Page 1 of 3

AD2PI with existing Raspberry Pi

PostPosted: Mon Apr 25, 2016 1:13 pm
by jgrant50
Hello,

I ordered the AD2PI board and installed it on my existing Raspberry Pi 2. I downloaded the pre-built image from Alarm Decoder and wired the board to my Vista 20P panel as keypad address 18. Everything works great - webapp, notifications, etc. I'm now trying to integrate into Smartthings and have run into a bit of an obstacle.

I have followed the GitHub instructions exactly as documented here:

https://github.com/nutechsoftware/alarm ... tree/debug

I am able to add the 2 device handlers as well as the SmartApp with no issues, but when I try to discover the AD2PI device per the instructions, no device is discovered. I've refreshed many times. I've also removed all associated Smartthings elements and started from scratch with the same results.

Has anyone else successfully integrated with Smartthings who can point me in the right direction to troubleshoot?

Thanks in advance.

Re: AD2PI with existing Raspberry Pi

PostPosted: Mon Apr 25, 2016 1:27 pm
by Scott
Do you see anything in the SmartThings logs when you're trying to refresh?

First thing I would check is what version of the webapp you're running. You can find that at the bottom of the page. 0.6.2 is current.

If that looks good, maybe a network issue? Are the AD2PI and SmartThings hub on the same router/switch?

Re: AD2PI with existing Raspberry Pi

PostPosted: Mon Apr 25, 2016 1:36 pm
by jgrant50
Hi. Thanks for the quick reply. I do see activity in the live logging while refreshing, but I'm not sure where to look for the webapp version. I just purchased and installed the board and downloaded the image a few days ago, so I would assume it's at the latest version.

Regarding the network, they are both on the same (192.168.2.x /24).

Thanks again for the help.

Re: AD2PI with existing Raspberry Pi

PostPosted: Mon Apr 25, 2016 1:37 pm
by jgrant50
My apologies - I found the webapp version (on the web page itself :)

v0.6.2-0-g6558799

Thanks.

Re: AD2PI with existing Raspberry Pi

PostPosted: Tue Apr 26, 2016 3:13 am
by jgrant50
Any other troubleshooting suggestions?

Re: AD2PI with existing Raspberry Pi

PostPosted: Tue Apr 26, 2016 12:02 pm
by Scott
Could you post the smartthings log from the install/discovery process? Uninstall all of the AlarmDecoder stuff first to make sure there's nothing strange left over.

Re: AD2PI with existing Raspberry Pi

PostPosted: Tue Apr 26, 2016 4:26 pm
by jgrant50
Scott wrote:Could you post the smartthings log from the install/discovery process? Uninstall all of the AlarmDecoder stuff first to make sure there's nothing strange left over.


I uninstalled all of the components from the IDE early today and just ran the setup again a few moments ago. I'm getting the same results as before. Here is the log entry for the AlarmDecoder (Service Manager):

684a234c-b2dc-438a-a780-52bbd419572f 8:24:20 PM: trace locationHandler: description=devicetype:04, mac:00178817DB29, networkAddress:C0A80218, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178817db29, ssdpTerm:urn:schemas-upnp-org:device:basic:1, ssdpNTS:
684a234c-b2dc-438a-a780-52bbd419572f 8:24:20 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:24:20 PM: trace locationHandler: description=devicetype:04, mac:00178817DB29, networkAddress:C0A80218, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178817db29, ssdpTerm:uuid:2f402f80-da50-11e1-9b23-00178817db29, ssdpNTS:
684a234c-b2dc-438a-a780-52bbd419572f 8:24:20 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:24:19 PM: trace locationHandler: description=devicetype:04, mac:00178817DB29, networkAddress:C0A80218, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178817db29, ssdpTerm:urn:schemas-upnp-org:device:basic:1, ssdpNTS:
684a234c-b2dc-438a-a780-52bbd419572f 8:24:19 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:24:17 PM: trace locationHandler: description=devicetype:04, mac:00178817DB29, networkAddress:C0A80218, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178817db29, ssdpTerm:uuid:2f402f80-da50-11e1-9b23-00178817db29, ssdpNTS:
684a234c-b2dc-438a-a780-52bbd419572f 8:24:17 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:24:17 PM: trace locationHandler: description=devicetype:04, mac:00178817DB29, networkAddress:C0A80218, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178817db29::upnp:rootdevice, ssdpTerm:upnp:rootdevice, ssdpNTS:
684a234c-b2dc-438a-a780-52bbd419572f 8:24:17 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:24:16 PM: trace locationHandler: description=devicetype:04, mac:00178817DB29, networkAddress:C0A80218, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178817db29::upnp:rootdevice, ssdpTerm:upnp:rootdevice, ssdpNTS:
684a234c-b2dc-438a-a780-52bbd419572f 8:24:16 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:24:16 PM: trace discover_alarmdecoder
684a234c-b2dc-438a-a780-52bbd419572f 8:24:03 PM: trace discover_alarmdecoder
684a234c-b2dc-438a-a780-52bbd419572f 8:24:04 PM: trace locationHandler: description=devicetype:04, mac:00178817DB29, networkAddress:C0A80218, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178817db29, ssdpTerm:urn:schemas-upnp-org:device:basic:1, ssdpNTS:
684a234c-b2dc-438a-a780-52bbd419572f 8:24:04 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:24:04 PM: trace locationHandler: description=devicetype:04, mac:00178817DB29, networkAddress:C0A80218, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178817db29::upnp:rootdevice, ssdpTerm:upnp:rootdevice, ssdpNTS:
684a234c-b2dc-438a-a780-52bbd419572f 8:24:04 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:24:03 PM: trace locationHandler: description=devicetype:04, mac:00178817DB29, networkAddress:C0A80218, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178817db29, ssdpTerm:uuid:2f402f80-da50-11e1-9b23-00178817db29, ssdpNTS:
684a234c-b2dc-438a-a780-52bbd419572f 8:24:03 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:24:02 PM: trace locationHandler: description=devicetype:04, mac:00178817DB29, networkAddress:C0A80218, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178817db29, ssdpTerm:urn:schemas-upnp-org:device:basic:1, ssdpNTS:
684a234c-b2dc-438a-a780-52bbd419572f 8:24:02 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:24:02 PM: trace locationHandler: description=devicetype:04, mac:00178817DB29, networkAddress:C0A80218, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178817db29, ssdpTerm:uuid:2f402f80-da50-11e1-9b23-00178817db29, ssdpNTS:
684a234c-b2dc-438a-a780-52bbd419572f 8:24:02 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:24:02 PM: trace locationHandler: description=devicetype:04, mac:00178817DB29, networkAddress:C0A80218, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178817db29::upnp:rootdevice, ssdpTerm:upnp:rootdevice, ssdpNTS:
684a234c-b2dc-438a-a780-52bbd419572f 8:24:02 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:24:01 PM: trace discover_alarmdecoder
684a234c-b2dc-438a-a780-52bbd419572f 8:23:41 PM: trace discover_alarmdecoder
684a234c-b2dc-438a-a780-52bbd419572f 8:23:41 PM: trace discover_devices: subscribe to location


Thanks.

Re: AD2PI with existing Raspberry Pi

PostPosted: Tue Apr 26, 2016 4:38 pm
by jgrant50
After it sat for a few more minutes, there are some errors in the log entry:

684a234c-b2dc-438a-a780-52bbd419572f 8:35:52 PM: error java.lang.StringIndexOutOfBoundsException: String index out of range: 154 @ line 125
684a234c-b2dc-438a-a780-52bbd419572f 8:35:52 PM: trace locationHandler: headers=HTTP/1.1 200 OK
Content-Length: 2
684a234c-b2dc-438a-a780-52bbd419572f 8:35:52 PM: trace locationHandler: description=index:17, ip:7F000001, port:23E7, requestId:2944097c-ed50-4007-8b0d-df2988e40ac7, headers:SFRUUC8xLjEgMjAwIE9LDQpDb250ZW50LUxlbmd0aDogMg==, body:T0s=
684a234c-b2dc-438a-a780-52bbd419572f 8:35:52 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:35:50 PM: trace locationHandler: description=Home
684a234c-b2dc-438a-a780-52bbd419572f 8:35:50 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:35:26 PM: trace locationHandler: description=devicetype:04, mac:00178817DB29, networkAddress:C0A80218, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178817db29::upnp:rootdevice, ssdpTerm:upnp:rootdevice, ssdpNTS:
684a234c-b2dc-438a-a780-52bbd419572f 8:35:26 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:35:26 PM: error java.lang.StringIndexOutOfBoundsException: String index out of range: 154 @ line 125
684a234c-b2dc-438a-a780-52bbd419572f 8:35:26 PM: trace locationHandler: headers=HTTP/1.1 200 OK
Content-Length: 2
684a234c-b2dc-438a-a780-52bbd419572f 8:35:26 PM: trace locationHandler: description=index:17, ip:7F000001, port:23E7, requestId:dea9dcc7-9576-4807-b47e-336cdb4b885c, headers:SFRUUC8xLjEgMjAwIE9LDQpDb250ZW50LUxlbmd0aDogMg==, body:T0s=
684a234c-b2dc-438a-a780-52bbd419572f 8:35:26 PM: trace locationHandler
684a234c-b2dc-438a-a780-52bbd419572f 8:35:24 PM: trace locationHandler: description=devicetype:04, mac:00178817DB29, networkAddress:C0A80218, deviceAddress:0050, stringCount:04, ssdpPath:/description.xml, ssdpUSN:uuid:2f402f80-da50-11e1-9b23-00178817db29, ssdpTerm:urn:schemas-upnp-org:device:basic:1, ssdpNTS:

Re: AD2PI with existing Raspberry Pi

PostPosted: Wed Apr 27, 2016 11:47 am
by Scott
Hmph. So definitely need a little better error handling in there, but I'm not actually seeing any responses from an AlarmDecoder.

I'll dig up some of my early test scripts for the discovery stuff a little later today so we can test from something other than the AlarmDecoder or SmartThings.

Re: AD2PI with existing Raspberry Pi

PostPosted: Wed Apr 27, 2016 12:07 pm
by jgrant50
Thanks Scott. Just let me know what you need on my end.