AlarmDecoder Integration

That is what I was expecting. Home assistant is not replacing monitoring, I just want access to sensor more than anything. I have a detached shop, and there are some things I would like to automate.
Any new words of wisdom on which AlarmDecoder to use. When I look at this before you sugested AD2USB and ser2socket as the interface, anything changed there?
Also, just thought to ask, I am using hass.io, any issues since it is hard to get down to the OS?

I have been using AD2PI for a year or so (since it was introduced in HASS) and so far so good, I have seen the disconnections mentioned in the other post, but the system has been reliably for me (I do not have a monitored system). In the Alarmedecoder implementation you have the option to alert on the zones being triggered and I am using that one too (as a backup measure). My Home Assistant installation is Hassbian based.

I spent the extra money and got the AD2PI Network Appliance. It has been rock solid and I am happy I did. I picked it so I didn’t have to worry about usb drivers/configuration, setup of ser2socket, etc. Just connect to the alarm, plugin it into the network, plug it into power and done.

It is nice having access to all the door sensors and alarm state changes for automations.

I’ve not used the ad2pi (my rpi already has connections that would prevent the use of the hat, and would mean I needed a different pi just for this purpose. I prefer to have a single system running all my peripherals)
I still use the ad2usb + ser2socket plugged directly into my rpi.
I don’t use hass.io so I don’t know the effort of using it that way

@hawk259 , how is your HASS installed? Hassbian based, hass.io, other?

I posted a Feature Request for this a while back but maybe in the wrong place where you couldn’t see it. Would it be possible to add in the relay messages that come across the port 10000 stream? They are close to the RFX wireless messages and just be mapped as additional zones/binary sensors.

Docker running on a Synology box.

My concern was what configuration would be needed outside of HASS. HASS.io creates a docker environment and without hoops, you can not get to the OS shell. But in hindsight, if you use a device (ie: AD2USB or AD2PI) outside of the pi that is running HASS, then all the configurations should be in the HASS yaml files. There is not anything at the OS level to configure ser2sockets is there?

Should the docker running HASS.io be same as @hawk259? Maybe a different way to ask … @hawk259 did you have to do anything outside of the docker box running HASS?

Right, if you use a usb or serial device, you will need to import the device into the docker container. I have to do this for my usb z-wave stick. With AD2PI running on a separate device it is all in the configuration settings.

@penright
check out


I run a modified version of this on hassio and it is working just fine with the AD2USB.
1 Like

So I’m going to be that guy that responds to his own post. First of all, I’m no Python coder by any means but I have various coding backgrounds I can usually dig in, take things apart and see how things are done and modify some work. So that’s what I did with this component. I was able to add the relay monitoring feature I wanted for the most part. I got the proof of concept down and monitor a relay I wanted.

Now, I’m streamlining things and making the configuration easier and straightforward but then I ran into an issue. I can’t seem to get the schema down on just listing various entities without numbering them like the zone numbering is done. Before I go into a whole code snippet dump with various errors, is this the right spot/thread to inquire about that? Would some of the HA gurus on the coding side be able to help?

It’s been a fun challenge and I can’t wait to get it all finished! Take all the knowledge learned and will learn to contribute to the HomeAssistant project…exciting stuff.

Question for the gurus here, only been messing with Python off and on for a month or two along with HA. I’m hooked and all in, Smartthings is back in the box as of this week! I’m trying to update the alarmdecoder component to allow the triggering of the virtual relay messages (answer my own feature request). This feature is required for my alarm panel to send out the motion triggers while armed which is my big usage for lights of course.

I have it working for the most part after a good bit of trial and error but it works, I’d like to clean it up and do a proper config on it though as I mocked up each relay based on the examples of the zones. Is there a way to change my relays to not require a number like the zones are listed? I tried looking at several different components as examples but was unable to get my code to work. Basically looking to have a “relay:” section then list the name, address and channel of each relay in 3 variables. A system can have up to 4 relay boards with 4 or so relays per board, hence the address and channel. Any insight would be much appreciated. Thanks

Two components I updated:
https://github.com/digiblur/home-assistant/blob/dev/homeassistant/components/alarmdecoder.py https://github.com/digiblur/home-ssistant/blob/dev/homeassistant/components/binary_sensor/alarmdecoder.py
indent preformatted text by 4 spaces
Current config style is:
relays:
01:
relayname: ‘LRoomRelay’
relayid: ‘12,01’

Would like to change it to something like:

  • relayname : ‘LRoomRelay’
    relayaddr: 12
    relaychan: 1
  • relayname: ‘Back Door’
    relayaddr: 12
    relaychan: 2

…and so forth

Any examples of how to get this working in the config schema?

Can I suggest that you don’t need to call everything “relayX”? It’s already under the relays tag. “name”, “addr”, “channel” should be good enough then. I usually start with a basic yaml file and use a simple script that calls yaml.load() directly until you get it to work and see what the structure looks like. Then you can translate that into a schema. If you look at the existing zones schema, it should be pretty similar.

relays:
   - name: "Relay 1"
     address: 12
     channel : 1
   - name: "Relay 2"
     address: 12
     channel: 2

Ahh… Nice idea. I think I tried name but it threw an error so I changed it back to relay name. Will start simple first like you said and build from there.

Any of the Alarmdecoder folks with Vista/Honeywell panels using the virtual relay on their panel? Or wish they could see the bypassed zone triggers? I have a pull request in the queue with the changes to add the relays (reworked from the last time I got advice on the design). I had one user chime in that they tested and have no issues. It’s been working great here for a few months as well.

Hey digiblur. Thank you for your contribution to getting this working for us. I’m actually in the middle of implementing the motions that are bypassed into automation. I previously used DSC with Envisalink but I moved and Honeywell appeared to be a better fit. I still have an Envisalink, however, I’ve had terrible luck getting it to play nice with Home Assistant so I switched to AlarmDecoder and it’s been 100% stable.

I’d like to get the bypassed motions to report status in HA but I am missing something as I configured the relayaddr and relaychan but I know there’s more to it. Can you let me know what I’m missing? I’ve searched the Alarm Decoder documentation but it’s kind of vague with no solid examples.

TIA

I too struggled with this issue for quite some time and had many failures on getting it working until I started tearing into the alarmdecoder python library and realized the answer was right there. I found a VERY old archived post about the bypassed zone monitoring (specifically talking about the Vista 20P panel…there might be others).

Since the device simply sits on the keypad bus and listens for events, as you know the panel tries to be smart and not send out the tripped sensors such as motion at night when in armed home mode. This also presents a problem if you want to read the binary output of the delayed door for instant lighting when disarming the system from armed away mode. I heard from one EVL user that they don’t have this issue on their 20P but I don’t think he knew what I was talking about as I also found the issue in their threads with no solution. Fortunately Alarmdecoder has an solution!!

First you have to configure your Alarmdecoder to emulate a relay board. In reality these are boards installed in the home to trigger different things based on alarm events. The cool thing is they attach to the same keypad bus. So there’s the workaround. If you configure the panel to send a close relay command when the motion sensor is triggered then send an open relay command when the motion is not triggered you can see these commands on they keypad bus no matter what state the alarm panel is in. I only have two bypassed sensors (delayed door and motion) that I programmed in.

What you need to do is program the panel to send these codes to this emulated relay board. I had to dig up some programming manuals and walk through the programming. It’s not too hard but I just took my time and went through things. Here’s one thread with some instructions… when I get home later I’ll see if I can find the PDFs I used.

http://archive.nutech.com/index.php?option=com_fireboard&Itemid=74&func=view&catid=4&id=656

3 Likes

Fantastic! It took a little reading on that article but I got everything working without a hitch. The hardest part was hitting the serial interface on the ad2usb and turning on the relay. The rest was just programming my panel for the relays.

I had a weird issue where the panel didn’t see the relay and was beeping error codes but I discovered that’s because you must reboot it.

Any future users that want to read events off a zone that’s bypassed while in an armed state can follow those instructions. Remember to setup the ad2usb or ad2pi for relay expander emulation first! Make sure to also follow the zone reset procedure to turn off the tripped zones. once you do all this set your HA alarmdecoder component using the relayaddr and relaychan variables on your zone.(use addr 12 and whatever relay chan you’d like just make sure it’s 1-4 per emulated relay board so a max number of 16 if you enabled all 4 boards.)

Thanks @digiblur!

2 Likes

Thanks for the follow up! You beat me to the programming instructions PDF! Great job!

One thing to be aware of, if you reboot the Alarmdecoder module (I have the Raspberry Pi hat version) the alarm will freak out since it doesn’t get a response from the relay board. But once the AD is back up you can just do an arm and disarm and I think a second disarm? Can’t remember, whichever will clear the trouble codes. Then it will be all back and working.

Enjoy! The road was definitely a long for me and I’ve been enjoying the motion activation from the unit along with instantly lighting when the door opens. Have some conditions based on if we are home and its at late enough in the day on both of those and based on the alarm state as well.

1 Like

Correct, the keypad will beep and display

CHECK 112 RELAY MODULE

or

CHECK 113 RELAY MODULE

If this occurs you need to verify Alarm Decoder is configured for relay emulation and also online and then arm and disarm the system to clear it.

In my case I have an ad2usb which gets power directly off the panel. I imagine if you have an ad2pi or an ad2pi hat that you’re not running off the panel power it can create a problem or during a reboot. I almost connected my ad2usb directly to the power brick(bypassing the panel battery) so it wouldn’t waste power during an outage. Now I will be sure NOT to do that. :slight_smile: