Closed thiete closed 3 years ago
I should note, I am using homebridge v1.3.0-beta.24
Is it that you are using strict boolean comparisons:if (event.status === true && event.value !== undefined)
while the events contain an integer "status": 1
, which evaluates as false?
EDIT: Changing to if (event.status == true && event.value !== undefined)
makes switch-on events fire but switch-off events still do not fire :) It seems like node-red-hb-automation expects the 'status' to be true if the status request was successfully completed, while it seems currently "status" == "value" == the state of the switch?
Tks for discovering this issue.
Under the covers I had made a change to hap-node-client to have status
be the connectivity status of the device. But for some reason that is missing, give me a couple of hours to fix things.
If you update to the latest, it should be good. When I promoted the change, I had missed including the newer version of hap-node-client, and this version includes that as a dependancy
The working version is v0.0.77
Yep, seems to be fine now! Thank you!
Updating from 0.0.73 to 0.0.76 breaks my Event nodes. I'm pretty sure the breaking change is related to commit 30c5c07642fb258f7a8df87fb31a8e1f281cdc89.
The Event node still registers the event - it shows a red status dot below the node with a " Disconnected: 0" or "Disconnected: 1" status text, where the previous version shows a green dot with {"On": 0} or {"On": 1}. The new version does not emit an actual node-red message. Here are two log snippets for events firing:
0.0.73:
0.0.76:
And some debug logs where I started node-red with the two versions of the plugin, and then toggled my "Clean Living Room" switch several times: Node-RED_0073.log Node-RED_0076.log