AlarmDecoder AD2Pi Network Appliance

Do I need an arduino mega or will the ad2pi network interface bundle unit work alone?

This is an ā€œall in oneā€ appliance that includes everything you need. You just hook it up to your alarm panel and your home network, then install the device handler and smartapp and you are good.

Thanks for your response. Looking to wire it up to a vista 20p today. Any reference materials as to specifics are greatly appreciated given the wide swath of data available to this newbie :slight_smile:

I personally donā€™t have this appliance though I do have the AD2Pi which is part of the device. Alarmdecoder.com has lots of documentation and even a video on installing the AD2Pi to your alarm panel.

The only difference with the network appliance is it comes with a Raspberry Pi 3 and a custom case. Otherwise you can buy a Raspberry Pi and the AD2Pi which will work also.

Hey Kevin, do I need to update the webapp with the recent changes? I see this in the instructions for setup:

Enabling SmartThings Integration in the Webapp

Log into your AlarmDecoder webapp.
Click Settings
Click Notifications
Click the New Notification button
Set the Notification Type to ā€˜SmartThings Integrationā€™
Enter a description
Click SmartThings settings
Enter the ā€˜API Endpointā€™ you recorded during install into the ā€˜URLā€™ box.
Enter the ā€˜API Tokenā€™ you recorded during install into the ā€˜Tokenā€™ box.
Press Next
Press Save

I donā€™t see the ā€œSmartThings Integrationā€ in my current version of the Alarmdecoder webapp though (v0.6.2-0-g6558799). If I need to update to a later version, how would I go about doing this? I donā€™t see any documentation on how to do this on Github, unless I glossed over it somewhere.

Go to your web URL for the keypad and put /update at the end. Remove the rest minus IP or host name. Doing from memory. Itā€™s probably under settings somewhere also

Thanks. My DNS resolution was messed up so I fixed that then forced a git update on the repository. After doing all that I was able to see the ā€œupdate availableā€ notification and updated. Now I see the SmartThings notification template.

Odd though because my AlarmDecoder integration wasnā€™t working and I couldnā€™t get the alarm to set when arming it. I made sure to update and set the API key for the device but no go. So I ended up removing the app and service and re-added everything. Now when I try to add the AlarmDecoder device back I get ā€œError Saving Pageā€ - ughā€¦ not sure what to do here.

EDIT: NM - guess it was just a blip or took some time to refresh/update. I was finally able to add the device back and now things are working again it seems. Strange thing is that my motion sensor was set off and now the status of the AlarmDecoder device is ā€œFire!ā€ - haha not sure whatā€™s up with that.

1 Like

How do I setup so that house siren will go off from devices that are triggered by smartthings and are not in a zone on the alarm panel? For example I have Z wave motion sensors that I would like to trigger the siren.

BTW: Iā€™m getting a ton of these errors in the syslog on the Alarmdecoder webapp:

May 15 09:43:05 localhost gunicorn[30747]: --------------------------------------------------------------------------------
May 15 09:43:05 localhost gunicorn[30747]: ERROR in decoder [/opt/alarmdecoder-webapp/ad2web/decoder.py:404]:
May 15 09:43:05 localhost gunicorn[30747]: Error while broadcasting event.
May 15 09:43:05 localhost gunicorn[30747]: --------------------------------------------------------------------------------
May 15 09:43:05 localhost gunicorn[30747]: Traceback (most recent call last):
May 15 09:43:05 localhost gunicorn[30747]: File ā€œ/opt/alarmdecoder-webapp/ad2web/decoder.pyā€, line 397, in _handle_event
May 15 09:43:05 localhost gunicorn[30747]: errors = self._notifier_system.send(ftype, **kwargs)
May 15 09:43:05 localhost gunicorn[30747]: File ā€œ/opt/alarmdecoder-webapp/ad2web/notifications/types.pyā€, line 105, in send
May 15 09:43:05 localhost gunicorn[30747]: errors.append(ā€˜Error sending notification for {0}: {1}ā€™.format(n.description, str(err)))
May 15 09:43:05 localhost gunicorn[30747]: AttributeError: ā€˜SmartThingsNotificationā€™ object has no attribute ā€˜descriptionā€™

I have noticed recently that the DH for the device shows open sensors but the individual sensors are not updating status. Anytips? Update?

I added a new hardwired zone to my Vista 20p panel, in this case Zone 6. I setup the correct settings, enabled the zone on the panel and power cycled the AD2Pi device. I then went into the smartthings app and mapped Zone tracker 6 to zone 6. But I do not see the device show up in smartthings. My original devices/zones are still working fine, am I missing something?

Bumpā€¦ Anyone experience this same issue?

Have you tried uninstalling and then reinstalling the smartapp in the IDE? I think I had to do that whenever I changed the zone assignments. Youā€™ll have to reassign all your zones.

Jason

I was going to try that next, I was hoping to avoid having to re-input all the info. Such a simple action should not require re-installing the entire app.

Edit: I ended up re-installing the app and it is working properly. This time I left the Zone 7/8 entries in the smartthings apps for future use and marked them as unused.

1 Like

You can try to contact AlarmDecoder directly before you do it. They may have a better solution. Have you tried posting on their boards? Or emailing them? See if someone is in their IRC channel.

Mind sharing what you changed to add more virtual zones? Iā€™d really like to have all of my window and door sensors monitored, not just 8. 8 is a very small number for an average sized houseā€¦

Sure. Iā€™ll have to go take a look at it since it has been a while. I think Kevin posted what lines need to be changed somewhere if you look around here and on the AlarmDecoder forums.

Jason

Here are the changes I made to the device_type.groovy: (Line numbers from original before adding additional code)

I got a little fancy and added the names of my zones right at the beginning, so here is line 18-24 for mine:

/*** Sensors ***/

def getSensorMap() {
    return ['10':'Front Door', '11':'Dining Room S.G.D', '12':'Garage Entry Door', '13':'Laundry Rm Bath Window', '14':'Kitchen Window', '15':'Kitchen Nook Window', '16':'Family Rm Door','17':'Master Bd Rm Window 1', '18':'Master Bd Rm Window 2', '19':'Master Bath Door', '20':'Hall Bathroom Window', '21':'Bedroom 2 Window', '22':'Bedroom 3 Window', '23':'Bedroom 4 Window','24':'Bedroom 5 Window', '25':'Motion - Hallway', '49':'Off', '50':'Away', '51':'Stay'];
}

def sensorMap = getSensorMap();

Then, I added my custom zones to the preferences section (Lines 25-32):

input("zonetracker1zone", "number", title: "10: " + sensorMap['10'], description: "Zone number to associate with this contact sensor.")
input("zonetracker2zone", "number", title: "11: " + sensorMap['11'], description: "Zone number to associate with this contact sensor.")
input("zonetracker3zone", "number", title: "12: " + sensorMap['12'], description: "Zone number to associate with this contact sensor.")
input("zonetracker4zone", "number", title: "13: " + sensorMap['13'], description: "Zone number to associate with this contact sensor.")
input("zonetracker5zone", "number", title: "14: " + sensorMap['14'], description: "Zone number to associate with this contact sensor.")
input("zonetracker6zone", "number", title: "15: " + sensorMap['15'], description: "Zone number to associate with this contact sensor.")
input("zonetracker7zone", "number", title: "16: " + sensorMap['16'], description: "Zone number to associate with this contact sensor.")
input("zonetracker8zone", "number", title: "17: " + sensorMap['17'], description: "Zone number to associate with this contact sensor.")
input("zonetracker9zone", "number", title: "18: " + sensorMap['18'], description: "Zone number to associate with this contact sensor.")
input("zonetracker10zone", "number", title: "19: " + sensorMap['19'], description: "Zone number to associate with this contact sensor.")
input("zonetracker11zone", "number", title: "20: " + sensorMap['20'], description: "Zone number to associate with this contact sensor.")
input("zonetracker12zone", "number", title: "21: " + sensorMap['21'], description: "Zone number to associate with this contact sensor.")
input("zonetracker13zone", "number", title: "22: " + sensorMap['22'], description: "Zone number to associate with this contact sensor.")
input("zonetracker14zone", "number", title: "23: " + sensorMap['23'], description: "Zone number to associate with this contact sensor.")
input("zonetracker15zone", "number", title: "24: " + sensorMap['24'], description: "Zone number to associate with this contact sensor.")
input("zonetracker16zone", "number", title: "25: " + sensorMap['25'], description: "Zone number to associate with this contact sensor.")
input("zonetracker17zone", "number", title: "49: " + sensorMap['49'], description: "Zone number to associate with this contact sensor.")
input("zonetracker18zone", "number", title: "50: " + sensorMap['50'], description: "Zone number to associate with this contact sensor.")
input("zonetracker19zone", "number", title: "51: " + sensorMap['51'], description: "Zone number to associate with this contact sensor.")																																

After line 58, I added the rest of my zones to the attribute list:

    attribute "zoneStatus13", "number"
    attribute "zoneStatus14", "number"
    attribute "zoneStatus15", "number"
    attribute "zoneStatus16", "number"
    attribute "zoneStatus17", "number"
    attribute "zoneStatus18", "number"
    attribute "zoneStatus19", "number"

After line 197, I added the additional ValueTiles for my additional zones:

valueTile("zoneStatus13", "device.zoneStatus13", inactiveLabel: false, width: 1, height: 1) {
    state "default", icon:"", label: '${currentValue}', backgroundColors: [
        [value: 0, color: "#ffffff"],
        [value: 1, color: "#ff0000"],
        [value: 99, color: "#ff0000"]
    ]
}

valueTile("zoneStatus14", "device.zoneStatus14", inactiveLabel: false, width: 1, height: 1) {
    state "default", icon:"", label: '${currentValue}', backgroundColors: [
        [value: 0, color: "#ffffff"],
        [value: 1, color: "#ff0000"],
        [value: 99, color: "#ff0000"]
    ]
}

valueTile("zoneStatus15", "device.zoneStatus15", inactiveLabel: false, width: 1, height: 1) {
    state "default", icon:"", label: '${currentValue}', backgroundColors: [
        [value: 0, color: "#ffffff"],
        [value: 1, color: "#ff0000"],
        [value: 99, color: "#ff0000"]
    ]
}

valueTile("zoneStatus16", "device.zoneStatus16", inactiveLabel: false, width: 1, height: 1) {
    state "default", icon:"", label: '${currentValue}', backgroundColors: [
        [value: 0, color: "#ffffff"],
        [value: 1, color: "#ff0000"],
        [value: 99, color: "#ff0000"]
    ]
}

valueTile("zoneStatus17", "device.zoneStatus17", inactiveLabel: false, width: 1, height: 1) {
    state "default", icon:"", label: '${currentValue}', backgroundColors: [
        [value: 0, color: "#ffffff"],
        [value: 1, color: "#ff0000"],
        [value: 99, color: "#ff0000"]
    ]
}

valueTile("zoneStatus18", "device.zoneStatus18", inactiveLabel: false, width: 1, height: 1) {
    state "default", icon:"", label: '${currentValue}', backgroundColors: [
        [value: 0, color: "#ffffff"],
        [value: 1, color: "#ff0000"],
        [value: 99, color: "#ff0000"]
    ]
}

valueTile("zoneStatus19", "device.zoneStatus19", inactiveLabel: false, width: 1, height: 1) {
    state "default", icon:"", label: '${currentValue}', backgroundColors: [
        [value: 1, color: "#ff0000"],
        [value: 99, color: "#ff0000"]
    ]
}

Update line 204:

    details(["status", "arm_disarm", "stay_disarm", "panic", "zoneStatus1", "zoneStatus2", "zoneStatus3", "zoneStatus4", "zoneStatus5", "zoneStatus6", "zoneStatus7", "zoneStatus8", "zoneStatus9", "zoneStatus10", "zoneStatus11", "zoneStatus12", "zoneStatus13", "zoneStatus14", "zoneStatus15", "zoneStatus16", "zoneStatus17", "zoneStatus18", "zoneStatus19", "refresh", "teststuff"])

Update the loops to have the correct number:
Line 211 and 225:

for (def i = 1; i <= sensorMap.size(); i++)

line 495:

	def sensorMap = getSensorMap();
    for (def i = 1; i <= sensorMap.size(); i++) {

Line 518-522

	def sensorMap = getSensorMap();
    // Iterate through the zone tracker settings.  If the zone number matches,
    // trigger an event for the service manager to use to flip the virtual
    // switches.
    for (def i = 1; i <= sensorMap.size(); i++) {

And in the service_manager.groovy:

Lines 365-381 become:

  			/*** Sensors ***/
  		def sensorMap = ['10':'Front Door', '11':'Dining Room S.G.D', '12':'Garage Entry Door', '13':'Laundry Rm Bath Window', '14':'Kitchen Window', '15':'Kitchen Nook Window', '16':'Family Rm Door','17':'Master Bd Rm Window 1', '18':'Master Bd Rm Window 2', '19':'Master Bath Door', '20':'Hall Bathroom Window', '21':'Bedroom 2 Window', '22':'Bedroom 3 Window', '23':'Bedroom 4 Window','24':'Bedroom 5 Window', '25':'Motion - Hallway', '49':'Off', '50':'Away', '51':'Stay'];
  		def sensorKeys = sensorMap.keySet() as String[]; 
// Add virtual zone contact sensors.
for (def i = 0; i < sensorMap.size(); i++)
{
  def currentSensorKey = sensorKeys[i];	
	def currentSensorValue = sensorMap[currentSensorKey];									  
  																								 
    def newSwitch = state.devices.find { k, v -> k == "${state.ip}:${state.port}:switch${i+1}" }
    if (!newSwitch)
    {
        def zone_switch = addChildDevice("alarmdecoder", "VirtualContactSensor", "${state.ip}:${state.port}:switch${i+1}", state.hub, [name: "${state.ip}:${state.port}:switch${i+1}", label: "${currentSensorKey}: ${currentSensorValue}", completedSetup: true])

@dman2306 Wondering if my post helped you along. Hope you were able to figure it out.

Jason