Insteon Hub stops responding to HA after some time

Greetings HA folks,

I’m running HA 0.108.3 (after getting back to tinkering with it). I have a problem where HA and my Insteon Hub 2245 stop talking after an hour or two.

2020-04-05 21:06:00 ERROR (MainThread) [insteonplm] Reconnect to Hub (TimeoutError)e
2020-04-05 21:06:00 WARNING (MainThread) [insteonplm.plm] Lost connection to Insteon Modem: Truee

One remedy I’ve tried is re-starting HA, which does work. But about an hour or two the same lost connection message happens.

While looking through the HA logs, I also noticed several messages like the following:

e2020-03-29 18:36:49 WARNING (MainThread) [insteonplm.devices] Device 29.50.E1 did not respond to an ID requeste

None of the Insteon addresses are for devices that I have installed. Sadly, I know where they ARE installed: My Previous home.

Could these devices be causing me problems? My next question is how to remove them from the Hub? I’m sure a factory reset of the hub would work, but I don’t want to re-link 30+ devices to it.

I tried using insteonplm_interactive, but had no luck. I tried the del_all_link command like this:

insteonplm: del_all_link 1 2950e1
insteonplm: Starting the All-Linking process
Attempting to link the PLM to device 2950e1.
19 devices added to the All-Link Database

But the device apepars to remain in the Hub.

Interestingly, trying to use group 0 yields an error - looking at the code I can’t figure out why group 0 is an error:

insteonplm: del_all_link 0 2950e1
Group number not valid

I tried deleting th address from both group 0 and 1 because they were both listed in the hub’s aldb:

ALDB record: {'memory': 0x0001, 'inuse': 0x01, 'mode': R, 'highwater': 0x00, 'group': 0x01, 'address': 29.50.E1, 'data1': 0x00, 'data2': 0x00, 'data3': 0x00}
ALDB record: {'memory': 0x0000, 'inuse': 0x01, 'mode': C, 'highwater': 0x00, 'group': 0x00, 'address': 29.50.E1, 'data1': 0x03, 'data2': 0x42, 'data3': 0x43}

I would appreciate any help the HA community can offer.

Best regards,
John Bernstein

The old devices are not the connectivity issue. The current version of insteonplm does not have a great way to remove a device from the PLM as you stated in your post. Unfortunately, neither does the Hub app unless the device is physically present. Which is useless. You are looking at it correctly, the group numbers in the ALDB are the group numbers you would want to delete. The pyinsteon module can do this but it is a long explaination how and since it is not going to help your connectivity issue, this is likely not what you really care about.

Regarding the connectivity issue, I am not sure what to say. There was a log standing issue with connectivity from about version 0.95 until 0.106 or so but I thought those were resolved. Unfortunately this is not an issue that I can recreate. Can you tell me about your system?

O

@teharris1 Thank you for reading my post about my HA+Insteon problems! Your time is greatly appreciated. I’ve put together as many details about my system as I could think of. If there are additional bits of information you need, please let me know.

HA v0.108.3
Running on late 2012 Mac Mini
macOS 10.15.4 (19E287)
Hard wired ethernet connection
Python 3.8.2 (via MacPorts)

Insteon Hub 2245-222
Version 1019 (released April 7 2020, auto-installed)
Bin Version Hub2-V04-20140904
PLM Version A5
Hard wired ethernet conenction (with ferrite choke on the ethernet)
Directly AC wall connected, near several other hard wired Insteon devices (good RF proximity)
Hub has two scheduled scenes (one to turn on interrior lights at night, and one to turn off water heater)
Installed insteon devices consist of:

2x keypad dimmers 8-button
9x switchlinc dimmers
1x dual outlet on/off
6x switchlinc on/off

HA installed following instructions on https://www.home-assistant.io/docs/installation/macos/

HA configuration includes setting up my insteon hub (host, port, username, etc), and Homekit.

Homekit is started with a delay until after my known insteon devices are available.

Your install and config is pretty straight forward. Thanks for the info. The only piece I have no experience with is the Mac Mini. Hub connectivity issues occur when two connections try to access the local HTTP server built into the Hub at the same time or if an existing connection does not close. (The hub app does not try to access the local HTTP server so it is not the culprit). Do you have any other software running like OpenHab that may be trying to connect to the Hub at the same time? Also, in your HA logs, do you see any other http or aiohttp errors other than Insteon?

@teharris1, I don’t have any other software running that is accessing the Hub; only Home Assistant and the Hub’s iOS app access the Hub.

Yesterday early evening I shutdown HA, rebooted my hub, then restarted HA… then waited for the error to occur again. It took overnight until early this morning when it finally lost contact:

2020-04-19 21:20:48 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.keypad_dimmer_46_2c_be_main=off; insteon_address=46.2C.BE, insteon_group=1, friendly_name=Master Sconces, supported_features=1 @ 2020-04-19T21:20:48.264456-07:00>
2020-04-20 05:39:31 ERROR (MainThread) [insteonplm] Reconnect to Hub (TimeoutError)
2020-04-20 05:39:31 WARNING (MainThread) [insteonplm.plm] Lost connection to Insteon Modem: True
2020-04-20 06:56:25 DEBUG (MainThread) [homeassistant.components.insteon.insteon_entity] Received update for device 46.2C.BE group 7 value 1
2020-04-20 06:56:56 DEBUG (MainThread) [homeassistant.components.insteon.insteon_entity] Received update for device 46.2C.BE group 7 value 0
2020-04-20 06:57:02 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/Volumes/Data/homeassistant/lib/python3.8/site-packages/insteonplm/plm.py", line 620, in _peel_messages_from_buffer
    self._process_recv_queue()
  File "/Volumes/Data/homeassistant/lib/python3.8/site-packages/insteonplm/plm.py", line 635, in _process_recv_queue
    device.receive_message(msg)
  File "/Volumes/Data/homeassistant/lib/python3.8/site-packages/insteonplm/devices/__init__.py", line 761, in receive_message
    if not self._is_duplicate(msg):
  File "/Volumes/Data/homeassistant/lib/python3.8/site-packages/insteonplm/devices/__init__.py", line 818, in _is_duplicate
    userdata=msg.userdata
AttributeError: 'StandardReceive' object has no attribute 'userdata'
2020-04-20 07:03:30 DEBUG (MainThread) [homeassistant.components.insteon.insteon_entity] Received update for device 4B.6C.B4 group 1 value 255

Last night, everything was working great. HA UI controlling Insteon. Homekit controlling insteon via HA.

But now, this morning after the time of the error, I can’t use the HA web page to control Insteon devices. For example, if I try to turn on a light, I click on it in HA, and the GUI switch will move to ON, then a second later, move to OFF, and the light itself never actually turns on. I also don’t see any entries in the HA log regarding this.

Throughout today, HA has continued to receive Insteon device state change updates (which you can see @7:03 in the log above.

OK, I see what it is and can post a patch for it.

What type of device is 46.2C.BE?

If you are comfortable editing files, you can change the following file:

/Volumes/Data/homeassistant/lib/python3.8/site-packages/insteonplm/devices/__init__.py

At line 810 the current line says:
if msg.flags.isExtended:

Change it to:
if msg.flags.isExtended and hasattr(msg, "userdata"):

Otherwise the patch will take a few days to a week to get in.

1 Like

@teharris1 46.2c.be is an 8-button dimmer keypad.

I’ll try your suggested edit. Definitely comfortable editing files! I’m an engineering manager, running a team that builds the most prolific OS that no one has ever heard of :wink: I live in Emacs.

I’ll post my results in another day or so after I’ve made the edit and restarted. It took 8 hours to happen last time. I’ll “exercise” that dimmer keypad a bit more too.

Thank you for your help!

@teharris1, great news! Its been 19 hours since I added your suggested edit, and everything continues to work nicely. No more lost connections to the hub nor errors in the log.

I’ll post another update in a day or so.

THANK YOU!!!

Its still working without errors. Thank you so much for the help!

FYI, I cannot recreate your issue. Technically the change I had you make should not be necessary. I have seen before where devices send messages that are not “standard” for unknown reasons. I believe this is the case with your KPL. If you are up for it, can you try the new beta version? I want to see if it breaks under your situation. The underlying library is completely different and so there is no direct map between the change you made and a similar change in the new library. It will be the new solution in a few weeks so it is a good chance to see how it will work for you.

Ouch by the way.

Sure, I’ll tinker with your Insteon2 beta this weekend. I assume the two integrations are mutually exclusive. One thing I’m eager to test out is your new support for the thermostat.

Ihave same problem here.
I have latest HA 2021.11.4
I have 3 tablets and Insteon own app continues to work always, but HA works only for few hours and then stops responding with Insteon…
I have to unplug and plug Insteon modem back for HA to work… It works for somw hours and then again stops working

I run HA in Qnap VM.

I will add my voice to this issue. My Insteon Hub periodically decides to lose its connection, and it seems like it is doing it with increasing frequency.

Here is my setup:


System Health

version: core-2021.11.5
installation_type: Home Assistant OS
dev: false
hassio: true
docker: true
user: root
virtualenv: false
python_version: 3.9.7
os_name: Linux
os_version: 5.10.75
arch: x86_64
timezone: America/Los_Angeles


GitHub API: ok
Github API Calls Remaining: 4977
Installed Version: 1.17.2
Stage: running
Available Repositories: 910
Installed Repositories: 1


logged_in: false
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok


host_os: Home Assistant OS 6.6
update_channel: stable
supervisor_version: supervisor-2021.10.8
docker_version: 20.10.8
disk_total: 30.8 GB
disk_used: 8.3 GB
healthy: true
supported: true
board: ova
supervisor_api: ok
version_api: ok
installed_addons: Studio Code Server (3.7.0), Samba share (9.5.1), Mosquitto broker (6.0.1), MariaDB (2.4.0), Nginx Proxy Manager (0.11.0), Check Home Assistant configuration (3.9.0), NGINX Home Assistant SSL proxy (3.0.2), Insteon MQTT (1.1.0), SSH & Web Terminal (9.1.1)


dashboards: 2
resources: 0
views: 3
mode: storage

I am having a similar problem.
Interestingly:

  • An Insteon plug that I turn on and off with a HA automation works fine even with the GUI locked up.
  • Alexa, running through HA, works even with GUI locked up.
    Could this be a Lovelace issue?