Python commands

General Discussion

Python commands

Postby Robin629 » Mon Jan 29, 2018 9:33 pm

Hello! I’m just starting to attempt to develop for the AD2PI. So far I’ve gotten commands to work but I’m really confused on something... when I send the command device.send(*5123402*#) to delete a user code (1234 being the master and 02 being the slot number it doesn’t actually delete it, only changes it. When I add the code “3456” it adds through the python library just fine but when I go to delete it, it changes it to “1056”. I’m really confused as to what it’s doing to change the code.

While I’m at it, how do I request statuses from the system for zones, arming state, ready state, etc.? Do I use the device.send() command or something different?

Thank you for any help!! :D
Robin629
newt
newt
 
Posts: 3
Joined: Mon Jan 29, 2018 9:27 pm

Re: Python commands

Postby kevin » Sun Feb 04, 2018 8:42 am

Robin629 wrote:Hello! I’m just starting to attempt to develop for the AD2PI. So far I’ve gotten commands to work but I’m really confused on something... when I send the command device.send(*5123402*#) to delete a user code (1234 being the master and 02 being the slot number it doesn’t actually delete it, only changes it. When I add the code “3456” it adds through the python library just fine but when I go to delete it, it changes it to “1056”. I’m really confused as to what it’s doing to change the code.

While I’m at it, how do I request statuses from the system for zones, arming state, ready state, etc.? Do I use the device.send() command or something different?

Thank you for any help!! :D


Not sure about deleting users - you'll have to go through your programming manual and figure out exactly what to send. No magic here - the keys you .send is what is sent

The python library automatically keeps track of states of things for you - check the alarmdecoder library documentation it is possible to get all of that information, suggest looking at the events such as on_alarm etc
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: Python commands

Postby Robin629 » Sun Feb 04, 2018 10:18 am

Thanks for the reply! I know the keys to send, and sometimes it works, but sometimes it doesn’t. It’s Seems like it isn’t sending the correct keys in the right order all the time. But what confuses me even more is my command to add a user code (almost the same as deleting, you type in the user number then the code you want instead of the user number then * to clear it) always works. I do have a few more questions too now... I’m thinking this is a pyserial issues but I keep getting an error at the very end of each log (not sure what you call it, the response in a terminal after sending a command) saying I’m attempting to use a port that’s not open. The command almost always goes through without a problem but once in a while the command won’t. I’m guessing it’s becausr of that error. The other question has to do with the Honeywell side of things.

When I want to test this on a Honeywell system, besides changing the commands around a little what do I need to do? I saw there’s a field somewhere in the library that said DSC or Honeywell, do I need to somehow set that field? If so where? The last question is about AUI/LRR. Now that the AUI messages are decided, is that the best method to use? What’s the difference between LRR messages and AUI? Do I use AUI to also send commands somehow? Or is it just the normal device.send()?

Thanks so much!!
Robin629
newt
newt
 
Posts: 3
Joined: Mon Jan 29, 2018 9:27 pm

Re: Python commands

Postby kevin » Sun Feb 04, 2018 10:23 am

You should probably email support about your serial port issue.

You just use .send method to send keys, if you need a specific type of command to send such as AUI, you can prefix with the AUI command indicator '|' this is all in the protocol documentation found through the Documentation link above

example: decoder.send('K01|006f6b0a81') to send an AUI command to get your installer code

Panel mode is done through device setup.
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: Python commands

Postby Robin629 » Sun Feb 04, 2018 10:25 am

I didn’t know you could send requests for codes like that with AUI! That’s awesome thanks so much!!
Robin629
newt
newt
 
Posts: 3
Joined: Mon Jan 29, 2018 9:27 pm


Return to General

Who is online

Users browsing this forum: No registered users and 4 guests

cron