-
Notifications
You must be signed in to change notification settings - Fork 29
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
Device does not become unavailable when connection is failed. #144
Comments
Sorry for the slow response here! You're right, it does make make sense to make it unavailable. I'll try to work out a way to accomplish that without unintended side-effects. My biggest concern is making sure we're able to reliably toggle the availability state. We have a few possible things we can use, like persistent MQTT connections and message intervals. I think we can even use ICMP pings with the fan devices if we need to! I do need to temper expectations just a bit though. I'm going to approach this with caution since there's less certainty with our connection scheme that in other common home automation setups. For Z-Wave, and Zigbee (and maybe Matter?) devices, connection status is a part of the protocol and immediately available. But we're piggybacking on TCP/IP since Dyosn devices are simple Wi-Fi devices. While it's really nice that we get a direct connection to the devices so we don't need the cloud, we also don't get native visibility on network connectivity. MQTT should. give us a really strong approximation though! For now I'll check into using connect/disconnect callbacks to handle the state change. |
Thanks for getting back, I understand what you are trying to achieve is find a reliable way to continuously monitor the online status of the device and reflect that in the HA status. But what I was asking was simple to update the HA status whenever you have error such as the “DysonNotConnected” exception above ? Or is it not an appropriate way how the availability status should be updated ? Thanks again for looking into this. |
The thing is we need to be able to mark it available again when connectivity is restored. |
I have a fan which appeared to be normal as I could use the remote to turn it on / off, as well as showing as a normal device in HA. However, I noticed I was getting the following error message in HA while I had no idea what it was:
and then when I tried to turn my fan on, I got the following error and was unable to turn off the fan via HA:
And at this moment, I finally realized the fan may have trouble connecting to the wifi so I turned off the fan at the socket, waited a few minutes, and then turn the socket back on. The fan successfully connected to the wifi and is working in HA again and there is no more error messages.
So in this case shouldn't the device become unavailable in HA with a more meaningful error message in the HA log?
Thanks.
The text was updated successfully, but these errors were encountered: