[Solved] How to Arm/Disarm Alarm Panel Programmatically

General Discussion

[Solved] How to Arm/Disarm Alarm Panel Programmatically

Postby duachirag » Wed Apr 09, 2014 5:50 pm

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.
duachirag
newt
newt
 
Posts: 9
Joined: Tue Apr 08, 2014 6:18 am

Re: How to Arm/Disarm Alarm Panel Programmatically

Postby kevin » Wed Apr 09, 2014 6:32 pm

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 :)
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: How to Arm/Disarm Alarm Panel Programmatically

Postby duachirag » Fri Apr 11, 2014 9:21 am

Thanks Kevin, worked like a charm!
duachirag
newt
newt
 
Posts: 9
Joined: Tue Apr 08, 2014 6:18 am


Return to General

Who is online

Users browsing this forum: No registered users and 6 guests

cron