New Insteon version for beta testing - (Do not use since this is now in 0.111 and higher)

Based on @Mil and @Haddood description of an issue with another integration causing insteon to timeout, I believe I understand the problem. The Insteon module tries to connect to the Hub and if it does not get a response in a certain amount of time it times out and fails. This was a response to an issue where it retried forever in the past but it hung the UI until it connected. If it never connected HA never became available to the user. Let me thing about how to handle this.

1 Like

@Mil Which integration? I was doubting emporia vue, but disabling it did not solve the problem
@teharris1 how about instead of (the integration) gives up after fail, it retries to connect after certain amount of time for a certain amount of retries. these can be set in the options of the integration ? while this is happening the state of insteon devices will be ā€œtrying to connectā€ instead of ā€œunavailableā€ ā€¦ just thinking out loud as i have no idea how complex is to program that

The one I disabled was a Bluetooth LE reader for Airthings Wave that was not working, probably unrelated reasons (https://github.com/custom-components/sensor.airthings_wave). When Insteon did setup successfully it took 16.6 seconds on the log.

I am on 0.111.4. On a Pi 3, HassOS 4.10. I am also seeing the following error:

2020-06-24 17:17:03 ERROR (MainThread) [pyinsteon.protocol.http_reader_writer] An aiohttp timeout error occured during test connection.
2020-06-24 17:17:03 DEBUG (MainThread) [pyinsteon.protocol.http_transport] Closing Hub session
2020-06-24 17:17:03 ERROR (MainThread) [homeassistant.components.insteon] Could not connect to Insteon modem

I disabled my Airthings Wave custom component:

#  - platform: airthings_wave
#    mac: "xx:xx:xx:xx:xx:xx"
#    name: 'Basement Airthings Wave'

And now Insteon is working again. How can I get both the Airthings Wave custom component and Insteon working?

Some more detail on errors from Airthings:


2020-06-24 17:17:04 WARNING (MainThread) [custom_components.airthings_wave.sensor] Radon data is : got an exception: could not convert string to float: 'unknown'
2020-06-24 17:17:04 WARNING (MainThread) [custom_components.airthings_wave.sensor] Radon level is : got an exception: could not convert string to float: 'unknown'
2020-06-24 17:17:04 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.basement_airthings_wave_radon_1_day_average, old_state=None, new_state=<state sensor.basement_airthings_wave_radon_1_day_average=unknown; device_class=radon, device_date_time=unknown, radon_level=unknown, icon=mdi:radioactive, unit_of_measurement=pCi/L, friendly_name=Basement Airthings Wave Radon 1 Day Average @ 2020-06-24T17:17:04.079439-05:00>>

2020-06-24 17:19:40 ERROR (Basement Airthings Wave) [pygatt.backends.gatttool.gatttool] Timed out connecting to xx:xx:xx:xx:xx:xx after 30 seconds.
2020-06-24 17:19:40 ERROR (Basement Airthings Wave) [custom_components.airthings_wave.sensor] Exception: Timed out connecting to xx:xx:xx:xx:xx:xx after 30 seconds. 
2020-06-24 17:19:41 INFO (Basement Airthings Wave) [pygatt.backends.gatttool.gatttool] Stopping

2020-06-24 17:24:13 INFO (Thread-91) [pygatt.backends.gatttool.gatttool] Running...
2020-06-24 17:24:13 INFO (Basement Airthings Wave) [pygatt.backends.gatttool.gatttool] Connecting to xx:xx:xx:xx:xx:xx with timeout=30

The timeouts repeat for a while, then it seems to connect. The value is initially ā€œunknownā€ until it connects and updates the value.

My Insteon integration stopped working again. I still have the Airthings disabled. Went thru the log and disabled anything else that wasnā€™t working, rebooted a few times, still, no Insteon.

With Airthings enabled, I never get Insteon. Without Airthings, Insteon still fails more than half the time. I think Airthings just slows the system down enough to keep pushing Insteon over the timeout cliff.

It looks like the timeout for Insteon is 5 seconds according to this (line 11):

SESSION_TIMEOUT = ClientTimeout(total=5)

According to my logs, every time it fails, it takes more than 5 seconds. Can we get this to be configurable - or use the default of 300?

I figured the culprit in my case. when I am home the security cameras are powered down by having electricity cut off (with wifi plugs) ā€¦ when HASS boot, these generate errors and delay boot. since I disabled the automation, and left cameras on ā€¦ it has been working.


update: belay that ā€¦it worked for couple of times ā€¦and now it times out again !!!
update II: upgraded to Home Assistant 0.112.0b4 still same issue

anybody knows where we can find pyinsteon in the system to edit the timeout value manually? untill there is a fix for this. it has been almost 2 weeks with everything insteon related is not working.

I still cannot replicate this issue due to what seems to be an indirect issue with the insteon module. I am seeing multiple issues in HA that have to do with failing integrations having nothing to do with Insteon. Something changed in 0.111.3 or 4 that broke a number of modules. I have a few ideas but it will take me at least a week or more due to some scheduling issues on my side.

The only recommendation I have right now is to revert back to the last working version. I will try to keep you all updated on any progress.

@teharris1 that is understandable. but is there a way that we can manually edit the time out to make it work, until you have a chance to fix this? been scouring the files through file editor, but i can,t find where pyinsteon is placed

Unlike our other partners, the latest update with version .0.5 of pyinsteon brought the best experience Iā€™ve had so far with Insteon and HA in 3 years of use.

I thank you for your good and hard work.

I hope that the problem of the others will be solved soon but in my experience it is unbeatable in the control function.

The cherry on the cake will be the manipulation of the devices like the backlight, favorite position, creating insteon scenes from HA (HouseLinc style), in the shades part thereā€™ s a lot to configure for example.

:wink: what comes in 113 looks very good.

Indeed, when it works it is unbeatable ā€¦ how are you connecting insteon ? hub ? plm?
I m using hub version 2

i use a PLM USB.

After many disappointments with the hub in previous versions of the integration I switched to the small USB PLM.

btw i have 2 hubs version 2 in my closet almost brand new.

Anybody running the new insteon successfully with hubs? if so, what is your hardware for HASS

I run HA supervised on a Pi4 running Raspbian with a SSD. I use an Insteon Hub 2 to control about 14 devices. The Hub is also in parallel connected via the internet to the Insteon servers which also respond to Alexa. I find the latest Insteon integration is fast and reliable.

I am committed to fixing any issue with the Hub. I am sure it is not as simple as changing the timeout. The timeout referenced above is for a single read of the hub buffer. That specific timeout retried 20 times before the pyinsteon module fails. The initial connection timeout is set to 60 seconds, which should be plenty of time.

1 Like

Is anyone else having troubles with HA turning off the AC? About 2 weeks ago this started, my thermostat will be in cool mode, and then very shortly after a call for cooling and the AC turning on, HA turns the whole system off changing from COOL to OFF. So I unplugged the PLM, and never had the issue again, until I decided to try again, and plugged my PLM back in yesterday. Now again three times in a row right after the AC turns on HA turns the system off, it also doesnā€™t display the same temperature in HA as it does on the thermostat, even though HA sees the thermostat be put into cool mode the temperature in HA isnā€™t updated. I tried to turn COOL mode on in HA thinking that might keep it from being turned off by HA, but no HA turned my thermostat to cool, several minutes later the AC turns on, and then HA turns the system off and never updates it temperature.

couple of observation, maybe they help solving the issue.

  1. first boot after an update insteon works
  2. yesterday I added a new device through insteon app. HASS insteon was not working, when I restarted HASS the new device appeared in HASS and insteon was still not working

Integration is working great with 24 entities and more on the way.

Question: are there plans for supporting ā€˜areaā€™ in HA? Iā€™ll confess Iā€™m confused by the difference between Devices and Entities, and what role area plays.