aficustree / homebridge-alarmdecoder-platform

Homebridge plugin for the AlarmDecoder interface for Honeywell and DSC Alarm Systems. Exposes the security system and all zones (via Contact Sensors and Motion Sensors) to Apple's Homekit. Control your alarm through Siri.
Apache License 2.0
18 stars 11 forks source link

Excessive logging in Homebridge #33

Closed gdavids57 closed 1 year ago

gdavids57 commented 2 years ago

The plugin is working for both alarm setting and notifications; however, I'm getting excessive logging in Homebridge. Following are extracts from the Homebridge log and the Alarm Decoder log. Note there is no specific Alarm Decoder entry for 21:20 but Homebridge received three duplicate entries for 21:20. I have the two systems' clocks sync'd so the timestamps are accurate. Can anyone provide insight into this behavior from the plug-in?

Homebridge [31/12/2021, 21:20:34] [ADT Security] {"last_message_received":"[10000001100000003A--],008,[f72200ff1008001c28020000000000],\" DISARMED CHIME Ready to Arm \"","panel_alarming":false,"panel_armed":false,"panel_armed_stay":false,"panel_battery_trouble":false,"panel_bypassed":{},"panel_chime":true,"panel_entry_delay_off":false,"panel_exit":false,"panel_fire_detected":false,"panel_panicked":false,"panel_perimeter_only":false,"panel_powered":true,"panel_ready":true,"panel_relay_status":[],"panel_type":"ADEMCO","panel_zones_faulted":[]} [31/12/2021, 21:20:34] [ADT Security] {"last_message_received":"[10000001100000003A--],008,[f72200ff1008001c28020000000000],\" DISARMED CHIME Ready to Arm \"","panel_alarming":false,"panel_armed":false,"panel_armed_stay":false,"panel_battery_trouble":false,"panel_bypassed":{},"panel_chime":true,"panel_entry_delay_off":false,"panel_exit":false,"panel_fire_detected":false,"panel_panicked":false,"panel_perimeter_only":false,"panel_powered":true,"panel_ready":true,"panel_relay_status":[],"panel_type":"ADEMCO","panel_zones_faulted":[]} [31/12/2021, 21:20:34] [ADT Security] {"last_message_received":"[10000001100000003A--],008,[f72200ff1008001c28020000000000],\" DISARMED CHIME Ready to Arm \"","panel_alarming":false,"panel_armed":false,"panel_armed_stay":false,"panel_battery_trouble":false,"panel_bypassed":{},"panel_chime":true,"panel_entry_delay_off":false,"panel_exit":false,"panel_fire_detected":false,"panel_panicked":false,"panel_perimeter_only":false,"panel_powered":true,"panel_ready":true,"panel_relay_status":[],"panel_type":"ADEMCO","panel_zones_faulted":[]}

Alarm Decoder 2021-12-31 21:16:18,392 INFO: Checking for version updates - last check at: 12-31-2021 21:06:09 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:616] 2021-12-31 21:22:05,791 INFO: Event: 0124531:0:1:1:0:0:0 [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:521]

aficustree commented 2 years ago

while I'm the maintainer, I don't actually have a system ... that said, the system polls state before and after operation in addition to cases where the panel emits its own state. The broadcast of state seems to vary wildly amongst systems (some report state frequently, some only do on-change, and I've noted some strange behavior in multi-panel systems. My guess is that it checked once before, once after and then the system itself sent an update. You could probably extend it to make the logging facility 'debounce' repeated messages or only log broadcast state messages.

gdavids57 commented 1 year ago

I'm just digging deep into this issue. I see the updated code merged into master; however, when I install using Homebridge, I get an earlier version. If I manually install using the npm command directly, I get the current version. Is there something screwy with the repo metadata. I notice the release notes do not reflect the current release.

aficustree commented 1 year ago

added the latest fix to the debug, bumped the npm version to match.