Closed RobHofmann closed 3 months ago
@toughvj we still have the connection dropping issue unfortunately.
As a matter of clarification: this component does not establish any permanent connection to the ac unit, so there is nothing to drop. Every specified time interval, defined by the SCAN_INTERVAL constant, the update() function is called to retrieve its current state from the device. The update() function calls the SyncState() function, which if it is unable to connect to the unit 3 times, makes the device unavailable until the next update() call. So as you can see, it's not a matter of a few seconds, but three minutes. I am sure that if you analyze the home-assistant.log file you will find the information: Could not connect with device 3 times. Set it as offline. We have 3 solutions: We do not change anything and the user must take care of the quality of the WiFi connection between the access point and the AC unit Or in the next release (where I plan to fix the v2 encryption bug) I can add one of 2 options: A variable that defines the number of connection attempts in the device configuration and let each user decide when the device should go into the unavailable state Or: A variable that allows you to disable switching to the unavailable state. In my opinion, this solution is the worst because the device is always listed as available and the user can make many attempts to change its settings without any effect.
Hmm I understand, and indeed the Could not connect with device 3 times. Set it as offline.
is displayed. However I think this is not due to my WiFi (I've got a serious WiFi setup with multiple Unifi U6 Enterprise & Unifi AP AC Pro AP's (which hangs a few meters away without any restrictions in between from one of the HVAC's).
My guess it that (at least some of) the HVAC's have shitty WiFi implementations. We must be able to handle these shitty WiFi implementations, so the first option you are suggesting is not an option.
I think we should implement both the 2nd & 3rd option actually. Preferably i'd test it with configurigurable options for retry's & timeouts. However I'm pretty sure that even that won't permanently fix it. So i'd need an option to check it on boot and after that no longer check the connection (and leave it as online) to avoid any unintended automations firing due to the Unavailable
status.
Let me know your thoughts.
Haha I'm using Unifi setup too ;) no problem, will be in next PR.
Added the logs from Home Assistant for the complete image.
Perhaps we should add an option to adjust the delay between connection attempts?
this will be solved in next PR
solved with PR #179, can be closed
Describe the bug We are having two connection issues currently:
Unavailable
(this issue will cover this); I have this issue on all three of my HVAC's. The HVAC's might not be 100% stable in connection (i dont know), but we need to make the checking more robust avoiding these status changes when connection drops for a few seconds.To Reproduce Steps to reproduce the behavior:
Configuration
Expected behavior No connection drops & stable statusses
Screenshots
Platform:
Additional context This issue occurs since 2.12. With 2.11 this issue is not present.
Logs