Event "Disarmed by Master Pin" technically incorrect.
Closed this issue · 6 comments
Is your feature request related to a problem? Please describe.
Specifying event output for EVENT_DISARMED_BY_MASTER_PIN
Describe the solution you'd like
Could differentiate master pin from other pins
Additional context
I've been adapting the homebridge library to use in Node-Red and using this library as a reference for what I'm doing. in simplipy/websocket.py on line 73 you have event 1400 as "EVENT_DISARMED_BY_MASTER_PIN". In actuality, in my testing, that event actually denotes disarmed by "Keypad" rather than "master pin".
The master pin can be used on either remote or keypad. If you look at the data coming from 1400 or 1406 (alarm canceled), it differentiates "master pin" from other pins in the "pinName" field. The zoneCid field seems to coincide with the custom pin used and pinName is the label for that pin.
For example, master pin would output something like (omitting erroneous fields):
{
"eventCid": 1400,
"zoneCid": "1",
"sensorType": 1,
"info": "Alarm Disarmed by Master PIN",
"pinName": "Master PIN",
},
While another pin would output something like:
{
"eventCid": 1400,
"zoneCid": "3",
"sensorType": 1,
"info": "System Disarmed by PIN 3 \"Babysitter\"",
"pinName": "Babysitter",
},
This also applies to the alarm being canceled. I don't know if it really matters for all intents and purposes. But in my script I've added logic to differentiate what pin is used on the keypad for reporting purposes. I don't know if you guys ever noticed this and might want to do the same.
Would this just be changing the event name from disarmed_by_master_pin
to disarmed_by_pin
?
Well, in your code, I would go from "EVENT_DISARMED_BY_MASTER_PIN" to "EVENT_DISARMED_BY_KEYPAD".
If you want to add some logic to distinguish WHO disarmed the alarm, then on the 1400 and 1406 events you can read the "pinName" field to output which user put in their pin to disarm the alarm. I don't know if you can set up the remote disarm with a different pin as the output for 1407 has a blank "pinName" field when I disarm remotely, so I'm guessing not. It would only apply to 1400 and 1406.
Really I guess it just depends on how much data you are wanting to report. If you don't really care about outputting who disarmed the alarm, then leave it as it is, if you want to include that information to differentiate between the master pin and some other user, then it would make sense to change the event to something along the line of what I put above.
For me, I have 2 kids, my parents regularly come over, and a babysitter. So I like to keep a central log of their disarm events paired with some wifi connection/disconnection events to record who is home and when.
There hasn't been any activity on this issue recently, so it has been marked as stale.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment.
This issue will be closed if no further activity occurs. Thanks!
Not stale.
There hasn't been any activity on this issue recently, so it has been marked as stale.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment.
This issue will be closed if no further activity occurs. Thanks!
Bump.