mstovenour/misterhouse — pull request #5 by krkeegan (2013-03-09 04:24:27+00:00)
Title: Add CRC16 Support with calculate_crc16

Insteon, in their infinite wisdom, has added yet another message validity check. This check is used only on specific extended length messages and is used instead of the i2cs checksum.

This new message validity test is a two byte CRC value appended to data 13 and data 14 positions of an extended message. This two byte CRC differs from the one byte checksum used in other extended commands. This CRC calculation is known to be used by the 2441TH Insteon Thermostat as well as the iMeter INSTEON device. It may be used by other devices in the future.

The two byte CRC is only used in some messages sent to and from these devices, but not all messages.

Also clean up debugging code accidentally left behind.