Alarm Decoder Emulated Zones

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 zone on the alarm panel to accomodate a motion sensor.
I 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 and I can use the new motion detector to trip the alarm.
If this is implemented, any binary sensor in home assistant can be set as a virtual zone (motion detectors, nest protect smoke alarm, zwave door/window sensors etc.)
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…

My guess is that you would want to edit the alarmdecoder (AD) component and create a switch for the virtual zone - that might require an AD switch class. This AD switch should use the AD python api (which is pretty simple) to set and clear the virtual zone as well as connect the AD zone notifications to the switch state. Once you have a switch in HA, you can use any automation you want to set and clear the switch.

There is also this request which might be very similar. A relay is really a switch so it would be similar to the zone: Alarmdecoder component - Add relay monitoring

Thinking a bit more about this, it might require both a sensor and an optional switch. A zone is normally a binary sensor so AD should create a sensor for each virtual zone to report status. Then maybe have an option in the config file to add switches to toggle the zone.

Sorry, I know nothing about python…I tried looking at the code but couldn’t figure it out

This is actually a bit different as the request you posted is trying to “read” alarmdecoder messages from devices already setup on the panel to use for automations where I am looking to actually “feed” instructions to alarmdecoder so I can expand my alarm system with other components from home assistant.

Yep, two items a little different from each other. The virtual relay feature request would be handled just like a regular window or door sensor contact coming out of the alarm panel. The virtual part is all handled in the alarmdecoder hardware itself and would just be like another zone message out of the panel to HomeAssistant.

The other feature is a cool setup where you could make your own motion sensor, contact, etc type of binary sensor that would tell the alarmdecoder hardware that a zone was triggered. The alarmdecoder hardware then pushes that zone out on the keypad bus and the panel thinks a real sensor just triggered the system.

Same boat as you almost, I know a little bit about Python, still learning it and such, but I dug through the existing code and it’s a little above my experience level at this point.