Page 1 of 1

[Solved] How to Arm/Disarm Alarm Panel Programmatically

PostPosted: Wed Apr 09, 2014 5:50 pm
by duachirag
I have attached AD2PI successfully, thanks to Scott for helping, able to listen to all the required events and send notifications. Now I want to arm/disarm the system through a python program. I can see send method on AlarmDecoder but not sure what format strings should be passed in. In other words, I don't know the conversion between what I punch on my physical keypad to what send method is expecting.

Re: How to Arm/Disarm Alarm Panel Programmatically

PostPosted: Wed Apr 09, 2014 6:32 pm
by kevin
You can send a full string of your code and action all at once or one at a time, such as:

Code: Select all
device.send("12341")
device.send(AlarmDecoder.KEY_F1)


First example is code + disarm
Second example is simulating an F1 or Fire press.

Outside of the built-in macros, all keys should be passed in as a string, not integers :)

Re: How to Arm/Disarm Alarm Panel Programmatically

PostPosted: Fri Apr 11, 2014 9:21 am
by duachirag
Thanks Kevin, worked like a charm!