-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
D2CND Gas boiler becomes unavailable after aprox. 2 days #53
Comments
This is weird that the device becomes unresponsive. At the moment you can't configure pull times for individual sensors. What you could do is to go UPDATE_INTERVAL_SECONDS = 2 Keep in mind if you re-download or upgrade to new release, your modifications will be overwritten and you will have to change again. |
I've changed it to 10 seconds. We'll know in 2 days if it made a difference. 🤞😊 |
The change to 10 seconds helped. The gateway didn't become unavailable anymore. |
Changing the update interval didn't help in the long run. |
The Onecta app connects directly to the cloud, and the gateway provides data to the cloud at its own discretion. On the other hand, the integration connects directly to the gateway on a regular basis. I can only speculate that the problem might be due to poor connectivity, and perhaps the gateway fails to handle abrupt disconnects properly, resulting in a crash on the gateway side. The gateway can only handle one open websocket connection, so there may be a bug in the gateway that prevents it from cleaning up the "broken" connection and responding to the future requests. Maybe even a memory leak. However, this is just a tentative theory, and I am not certain whether anything can be done to prevent this behavior, as it is not related to the integration itself. Impossible to know if things will go wrong in the middle of the "conversation". Maybe it is worth contacting daikin and report that their gateway might break if the connection is not good. It may be possible to make some changes to the integration by stopping regular data polling and instead making a service call to request updates. With this approach, using combination of automations, for example before pulling updates, you can ping the device and check if the reply is "good," then request an update. This way, you can control when you want to refresh the settings, but of course the downside of this is that you might see some lag in HA. This also does not guarantee that connection would not be terminated in the middle of the data pulling. Alternatively, you could explore a Raspberry Pi solution, where the Raspberry Pi would act as a proxy server connected to the same network. However, this would be a different story and beyond the scope of the integration. |
I managed to run a temporary network cable between the router and the Daikin gateway and after a bit more than a week the gateway became unavailable again. I guess it is a bug in the gateway and it can't handle the amount of traffic generated by the websocket. |
Good luck with Daikin 😄 . I guess other approach could be to disable polling and implement HA service to pull limited data out from the gateway. In that case you could just control whenever you want to pull data with HA and refresh like every minute. Worst case plug some zigbee relay so HA could just turn it off and on again if it detects that device became unavailable. |
Apparently the Asus RT-AX88U Router was causing the issues (even after a factory reset). After replacing it with a RT-AX88U Pro it didn't go offline anymore, still replies to ping and I can controll it with Onecta, but in the integration appears unavailable after a while.
I've also contacted Daikin but didn't get a reply yet.😁 |
The issue with the integration not loading while the gateway was pingable, was caused by the running Add-on https://github.com/jaakla/home-assistant-addons/tree/main/daikin, even though I can't remember starting it or setting it to auto-start. 😁 I'll monitor the status and let you know. |
This router issue is interesting indeed. I'd suggest reaching out to Asus directly as it appears to be a potential bug with the router firmware. In addition, it seems that the addon is likely keeping open connection. I've noticed that the gateway accepts only one active connection. Consequently, if one process is already connected, no other process can connect. For this reason, I've added some additional code to ensure that connection is closed when data isn't being pulled. |
The connection is stable for almost a month now. |
Hi @tadasdanielius,
Whenever I enable this integration my D2CND Gas boiler becomes unavailable after aprox. 2 days.
The DRGATEWAYAA won't reply to pings and I'd have to power cycle the boiler to get it working.
Could this happen because the integration pulls data from the gateway every 5 seconds?
Would it be possible to adjust the polling times for various sensors?
Thanks in advance for your help.
The text was updated successfully, but these errors were encountered: