fjhorrillo / homebridge-airzone-cloud

Homebridge Airzone Cloud
Apache License 2.0
22 stars 3 forks source link

Temperature reading stops working after a while #17

Closed morph208 closed 2 years ago

morph208 commented 2 years ago

First of all, thank you for this plugin. Great work.

Describe The Bug: I have installed the plugin a couple of days ago and I noticed a few inconsistencies so I will try to explain them. First of all, I realized that the temperatures measured by my thermostats are not reflected in Apple’s Home app. Setting the temperature from there works, but the current temperatures are the ones when I start my Homebridge server and do not move afterwards. But I can access the actual temperatures from other apps (I have tried with Eve and Controller apps). After a while, I do not know if something triggers it or not, even Eve and Controller apps stopped updating the current temperatures. Setting a new temperature still works though.

To Reproduce: Sadly I am not sure at this point. I will try to observe if there is a particular event that put it in this state. It just occurs after a while. If I restart the homebridge server, all temperatures are correct again. I will try to make more tests and I will report anything I can find.

Expected behavior: It should always work, obviously.

Logs: The only weird thing I see in the logs is the following error: “Disconnect due to red disconnection” (written in red in the logs). It is always followed by “Websocket connected” right after (in the same second, or 1 or 2 seconds after at the most).

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.

Environment:

morph208 commented 2 years ago

I have enabled debug mode to see if I had more information. Here what I have at the first “red disconnection” occurrence:

[1/14/2022, 10:57:39 AM] [AirzoneCloud] Disconnect: "transport close"
[1/14/2022, 10:57:39 AM] [AirzoneCloud] Disconnect due to red disconnection
[1/14/2022, 10:57:41 AM] [AirzoneCloud] Websocket connected
[1/14/2022, 10:57:41 AM] [AirzoneCloud] [Websocket] ⬆️ ["clear_listeners"] 
fjhorrillo commented 2 years ago

Hello, please check it on v0.2.2

morph208 commented 2 years ago

Hello. I have upgraded. It works! Awesome. Thank you for your reactivity.

In the native HomeKit app all temperatures are rounded to 0.5 (probably not your fault) but in 3rd-party apps the accurate temperatures are visible and are updated. So your fix did the job. Thank you.

fjhorrillo commented 2 years ago

Thanks for the update and yes homekit requires round temperatures.