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

@teich how do you connect to insteon, hub or PLM?

USB plm. I switched years ago from the hub when my hub randomly died and I had to jump through crazy hoops like deleting my account to get a new one working. Insteon makes great switches but that hub is a disaster.

The new pyinsteon code works a lot better for me and I appreciate all of your work on it. Thank You.

I did update that timeout in my own fork and created a custom insteon component that used my fork of pyinsteon as a requirement. I donā€™t know all the implications of my change as Iā€™m not much of a developer, but it is working for me now.

my rpi3b+ take 6+ minutes to boot with all the integrations I have. so i set to do lots of experiments by starting off with fresh install of HASS. no matter what combination of integrations and addons I have (and tried at least 20 different scenarios) ā€¦once boot time passes about 4 min insteon stopped working. and @kressir confirms that by modifying the time out he got it work.

for the time being I stopped all ā€œnon essential addons and integrationsā€ till a solution become available

BTW @kressir what is the new time out setting you have ? can you share your fork till @teharris1 have the time to fix this issue?

finally Indeed when it works it is a killer even faster than own insteon apps. an efferot that deserves lots of applauds

ā€œfirst boot after an update insteon worksā€ā€¦ This is the case on my system as well, (Hub 2245). Each time I install a new a new update (112.3, for example), Insteon works. But if I reboot, it fails. Not sure what this means, just an observation. @teharris1, thanks for your development work.

I am confused by the portion of title ā€œ(Do not not use since this is now in 0.111 and higher)ā€.
Should I remove the beta I installed and activate the now included version?

Yes, delete your Insteon custom component and in your configuration.yaml change insteon2ā€”>insteon

Thanks! I finished fumbling my way through that about 90 minutes ago and then getting my automations back in order about an hour ago. Deleted the Insteon _2 entities and now have the basic Insteon entities working! Also changed python 3.7 to be the main ā€˜pythonā€™ over python2 and upgraded pipā€¦

@teharris1 This is really awesome. I had taken some time off from home assistant because life got in the way, and I came back to a new Insteon implementation! Thanks for all your work on this.

Couple questions:

  1. I canā€™t seem to get my three way lights to work. Iā€™m guessing it has something to do with calling a scene stored on the switch, but I canā€™t figure it out.
  2. Could you point me in the direction of a place to read more about the pyinsteon module and the command line tools associated with it. I know you are working on a UI version of this, but until that is up and running I would like to be able to fiddle around.

Again, really awesome work.

@teharris1 I think thereā€™s a bug in the event handler for 4 button mini remotes.

When I press button a on, I get an insteon.button_on event for button a. This is expected.
When I press button a off, I get ā€¦ an insteon.button_on event for button a, rather than a button OFF event.

The remote is also paired to a second Insteon PLM attached to a Mac Mini running Indigo, and that system is seeing the button off event. Thus, I think thereā€™s a decode bug.

Iā€™m running 0.112.3

Remote in question is a Mini Remote Model 2342-2

Try to call Insteon.load_all_link_database to rebuild. My 3w are working as expected.

Good luck.

Underlying module is here: https://github.com/pyinsteon/pyinsteon

@geoffdavis Thanks for pointing me there. I have been looking through that but I canā€™t find anything about the mentioned command line tool. Do you have any working knowledge of that?

No, I donā€™t see it there either. The old insteonplm module did have a command-line tool, but this new pyinsteon library does not.

@geoffdavis Thanks, I thought I was missing something. So, does the pyinsteon library allow you to interface with all the insteon devices in the network? Also, I am calling the Insteon.load_all_link_database and I canā€™t seem to find any verbose output in the log. Where should I be looking for that? Thanks for your replies.

You need to call insteon.load_all_link_database, followed by insteon.print_im_all_link_database

Logs get dumped in the Supervisor tab under System. Change the log type from ā€œSupervisorā€ to ā€œCoreā€, and youā€™ll get something like this:

2020-07-11 21:17:08 INFO (SyncWorker_8) [homeassistant.components.insteon.utils] 4C.16.64 ALDB load status is LOADED
2020-07-11 21:17:08 INFO (SyncWorker_8) [homeassistant.components.insteon.utils] RecID In Use Mode HWM Group Address  Data 1 Data 2 Data 3
2020-07-11 21:17:08 INFO (SyncWorker_8) [homeassistant.components.insteon.utils] ----- ------ ---- --- ----- -------- ------ ------ ------
2020-07-11 21:17:08 INFO (SyncWorker_8) [homeassistant.components.insteon.utils]  1fff    Y     C   N      1 XX.XX.XX     1    65    67
2020-07-11 21:17:08 INFO (SyncWorker_8) [homeassistant.components.insteon.utils]  1ff7    Y     C   N      1 XX.XX.XX     1    65    67
2020-07-11 21:17:08 INFO (SyncWorker_8) [homeassistant.components.insteon.utils]  1fef    Y     R   N      1 XX.XX.XX     1    65    67
2020-07-11 21:17:08 INFO (SyncWorker_8) [homeassistant.components.insteon.utils]  1fe7    Y     C   N      0 XX.XX.XX     1    65    67
2020-07-11 21:17:08 INFO (SyncWorker_8) [homeassistant.components.insteon.utils]  1fdf    Y     C   N      0 XX.XX.XX     1    65    67

I have posted a test fix for the hub issues to:

It does 2 things:

  1. Retries 5 times if it does not connect the first try This should fix the issue where other components cause a timeout with the Insteon component.
  2. Increase the hub read/write timeout to 5 minutes. This should fix the issue with the hub disconnecting after a successful connection.

This would be installed as a custom component so if you are up for being a tester you can disable the main module and enable the custom component.

1 Like

@teharris1 ā€¦ it is alive ! it is alive ! it is alive !

just thinking out loud, is it possible to make these as user settings, so we can adjust it to various scenarios. something that look like this:

insteon2:
  host: <host ip address>
  ip_port: <port number>
  connection_retries: 5
  connection_timeout: 5
  username: !secret hub_username
  password: !secret hub_password

on another note, my 8 buttons keypad has been always detected as main and 4 buttons, and this issue since the old insteon module, any solution for this ?

gigantiqueromous thank you for this incredible work.

This still doesnā€™t fix my Insteon connection issues, it just retries for 5 minutes with the same errors. I donā€™t have a bunch of custom add-ons like some of the others here, and confirmed I can ping from my HA device to the Insteon hub on the port required:

2020-07-17 12:24:45 ERROR (MainThread) [pyinsteon.protocol.http_reader_writer] An client error occurred: Cannot connect to host <IP Address> ssl:None [Connect call failed (<IP Address>)]
2020-07-17 12:24:45 ERROR (MainThread) [custom_components.insteon2] Could not connect to Insteon modem
2020-07-17 12:25:13 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: insteon2
2020-07-17 12:26:13 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: insteon2
2020-07-17 12:26:47 ERROR (MainThread) [pyinsteon.protocol.http_reader_writer] An client error occurred: Cannot connect to host <IP Address> ssl:None [Connect call failed (<IP Address>)]
2020-07-17 12:26:47 ERROR (MainThread) [custom_components.insteon2] Could not connect to Insteon modem
2020-07-17 12:27:13 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: insteon2
2020-07-17 12:28:13 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: insteon2
2020-07-17 12:28:49 ERROR (MainThread) [pyinsteon.protocol.http_reader_writer] An client error occurred: Cannot connect to host <IP Address> ssl:None [Connect call failed (<IP Address>]
2020-07-17 12:28:49 ERROR (MainThread) [custom_components.insteon2] Could not connect to Insteon modem
2020-07-17 12:29:13 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: insteon2

Interestingly, I rebooted my Insteon Hub and it seems to have connected nowā€¦