QuailAutomation / openhab2-addons

The next-generation open Home Automation Bus (openHAB)
Eclipse Public License 2.0
8 stars 7 forks source link

[isy] support node add/rename/remove based on WS updates + scene link support #131

Closed HentschelT closed 6 years ago

HentschelT commented 6 years ago

Changes:

Structural changes to ISY (additions, removals, renames)

fix the ISY Web Socket Listener to listen to

and add/remove ISY devices to/from OHAB Inbox. Also, add a ISY REST scan each time the system starts up, and reconcile any changes to the device structure - this way the inbox can be updated. Existing devices are set to OFFLINE - GONE if the device is no longer part of the REST interface. If the Web Socket indicates a removed device/scene, remove from inbox if present - if the ISY device/scene/variable is already added as thing, then set status to OFFLINE - GONE.

Scene updates from ISY

The original ISY binding discovered ISY scenes, and let users change the state. However, any state changes from the "real world" were not reflected into the binding. This PR fixes that based on the premise that if any linked device is != 0, the scene is ON, if all linked devices are 0, then the scene is OFF

ISY devices/scenes need a verified update from ISY before going ONLINE

Currently, any ISY devices that are added to the config are set ONLINE regardless of communication status (or if the device is still around). If the device is not communicating with the ISY (or defective), the binding status of the device now reflects that.

HentschelT commented 6 years ago

moved over to isy-binding branch per craig's request