excaliburpartners / OmniLinkBridge

MQTT bridge, web service API, time sync, and logging for HAI/Leviton OmniPro II controllers
GNU General Public License v3.0
41 stars 24 forks source link

How to handle "A status update containing a temperature of 0 is ignored" #46

Closed yarafie closed 2 years ago

yarafie commented 2 years ago

Hello first thanks for this app it actually is what I was looking for to better utilize my Ominipro2 as part of the Home Assistant platform.

I have it running with mosquitto and utilizing Home Assistant and it works perfectly.

I noticed in the Readme it states:

"A status update containing a temperature of 0 is ignored This can occur when a ZigBee thermostat has lost communication"

The above is correct as i do have a case when my AC breaker trips due to whatever reason obviously the Omnipro2 Thermostat (hardwired to the Omnipro2) is completly off and i think Omnilink-bridge ignores the reading as per log below.

2022-08-02 08:45:30 [OmniLinkBridge.Modules.OmniLinkII WRN] Ignoring unknown temp for Thermostat Womens Room

How can i detect this situation and have it not ignored or report it as failure so that Home Assistant reports it as so. Currently Home Assisant just keeps reporting the last status of Thermostat before the failure sometimes or 0deg temp which appears as if everything is ok.

rwagoner commented 2 years ago

I've added support for a separate offline / online status for each thermostat, which is published to omnilink/thermostatX/status when a temperature of 0 is received. Additionally the Home Assistant MQTT climate discovery has been updated so the thermostat will show Unavailable when it or the controller is offline. These changes are available in the dev branch and docker tag. Please let me know if it works as expected. Thanks!