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

Support for Arming Buttons #1

Closed ansuz07 closed 6 years ago

ansuz07 commented 6 years ago

First off, thank you so much for your work on this platform. I know you guys do this stuff for fun and it is really appreciated by people like me who take advantage of all that work.

I was curious if you had any plans to support the automatic arming buttons present on DSC systems that appear in the Alarm Decoder Web UI. For example, my system as dedicated "Stay" and "Away" buttons that enable specific alarm states. It seems that there are special keys that can be sent via the API to activate those specific functions. It would be really cool if rather than sending the generic arm/disarm code, it could send those specific keys instead.

Thanks for reading and if its too much work, I totally get it :)

aficustree commented 6 years ago

i have a honeywell panel and stay is PIN + 3, AWAY is PIN + 2 and NIGHT is PIN + 33....do those combos not work on DSC (i.e., do you have to use the special buttons?). If they do work, what advantage does sending the special button instead of the combo do? (i think i could send the special version, just curious as to the advantage)

ansuz07 commented 6 years ago

They don't seem to work on a DSC panel - when I use those commands on mine they seem to just send the arm/disarm pin and enable a generic arm state. The combo buttons don't seem to enable discrete alarm states.

The idea on the special buttons is that the stay/away buttons can allow for different zones to be armed by default. For my system, the "stay" state does not enable the motion detectors, while the "away" state does enable them. I'd imagine this is somewhat common, as you would not want motion detectors active when you are home.

I don't know how the differences manifest between Honeywell and DSC systems, but it does seem tile the key+pin does not elicit the same response between the two systems. If you need a guinue pig for DSC, I'm happy to do that for you.

aficustree commented 6 years ago

okay, i think i've got a fix for DSC panels. I see in the alarmdecoder code there's references to a "Exit" and "Reset" button on DSC panels. Can you describe the use of those buttons (if they exist). Do you still disarm with PIN+"1" ? How do you do "night" mode (aka 'instant' mode)?

I've just pushed a version with a new config.json, readme.md to test. Here i've replaced stay and away with the special buttons (i think). Let me know if it works. You shouldn't have to flush any cached accessories. Make sure you set DSCorHoneywell to DSC in your config.json

aficustree commented 6 years ago

oh, it's on the development branch, not the main branch so make sure you pull from that

ansuz07 commented 6 years ago

I honestly have no idea what the reset and exit buttons do - I’ve never actually used them.

To disarm, it is just the normal pin, no additions at the end.

I’ll test out the new settings today. To install it, do I just replace #master with #development?

Thanks for all the help

ansuz07 commented 6 years ago

So I installed the updated package and updated the config.json with your new version. Tested it out and here are the results:

ansuz07 commented 6 years ago

So as it turns out I was a few commits behind on the Alarm Decoder libraries. After I updated it is all working perfectly! Thanks for your help with all this -

ansuz07 commented 6 years ago

One tiny thing I noticed this morning I though I'd toss out to you.

I have the alarm set up on some automation (e.g. automatically arm when I leave the house, automatically disarm when I get home). I've noticed that if the alarm is already in the desired state (e.g. it is disarmed and I arrive home) then it will still send the function to the panel. This isn't an issue when it is already armed (the panel just ignores the function) but when it is disarmed it will send the disarm code, which results in the panel arming.

Probably a unique thing for DSC (since it doesn't use the Pin + function like Honeywell does) but I thought I'd let you know. Overall, not a big deal and easy to work around.

aficustree commented 6 years ago

Interesting, yes, since disarm and arm are different on a Honeywell i didn't consider the behavior so the system isn't too rigorous with tracking state internally. That will take a bit more work to think through. I'm out for the next few days but will try and squeeze in some time to look maybe towards the weekend. Let me know if you find anything else.

ansuz07 commented 6 years ago

No rush - its a minor thing that is easy to work around.

I've tested the thing pretty well and that is all that has come up. I'll let you know if I find anything else, but the other changes you made to the platform work perfectly.

aficustree commented 6 years ago

pushed a new version on the dev branch. didn't have time to think it through all that much so let me know if it works.

ansuz07 commented 6 years ago

This seems to be working correctly. Thanks for the help.