Open devMarcus opened 2 years ago
The integration should definitely attempt to reconnect. The question is why it isn’t. Debug logs would be helpful here to trace the issue.
I do see connection errors and have restarted the machine that Homeseer is on and not sure that I clearly see reconnection attempts on Home Assistant.
Ok, something funky is going on and I will spend more time tracing the issue including network sniffer between the machines to get us more information. The good news for both of us here is that I am well versed at doing this sort of a thing. Just a little new to Home Assistant, but have used HomeSeer since 1999.
I have a funeral to go to and probably will not have opportunity to spend more time on this until Sunday night or Monday. Thanks for reaching out. Do appreciate that.
Sent from my iPad
On Jan 6, 2022, at 2:56 PM, Mark Coombes @.***> wrote:
The integration should definitely attempt to reconnect. The question is why it isn’t. Debug logs would be helpful here to trace the issue.
— Reply to this email directly, view it on GitHubhttps://github.com/marthoc/homeseer/issues/70#issuecomment-1006928917, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARBHCMGXL42VHFRC3K26UQTUUX6YFANCNFSM5LNFGSGQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>
@devMarcus sorry to hear you’re attending a funeral, best wishes on that.
You shouldn’t have to set up a network sniffer. It’s likely the telnet connection to HomeSeer that is failing here, and debug logs will let me see why the reconnection is failing. I refactored the whole telnet listener last year and it’s definitely possible I missed a case where reconnection should occur. If you look at the bottom of the README, it will show you how to obtain the logs I need. Enable that logging, then start HA, then reset HS and we should see the debug trail of the disconnection/reconnection attempts. Thanks for helping!
Ok, this is just silly. I have added the logger section, and checked configuration before restarting HA and getting the following error:
Invalid config for [logger]: [custom_components.homeseer] is an invalid option for [logger]. Check: logger->logger->custom_components.homeseer. (See /config/configuration.yaml, line 20).
Any thoughts? Configuration.yaml is as follows – Thanks!!!: logger: default: critical custom_components.homeseer: debug libhomeseer: debug
@.***
From: Mark Coombes @.> Sent: Friday, January 7, 2022 8:50 AM To: marthoc/homeseer @.> Cc: Marcus Krumpholz @.>; Mention @.> Subject: Re: [marthoc/homeseer] Devices Unavailable… (Issue #70)
@devMarcushttps://github.com/devMarcus sorry to hear you’re attending a funeral, best wishes on that.
You shouldn’t have to set up a network sniffer. It’s likely the telnet connection to HomeSeer that is failing here, and debug logs will let me see why the reconnection is failing. I refactored the whole telnet listener last year and it’s definitely possible I missed a case where reconnection should occur. If you look at the bottom of the README, it will show you how to obtain the logs I need. Enable that logging, then start HA, then reset HS and we should see the debug trail of the disconnection/reconnection attempts. Thanks for helping!
— Reply to this email directly, view it on GitHubhttps://github.com/marthoc/homeseer/issues/70#issuecomment-1007465761, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARBHCMBJ3PPZ7277KTLX3FTUU34PXANCNFSM5LNFGSGQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.***>
Never mind. This seems to do what we want:
logger: default: critical logs: custom_components.homeseer: debug libhomeseer: debug
Playing around. Will reply when I have tested.
From: Marcus Krumpholz Sent: Monday, January 10, 2022 12:02 AM To: marthoc/homeseer @.>; marthoc/homeseer @.> Cc: Mention @.***> Subject: RE: [marthoc/homeseer] Devices Unavailable… (Issue #70)
Ok, this is just silly. I have added the logger section, and checked configuration before restarting HA and getting the following error:
Invalid config for [logger]: [custom_components.homeseer] is an invalid option for [logger]. Check: logger->logger->custom_components.homeseer. (See /config/configuration.yaml, line 20).
Any thoughts? Configuration.yaml is as follows – Thanks!!!: logger: default: critical custom_components.homeseer: debug libhomeseer: debug
@.***
From: Mark Coombes @.**@.>> Sent: Friday, January 7, 2022 8:50 AM To: marthoc/homeseer @.**@.>> Cc: Marcus Krumpholz @.**@.>>; Mention @.**@.>> Subject: Re: [marthoc/homeseer] Devices Unavailable… (Issue #70)
@devMarcushttps://github.com/devMarcus sorry to hear you’re attending a funeral, best wishes on that.
You shouldn’t have to set up a network sniffer. It’s likely the telnet connection to HomeSeer that is failing here, and debug logs will let me see why the reconnection is failing. I refactored the whole telnet listener last year and it’s definitely possible I missed a case where reconnection should occur. If you look at the bottom of the README, it will show you how to obtain the logs I need. Enable that logging, then start HA, then reset HS and we should see the debug trail of the disconnection/reconnection attempts. Thanks for helping!
— Reply to this email directly, view it on GitHubhttps://github.com/marthoc/homeseer/issues/70#issuecomment-1007465761, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARBHCMBJ3PPZ7277KTLX3FTUU34PXANCNFSM5LNFGSGQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.**@.>>
Ok, so I restarted HomeSeer and it reconnected after the HomeSeer reboot… The enclosed log shows that your code does attempt to reconnect at a interval. I will have to play around and attempt to recreate my issue. But, I do see that the code attempts reconnection. Thank you for the Home Assistant debug log education.
2022-01-10 00:29:20 DEBUG (MainThread) [libhomeseer.devices] Updating data for System UltraM1G3 Plugin Ethernet Connection (584) 2022-01-10 00:29:21 ERROR (MainThread) [libhomeseer.listener] ASCII listener error from connection to 10.1.3.210:11000: [Errno 104] Connection reset by peer 2022-01-10 00:29:21 DEBUG (MainThread) [libhomeseer.listener] Closing ASCII listener at 10.1.3.210:11000 2022-01-10 00:29:21 DEBUG (MainThread) [libhomeseer.homeseer] Setting availability for 10.1.3.210 to False 2022-01-10 00:29:21 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:29:21 DEBUG (MainThread) [libhomeseer.listener] Cancelling ping task for ASCII connection at 10.1.3.210:10.1.3.210 2022-01-10 00:29:31 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:29:31 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:29:41 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:29:41 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:29:51 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:29:51 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:30:01 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:30:01 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:30:11 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:30:11 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:31:26 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:31:26 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:31:36 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:31:36 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:31:46 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:31:46 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:31:56 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:31:56 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:32:06 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:32:06 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:32:16 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:32:16 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:32:26 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:32:26 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:32:36 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:32:36 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:32:46 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:32:46 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:32:56 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:32:56 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:33:06 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:33:06 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:33:16 ERROR (MainThread) [libhomeseer.listener] Error opening connection to HomeSeer ASCII at 10.1.3.210:11000: [Errno 111] Connect call failed ('10.1.3.210', 11000) 2022-01-10 00:33:16 INFO (MainThread) [libhomeseer.listener] Attempting to connect ASCII listener to 10.1.3.210:11000 in 10 seconds 2022-01-10 00:33:26 INFO (MainThread) [libhomeseer.listener] Successful connection to HomeSeer ASCII at 10.1.3.210:11000 2022-01-10 00:33:26 DEBUG (MainThread) [libhomeseer.listener] Logging in to HomeSeer ASCII connection at 10.1.3.210:11000 2022-01-10 00:33:26 DEBUG (MainThread) [libhomeseer.listener] Successful login to HomeSeer ASCII at 10.1.3.210:11000 2022-01-10 00:33:26 DEBUG (MainThread) [libhomeseer.homeseer] Refreshing devices for 10.1.3.210 and setting availability to True
From: Marcus Krumpholz Sent: Monday, January 10, 2022 12:24 AM To: marthoc/homeseer @.>; marthoc/homeseer @.> Cc: Mention @.***> Subject: RE: [marthoc/homeseer] Devices Unavailable… (Issue #70)
Never mind. This seems to do what we want:
logger: default: critical logs: custom_components.homeseer: debug libhomeseer: debug
Playing around. Will reply when I have tested.
From: Marcus Krumpholz Sent: Monday, January 10, 2022 12:02 AM To: marthoc/homeseer @.**@.>>; marthoc/homeseer @.**@.>> Cc: Mention @.**@.>> Subject: RE: [marthoc/homeseer] Devices Unavailable… (Issue #70)
Ok, this is just silly. I have added the logger section, and checked configuration before restarting HA and getting the following error:
Invalid config for [logger]: [custom_components.homeseer] is an invalid option for [logger]. Check: logger->logger->custom_components.homeseer. (See /config/configuration.yaml, line 20).
Any thoughts? Configuration.yaml is as follows – Thanks!!!: logger: default: critical custom_components.homeseer: debug libhomeseer: debug
@.***
From: Mark Coombes @.**@.>> Sent: Friday, January 7, 2022 8:50 AM To: marthoc/homeseer @.**@.>> Cc: Marcus Krumpholz @.**@.>>; Mention @.**@.>> Subject: Re: [marthoc/homeseer] Devices Unavailable… (Issue #70)
@devMarcushttps://github.com/devMarcus sorry to hear you’re attending a funeral, best wishes on that.
You shouldn’t have to set up a network sniffer. It’s likely the telnet connection to HomeSeer that is failing here, and debug logs will let me see why the reconnection is failing. I refactored the whole telnet listener last year and it’s definitely possible I missed a case where reconnection should occur. If you look at the bottom of the README, it will show you how to obtain the logs I need. Enable that logging, then start HA, then reset HS and we should see the debug trail of the disconnection/reconnection attempts. Thanks for helping!
— Reply to this email directly, view it on GitHubhttps://github.com/marthoc/homeseer/issues/70#issuecomment-1007465761, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARBHCMBJ3PPZ7277KTLX3FTUU34PXANCNFSM5LNFGSGQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.**@.>>
I have noticed that HomeSeer integrated devices are sometimes marked as unavailable. I presume this occurs after I restart HomeSeer without restart Home Assistant.
Does this integration, or HA itself, not attempt to reconnect if the TCP session between Home Assistant to HomeSeer is broken for one reason or another?