kuestess / homebridge-platform-insteonlocal

Homebridge platform plugin for local Insteon control
Other
76 stars 26 forks source link

Problem with Motion Sensors and 2242 Hub #247

Open Ed217 opened 2 years ago

Ed217 commented 2 years ago

I have installed the insteon local on a homebridge setup I have a model 2042 hub, and the install seems fine. I have added two insteon motion sensor devices to the mix, and both show up in homekit. However even though motion works in other regular Insteon apps, no such data ever shows up in HomeKit. I have defined automations for each, but they never fire.

I believe I have the correct device ids and ports.

Any ideas or suggestions?

kuestess commented 2 years ago

@Ed217 I assume when you say that it works in other Insteon apps, that the motion sensors are linked to the Hub? Do you see anything in the log that shows the motion event happening?

Ed217 commented 2 years ago

No, nothing in the log at all. Yes with other apps connected to hub, sensors work fine. I also have a Ring doorbell and the motion sensor there works correctly with HomeBridge. However there are two different Insteon plugins and neither works with motion detection.

Ed217 commented 2 years ago

this is the log after a restart:

[15/05/2022, 19:21:10] [Homebridge UI] Homebridge log truncated by admin. [15/05/2022, 19:21:14] [Homebridge UI] Homebridge restart request received [15/05/2022, 19:21:14] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process [15/05/2022, 19:21:14] [Homebridge UI] Sending SIGTERM to Homebridge [15/05/2022, 19:21:14] Got SIGTERM, shutting down Homebridge... [15/05/2022, 19:21:19] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [15/05/2022, 19:21:24] [HB Supervisor] Restarting Homebridge... [15/05/2022, 19:21:24] [HB Supervisor] Started Homebridge v1.4.1 with PID: 991 [15/05/2022, 19:21:25] Loaded config.json with 0 accessories and 4 platforms. [15/05/2022, 19:21:25] Loaded 1 cached accessories from cachedAccessories. [15/05/2022, 19:21:25] --- [15/05/2022, 19:21:26] Loaded plugin: homebridge-config-ui-x@4.44.1 [15/05/2022, 19:21:26] Registering platform 'homebridge-config-ui-x.config' [15/05/2022, 19:21:26] --- [15/05/2022, 19:21:27] Loaded plugin: homebridge-nest-thermostat@1.0.2 [15/05/2022, 19:21:27] Registering platform 'homebridge-nest-thermostat.NestThermostat' [15/05/2022, 19:21:27] --- [15/05/2022, 19:21:28] Loaded plugin: homebridge-platform-insteonlocal@0.4.27 homebridge API version: 2.7 [15/05/2022, 19:21:28] Registering platform 'homebridge-platform-insteonlocal.InsteonLocal' [15/05/2022, 19:21:28] --- [15/05/2022, 19:21:30] Loaded plugin: homebridge-ring@11.0.0 [15/05/2022, 19:21:30] Registering platform 'homebridge-ring.Ring' [15/05/2022, 19:21:30] --- [15/05/2022, 19:21:30] Loading 4 platforms... [15/05/2022, 19:21:30] [Config] Initializing config platform... [15/05/2022, 19:21:30] [Config] Running in Service Mode [15/05/2022, 19:21:30] No plugin was found for the platform "ExampleHomebridgePlugin" in your config.json. Please make sure the corresponding plugin is installed correctly. [15/05/2022, 19:21:30] [Ring] Initializing Ring platform... [15/05/2022, 19:21:30] [InsteonLocal] Initializing InsteonLocal platform... Initializing Insteon UI Reading config from /var/lib/homebridge/config.json Found 4 platform(s) in config Creating new insteon.json No devices in config [15/05/2022, 19:21:30] [InsteonLocal] Started connection watcher... [15/05/2022, 19:21:30] [InsteonLocal] Found 2 devices in config [15/05/2022, 19:21:30] Initializing platform accessory 'MotionMusic'... [15/05/2022, 19:21:30] Initializing platform accessory 'MotionPorch'... [15/05/2022, 19:21:30] [Ring] Configuring cached accessory 88077e25-c878-4d0b-b9a2-15765b03ea19 Front Door Setup Payload: X-HM://00241HCHDLGUT Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 345-15-569 │     
└────────────┘     

[15/05/2022, 19:21:30] Homebridge v1.4.1 (HAP v0.10.2) (Homebridge E9B2) is running on port 51806. [15/05/2022, 19:21:30] [Ring] Found the following locations: [15/05/2022, 19:21:30] [Ring] locationId: 71b8abfe-91f6-46b8-9d64-59479580b56a - Roanoke [15/05/2022, 19:21:31] [Ring] Configuring 1 cameras and 1 devices for location "Roanoke" - locationId: 71b8abfe-91f6-46b8-9d64-59479580b56a Error getting Hub info

kuestess commented 2 years ago

@Ed217 If you load up the plugin ui, does your motion sensor appear in the list of devices?

Ed217 commented 2 years ago

Bit sure which plugin you mean. This is the config data for the current install.

{ "bridge": { "name": "Homebridge E9B2", "username": "0E:1A:42:93:E9:B2", "port": 51806, "pin": "345-15-569", "bind": [ "eth0" ] }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "name": "Janet Ed House", "platform": "ExampleHomebridgePlugin" }, { "refreshToken": "eyJhbGciOiJIUzUxMiIsImprdSI6Ii9vYXV0aC9pbnRlcm5hbC9qd2tzIiwia2lkIjoiYzEyODEwMGIiLCJ0eXAiOiJKV1QifQ.eyJpYXQiOjE2NTI2ODg2NjMsImlzcyI6IlJpbmdPYXV0aFNlcnZpY2UtcHJvZDp1cy1lYXN0LTE6M2M3ZjhlNGIiLCJyZWZyZXNoX2NpZCI6InJpbmdfb2ZmaWNpYWxfYW5kcm9pZCIsInJlZnJlc2hfc2NvcGVzIjpbImNsaWVudCJdLCJyZWZyZXNoX3VzZXJfaWQiOjY5MTk0MDk3LCJybmQiOiItTUlCM0E3eWswTHlIZyIsInNlc3Npb25faWQiOiJhYzE1NWUxNC1lZjUyLTRkZGYtYjk4Zi1hZDQyYTIyMjAzZGEiLCJ0eXBlIjoicmVmcmVzaC10b2tlbiJ9.toFiiJIunEnPYHhKx4aZim4MHey4B7_jpIRxoMMLrkzRBTbrtY0SpD2Q0wvndTWn4u8Mj5Fuz7qbrP1OAW5I2w", "beamDurationSeconds": 16263, "cameraStatusPollingSeconds": 6, "platform": "Ring" }, { "name": "InsteonLocal", "user": "admin", "pass": "jake93", "host": "198.168.0.220", "port": "1800", "model": "2242", "refresh": "0", "server_port": "3000", "keepAlive": "3600", "devices": [ { "name": "MotionMusic", "deviceID": "285F7B", "dimmable": "no", "deviceType": "motionsensor" }, { "name": "MotionPorch", "deviceID": "285B07", "dimmable": "no", "deviceType": "motionsensor" } ], "platform": "InsteonLocal" } ] }

Ed217 commented 2 years ago

They also show in the devices list for the InsteonLocal plugin. I added each separately

Ed217 commented 2 years ago

I think I am missing something more basic. It says:

Click on the 'Hub' link. In the top section of the page, click 'Get Hub Info'. This pulls information from the Hub, most notably the Insteon ID. Still on the 'Hub' page, click 'Get Devices/Links' under the action menu.

Where is this actions menu?

Ed217 commented 2 years ago

I configured a regular Insteon light to the system. That works now. I did find one conflict. In the past I had a Windows based Insteon app running. With that running, HomeBridge control didnt work. When I turned that off and restarted the bridge, the light now goes on and off under Homebridge control However the motion sensors still show no data in the log.

kuestess commented 2 years ago

@Ed217 The action menu is right under the 'Get hub info' button. Alternately, you can click the 'Get Devices' button on the Devices page. You can only have a single connection to the hub at a time so you won't be able to connect using the plugin while the Windows Insteon app is running.

Ed217 commented 2 years ago

I see none of these buttons anywhere...'Get hub info, Action menu, or Devices page. All MIA.

The main homebridge page has a status area and a menu for plugins and config. The settings for Insteon have only Devices and cancel/save

Ed217 commented 2 years ago

Seems we are talking about completely different screens and systems.

sahafeez commented 2 years ago

@Ed217 @kuestess is talking about the express server GUI, not the homebridge GUI.

http://yourip:3000/

Ed217 commented 2 years ago

homebridge is what I am using, not something else. Does it work with that? The readme seems to say it does.

sahafeez commented 2 years ago

@Ed217 I am confused. This homebridge plugin beside installing what you see in the home bridge GUI installs another service that allows you to manipulate the InsteonDB. That is what @kuestess and myself are referring to. You need to open another browser window to the same IP address as homebridge but on a different port. So for example you connect to http://192.168.100.16:8581/ for homebridge you need to open another window to http://192.168.100.16:3000/ to see the express server. Replace the IP with the IP of the system you are running homebridge on.

It is documented in the wiki

https://github.com/kuestess/homebridge-platform-insteonlocal#insteonui

Ed217 commented 2 years ago

Already tried multiple times on the correct port. Nothing in each case. If I start up my windows apps that does Insteon things, it has no trouble working with the hub, doing motion detection, schedules, etc.

Ed217 commented 2 years ago

When I log in, this is what I see:

INSTEON Hub Details Alert 2.6 YF PLM:9C Firmware:4.8A Build Feb 08 2013 ID:1E.C5.05

For device control visit connect.insteon.com User Manual Technical Support

sahafeez commented 2 years ago

@Ed217 that is the IP of your Insteon HUB not the homebridge software. You need to install homebridge https://homebridge.io and then this plugin.

Ed217 commented 2 years ago

Still missing something here. I am open on http://homebridge.local/. It shows the basic interface, plugings, etc. I have Homebridge UI, RING, Insteon and Nest as plugins.

Ed217 commented 2 years ago

Homebridge is running on a separate Rasperberry PI 4 here in same room.

kuestess commented 2 years ago

@Ed217 Open http://homebridge.local:3000/ in your browser.

Ed217 commented 2 years ago

Thanks, will try that and see what I get.

Ed217 commented 2 years ago

This looks more promising. Will be later tonight or tomorrow before I have a chance to test. thanks for the help!

Ed217 commented 2 years ago

I see the screens and buttons referenced earlier. It does populate all the devices. However motion detection is still not working at all. The devices are there, but motion has no effect on what is reported, and hence you cannot trigger anything based on motion.

I use motion to trigger lights at different places in the house. I've been doing this for at least 30+ years. I started with X10 in the 70s and moved on to Insteon in later decades. Since Insteon went belly up a month or so ago, I'm trying to move everything to Homekit. Most of my lights now are fully Homekit devices. I also have a few Homekit motion sensors that work well too.

kuestess commented 2 years ago

@Ed217 Do you see the device ID of your motion sensor in the list on the devices page?

Ed217 commented 2 years ago

@Ed217 Do you see the device ID of your motion sensor in the list on the devices page?

Yes, all are listed there. I have added each to the config list;

"devices": [ { "name": "MotionMusic", "deviceID": "285F7B", "dimmable": "no", "deviceType": "motionsensor" }, { "name": "MotionPorch", "deviceID": "285B07", "dimmable": "no", "deviceType": "motionsensor" }, { "name": "Stairs Light", "deviceID": "364717", "dimmable": "yes", "deviceType": "dimmer" }, { "name": "MotionStairsDown", "deviceID": "215863", "dimmable": "no", "deviceType": "motionsensor" }, { "name": "Picture Light", "deviceID": "2E4F78", "dimmable": "yes", "deviceType": "dimmer" } ],

Ed217 commented 2 years ago

Initializing Insteon UI Reading config from /var/lib/homebridge/config.json Found 4 platform(s) in config Reading devices from insteon.json [24/05/2022, 16:06:29] [InsteonLocal] Started connection watcher... [24/05/2022, 16:06:29] [InsteonLocal] Found 5 devices in config [24/05/2022, 16:06:29] Initializing platform accessory 'MotionMusic'... [24/05/2022, 16:06:29] Initializing platform accessory 'MotionPorch'... [24/05/2022, 16:06:29] Initializing platform accessory 'Stairs Light'... [24/05/2022, 16:06:30] Initializing platform accessory 'MotionStairsDown'... [24/05/2022, 16:06:30] Initializing platform accessory 'Picture Light'...

Ed217 commented 2 years ago

When the Windows app is not running, I can turn these two lights on or off. However motion detection never shows up.

kuestess commented 2 years ago

@Ed217 The plugin will initialize whatever you put in the config, however that doesn't necessarily mean that they are valid/properly linked. My suspicion is that the motion sensors are not properly linked - if not, then the hub won't get messages about the events which the plugin needs to work. Do you see messages for either of the motion sensors in the homebridge log?

Ed217 commented 2 years ago

No, there are no messages for motion from any of them.

Ed217 commented 2 years ago

What are they supposed to be linked to? There is no linking needed for other homekit motion sensors I already have

Ed217 commented 2 years ago

Any further thoughts on this? Still does nothing.

kuestess commented 2 years ago

@Ed217 Don't recall what kind of hub you have, but the easiest way to check now that the Insteon app is working is to open the app and see if your motion sensor shows there. If not, you'll need to link it to the hub after which point the plugin should pick up those events.

Ed217 commented 2 years ago

I have a Insteon model 2242 hub. I have a number of regular Insteon motion sensors. They work fine with other apps that use this hub. However none ever show up with the Homebridge setup. They do show in init:

[02/07/2022, 08:24:27] [InsteonLocal] Initializing InsteonLocal platform... Initializing Insteon UI Reading config from /var/lib/homebridge/config.json Found 5 platform(s) in config Reading devices from insteon.json [02/07/2022, 08:24:27] [InsteonLocal] Started connection watcher... [02/07/2022, 08:24:27] [InsteonLocal] Found 5 devices in config [02/07/2022, 08:24:27] Initializing platform accessory 'MotionMusic'... [02/07/2022, 08:24:27] Initializing platform accessory 'MotionPorch'... [02/07/2022, 08:24:27] Initializing platform accessory 'Stairs Light'... [02/07/2022, 08:24:27] Initializing platform accessory 'MotionStairsDown'... [02/07/2022, 08:24:27] Initializing platform accessory 'Picture Light'...

sahafeez commented 2 years ago

@Ed217 the fact that you have them in the config.json does not mean they are in the DB on the hub itself. There is a DB on the hub where devices have to be linked to. If you go to the UI here - http://yourip:3000/devices do you see the device ID in the list? As @kuestess said now that Insteon is back online you could just look in the App (which looks at the DB on the hub).

Ed217 commented 2 years ago

Port 3000 does not reflect anything on my system. The 2242 hub is located at 198.168.0.220 and port 1800. Its been there for many years. It has all the devices there including the motion sensors. It also shows in the iOS app for Insteon. I can see the same devices using HouseLinc, there windows app from years ago.

sahafeez commented 2 years ago

@Ed217 I am referring to the IP of the system running the plugin, not your hub. The documentation is here:

https://github.com/kuestess/homebridge-platform-insteonlocal#express-server

This will tell you if the plugin sees them from the DB on the hub. From there you can get links, etc and verify what they are linked to.

Ed217 commented 2 years ago

It looks like Insteon has pushed out an update for the 2242 hub that bricks it for port 9761. The update shows for 8/10/22 and that day it stopped working.

kuestess commented 2 years ago

@Ed217 That sucks, clearly a step backward. Does it work if you configure the hub as a 2245?

Ed217 commented 2 years ago

Not sure how I would do that. I think they are trying to void all old hub users in the hope they will buy new ones and subscribe to their paid service,

kuestess commented 2 years ago

@Ed217 You just need to change your config to reflect model 2245 rather than 2242.

Ed217 commented 2 years ago

The problem I am seeing is with a Windows app...one I wrote many years ago and still use. If you use the standard Insteon HouseLinc app, its the same problem now. I know of no way to change the model in those cases. I was never able to get motion sensors to work with the HomeBridge setup.

kuestess commented 2 years ago

@Ed217 I was referring to the plugin - try to change the model to 2245 in your config.json.