fblackburn1 / node-red-contrib-hubitat

MIT License
18 stars 4 forks source link

Device node pointing to hubitat virtual thermostat does not fire when attributes change in Hubitat #126

Closed robacarp closed 2 years ago

robacarp commented 2 years ago

I have a virtual thermostat device created from Hubitat. When I change the parameters in the hubitat portal, the device nodes in node-red do not update, nor do they fire events. Even when triggered by a Timestamp node "press," the data attribute does not change. When I restart or re-deploy the nodes, the current value is reflected in the status icon.

I can't be sure if I'm doing something wrong or not, but the other device nodes on the same Flow behave as expected. Is there some weakness within Hubitat for webhook events on virtual devices?

fblackburn1 commented 2 years ago

I don't have issue with the quick test I made

Be sure:

Otherwise, you can ask help on https://community.hubitat.com/t/node-red-nodes-for-hubitat/34386 People are more reactive than me :sweat_smile:

robacarp commented 2 years ago

I spent a bunch of time debugging this and it magically started working. I was able to verify that the app had permissions, the server was selected correctly, and that other devices are receiving events.

I noticed a difference in my test routine compared to yours. I was using the Set Heating Setpoint and Set Thermostat Setpoint controls and not the Set Temperature control.

I started up a socat server and added a maker-api instance, and was able to see the events. I restarted node-red and was able to reproduce the bug with log_level set to debug, and then I started editing the javascript in teh downloaded node_modules folder and restarting node_red and it magically started working. All I'd done was add some print statements to get some bearings.

No idea what happened, but perhaps it was a cache ghost or a simple error on my end or something. Thank you for looking, sorry to waste your time.