dave-code-ruiz / uhomeuponor

Custom Component to connect Home Assistant with Uhome Uponor Smatrix App
MIT License
19 stars 7 forks source link

Skip bogus values; when thermostats go offline #9

Closed LordMike closed 4 years ago

LordMike commented 4 years ago

I think my system lost contact with all thermostats for a while. In this picture, all thermostats go to 65535 *C, which iirc is the value of a non-existent thermostat.

Would it make sense to skip bogus values, and simply not report it? Or perhaps register an attribute for "present: yes" when values are fetched, and "present: no" when values are bogus?

image

jptuomi commented 4 years ago

Yes please! I mainly use this addon for monitoring temperatures over time and these values bork up the graphs. I’m not up to date on the HomeAssistant API but the way HomeAssistant behaves on other implementations is that if there is nothing to be reported it will just seem as the sensor / device isn’t there at that point in time.

Best regards Johan Tuomi

On 3 Feb 2020, at 22:03, Michael Bisbjerg notifications@github.com wrote:

I think my system lost contact with all thermostats for a while. In this picture, all thermostats go to 65535 *C, which iirc is the value of a non-existent thermostat.

Would it make sense to skip bogus values, and simply not report it? Or perhaps register an attribute for "present: yes" when values are fetched, and "present: no" when values are bogus?

https://user-images.githubusercontent.com/1027111/73690505-ccb86580-46d0-11ea-95aa-99a62f9793fe.png — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dave-code-ruiz/uhomeuponor/issues/9?email_source=notifications&email_token=AJWB4GOX7YG7PKMFESJJ2L3RBCBBRA5CNFSM4KPMAM4KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IKWXQ5Q, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWB4GN7PXC4M6QQWT5MJT3RBCBBRANCNFSM4KPMAM4A.

LordMike commented 4 years ago

Maybe the device should be reported as unavailable, when it misses updates?

If we set the state to unavailable, it looks like this:

image

dave-code-ruiz commented 4 years ago

I have the same bug in my thermostats, API have values "min_setpoint" and "max_setpoint", a try to develop option to limit values between max and min setpoint, but when i try to catch values "65535" my code not catch this, i do not know how to do it. Temporaly i access to sqlite3 database and delete this values.

LordMike commented 4 years ago

I'm working on a refactoring of the code to be able to split the API logic from the thermostat/climate/sensor logic. It should allow entirely skipping bogus values, and providing a state ala unavailable