home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.48k stars 30.33k forks source link

Insteon delayed response after 2022.5.0 Update #71480

Closed 34bwood closed 2 years ago

34bwood commented 2 years ago

The problem

Prior to 2022.5.0 update, Insteon devices responded to on/off requests almost immediately (using dashboard or Alexa). After 2022.5.0 update, devices take up to 30 seconds to respond. They always work, but take several seconds to turn on/off. Approximately 1 out of 10 times, the device will respond instantly, but average response time is about 6 seconds.

What version of Home Assistant Core has the issue?

2022.5.1

What was the last working version of Home Assistant Core?

2022.4.7

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Insteon

Link to integration documentation on our website

https://www.home-assistant.io/integrations/insteon/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

My Insteon setup is a PowerLinc USB Modem 2413U. If I restore from backup version 2022.4.7, the devices work instantly again. Since the devices do work with 2022.5.X, I'm keeping it on the latest build and expect a delay in response. The integration isn't broken with the new build, just not working as well.

probot-home-assistant[bot] commented 2 years ago

insteon documentation insteon source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @teharris1, mind taking a look at this issue as it has been labeled with an integration (insteon) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

teharris1 commented 2 years ago

Thanks for the feedback. Is there a difference in response time for changes made in the UI to when the device physically changes or is the delay in physical changes to the device being represented by the UI, or is it both? Also, what hardware are you running on?

There were a lot of changes made to the message handling in 2022.5 which could explain the change you are seeing. It was decided to allow all message handling to be asynchronous rather than handled in near real-time. I would not expect 6-second delays, however. Handling device messages asynchronously does increase the number of devices that can be supported without causing bottlenecks but it would have the likely outcome of some intermittent delays.

34bwood commented 2 years ago

The ui would switch properly, but the physical device had the delay in response.

This weekend I got frustrated with the delay. Most of my HA devices are zwave, but two devices I turn on the most by voice or through the dashboard are my coffeemaker and 3D printer. Those two are controlled by insteon and are the only two devices that I own that can handle that much wattage. I use them frequently. I really wanted this working so I decided to just delete the devices and add them again. This was not easy. Every Insteon device I wanted to delete, the delete option was grayed out. I factory reset every device and I removed the integration, added it back and all the links were there, again. After much googling, I found a thread that said to delete the insteon_devices.json file. Once I did that, the devices were gone. There were still a few entities hanging around, but I could delete them.

I re-added the integration, added the PLM and devices and all is working great! Fast as before.

I'm fairly new to Home Assistant, but I'll try to give you some additional information that my help someone else out. I'm running on a Rock Pi 4B 4GB memory (couldn't find a Raspberry Pi) with Armbian as the OS. Home Assistant shows it as Debian. When I was clicking around in the new Insteon configuration, I noticed in the All-link database, that there were many duplicates of the devices when it was running slow. Right now, for my coffeemaker, there are 2 links. One for the responder and one for the controller of the PLM. Previously there were many duplicates. I knew this didn't look right, but didn't know how to fix. Since I deleted everything, I can't get you a screen capture, but there were a lot of multiple items for every Insteon device I have. I did keep a copy of the old insteon_devices.json file if you think that would be helpful.

I still have a few more insteon devices to add, but as far as I'm concerned, the integration is working great after removing everything and adding them back.

pashdown commented 2 years ago

I noticed that after doing a "insteon.load_all_link_database" service call, the entire Insteon system bogs down and is filled with delay. Once that finishes up, things work normally again.

teharris1 commented 2 years ago

@34bwood now that the system has been running for some time, has performance improved at all?

34bwood commented 2 years ago

After deleting all my Insteon devices and adding everything back in, it's running fast as ever! Thanks!