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

AlarmDecoder API status requests return multiple duplicate messages #67

Open
gdavids57 opened this issue May 17, 2022 · 11 comments
Open

Comments

@gdavids57
Copy link

gdavids57 commented May 17, 2022

I'm using a HomeBridge plugin to integrate with the AlarmDecoder API. The plugin uses an Async/Try/Await construct to get the AlarmDecoder status. Whenever the AlarmDecoder server responds to the request, it frequently sends anywhere from 5-8 duplicate messages as you can see in the following log entry from the plugin. Note the 13:32:26 timestamp with exactly the same data for all of the log entries. Is this normal behavior from the server? Everything else works just great, including Notifications!

My AlarmDecoder server has the following configuration:
OS - Debian 5.10.103+
Python Version - 3.9
Hardware - Raspberry Pi Zero W with AD2pHAT

[17/05/2022, 13:32:26] [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":[]}
[17/05/2022, 13:32:26] [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":[]}
[17/05/2022, 13:32:26] [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":[]}
[17/05/2022, 13:32:26] [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":[]}
[17/05/2022, 13:32:26] [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":[]}
[17/05/2022, 13:32:26] [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":[]}
[17/05/2022, 13:32:26] [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":[]}

@f34rdotcom
Copy link
Contributor

f34rdotcom commented May 17, 2022 via email

@gdavids57
Copy link
Author

During a period while the panel was armed, I counted 25 duplicate messages in a 3-second span between 7:01:32 and 7:01:35. The duplicate message was:

[18/05/2022, 07:01:35] [ADT Security] {"last_message_received":"[00100001100000003A--],008,[f72200ff1008008c28020000000000],"ARMED STAY "","panel_alarming":false,"panel_armed":false,"panel_armed_stay":true,"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":false,"panel_relay_status":[],"panel_type":"ADEMCO","panel_zones_faulted":[]}

I also observed the same 25 duplicate count after the panel was disarmed and then no more duplicate messages.

As an aside, the plug-in authors have implemented a message filter which discards duplicate messages if they are exact duplicates of the previous message. However, this filter is not reliably discarding duplicate messages so there may be something going on in the plug-in code. I'm trying to determine if the plug-in is requesting all these messages or if the server is sending unsolicited duplicate messages.

Is there any log showing API requests coming into the server?

@f34rdotcom
Copy link
Contributor

f34rdotcom commented May 20, 2022 via email

@gdavids57
Copy link
Author

My connection to the Vista 20p is via a AD2pHAT hosted by my RPi Zero W. There are two "logs" I can provide using the AlarmDecoder webapp: the "Live" and the "App". Which do you prefer? And what do you mean by "disconnected from HA?" As a sample of what I'm seeing on the live log, see the following attachment. BTW, I'm seeing a panel message every 10 seconds with the following data: [10000001100000003A--],008,[f72200ff1008001c28020000000000]," DISARMED CHIME Ready to Arm "

I can do a desktop share anytime you wish as I'm now retired and "every day is Saturday"!

Live log - 20220520.pdf

@f34rdotcom
Copy link
Contributor

The Live log will work but if the Pi is running ser2sock then telnet to port 10000 is even better less HTML more raw message.

@gdavids57
Copy link
Author

I'll collect raw data from a telnet session with the AD2 as I have ser2sock enabled on the Pi. BTW, I set the AD2 configuration element, "Deduplicate" to 'yes'. What effect does this have on the AD2's messaging?

@f34rdotcom
Copy link
Contributor

f34rdotcom commented May 22, 2022 via email

@gdavids57
Copy link
Author

Here's an hour's worth of raw data. The first message came immediately after I ran thru a configuration review (e.g., sent '!'). These message correlate with both the AlarmDecoder web app "Live" log and my HomeBridge (HB) log; although, I've detected excessive alarm decoder messages in HB log upon starting up the HB service. Once the service is fully up and running, the message volume matches the raw data from the AD2.

[10000001100000003A--],008,[f72200ff1008001c28020000000000]," DISARMED CHIME Ready to Arm "
*
!Sending.done
!AUI:126600000000646c02456cf5ec0101010000
!AUI:1666000000006563024543f531fb456cf5ec03010101
[10010001100000003A--],008,[f72200ff1008001c28020000000000]," DISARMED CHIME Ready to Arm "
[10000001100000003A--],008,[f72200ff1008001c28020000000000]," DISARMED CHIME Ready to Arm "
[10000001100000003A--],008,[f72200ff1008001c28020000000000]," DISARMED CHIME Ready to Arm "
!RFX:0355137,04
!RFX:0754306,04
!RFX:0774234,84
!AUI:126600000000666c02456cf5ec0101010000
!AUI:1666000000006763024543f531fb456cf5ec03020106
[00000301100000000A--],003,[f72200f71003030028020000000000],"FAULT 03 EXTERIOR GARAGE "
[00000001100000000A--],003,[f70000080003000028020000000000],"FAULT 03 EXTERIOR GARAGE "
[00000001100000000A--],003,[f72200ff1003000028020000000000],"FAULT 03 EXTERIOR GARAGE "
!RFX:0879667,04
!RFX:0007326,84
!RFX:0202724,04
!RFX:0141535,04
!AUI:126600000000606c02456cf5ec0101010000
!AUI:1666000000006163024543f531fb456cf5ec03020106
[00000301100000000A--],004,[f72200f71004030028020000000000],"FAULT 04 PATIO DOOR "
[00000001100000000A--],004,[f70000080004000028020000000000],"FAULT 04 PATIO DOOR "
[00000001100000000A--],003,[f72200ff1003000028020000000000],"FAULT 03 EXTERIOR GARAGE "
!AUI:126600000000626c02456cf5ec0101010000
!AUI:1666000000006363024543f531fb456cf5ec03020106
!AUI:126600000000646c02456cf5ec0101010000
!AUI:1666000000006563024543f531fb456cf5ec03020106
[00000301100000000A--],001,[f72200f71001030028020000000000],"FAULT 01 FRONT GARAGE DOOR "
[00000001100000000A--],001,[f70000080001000028020000000000],"FAULT 01 FRONT GARAGE DOOR "
[00000001100000000A--],003,[f72200ff1003000028020000000000],"FAULT 03 EXTERIOR GARAGE "
[00000001100000000A--],001,[f72200ff1001000028020000000000],"FAULT 01 FRONT GARAGE DOOR "
[00000001100000000A--],003,[f72200ff1003000028020000000000],"FAULT 03 EXTERIOR GARAGE "
!AUI:126600000000666c02456cf5ec0101010000
!AUI:1666000000006763024543f531fb456cf5ec03020106
[00000001100000000A--],003,[f72200ff1003000028020000000000],"FAULT 03 EXTERIOR GARAGE "
!AUI:126600000000606c02456cf5ec0101010000
[00000301100000000A--],001,[f72200f71001030028020000000000],"FAULT 01 FRONT GARAGE DOOR "
[00000001100000000A--],001,[f70000080001000028020000000000],"FAULT 01 FRONT GARAGE DOOR "
!AUI:1666000000006163024543f531fb456cf5ec03020106
[00000001100000000A--],003,[f72200ff1003000028020000000000],"FAULT 03 EXTERIOR GARAGE "
!AUI:126600000000626c02456cf5ec0101010000
[00000001100000000A--],001,[f72200ff1001000028020000000000],"FAULT 01 FRONT GARAGE DOOR "
!AUI:1666000000006363024543f531fb456cf5ec03020106
!AUI:126600000000646c02456cf5ec0101010000
!AUI:1666000000006563024543f531fb456cf5ec03010101
[10000001100000003A--],008,[f72200ff1008001c28020000000000]," DISARMED CHIME Ready to Arm "
!RFX:0892047,04
!AUI:126600000000666c02456cf5ec0101010000
!AUI:1666000000006763024543f531fb456cf5ec03020106
[00000301100000000A--],001,[f72200f71001030028020000000000],"FAULT 01 FRONT GARAGE DOOR "
[00000001100000000A--],001,[f70000080001000028020000000000],"FAULT 01 FRONT GARAGE DOOR "
!AUI:126600000000606c02456cf5ec0101010000
[10000001100000003A--],008,[f72200ff1008001c28020000000000]," DISARMED CHIME Ready to Arm "
!AUI:1666000000006163024543f531fb456cf5ec03010101
[10000001100000003A--],008,[f72200ff1008001c28020000000000]," DISARMED CHIME Ready to Arm "
!AUI:126600000000626c02456cf5ec0101010000
!AUI:1666000000006363024543f531fb456cf5ec03020106
[00000301100000000A--],001,[f72200f71001030028020000000000],"FAULT 01 FRONT GARAGE DOOR "
[00000001100000000A--],001,[f70000080001000028020000000000],"FAULT 01 FRONT GARAGE DOOR "
[00000001100000000A--],001,[f72200ff1001000028020000000000],"FAULT 01 FRONT GARAGE DOOR "
!AUI:126600000000646c02456cf5ec0101010000
!AUI:1666000000006563024543f531fb456cf5ec03010101
[10000001100000003A--],008,[f72200ff1008001c28020000000000]," DISARMED CHIME Ready to Arm "
!RFX:0124531,8c
!RFX:0917922,84
!RFX:0371841,04
!RFX:0891803,04

@f34rdotcom
Copy link
Contributor

Looks normal other than having way fewer messages with de-duplicate turned on.

The panel sees faults then when all faults clear it shows a "READY" state and the next zone fault causes it to dump the zones and it continues several times.

@f34rdotcom
Copy link
Contributor

f34rdotcom commented May 30, 2022 via email

@gdavids57
Copy link
Author

gdavids57 commented May 31, 2022 via email

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

2 participants