-
Notifications
You must be signed in to change notification settings - Fork 3
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
Connection fails after a timeout #82
Comments
Could be a coincidence, but I recently moved to running HA in a container. At first I found that there was no connection. I tried reinstalling/installing rebooting etc but no joy. For a while I thought that maybe there was an issue with it running in a container as my old HA on a 'pi connected without an issue. I then cast my mind way back when we were all trying to work out how to access the mysimplelink device and remembered it had issues with multiple devices connecting locally. I wondered if somehow the mysimplelink gateway was keeping the connection open for the old pi, even though it was powered off. Another more likely story is, as I do sometimes use the app on my 'phone, that was locking the gateway and for whatever reason when running HA in a container the script struggles to reconnect. Perhaps it's simply too fast now - compiling an Esphome device now takes 30 seconds rather than the ten minutes it was taking on the 'pi 3B+. Anyhow I power cycled the gateway to ensure nothing was using it, and restarted the container, and (sound of magic tinkling) the thermostat started working. I'll keep an eye on it for now, and at least I now how to get things working again. My suggestion would be to keep in mind, if you are using the native Rinnai Touch app as well, that it blocks this script unless you are connecting via the cloud. |
The gateway/device can only keep a single local connection. Therefore, it's best to connect the home assistant integration first and "hog" that connection. The app will then just use the cloud connection automatically. |
Hi,
Sorry to raise another issue, because the code is much more stable, but I have seen this issue twice now (first time I was too optimistic and removed debugs). With debugs on, it seems that for some reason the connection to the device times out and then never recovers.
I don't know whether the time out is due to a transient event or is the cause, because using nmap now, the port is closed on the rinnai device to my hass container. I am suspicious that if the timeout is transient, the repeated and fast re-connect attempts could trigger the device to block or even just confuse their code :)
Also noting the 'Bad file descriptor' error in the first part of the reconnect makes me wonder if the way in which the timeout is processed might need a tweak? (as always happy even to dig into the code a little if you want or add some debugs/wait for it to occur again)
The text was updated successfully, but these errors were encountered: