Closed plouj closed 6 years ago
This may be fixed in latest - there were some improvements to handling reconnection when Elk is not reachable in Gwww lib, and I only just today updated the requirements to use that version.
I'll try to test this tomorrow to see if I can reproduce the problem on the old version / test if it's fixed on the new version.
This should be fixed in elkm1 lib (quite a while ago actually). Without a elkm1 lib version it is hard to tell. I suggest closing this and deal with it again if we see it.
I have just tested this as fixed (as far as crashing / etc) for both rebooting M1 and also the M1XEP, at least as of the current commit on master
. As such, I am closing this issue.
However, if the M1XEP goes away the TCP connection may not die immediately (after 5 minutes I gave up waiting and toggled an output to force reconnect) until HASS tries to send a message to Elk at which point it will reconnect, but until that happens HASS will miss any state changes in Elk at the time they're occurring because it's no longer really connected. I created #26 to track this.
A TCP connection with that's idle (e.g., has no unacknowledged data in flight) has no means of detecting if the far end disappears, unless you probe the connection. Some TCP stacks have a "KEEPALIVE" option (which is really "MAKE DEAD") to probe idle connections to discover missing peers. I know that the BSD and Linux stacks can do this; don't know if the default state is on, and what the probe interval might be.
I've seen this failure myself, as I've stupidly not got my M1XEP plugged into a UPS powered outlet, and I miss events that are generated. Had I know the reconnect thing works well, I'd poke at it to provoke that rather than restarting HASS. Of course, this usually only happens when I'm traveling away..
I can use the XK message as a heartbeat. Should be able to get to that tomorrow.
/g
On Tue, 28 Aug 2018 at 20:16, Louis Mamakos notifications@github.com wrote:
A TCP connection with that's idle (e.g., has no unacknowledged data in flight) has no means of detecting if the far end disappears, unless you probe the connection. Some TCP stacks have a "KEEPALIVE" option (which is really "MAKE DEAD") to probe idle connections to discover missing peers. I know that the BSD and Linux stacks can do this; don't know if the default state is on, and what the probe interval might be.
I've seen this failure myself, as I've stupidly not got my M1XEP plugged into a UPS powered outlet, and I miss events that are generated. Had I know the reconnect thing works well, I'd poke at it to provoke that rather than restarting HASS. Of course, this usually only happens when I'm traveling away..
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/BioSehnsucht/ha-elkm1/issues/13#issuecomment-416781488, or mute the thread https://github.com/notifications/unsubscribe-auth/AC6xoPgVortnn1Uh7GcRzyVYftkIRKgtks5uVd1sgaJpZM4U_yEU .
Crazy me. I pushed heartbeat code to github and new lib on PyPi. Only change to hass side of the code is requirement for 0.7.5 elkm1-lib.
I have it running on my prod Pi. We'll see how it does overnight.
On Tue, 28 Aug 2018 at 21:59, Glenn Waters gwwaters@gmail.com wrote:
I can use the XK message as a heartbeat. Should be able to get to that tomorrow.
/g
On Tue, 28 Aug 2018 at 20:16, Louis Mamakos notifications@github.com wrote:
A TCP connection with that's idle (e.g., has no unacknowledged data in flight) has no means of detecting if the far end disappears, unless you probe the connection. Some TCP stacks have a "KEEPALIVE" option (which is really "MAKE DEAD") to probe idle connections to discover missing peers. I know that the BSD and Linux stacks can do this; don't know if the default state is on, and what the probe interval might be.
I've seen this failure myself, as I've stupidly not got my M1XEP plugged into a UPS powered outlet, and I miss events that are generated. Had I know the reconnect thing works well, I'd poke at it to provoke that rather than restarting HASS. Of course, this usually only happens when I'm traveling away..
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/BioSehnsucht/ha-elkm1/issues/13#issuecomment-416781488, or mute the thread https://github.com/notifications/unsubscribe-auth/AC6xoPgVortnn1Uh7GcRzyVYftkIRKgtks5uVd1sgaJpZM4U_yEU .
I was playing around with the gwww-elkm1-lib branch (83f799e34165) and ran into this error when my m1 restarted:
A restart of HA fixed this for me, but until then the web UI wouldn't even load.