Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insteon Plugin for HOOBS box locks up the HOOBS box #288

Open
greg-e-ctrl opened this issue Jan 14, 2023 · 133 comments
Open

Insteon Plugin for HOOBS box locks up the HOOBS box #288

greg-e-ctrl opened this issue Jan 14, 2023 · 133 comments

Comments

@greg-e-ctrl
Copy link

greg-e-ctrl commented Jan 14, 2023

Hi,

When I have the Insteon plugin running and no activity on the Insteon network that I can see in the log, it randomly lockups the entire HOOBS box from communicating with the Insteon hub although the log says it did. My Insteon Director app still works correctly when the Hoobs is in this state.

Also, when I use some of my Insteon physical switches or another program that sends a command it logs that it cannot find that accessory ID but in fact it is in the device list and i can control it from Hoobs when all is working correctly. Here is the log from that:
1/13/2023, 8:55:38 AM Platform Insteonlocal BridgeInsteon LocalMessage is from keypad, filtering non-keypad devices.
1/13/2023, 8:55:38 AM Platform Insteonlocal BridgeInsteon LocalFound 0 accessories matching 418C4B
1/13/2023, 8:55:38 AM Platform Insteonlocal BridgeInsteon LocalHub command: {"standard":{"type":"50","id":"418C4B","gatewayId":"3429F8","extended":false,"messageType":1,"hopsLeft":2,"maxHops":3,"command1":"32","command2":"02","raw":"0250418C4B3429F82B3202"}}

I debugged this with Zac from Hoobs and he said to contact you. I would love to get on the phone with you and share my screen with you. I am a software engineer and know something about all this home iot stuff with the restful apis used, etc. :)

Thanks!

--
Greg

@kuestess
Copy link
Owner

@greg-e-ctrl Looks like the connection to the hub has dropped. Can you share your config? Which version of the plugin are you using?

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Jan 14, 2023 via email

@kuestess
Copy link
Owner

@greg-e-ctrl Do you get any messages in your console that say 'Started connection watcher...' and 'Reconnecting to Hub...'? From your config, you should see these about every hour. The 2245 gets 'bored' with the connection sometimes, so the plugin periodically disconnects/reconnects the hub. Sorry, don't do phone support but happy to help here.

@AstonMartin715
Copy link

I have the exact same issue, with the same setup, as the OP. I rebooted my hoops hub at 3:11 PM. It worked until 3:42 PM, which is when it sent a CLOSE and RECONNECT command to the Insteon hub (I have my keep alive set to 1800). After it sent the RECONNECT command it gave the ETIMEDOUT error and no longer speaks to the Insteon hub.

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Jan 15, 2023 via email

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Jan 15, 2023 via email

@kuestess
Copy link
Owner

@greg-e-ctrl Agree that this is a Hoobs-specific (likely) networking issue. I spun up a Hoobs instance this morning and it's been running fine for me for a bit, but I don't have much Insteon network traffic on that instance. Did this just start after the latest update to 0.5.7? If so, you might try setting the keepAlive to 0 (disabled) to see if that helps.

@AstonMartin715
Copy link

Did some extensive testing today. Exact same issue as above. Communication between the hoobs and Insteon works fine until someone presses an Insteon switch manually, then this happens for every device, after which the communication no longer works ...
1/15/2023, 10:50:40 AM Platform Insteonlocal Bridge 2 InsteonLocal [ DEBUG ] Chandelier (MB) is off at 0%
1/15/2023, 10:50:58 AM Platform Insteonlocal Bridge 2 InsteonLocal [ DEBUG ] Received command for 3CE278
1/15/2023, 10:50:58 AM Platform Insteonlocal Bridge 2 InsteonLocal [ DEBUG ] Found 1 accessories matching 3CE278
1/15/2023, 10:50:58 AM Platform Insteonlocal Bridge 2 InsteonLocal [ DEBUG ] Hub command: {"standard":{"type":"50","id":"3CE278","gatewayId":"000001","extended":false,"messageType":6,"hopsLeft":2,"maxHops":3,"command1":"11","command2":"00","raw":"02503CE278000001CB1100"}}
1/15/2023, 10:50:58 AM Platform Insteonlocal Bridge 2 InsteonLocal [ DEBUG ] Got event for Chandelier (MB) (3CE278)
1/15/2023, 10:50:58 AM Platform Insteonlocal Bridge 2 InsteonLocal Got on event for Chandelier (MB)
1/15/2023, 10:50:58 AM Platform Insteonlocal Bridge 2 InsteonLocal [ DEBUG ] No group members defined for Chandelier (MB)

@kuestess
Copy link
Owner

@AstonMartin715 Did this just start after the latest update to 0.5.7? If so, you might try setting the keepAlive to 0 (disabled) to see if that helps.

@AstonMartin715
Copy link

No I've been dealing with this for about 6 months and through multiple updates. I have set the keep alive to 0 as you suggested and am re-testing. Since doing that I've had 2 hours of consistent uptime.

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Jan 15, 2023 via email

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Jan 16, 2023 via email

@kuestess
Copy link
Owner

@greg-e-ctrl Agree with your diagnosis - everything you describe points to a network issue specific to Hoobs. The apps will continue to work as they initiate a fresh connection to the hub, which the plugin should do as well...but seems it isn't making it out of the Hoobs box. Quick thought - have you tried power cycling your Hub or spinning up a quick Homebridge container to see it it persists?

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Jan 16, 2023 via email

@kuestess
Copy link
Owner

@greg-e-ctrl I meant to power cycle your Hub. Sometimes they get a bit wonky, and unfortunately no way to reboot them without unplugging. 'Spin up' is nerd speak :-) for setting up a docker container to run/administrate home bridge. See here: https://github.com/oznu/homebridge-config-ui-x

@AstonMartin715
Copy link

Confirming your 4 points above are exactly the same for me @greg-e-ctrl. Tested a lot today. Set up an iPhone shortcut to cycle one light every 10 minutes. It failed as soon as someone manually turned on a different light using the Insteon switch which caused the Hoobs hub to cycle through all of the devices, saying it couldn’t find them:l, for example:

1/16/2023, 7:26:42 PMPlatform Insteonlocal Bridge 2InsteonLocalReceived command for 3C68E0
1/16/2023, 7:26:42 PMPlatform Insteonlocal Bridge 2InsteonLocalMessage is from keypad, filtering non-keypad devices.
1/16/2023, 7:26:42 PMPlatform Insteonlocal Bridge 2InsteonLocalFound 0 accessories matching 3C68E0

After that there was no communication between the Hoobs hub and the Insteon hub. The only error I get is:

1/16/2023, 7:44:43 PMPlatform Insteonlocal Bridge 2InsteonLocalError getting power state of Garage Lights (G)

It seems a call from the Insteon hub back to the Hoobs hub (instead of the other way round) throws it through a bit of a loop.

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Jan 16, 2023 via email

@AstonMartin715
Copy link

AstonMartin715 commented Jan 17, 2023

I have tried ethernet only, wi-fi only and both at the same time. I have discovered that even when the Hoobs hub loses connection to the Insteon hub, the Insteon will still take instructions from the Amazon Echo. I assume the communication protocol is the same for both devices? So does that tell us it's not so much Insteon not accepting commands, rather Hoobs not actually sending (or receiving) them?

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Jan 17, 2023 via email

@AstonMartin715
Copy link

I tried to turn on verbose logging on Hoobs so I could see what was going on but I couldn’t get it to work (sudo hoobsd hub -v is the command I got from the Hoobs online CLI manual). Anyone else have any luck with this? I was able to turn on debugging mode but that didn’t tell me anything new.

@zzack01
Copy link

zzack01 commented Jan 18, 2023

@kuestess please send me an email

@kuestess
Copy link
Owner

@AstonMartin715 @greg-e-ctrl Are either of you using any software to connect to your Hub in addition to the plugin (something like Home Assistant that would maintain a connection)?

@AstonMartin715
Copy link

I am not. Only the Hoobs hub. I added the Amazon Echo skill for Insteon a few days ago to test that the Insteon hub could still receive commands from a 3rd party device when it was not receiving command from Insteon (see above).

@kuestess
Copy link
Owner

Thanks @AstonMartin715 - working with @zzack01 and just trying to eliminate things that could be grabbing the connection to the Hub.

@AstonMartin715
Copy link

Is there an easy way to make the Insteon hub a local LAN device only and stop it from receiving any pings from the WAN? I would be OK with that as I have no reason to access it from outside of the LAN if the Apple Homekit/Hoobs/Insteon bridge is working as it should. I did some research and just have a gut feeling that making Insteon a local only device might help. The other option might be to put Hoobs and Insteon both on their own network (eg. 192.168.5.xxx) and firewall that off from other traffic except Homekit?

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Jan 20, 2023 via email

@AstonMartin715
Copy link

I put the Hoobs hub and Insteon hub on their own separate VLAN. No other devices present. They talked to each other for a couple of hours and then the same problem as described above occurred.

@kuestess
Copy link
Owner

kuestess commented Feb 2, 2023

@zzack01 Any updates?

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Feb 2, 2023 via email

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Feb 9, 2023 via email

@AstonMartin715
Copy link

No the docker container didn't work on the MAC. Couldn't get to the network. I am using homebridge on a second raspberry pi.

@AstonMartin715
Copy link

Final observation. When the Insteon has stopped accepting commands from either Homebridge or the shortcuts I created, I unplug the Raspberry Pi that is running homebridge, wait a few minutes, and like magic, the shortcuts start to work again. So, the homebridge (and Hoobs) is locking up the Insteon.

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Mar 19, 2023 via email

@AstonMartin715
Copy link

@greg-e-ctrl that’s the same syntax I am using. Works great until it gets locked up by the bridge as described above.

Curious - you don’t have a UniFi network do you?

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Mar 19, 2023 via email

@AstonMartin715
Copy link

AstonMartin715 commented Mar 20, 2023

There goes my theory that the router is involved!

@kuestess here is the debug log before a failure:

home-controller:http making request /3?0260=I=3 +1s
[19/03/2023, 17:56:27] [InsteonLocal] Connected to Insteon Model 2245 Hub...
[19/03/2023, 17:56:27] [InsteonLocal] Getting status for Master Bed Chandelier

And here it is from the same point after a failure:

home-controller:insteon sendCommandTimout - status: {"command":{"raw":"0260","type":"60"},"deferred":{"promise":{}},"timeout":5000,"nakTimeout":10} +5s
home-controller:insteon Resend: {"command":{"raw":"0260","type":"60"},"deferred":{"promise":{}},"timeout":5000,"nakTimeout":10} +1ms
pi@homebridge:/var/lib/homebridge $

I am now convinced that it's similar to the homeassistant issue I linked to earlier. The Insteon plugin is keeping the network connection to the Insteon hub open and not closing it, preventing any other traffic getting to the hub via the network port (except for traffic from the Director app which I understand takes advantage of a different communication method to avoid 'popcorning').

Oh by the way I can now 100% recreate the non-communication issue within about 1 minute of a reboot by switching on and off a number of devices manually in quick succession. And then to fix the issue I just unplug the Cat5 cable from the Pi (breaking the network connection).

@AstonMartin715
Copy link

AstonMartin715 commented Mar 20, 2023

@kuestess a netstat -at command is very revealing. It confirms that the homebridge network connection remains open.

@greg-e-ctrl after your connection has seized up, run the network -at command in the terminal window in HOOBS and see if it shows a perpetual open connection at your Hoobs IP address.

@kuestess
Copy link
Owner

@AstonMartin715 Interesting observation. I tried to run netstat on my machine, but oddly it didn’t see any connection to the hub. I’ll play around with it a little more. nettop is another interesting command.

@hypeitinc
Copy link

@kuestess Today the (SLT) System showed "No Response" on the Home App.
The MacMini I'm using was unusually warm and logging in I could see that Insteon plugin is restarting every other second or so. I noted that the memory leak warning I have mentioned before is there.
No changes had been done to the system.
Not sure if this is helpful on this thread or not but here is part of the log:

3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonConnecting to Insteon Model 2245 Hub...
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonConnecting to Insteon Model 2245 Hub...
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonStarted connection watcher...
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonStarted connection watcher...
3/23/2023, 4:12:37 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:37 PM] [InsteonUI] Initializing Insteon UI
3/23/2023, 4:12:37 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:37 PM] [InsteonUI] Initializing Insteon UI
3/23/2023, 4:12:37 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:37 PM] [InsteonUI] Reading config from /var/lib/hoobs/platforminsteonlocalbridge/config.json
3/23/2023, 4:12:37 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:37 PM] [InsteonUI] Reading config from /var/lib/hoobs/platforminsteonlocalbridge/config.json
3/23/2023, 4:12:37 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:37 PM] [InsteonUI] Found 1 platform(s) in config
3/23/2023, 4:12:37 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:37 PM] [InsteonUI] Found 1 platform(s) in config
3/23/2023, 4:12:37 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:37 PM] [InsteonUI] Reading devices from insteon.json
3/23/2023, 4:12:37 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:37 PM] [InsteonUI] Reading devices from insteon.json
3/23/2023, 4:12:37 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:37 PM] [InsteonUI] Done with InsteonUI init
3/23/2023, 4:12:37 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:37 PM] [InsteonUI] Done with InsteonUI init
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonFinished initializing platform: Insteon
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonFinished initializing platform: Insteon
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Office Light
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Office Light
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Living Room Sconces
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Living Room Sconces
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Living Room Chandelier
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Living Room Chandelier
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Entrance
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Entrance
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Floor Lamp
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Floor Lamp
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Console Table Lamp
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Console Table Lamp
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Side Table Lamp
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Side Table Lamp
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Gutter Back
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Gutter Back
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Gutter Front
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Gutter Front
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Family Room
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Family Room
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Living Room
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Living Room
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Master
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Master
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Upper Hall
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Upper Hall
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonExecuted didFinishLaunching callback
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonExecuted didFinishLaunching callback
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonFound 13 devices in config
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonFound 13 devices in config
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Office Light
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Office Light
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Living Room Sconces
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Living Room Sconces
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Living Room Chandelier
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Living Room Chandelier
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Entrance
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Entrance
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Floor Lamp
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Floor Lamp
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Console Table Lamp
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Console Table Lamp
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Side Table Lamp
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Side Table Lamp
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Gutter Back
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Gutter Back
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Gutter Front
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Gutter Front
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Family Room
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Family Room
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Living Room
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Living Room
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Master
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Master
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Upper Hall
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Upper Hall
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeSetup URI 'X-HM://0023ISYWYB4AH'
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeSetup URI 'X-HM://0023ISYWYB4AH'
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeShutting down
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeShutting down
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeERROR(node:74971) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 14 connect listeners added to [Insteon]. Use emitter.setMaxListeners() to increase limit
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeERROR(node:74971) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 14 connect listeners added to [Insteon]. Use emitter.setMaxListeners() to increase limit
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeERROR(Use node --trace-warnings ... to show where the warning was created)
3/23/2023, 4:12:37 PMPlatform Insteonlocal BridgeERROR(Use node --trace-warnings ... to show where the warning was created)
3/23/2023, 4:12:39 PMPlatform Insteonlocal BridgeStopped
3/23/2023, 4:12:39 PMPlatform Insteonlocal BridgeStopped
3/23/2023, 4:12:39 PMPlatform Insteonlocal BridgeERRORNo matching processes were found
3/23/2023, 4:12:39 PMPlatform Insteonlocal BridgeERRORNo matching processes were found
3/23/2023, 4:12:46 PMPlatform Insteonlocal Bridge starting
3/23/2023, 4:12:46 PMPlatform Insteonlocal Bridge starting
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeLoaded plugin 'homebridge-platform-insteonlocal'
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeLoaded plugin 'homebridge-platform-insteonlocal'
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeRegistering platform 'homebridge-platform-insteonlocal.InsteonLocal'
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeRegistering platform 'homebridge-platform-insteonlocal.InsteonLocal'
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeLoading 1 platforms...
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeLoading 1 platforms...
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonConnecting to Insteon Model 2245 Hub...
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonConnecting to Insteon Model 2245 Hub...
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonStarted connection watcher...
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonStarted connection watcher...
3/23/2023, 4:12:48 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:48 PM] [InsteonUI] Initializing Insteon UI
3/23/2023, 4:12:48 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:48 PM] [InsteonUI] Initializing Insteon UI
3/23/2023, 4:12:48 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:48 PM] [InsteonUI] Reading config from /var/lib/hoobs/platforminsteonlocalbridge/config.json
3/23/2023, 4:12:48 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:48 PM] [InsteonUI] Reading config from /var/lib/hoobs/platforminsteonlocalbridge/config.json
3/23/2023, 4:12:48 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:48 PM] [InsteonUI] Found 1 platform(s) in config
3/23/2023, 4:12:48 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:48 PM] [InsteonUI] Found 1 platform(s) in config
3/23/2023, 4:12:48 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:48 PM] [InsteonUI] Reading devices from insteon.json
3/23/2023, 4:12:48 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:48 PM] [InsteonUI] Reading devices from insteon.json
3/23/2023, 4:12:48 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:48 PM] [InsteonUI] Done with InsteonUI init
3/23/2023, 4:12:48 PMPlatform Insteonlocal Bridge[3/23/2023, 4:12:48 PM] [InsteonUI] Done with InsteonUI init
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonFinished initializing platform: Insteon
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonFinished initializing platform: Insteon
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Office Light
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Office Light
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Living Room Sconces
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Living Room Sconces
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Living Room Chandelier
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Living Room Chandelier
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Entrance
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Entrance
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Floor Lamp
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Floor Lamp
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Console Table Lamp
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Console Table Lamp
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Side Table Lamp
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Side Table Lamp
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Gutter Back
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Gutter Back
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Gutter Front
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Gutter Front
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Family Room
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Family Room
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Living Room
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Living Room
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Master
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Master
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Upper Hall
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonLoading accessory from cache: Temp Upper Hall
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonExecuted didFinishLaunching callback
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonExecuted didFinishLaunching callback
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonFound 13 devices in config
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonFound 13 devices in config
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Office Light
3/23/2023, 4:12:48 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Office Light
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Living Room Sconces
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Living Room Sconces
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Living Room Chandelier
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Living Room Chandelier
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Entrance
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Entrance
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Floor Lamp
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Floor Lamp
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Console Table Lamp
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Console Table Lamp
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Side Table Lamp
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Side Table Lamp
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Gutter Back
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Gutter Back
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Gutter Front
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Gutter Front
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Family Room
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Family Room
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Living Room
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Living Room
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Master
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Master
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Upper Hall
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeInsteonRestoring existing accessory from cache: Temp Upper Hall
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeSetup URI 'X-HM://0023ISYWYB4AH'
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeSetup URI 'X-HM://0023ISYWYB4AH'
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeShutting down
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeShutting down
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeERROR(node:74990) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 14 connect listeners added to [Insteon]. Use emitter.setMaxListeners() to increase limit
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeERROR(node:74990) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 14 connect listeners added to [Insteon]. Use emitter.setMaxListeners() to increase limit
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeERROR(Use node --trace-warnings ... to show where the warning was created)
3/23/2023, 4:12:49 PMPlatform Insteonlocal BridgeERROR(Use node --trace-warnings ... to show where the warning was created)
3/23/2023, 4:12:51 PMPlatform Insteonlocal BridgeStopped
3/23/2023, 4:12:51 PMPlatform Insteonlocal BridgeStopped

@kuestess
Copy link
Owner

@hypeitinc That looks like something different - do you somehow have two instances of homebridge running? (notice duplicate lines for each message)

@AstonMartin715 I did a little homework on your observation above using iftop as I couldn't get netstat to show my connection to the hub. The underlying home-controller package manages connections to the hub and I think the remaining connection you're seeing is a result of how that code and the node http module handles connections. From what I can glean, it only keeps one active connection to the hub at a time, but a pool of TCP sockets that the http code holds on to and rotates through. When you run netstat or another network tool, you can see those sockets, however they are inactive. I can confirm this with iftop as it shows throughput for each socket in the pool - all are inactive except for one at a a time. The command I ran was sudo iftop -i en0 -o destination -f "host <IP address of hub>". You can install iftop using brew on a Mac.

Interestingly enough, I was able to get my hub to a state that you are describing. I let homebridge run for a couple days and eventually I couldn't reconnect to the hub. Even restarting homebridge didn't work, but the Insteon app did work (albeit slow response). Once I unplugged/replugged the hub, all worked as expected, which leads me to believe that this is a hub issue.

@sabresoftware2021
Copy link

@greg-e-ctrl I meant to power cycle your Hub. Sometimes they get a bit wonky, and unfortunately no way to reboot them without unplugging. 'Spin up' is nerd speak :-) for setting up a docker container to run/administrate home bridge. See here: https://github.com/oznu/homebridge-config-ui-x

I have my Raspberry Pi HomeBridge hub plugged into an Eve power bar (WIFI connected with each outlet individually controllable) allowing me to remotely restart the HomeBridge hub, via HomeKit or Siri command.

@AstonMartin715
Copy link

Interestingly enough, I was able to get my hub to a state that you are describing. I let homebridge run for a couple days and eventually I couldn't reconnect to the hub. Even restarting homebridge didn't work, but the Insteon app did work (albeit slow response). Once I unplugged/replugged the hub, all worked as expected, which leads me to believe that this is a hub issue.

@kuestess you don't even need to reboot the hub. Simply removing the ethernet cable, waiting and plugging it back in solves the problem (for me at least). If I had a device that could periodically shut down the connection between the Pi and the switch that would probably solve my problem. Is that a line of code you could add? Like keep-alive but frequently close the open port? One thing to test, when your Insteon app works but the hub doesn't. Try to send an http command to the Insteon hub (see exchange between me and @greg-e-ctrl above) - I bet it doesn't accept them.

@sabresoftware2021
Copy link

I looked at one device as follows:

Insteon bulb

  1. Turned on with Insteon remote switch (battery operated)
  • Insteon Director shows bulb off
  • HomeKit shows bulb off
  • Alexa shows bulb off
  • Insteon app on refresh (toggle between favourites and devices screen) shows bulb as on, and then Director shows bulb on. Refresh of Alexa screen then also shows bulb on
  1. Turned on with Insteon app
  • HomeKit shows as off
  • Director shows as on
  • Alexa shows as on
  1. Turned on with Alexa
  • HomeKit shows as off
  • Director shows as on
  • Insteon app shows as on
  1. Turned on with Director
  • HomeKit shows as off
  • Alexa shows as on
  • Insteon app shows as off
  1. Turned on with HomeKit
  • Director shows as on
  • Alexa shows as on
  • Insteon app shows as on

In all cases the bulb turned on. This was with both refresh and keepActive set to 0. With keepActive set to 3600 and refresh to 0 there was no real change, except that when turned on with HomeKit, Director did not show as on, Alexa did not show as on, but Insteon app did show as on, and then after accessing the Insteon app both Director and Alexa now showed as on.

The only way to get HomeKit to show as on when the light was switched on with any method other than HomeKit was to set a short refresh rate, which makes for a lot of network traffic.

I am convinced that most of the problem originated with the Insteon hub not sending status updates when a device state changes.

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Apr 6, 2023 via email

@AstonMartin715
Copy link

I remain convinced from my extensive testing that the plugin is leaving the connection to the Insteon hub open. It needs code to shut that down after communication. Until then, this will persist. I know this view isn't shared by @kuestess. But remember I have now tested homebridge, hoobs, 2 different RaspberryPI computers, and 2 different Insteon hubs. The only common factors are (1) the Insteon plugin and (2) my home and network setup. On (1), remember I also tested a different plugin (non-Insteon) and it worked. On (2) I will be testing the setup on a different home and network as soon as I can.

@sabresoftware2021
Copy link

I think that the Insteon hub is the culprit. I find that even the new Director app is not properly updated when devices change state. The old Insteon app generally shows the correct status, but often the app has to be refreshed (by swapping from Favorites to Devices screen or visa versa).

@AstonMartin715
Copy link

I disagree. The Insteon hub has been a workhorse for me for years, and I have 3 or them. Very reliable. The newer Director app may be buggy though.

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Apr 7, 2023 via email

@zzack01
Copy link

zzack01 commented Apr 7, 2023

I agree with @kuestess, I believe this is the insteon hub issue:**
#288 (comment)

I think if it were a HOOBS™ issue then the almost thousand people from discord would all be reporting the same, I too use a HOOBS™ box and do not have this issue.

I think if it were a plugin issue, thousands of users would be reporting this issue, again I too use this plugin without this issue.

I have also reached out to pass people that I have helped set up the insteon plugin and they report everything is working.

There was only @greg-e-ctrl @AstonMartin715 @mightstricky that is running HOOBS™ with this issue
There are also @hypeitinc using a mac mini with this issue
Also @sabresoftware2021 @AstonMartin715 used homebridge on a pi and had this issue
#288 (comment)

Again it may be possible you all share a setting with vpn/firewall/router setting... but I think we ruled that out earlier

Since it is across so many devices & platforms and it seems like none of the networks are the same, the only thing that all shares is the insteon hub...

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Apr 7, 2023 via email

@AstonMartin715
Copy link

One more data point to add to @greg-e-ctrl. The Insteon hub flawlessly accepts http commands, and has done for me for years, from any device. For example, I've been using irule to control lights since 2015. Up until the network issue caused by this setup when even that gets locked out. And don't forget I've used 2 Insteon hubs with this setup and both fail the same way. If your assertions are correct @zzack01 this would be a massively unfortunate coincidence that I have to have 2 of the bad ones.

@AstonMartin715
Copy link

If anyone wants to send me an insteon hub that they know for sure works with hoobs I’m happy to test it.

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Apr 7, 2023 via email

@greg-e-ctrl
Copy link
Author

greg-e-ctrl commented Apr 7, 2023 via email

@hypeitinc
Copy link

hypeitinc commented Apr 7, 2023 via email

@mightstricky
Copy link

I was one of the first ones to be involved in this thread. I have been silent for a while but Peter/Hyperion a comment above resonated with me because that’s exactly how I felt when I went silent. Let me reiterate and go silent again.

HOOBS and Insteonlocal need to stop bitching about this and work together to solve this problem.

In the meantime, I too have replaced 99% of my Insteon devices with HomeKit enables Wi-Fi devices. I made sure none of the replacement requires a hub because HomeKit devices has been very stable without a hub. The only device I have yet to find a replacement for is the 0-5V Ballast Dimmer from Insteon that I use to control an HVAC booster fan. Everything else Insteon is gone and will hit eBay soon.

Good luck everyone who is continuing with HOOBS and Insteonlocal. I sincerely hope this gets resolved for all of you.

@zzack01
Copy link

zzack01 commented Apr 8, 2023

Hey guys, Im a not try to blame fault, I am looking at the facts of the entire thread and see people using both homebridge and HOOBS™ having the same issue. I see people using different hardware then the HOOBS™ box having the issue. Which leads to believe that the HOOBS™ box and the HOOBS™ software alone is not the issue.

If you are using HOOBS™ and would like a new operating system please follow the steps on the website below:
https://support.hoobs.org/topics/resetting-re-flashing/how-to-i-re-flash-the-software

@AstonMartin715 shared that you have this issue on HOOBS™ and homebridge. So on both the similarities are the plugin, the network, and the insteon system.
PLUGIN:
@kuestess if a user is already using another program with insteon will this have any affect/interference of your plugin?
NETWORK:
We've been through the network (no firewall/vpn/... maybe ensure WMM NO-ack, Smart connect, 802.11ax WiFi6 mode, airtime fairness firewall, smart connect, mac filter,...) Also try changing the encrypt method to WPA2 only, change the channel band to 1 or 6 or 11, change the IP of DNS server to 8.8.8.8. Could also reset the router to factory or use network of another router, then check if the problem could be solved.
INSTEON:
Have you tried to factory reset the insteon hub? Then maybe add a single light switch and then run a new insteon plugin to see if you are having the same affect.

@greg-e-ctrl have you tried running only homebridge to see if the issue is the same? Also try the above too.

@kuestess do you have any other ideas? I am out of ideas to try...

@AstonMartin715
Copy link

INSTEON:
Have you tried to factory reset the insteon hub? Then maybe add a single light switch and then run a new insteon plugin to see if you are having the same affect.

Yes did exactly that. Same issue.

@kuestess
Copy link
Owner

kuestess commented May 4, 2023

Hi all, finally had a little time to dig into this again - ran Wireshark alongside the plugin, and watched that happened with the connection. Let it run for a while, but was never able to get it to a state where the hub wasn't responding. @AstonMartin715 or @greg-e-ctrl are either of you able to run Wireshark and watch the traffic between your hub and the homebridge machine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants