Closed swaggner closed 3 years ago
Assuming this is a Honeywell/DSC system...
The code waits for the status message to the panel and searches for the words "NIGHT" or "INSTANT" to come back...
homebridge-alarmdecoder-platform/alarmsystems/honeywell.js
if(stateObj.last_message_received && (stateObj.last_message_received.includes('NIGHT') || stateObj.last_message_received.includes('INSTANT')))
stateObj.panel_armed_night = true; //map instant mode to night
/* 0 = stay, 1 = away, 2 = night, 3 = disarmed, 4 = alarm */
this.log(JSON.stringify(stateObj));
You should be able to go into your homebridge console log and see what the alarm is sending back. Happy to adjust but my panel didn't even send back night so I didn't have the ability to test.
Makes sense. The set command is working, but the response is wrong. homebridge.log shows: [5/26/2021, 11:12:33 AM] [Alarm System] {"last_message_received":"[00110301000000003A--],008,[f70000011008038c08020000000000],\"ARMED STAYYou may exit now\"","panel_alarming":false,"panel_armed":false,"panel_armed_stay":true,"panel_battery_trouble":false,"panel_bypassed":{},"panel_chime":false,"panel_entry_delay_off":false,"panel_exit":true,"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 notice way more logs for alarm decoder than what I have enabled in notifications. Is the plug-in supposed to pull the “stateURL” on a regular basis without a “ping” from the notifications?
is there really no space after STAY in the log? if so, I'm pretty sure that's the problem.
as for the pinging, it's not actually polling the device. the panel sends out 'keep alive' updates every so often (like very often) and the system just updates all the variables each time and reports if anything has changed. This catches cases where someone has used the keypad directly or has one of the newer systems that can also be controlled by an app. The only time it every really bothers to poll the decoder is after an update from HomeKit, when HomeKit requests a poll or during the initial boot.
nvm, on Honeywell panels there's no way to distinguish beyond night-stay and home as the status message is the same. If you have the 'instant' feature turned on for night, it can pick up that, but if you're not using 'instant' in night, it's the same. You do send different commands but the message emitted is identical with home (if you see different let me know). I remember the DSC users get a different message.
Thanks so much for the detailed response and information. Github changed the asterisks around "STAY" to italicized print. I only have 3 zones that I'm monitoring in Homekit (in addition to the alarm system itself) via the custom notifications of alarm decoder, but my homebridge.log file is full of duplicate status messages about unmonitored zones and duplicate "disarmed ready to arm" messages. Is that normal or do I have something setup incorrectly? I actually started using logrotate for the log file because it was getting so large. Any idea how to arm "Stay - Instant" from homekit to achieve the night status? From my keypad, I can enter MYCODE +33 and homekit displays "night" correctly as you said. Thanks again for the help!
I need to add a way to suppress logging...that said, the program is actually pretty dumb. It just responds to what the panel is doing. all these configurations about instant and zone errors, etc. are all the result of the panel's configuration itself. you can use alarm decoder to get in and futz around with it but having delved into a bit, it's like interfacing with something built in the 70s and not really fun. If you can get night to trigger 'instant' on the panel config the status will be proper. Otherwise, might be easier to just live with it.
Makes sense. Thanks again for the help!
This is a great plugin and I only have one issue. I can’t get homekit to recognize “night” mode. The status always quickly changes from “Night” to “Home” within HomeKit even though my keypads say “NIGHT-STAY” as desired. It seems it is setting the command correctly but not getting the status back correctly.