Alarmdecoder and multiple partitions

Hi all,

I’ve just received my new AD2USB and configured it in Home Assistant. My alarm panel has 8 partitions (Ademco Vista 4140XMPT2) and I’ve added a new keypad for the AD2USB in the panel. For starters, I’ve configured this new keypad on partition 4, to match the appartment I actually live in. In my configuration, I’ve only added the zones that are relevant to my apartment (for now). As my alarm system has almost 100 zones, most of them are connected on the polling loop. And I think this is where my problem is. In Home Assistant, I see my apartment’s zones “blinking”, i.e. switching from closed to faulted and then to closed again, as the panel loops through the polling loop. At least this is my understanding. Something similar happens with the alarm panel display component, it continuously changes from partition to partition, displaying the state of each partition (armed, disarmed, faults etc).

Does anyone have any experience with such a situation?

Thank you in advance

OK, some more information: I’ve added an address mask to the AD2USB, so I now only see messages relevant to my partition. And from what I’ve read in the alarmdecoder forums, it seems that the way this device works is by constantly sending the asterisk symbol to the panel (*) to get the faulted zones (a feature called zonetracker if I understood correctly). Which may be why I see my zones constantly switching from faulted to not-faulted and back to faulted again. However, this renders the information from monitoring the zones in Home Assistant pretty much useless, as you can’t really tell if a zone is faulted or not, unless you keep staring at the UI for a couple of minutes.

So my question would be: does anyone using alarmdecoder and Home Assistant get meaningful information from zone sensors?

I do, but I don’t have multiple partition. I am using AD2PI Network Appliance and HA running inside Docker on a Synology Diskstation.

I track of all the zones of my alarm (26). 4 doors, 5 motion, 5 glass break, a smoke alarm and the rest are windows contacts.

I get a motion sensor state stuck ever once in a while, but other than that it all works great.

I am also using the door state for automation for turning on lights (sun down, garage door opens, back door not been opened for 5 mins, turn on garage lights).

Mine does, but I only have 1 partition with 20 zones. You should probably post this on the alarm decoder forum - the authors pretty active over there and can probably help you figure out what’s going on.

Thank you for your answers. Over the last few days, I’ve been using the AD2USB with Home Assistant in the “mode” I described above, i.e. essentially only “monitoring” one partition of my alarm, which is OK for the time being. What I’m still not clear on is whether the sensors should be working the way they are. For instance, I have a window contact. If the window is open, the sensor will only show that it is open for a couple of seconds every 30-40 seconds (when the panel is actively polling it??), the rest of the time it seems to be closed. This is what troubles me the most, as I’m not sure how I could use this information to turn on a light on arrival for example…

@hawk259, do you mind sharing the code for the automation you described above?

Thank you

Hmm, I wouldn’t think window or door contacts would be like that. Open is open, closed is closed.

I know glass break sensors have two modes, I don’t know the exact names for them:

  • Alarm and latch (stay alarmed)
  • Alarm and release (reset)

I was told the latch mode was so if you had a bunch of sensors all wired together you could tell which one went off and use release if they are wired individually.

I wonder if your alarm can be configured so the window sensors can do the same thing. My window/door sensors show open until you close them.

Here is the automation for garage door opens, sun is down, back door not been opened for 5 mins (300 seconds), turn on garage and back door interior lights.

http://www.brianfrance.com/software/home-assistant/garagedoor-open-lights-on.yaml

ADT and the other “smart” alarm companies keep knocking on my door trying to sell me alarm and home automation stuff and I give them this test:

I am coming home at night open the garage door, can your system turn on the garage and back door lights?

Most can pass that test, until you add the kicker:

It is night and I am leaving, I open the back door, close the door behind me, hit the garage door button and get in the car. Can your system detect I am leaving and not coming home and NOT turn on the the garage and back door lights? Nobody has passed yet, expect my HA system.

The wife thought I was crazy when I set all this up, until it stop working for a few days and she noticed how she hates coming home to a dark garage/house.

Hi hawk259,

thank you for your detailed response. Is your alarm panel an Ademco/Honeywell one? And if so, are your door/window contacts connected on the polling loop, or directly to the panel?

Thanks

I have a VISTA-20P with three expansion boards and cellular module.

I believe all sensors are connected directly to the panel.

I’m using a Vista-20P with some hardwired zones and a lot of wireless zones going through a 6160RF wireless interface. No issues with zones flickering or anything else. I suggest you try removing HASS from the equation to figure out what’s going on. Use the alarmdecoder package (pip install alarmdecoder) and you can see exactly what the AD module is doing. A simple script like the one below will print every keypad message sent to the AD and report zones opening and closing. There are a number of other callbacks that can be added as well. From what I see, keypad messages are sent by the panel every once in awhile to refresh the keypad display but I don’t seen any indication of the AD module sending a bunch of * commands.

I’d also recommend setting up ser2sock if you haven’t - that lets multiple clients get the AD messages. Otherwise you have to make sure you shut down HASS and give yourself permissions to read he serial connection.

from __future__ import print_function
import time
import datetime as dt
import alarmdecoder as A

def on_zone_fault( device, zone ):
    print( dt.datetime.now(), "OPENED zone:", zone)
def on_zone_restore( device, zone ):
    print( dt.datetime.now(), "CLOSED zone:", zone)
def on_message( device, message ):
    print( dt.datetime.now(), "MESSAGE:", message)

# ser2sock port
if 1:
    dev = A.devices.SocketDevice( interface=( 'localhost', 22053 ) )
else:
    dev = A.devices.SerialDevice( interface='/dev/ad2usb' )

ad = A.AlarmDecoder( dev )
ad.on_zone_fault += on_zone_fault
ad.on_zone_restore += on_zone_restore
ad.on_message += on_message

with ad.open( baudrate=115200 ):
    while True:
        time.sleep(1)

Hi,

thank you all for your inputs. I’ve tried your suggestion @TD22057 and my results are consistent with what I see within Home Assistant. Please take a look at the image below, it’s from the alarmdecoder webapp:

This explains the way my sensor’s report their state, i.e. zones are “oscillating” between open and closed state.

I’ve posted this in the alarmdecoder forums too, but in the meantime, has anyone experienced anything similar?

Thanks

Well, I heard back from the alarmdecoder guys in the forum: http://www.alarmdecoder.com/forums/viewtopic.php?f=3&t=592&p=2676#p2676

What’s weird is that they are saying that what I see is the standard behavior and it’s the way the panels report the zones’ state, so not much the AD2USB can do about it. But then, how do your systems report zone status properly? I’m confused…

Weird. My logs (Vista 20P, 1 partition, 4 hardwired zones, 16 wireless zones via 6160RF module) don’t show anything like that. I see exactly what you’d expect - zone faults when they open, restores when they close. As far as I can see, there are no extra entries. Of course the Vista 4140 could be different - maybe the panel firmware is the issue.

I think he figured it out:

It only does it for my motions and rf wireless zones, so maybe there’s something there.

I see that on my motions, which I would expect as motion is detected and then it doesn’t detect motion any more.

I am at a loss on how to even handle this inside of HA or even test it since I can’t reproduce it.

Add a pause/delay setting per zone that if it gets a close/clear, ignore it if it is before the pause/delay setting?

I don’t see that working at all. Say you have a 5 second delay:

  1. open window, alarm sends zone open msg
  2. alarm sends zone close msg in 2 seconds, ignore due to delay
  3. alarm sends zone open msg, resets delay timer
  4. close windows in 1 second, alarm sends zone close msg, ignored due to delay

The zone is now permanently open.

Any chance you can get the logs of the raw messages from AD? I use a hacked up script like this:

http://www.brianfrance.com/software/alarmdecoder/socket_example.py.txt

Just change the IP address and let it run to see what you get.

I am wondering if there is a way to detect a valid close/clear vs random ones.