hollie/misterhouse — pull request #74 by krkeegan (2013-02-12 02:46:31+00:00)
Title: Add Support for ALDB_Delta

All Insteon Devices have an ALDB_Delta that increments every time its memory is changed. This branch uses the ALDB_Delta value to determine whether any changes have been made to the device since MH last inspected the device.

This branch uses this information to do the following:
- Scan Changed Device Link Tables - Is a new Voice Command for the PLM. Similar to Scan all device link tables, it will make sure that MH has an accurate representation of the link tables on all of the devices. EXCEPT, if the ALDB_Delta has not changed since the last scan, MH will skip scanning the device, since there have been no changes. This makes complete scans incredibly fast, unless you have made significant changes to your network.

- MH Changes are Verified - Any change to a device link table by MH is verified and then the resulting new ADLB_Delta is stored. This covers any Add, Delete, or Update of the links. As a result, adding a link to a device with 20 links will not require MH to rescan the entire device.

- Changes Cannot be Made to a Changed Device - If MH detects that a device has changed, it will not allow you to alter the device until the device is scanned. Otherwise MH may overwrite a link by accident or may have an incorrect representation of the link table.

Caveats:
- Unplugging a device will result in the ALDB_Delta resetting to 00 which will cause MH to view it as out-of-sync. Thus requiring a rescan.
- Making manual changes will force a complete rescan of that device as well.
- Running scan links on a specific device will always force a full scan of that device.

My experiences with this have been very good so far.

I am waiting to merge the branch until it is merged with i2cs support, which will require making some changes to I2CS.