Open alandtse opened 7 years ago
The RFUtils.py file was really a quick-and-dirty method of capturing the data on a Raspberry Pi, and is just meant to test SimpliSafe.py. Feel free to improve if you feel it is necessary.
The last error is interesting, as I assumed all messages started with CC05
, which I assumed to be some sort of "vendor code". I could be wrong on this, as the rest of the message looks correct, so let me know if it is repeatable. The first byte may have just been corrupted, in which case the error is valid. FYI, that message has the following characteristics:
Vendor Code: 0xD405
PLC: 0x11 (2 bytes)
Serial: 19PTL
Origin Type: 0x4 (Motion Sensor)
Sequence: 0x7
Event Type: 0x02 (Motion)
Checksum: 0x76
When the signal is not fully received, both RFUtils.py and Simplisafe.py may occassionally generate errors that will kill the calling program. In this case I have created a small test program based off the readme:
Here are examples of crashes I have generated.
Ascii decode errors:
Int decode errors
I did note that there is code that will raise InvalidMessage errors that need to be caught by the calling program. I'm not sure if that is the mechanism that should be raised for the above errors or if it makes sense for the library to gracefully ignore those types of messages.