Alarmdecoder Virtual Zone emulation

Alarmdecoder allows you to setup a “virtual zone” which you program into your alarm panel. Once setup properly, you can trip and restore the zone by issuing commands to the alarmdecoder device.
This is great since it allows you to use plenty of devices and hook them into your alarm system.
The way I have it setup is that I created a motion detection zone on the alarm panel. I also have a zwave PIR sensor connected to home assistant. These sensors are much cheaper than the ones that are offered by honeywell and ademco and they also have other sensors (temp, humidity etc) built in.
Now that I have a binary sensor for motion in home assistant, i created an automation to send a telnet command to the alarmdecoder whenever the binary sensor changes to on and another automation to send the restore command via telnet when the binary sensor returns to off. Now my alarm panel also shows when the virtual zone is faulted.
The reason I am posting is I was wondering if anyone has any ideas on how this might be integrated into the alarmdecoder component so that it isn’t so clunky to setup and dependent on shell scripts, events and automations. Alarmdecoder has python scripts for this on their github as well as the full explanation on how emulated zones are faulted and restored. I hope I was able to explain this properly…

Add your own custom component. Get the source code for the home assistant alarmdecoder.


Copy the alarmdecoder source code into the folder specified in the link.


to that folder.

Then, code away adding the alarmdecoder code into the component you copied.

If you don’t know python, then you’ll have to wait until someone does that for you after making a Feature request.

Alas, no python skills…I’ll post this in the feature requests…

Sorry for the necro-post, but for anyone else searching, just use the alarmdecoder.alarm_keypress service to send your command to the to the AlarmDecoder.

You’ve already worked it out, but for others, the command “L411\r” will fault zone 41, and “L410\r” will clear that zone. Make sure you use double quotes or the carriage return will be treated literally.

1 Like

Sorry for the necro-necro-post, but was wondering if you could offer a little more insight into how you set this up.

My biggest question is what to do on the panel itself. I enabled Zone 1 (I’m not using any hardwired zones so I figured that would be best), set it to Type 3 (perimeter) and then went over to HA Deverloper Tools > Services and called the alarmdecoder.alarm_keypress service to close the zone with this as my YAML:

entity_id: alarm_control_panel.alarm_panel
keypress: "L010\r"

It worked precisely once, cleared the zone, but then immediately faulted again 8 seconds later and I can’t get to clear again.

Is there anything else I need to set up on my Vista 20P in order for this to work? Besides adding the zone as type 3, I’ve done nothing else to the panel and cant’t figure out if I need to. AlarmDecoder’s documentation says…

After enabling it on both the panel and the AlarmDecoder you can begin opening and closing zones, which will be relayed back to the panel.

…but indicates nothing else needs to be done on the panel, so that’s where I’m lost.

Thanks for any help you might be able to provide!

Were you trying to use “L011\r” ? which should “trip” the zone…
Also, I guess the easiest way to troubleshoot is to use telnet to send the command and see if the alarmdecoder responds with any kind of error?
I am not 100% familiar with the settings in ademco but I believe there is a certain setting for the “Loop” which needs to be correct. Maybe try reading into and changing the loop setting…

Yes, I tried “L011\r” and like I indicated, it worked precisely once and then didn’t work anymore. Can you say more about using telnet commands? I’ve seen someone else use those on reddit, but I don’t know what IP address and port to use when using the AD2USB version.

That really depends on how you are setup? Is ser2sock installed on the host where the ad2usb is connected? What OS are you using on the machine that has the usb device etc. This might be more of a question for the alarm decoder forums…