Page 1 of 1

Python commands

PostPosted: Mon Jan 29, 2018 9:33 pm
by Robin629
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

Re: Python commands

PostPosted: Sun Feb 04, 2018 8:42 am
by kevin
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

Re: Python commands

PostPosted: Sun Feb 04, 2018 10:18 am
by Robin629
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!!

Re: Python commands

PostPosted: Sun Feb 04, 2018 10:23 am
by kevin
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.

Re: Python commands

PostPosted: Sun Feb 04, 2018 10:25 am
by Robin629
I didn’t know you could send requests for codes like that with AUI! That’s awesome thanks so much!!