NRCHKB / node-red-contrib-homekit-bridged

Node-RED Contribution - HomeKit Bridged : Node-RED nodes to simulate Apple HomeKit devices.
https://nrchkb.github.io
MIT License
412 stars 52 forks source link

[Help needed]: Can a NRCHKB thermostat report active as state? #484

Closed houser42 closed 2 years ago

houser42 commented 2 years ago

The question is the title: Can a NRCHKB thermostat report its state as a payload ? I would very much like that state for automations if at all possible. As far as I can tell it currently only reports Current Heating Cooling State: 0,1,2 on the output when heat is requested or off. Which is not exactly what I need. What I want is the equivalent of the orange dot in the Home app to tell us if the thermostat is active. Any hints much appreciated. Or clever workarounds ;)

TheNON75 commented 2 years ago

Hi @houser42,

Which orange dot do you mean? The on in the upper left corner when there is a heating reported by the device to the NRCHKB node?

That dot is orange if you set the Thermostate in home app to heat (target state) and the physical device reports back it is heating (current state).

But, even if the Thermostate in home app if turned off can happen the physical device is actively heating and it is reflected in the home app with "heating" while the dot is grey.

Anyhow, for sure you can catch the appropriate payload and turn it to something else that you need in your flows, just explain a little more precisely what do you need ;)

Ps.: the thermostat reports TargetHeatingCoolingState as part of the standard operation, unless you've enabled pass through or inspecting allChars property of the msg

You may join our discord server too, where we can provide more interactive help and guidance

houser42 commented 2 years ago

Hello @TheNON75 and thanks for your reply. I meant the bigger orange dot in the middle when you actually edit the thermostat in the home app on iOS/MacOS that just says it is active. Not Current Heating Cooling State: 0,1,2 that is analog to the smaller orange dots on the icons in the home app. Many thanks.

TheNON75 commented 2 years ago

Sorry, as said above the thermostat sends only the TargetHeatingCoolingState This represents off, heat, cool and auto modes. This is expected to be sent to your thermostat to take the necessary state change. If it cannot handle that directly, you have to set up a function or change node yourself to produce the needed payload

The current state shall come from the thermostat back to NRCHKB node to represent what the thermostat is doing.

Have you checked already our documentation?

https://nrchkb.github.io/wiki/service/thermostat/

Please consider joining our discord server

caitken-com commented 2 years ago

@houser42 another accessory similar to Thermostat is HeaterCooler. It has an Active characteristic. https://nrchkb.github.io/wiki/service/heater-cooler/

houser42 commented 2 years ago

Just wanted to add that this is possible in thermostat also, using "TargetHeatingCoolingState" as the state, rather than "CurrentHeatingCoolingState" I guess this thread can be closed AFAIK. Many thanks!

TheNON75 commented 2 years ago

"target" something is always what you want to achieve. This should be then sent to the accessory and the accessory is expected to report back its "current" something based on which homekit will calculate a kind of "in progress" status, like:

glad it works

houser42 commented 2 years ago

Thanks. Yes, this was a tad counter-intuitive to me for my needs and I could not get the heater/cooler to do what I want. In my tests and in my context the "current" does not do what I want but the "target" does, as I want HK to report to NR not only that the thermostat is heating/cooling, but actually when it is inactive. Yes, happy it is working also..;)