tonesto7 / homebridge-hubitat-tonesto7

Hubitat Homebridge Plugin
107 stars 34 forks source link

(BUG) Homebridge plugin does not report intrusion status #157

Closed ppkhoa closed 2 years ago

ppkhoa commented 2 years ago

Verify the following before opening an trouble issue


About Your Setup

Expected Behavior

Homebridge reports intrusion when HSM reports intrusion based on conditions set and HomeKit should report intrusion detected

Current Behavior

Homebridge reports intrusion when HSM reports intrusion, however, nothing happens on HomeKit side.

Steps to Reproduce (for bugs)

  1. On Hubitat, go to Apps, Homebridge v2, then turn on Allow HSM control in HomeKit. Save configuration.
  2. On Homebridge, config the plugin using the same procedure provided in README, enabling Validate App Endpoint Access Token and AppID, Enable Debug Logging and Show device events in the logs.
  3. Set HSM to Away on HomeKit
  4. Activate motion sensor/open/close sensor used for HSM to report intrusion,
  5. Watch the logs as Homebridge reports intrusion but Home app stays silent with no notification.

Context

Using danTapps/homebridge-hubitat-makerapi, HSM reports intrusion status correctly in Home app (run separately from homebridge-hubitat-tonesto7). When running both plugins in parallel, HSM accessories from makerAPI showed intrusion while homebridge-hubitat-tonesto7 still only shows armed Away.


Please include a copy of any relevant log output to assist in tracking down the bug The following excerpt showed the makerapi plugin reported intrusion (ALARMSYSTEMCURRENT), while Hubitat-v2 also reported intrusion, but it is not reflected in HomeKit (ALARMSYSTEMSTATUS).

[8/9/2022, 2:33:16 PM] [Hubitat MakerAPI hhm:0.4.15] Received HSM Alert
[8/9/2022, 2:33:16 PM] [Hubitat MakerAPI hhm:0.4.15] Change Event (http): (Alarm System Hubitat MakerAPI:hsmHubitat MakerAPI) [ALARMSYSTEMCURRENT] is alarm_active
[8/9/2022, 2:33:16 PM] [Hubitat-v2] [Device Event]: (XVNT-C7) [ALARMSYSTEMSTATUS] is intrusion
[8/9/2022, 2:33:21 PM] [Hubitat-v2] [Device Event]: (Master Bedroom Motion Sensor) [MOTION] is active
[8/9/2022, 2:33:26 PM] [Hubitat-v2] [Device Event]: (XVNT-C7) [ALARMSYSTEMSTATUS] is intrusion
[8/9/2022, 2:33:26 PM] [Hubitat MakerAPI hhm:0.4.15] Received HSM Alert
[8/9/2022, 2:33:26 PM] [Hubitat MakerAPI hhm:0.4.15] Change Event (http): (Alarm System Hubitat MakerAPI:hsmHubitat MakerAPI) [ALARMSYSTEMCURRENT] is alarm_active
[8/9/2022, 2:33:37 PM] [Hubitat-v2] [Device Event]: (Master Bedroom Motion Sensor) [MOTION] is inactive
[8/9/2022, 2:33:46 PM] [Hubitat MakerAPI hhm:0.4.15] Received HSM Alert
[8/9/2022, 2:33:46 PM] [Hubitat MakerAPI hhm:0.4.15] Change Event (http): (Alarm System Hubitat MakerAPI:hsmHubitat MakerAPI) [ALARMSYSTEMCURRENT] is alarm_active
[8/9/2022, 2:33:46 PM] [Hubitat-v2] [Device Event]: (XVNT-C7) [ALARMSYSTEMSTATUS] is intrusion
[8/9/2022, 2:33:49 PM] [Hubitat-v2] [Device Event]: (Master Bedroom Motion Sensor) [MOTION] is active

image

tonesto7 commented 2 years ago

Thanks for reporting. Let me see how the makerapi version is handling hsm. There was a bug in Homebridge related to alarm system status that maybe they found a solution to.

tonesto7 commented 2 years ago

Sorry, it took so long. I'm pushing out an update in the next 20 minutes to resolve this issue. It will require updating the Hubitat app and plugin.

ppkhoa commented 2 years ago

I updated both the plugins (Homebridge and Hubitat) to .17 and .18. Looks like it's working now.

Will test it out in the next few days and let you know

ppkhoa commented 2 years ago

Test event seems to send alert correctly:

[10/9/2022, 3:59:32 AM] [Hubitat-v2] [Device Event]: (Presence Switch) [SWITCH] is off
[10/9/2022, 3:59:32 AM] [Hubitat-v2] Sending Device Command: armAway | Name: (Hubitat Safety Monitor) | DeviceID: (alarmSystemStatus_1) | UsingCloud: (false)
[10/9/2022, 3:59:32 AM] [Hubitat-v2] Sending Device Command: off | Name: (Bedroom) | DeviceID: (34) | UsingCloud: (false)
[10/9/2022, 3:59:32 AM] [Hubitat-v2] [Device Event]: (XVNT-C7) [ALARMSYSTEMSTATUS] is armedAway
[10/9/2022, 3:59:32 AM] [Hubitat-v2] [Device Event]: (Bedroom) [SWITCH] is off
[10/9/2022, 3:59:34 AM] [Hubitat-v2] [Device Event]: (Bedroom) [GROUPSTATE] is someOn
[10/9/2022, 3:59:35 AM] [Hubitat-v2] [Device Event]: (Bedroom) [GROUPSTATE] is allOff
[10/9/2022, 3:59:43 AM] [Hubitat-v2] [Device Event]: (Front Bedroom Door Sensor) [CONTACT] is open
[10/9/2022, 3:59:44 AM] [Hubitat-v2] [Device Event]: (XVNT-C7) [ALARMSYSTEMSTATUS] is intrusion-away
[10/9/2022, 3:59:46 AM] [Hubitat-v2] [Device Event]: (Front Bedroom Door Sensor) [CONTACT] is closed
[10/9/2022, 3:59:48 AM] [Hubitat-v2] [Device Event]: (Front Bedroom Door Sensor) [ACCELERATION] is active
[10/9/2022, 3:59:54 AM] [Hubitat-v2] Sending Device Command: on | Name: (Presence Switch) | DeviceID: (67) | UsingCloud: (false)
[10/9/2022, 3:59:54 AM] [Hubitat-v2] [CHARACTERISTIC (SecuritySystemTargetState) GET] alarmSystemStatus (Hubitat Safety Monitor) | LastUpdate: (10/9/2022, 3:59:44 AM) | Value: (1)
[10/9/2022, 3:59:54 AM] [Hubitat-v2] Sending Device Command: disarm | Name: (Hubitat Safety Monitor) | DeviceID: (alarmSystemStatus_1) | UsingCloud: (false)
ppkhoa commented 2 years ago

It's been a day and everything's working as expected.