Insteon fails eventually

Wondering if someone can help me out with this. I’m having problems with my Insteon integration failing after a few hours. Usually fixes upon HA restart.

Of note, I was initially using a Raspberry Pi 3 but restored snapshot to a VirtualBox on an iMac. Since I have 91 entities (and will be adding more), I would really like to keep my existing config. That said, an unreliable system is useless so if that’s the problem, I certainly would start over.

Core version: core-2021.4.4
Supervisor: supervisor-2021.04.0
Operating System: Home Assistant OS 5.13
Recorder: MariaDB

Here are some of the errors on from the log:

2021-04-18 04:12:39 ERROR (MainThread) [pyinsteon.protocol.http_reader_writer] An client error occurred: Cannot connect to host 192.168.1.120:25105 ssl:default [Connect call failed ('192.168.1.120', 25105)]
2021-04-18 04:12:39 ERROR (MainThread) [homeassistant.components.insteon] Could not connect to Insteon modem
2021-04-18 04:14:06 ERROR (MainThread) [pyinsteon.utils] An issue occured distributing the following message
2021-04-18 04:14:06 ERROR (MainThread) [pyinsteon.utils] MSG: 0250546d41000001c71101
2021-04-18 04:14:06 ERROR (MainThread) [pyinsteon.utils] Topic: 546d41.1.on.all_link_broadcast data: {'cmd1': 17, 'cmd2': 1, 'target': 000001, 'user_data': None, 'hops_left': 1}
2021-04-18 04:14:06 ERROR (MainThread) [pyinsteon.utils] Error: 'NoneType' object has no attribute 'aldb'
2021-04-18 04:14:06 ERROR (MainThread) [pyinsteon.utils] Subscriber: OnLevelInbound.handle_command
2021-04-18 04:14:07 ERROR (MainThread) [pyinsteon.utils] An issue occured distributing the following message
2021-04-18 04:14:07 ERROR (MainThread) [pyinsteon.utils] MSG: 0250546d41000001c71101
2021-04-18 04:14:07 ERROR (MainThread) [pyinsteon.utils] Topic: 546d41.1.on.all_link_broadcast data: {'cmd1': 17, 'cmd2': 1, 'target': 000001, 'user_data': None, 'hops_left': 1}
2021-04-18 04:14:07 ERROR (MainThread) [pyinsteon.utils] Error: 'NoneType' object has no attribute 'aldb'
2021-04-18 04:14:07 ERROR (MainThread) [pyinsteon.utils] Subscriber: OnLevelInbound.handle_command

I am using an Insteon 2245-222. Even when I get these errors, I am able to use the Insteon app and switches without problems.

Would using an ISY994i with Insteon PLM be a more reliable integration?

I read this:

I appreciate any help!

.
.
.
.
.
.
More info on the above errors:

Logger: pyinsteon.protocol.http_reader_writer
Source: /usr/local/lib/python3.8/site-packages/pyinsteon/protocol/http_reader_writer.py:58
First occurred: April 17, 2021, 7:57:38 PM (144 occurrences)
Last logged: 4:12:39 AM

An client error occurred: Cannot connect to host 192.168.1.120:25105 ssl:default [Connect call failed ('192.168.1.120', 25105)]
Logger: homeassistant.components.insteon
Source: components/insteon/__init__.py:96
Integration: Insteon (documentation, issues)
First occurred: April 17, 2021, 7:57:38 PM (144 occurrences)
Last logged: 4:12:39 AM

Could not connect to Insteon modem
Logger: pyinsteon.utils
Source: /usr/local/lib/python3.8/site-packages/pyinsteon/utils.py:245
First occurred: 4:14:06 AM (2 occurrences)
Last logged: 4:14:07 AM

An issue occured distributing the following message
Logger: pyinsteon.utils
Source: /usr/local/lib/python3.8/site-packages/pyinsteon/utils.py:246
First occurred: 4:14:06 AM (2 occurrences)
Last logged: 4:14:07 AM

MSG: 0250546d41000001c71101
Logger: pyinsteon.utils
Source: /usr/local/lib/python3.8/site-packages/pyinsteon/utils.py:247
First occurred: 4:14:06 AM (2 occurrences)
Last logged: 4:14:07 AM

Topic: 546d41.1.on.all_link_broadcast data: {'cmd1': 17, 'cmd2': 1, 'target': 000001, 'user_data': None, 'hops_left': 1}
Logger: pyinsteon.utils
Source: /usr/local/lib/python3.8/site-packages/pyinsteon/utils.py:248
First occurred: 4:14:06 AM (2 occurrences)
Last logged: 4:14:07 AM

Error: 'NoneType' object has no attribute 'aldb'
Logger: pyinsteon.utils
Source: /usr/local/lib/python3.8/site-packages/pyinsteon/utils.py:255
First occurred: 4:14:06 AM (2 occurrences)
Last logged: 4:14:07 AM

Subscriber: OnLevelInbound.handle_command

Hi, I have the exact same problem and I’ve asked for help too a few days ago. Have not found a fix yet. I have been looking for a solution for weeks now. I hope we will find one.

I found out that either you restart the hub or home assistant, the connection is reestablished. But as you said, an unreliable system is pointless. I’ve set up an automation for a daily reboot, but even with that, sometimes it just fails after a few hours, other times it fails after a week. I can’t find where the issue is…

I’m sorry that you’re in the same boat, but it’s good to have some voice behind this problem. I’m expecting a NUC today and will move HomeAssistant on there. I suspect that the iMac I currently run HA on may have connectivity issues.

May I ask what you’re specs look like? Similarities may help us narrow down the issue (if it isn’t with the pyinsteon itself).

My next step will be to buy an ISY994i if there’s no progress

Hi Gordon

I don’t think your iMac is the issue as I am running HA on a stable version on my Linux Debian server. I was also considering moving to an ISY but I can’t stand the fact that I would have to recreate all my lighting scenes and have to pay a few hundreds dollars as well for something that I already own… I also have dozens of Insteon devices so I am not considering to move to another brand…

Please keep me informed of your development. I found a thread where someone was trying to downgrade to a previous version of Insteon component using a custom component. I might give a try this week end, but it looks like the issue is not exactly the same as ours. Like they were using a modem instead of a hub like I do and I think you do as well. Anyway, here is the thread.

regards,

Hey, I wonder if it is a problem with pyinsteon? That little bit about ssl:default makes me think that pyinsteon is looking for a certificate, and the hub doesn’t present one, or vice versa. The only other issue I see on the pyinsteon page is the limitation for one concurrent connection to the hub. I’m curious if the connection from the Insteon iOS app(s) are interfering with the HA connection. Nothing I can validate so far. I’m hoping a patch to pyinsteon or the integration will fix it.

Hello CalfDamage.

It really makes sense your hypothesis about the SSL certificate. I wonder if there is a way to disable SSL for pyinsteon

pyinsteon does not use https or look for an SSL cert since the Hub does not use any cert.

Then I wonder where is this error coming from and why HA is looking to establish an SSL connection…

Cannot connect to host 192.168.1.120:25105 ssl:default [Connect call failed (‘192.168.1.120’, 25105)]
2021-04-18 04:12:39 ERROR (MainThread) [homeassistant.components.insteon] Could not connect to Insteon modem