AD2Pi and SmartThings integration error

General Discussion

Re: AD2Pi and SmartThings integration error

Postby Quinchu » Fri Dec 01, 2017 1:58 pm

I can confirm it does not work with the v2 hub, with your changes to the dev branch.

Are there logs we can get you?
Quinchu
newt
newt
 
Posts: 5
Joined: Tue Nov 28, 2017 3:30 pm

Re: AD2Pi and SmartThings integration error

Postby jasonsf » Fri Dec 01, 2017 8:55 pm

I also can't get it to work with the v2 hub. I might have time to dig into the code this weekend.

Jason

Sent from my Pixel 2 using Tapatalk
jasonsf
Senior Nut
Senior Nut
 
Posts: 60
Joined: Sun Oct 16, 2016 2:43 pm

Re: AD2Pi and SmartThings integration error

Postby jasonsf » Sat Dec 02, 2017 11:49 am

Sean, I'm trying to see what is happening with communication between the webapp API and the smart app. When I hit Refresh in the smart app, I see an http get to the hub, but I do not see any response or anything in the webapp log. Should I?

Smartthings log:
Code: Select all
5d25236c-6f66-4927-a34f-ed1eed51fea5  12:46:36 PM: trace --- httpResponse: GET /api/v1/alarmdecoder?apikey=YBGCO7BGBKVQ HTTP/1.1
Accept: */*
User-Agent: Linux UPnP/1.0 SmartThings
HOST: /static/device_description.xml

5d25236c-6f66-4927-a34f-ed1eed51fea5  12:46:36 PM: trace --- hub_http_get: host=/static/device_description.xml, path=/api/v1/alarmdecoder?apikey=YBGCO7BGBKVQ
5d25236c-6f66-4927-a34f-ed1eed51fea5  12:46:36 PM: trace --- handler.refresh


WebApp Log:
Code: Select all
2017-12-02 19:21:37,750 INFO: Checking for version updates - last check at: 12-02-2017 19:11:21 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:600]
2017-12-02 19:31:49,920 INFO: Checking for version updates - last check at: 12-02-2017 19:21:37 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:600]
2017-12-02 19:42:00,184 INFO: Checking for version updates - last check at: 12-02-2017 19:31:49 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:600]


When I fault a zone, the Service manager registers this in the log:
Code: Select all
9ce1b78c-efc5-4e89-a6ee-f9a750c9f4cd  12:51:39 PM: trace refresh_alarmdecoders: AlarmDecoder
9ce1b78c-efc5-4e89-a6ee-f9a750c9f4cd  12:51:39 PM: debug getChildDevices(true), children=17
9ce1b78c-efc5-4e89-a6ee-f9a750c9f4cd  12:51:39 PM: trace refresh_alarmdecoders-
9ce1b78c-efc5-4e89-a6ee-f9a750c9f4cd  12:51:39 PM: trace webserviceUpdate


but the smartapp does not show the zone faulted.
jasonsf
Senior Nut
Senior Nut
 
Posts: 60
Joined: Sun Oct 16, 2016 2:43 pm

Re: AD2Pi and SmartThings integration error

Postby mathewss » Sat Dec 02, 2017 1:32 pm

At some point the HUB will hit the AD2Pi web appliance using its REST Api "OAauth" to keep in sync. I removed all of my smartthings sensors and devices to try and tests Adding again but now its broken and I get no updates. Meh.


Best
SM
mathewss
Moderator
Moderator
 
Posts: 188
Joined: Fri Dec 06, 2013 11:14 am

Re: AD2Pi and SmartThings integration error

Postby jasonsf » Sat Dec 02, 2017 1:47 pm

Lol, that's how I got into this situation in the first place. I deleted the device and re-added it.

Sent from my Pixel 2 using Tapatalk
jasonsf
Senior Nut
Senior Nut
 
Posts: 60
Joined: Sun Oct 16, 2016 2:43 pm

Re: AD2Pi and SmartThings integration error

Postby mathewss » Sun Dec 03, 2017 5:44 pm

Sorry for the lag in posting I have been busy trying to put my finger on the issue. I have two systems setup at my office and one was working the other was not. The only difference was the update.

I checked out hash 82282c8bc6 under alarmdecoder-webapp
git checkout 82282c8bc6

If others can confirm that would help. Next is to walk forward to figure out what broke or trace this version and compare network. No specific plan on how to fix it yet but at least I have a known good and bad.

Best
Sean M
mathewss
Moderator
Moderator
 
Posts: 188
Joined: Fri Dec 06, 2013 11:14 am

Re: AD2Pi and SmartThings integration error

Postby jasonsf » Sun Dec 03, 2017 6:31 pm

What are you trying to confirm? I checked out commit 82282c8bc6, rebooted the pi, uninstalled the smart app, then attempted to reinstall it. Still got the null pointer exception.

Code: Select all
root@alarmdecoder:/opt/alarmdecoder-webapp# git branch -a
* (detached from 82282c8)
  dev
  master
  remotes/origin/HEAD -> origin/master
  remotes/origin/dev
  remotes/origin/master


Code: Select all
java.lang.NullPointerException: Cannot invoke method minus() on null object


Code: Select all
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:16 PM: error java.lang.NullPointerException: Cannot invoke method split() on null object
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:16 PM: trace locationHandler: description=null
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:16 PM: trace locationHandler
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:16 PM: trace locationHandler: description=register
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:16 PM: trace locationHandler
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:14 PM: error java.lang.NullPointerException: Cannot invoke method minus() on null object
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:14 PM: trace addExistingDevices, devices.find=uuid:97487987-b220-11e7-9ba8-b5672e8fd4f7={port=1388, ssdpUSN=uuid:97487987-b220-11e7-9ba8-b5672e8fd4f7, devicetype=04, mac=B827EB6C0227, hub=54a142d6-34b8-444f-a2d5-960dc05ea1ce, ssdpTerm=urn:schemas-upnp-org:device:AlarmDecoder:1, ip=C0A80B95}
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:14 PM: trace devices=[uuid:97487987-b220-11e7-9ba8-b5672e8fd4f7:[port:1388, ssdpUSN:uuid:97487987-b220-11e7-9ba8-b5672e8fd4f7, devicetype:04, mac:B827EB6C0227, hub:54a142d6-34b8-444f-a2d5-960dc05ea1ce, ssdpTerm:urn:schemas-upnp-org:device:AlarmDecoder:1, ip:C0A80B95]]
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:14 PM: trace addExistingDevices, getChildDevice(C0A80B95:1388)
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:14 PM: trace addExistingDevices: C0A80B95:1388
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:14 PM: trace initialize
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:14 PM: debug Installed with settings: [shmIntegration:false, shmChangeSHMStatus:false, selectedDevices:C0A80B95:1388, defaultSensorToClosed:true]
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:05 PM: trace discover_alarmdecoder
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:05 PM: trace discover_devices: [port:1388, ssdpUSN:uuid:97487987-b220-11e7-9ba8-b5672e8fd4f7, devicetype:04, mac:B827EB6C0227, hub:54a142d6-34b8-444f-a2d5-960dc05ea1ce, ssdpTerm:urn:schemas-upnp-org:device:AlarmDecoder:1, ip:C0A80B95]
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:02 PM: trace locationHandler: device already exists.. checking for changed values
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:02 PM: trace locationHandler: description=devicetype:04, mac:B827EB6C0227, networkAddress:C0A80B95, deviceAddress:1388, stringCount:04, ssdpPath:, ssdpUSN:uuid:97487987-b220-11e7-9ba8-b5672e8fd4f7, ssdpTerm:urn:schemas-upnp-org:device:AlarmDecoder:1, ssdpNTS:
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:02 PM: trace locationHandler
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:02 PM: trace locationHandler: Adding device: uuid:97487987-b220-11e7-9ba8-b5672e8fd4f7
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:02 PM: trace locationHandler: description=devicetype:04, mac:B827EB6C0227, networkAddress:C0A80B95, deviceAddress:1388, stringCount:04, ssdpPath:, ssdpUSN:uuid:97487987-b220-11e7-9ba8-b5672e8fd4f7, ssdpTerm:urn:schemas-upnp-org:device:AlarmDecoder:1, ssdpNTS:
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:02 PM: trace locationHandler
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:02 PM: trace discover_alarmdecoder
875d7b5c-e862-4c3f-beae-116eaafb9094 7:27:02 PM: trace discover_devices: subscribe to location
jasonsf
Senior Nut
Senior Nut
 
Posts: 60
Joined: Sun Oct 16, 2016 2:43 pm

Re: AD2Pi and SmartThings integration error

Postby jasonsf » Sun Dec 03, 2017 7:45 pm

I added back the changes you made in dev to fix the device discovery manually but left everything else at the commit you said was working for you. Still not getting updates in the smart app though.

Jason
jasonsf
Senior Nut
Senior Nut
 
Posts: 60
Joined: Sun Oct 16, 2016 2:43 pm

Re: AD2Pi and SmartThings integration error

Postby mathewss » Sun Dec 03, 2017 9:49 pm

Ya on my log I do not get the null error.

I did make a small change to my code to only add 1 sensor not all 8 but AFAIK that is not an issue. My ssdPath is not null. I presume this is due to my V1 hub and some different interaction with the cloud app but as I have no V2 hup to confirm I am not 100%

I expect multiple things have gone wrong and in order to figure it out I will need a V2 Hub.

Code: Select all
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:41:01 PM: trace alarmdecoderAlarmHandler: off
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:41:00 PM: trace refresh_alarmdecoders: AlarmDecoder
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:41:00 PM: debug getChildDevices(true), children=2
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:41:00 PM: trace refresh_alarmdecoders-
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:41:00 PM: trace refreshHandler
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:40:01 PM: trace alarmdecoderAlarmHandler: off
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:40:00 PM: trace refresh_alarmdecoders: AlarmDecoder
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:40:00 PM: debug getChildDevices(true), children=2
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:40:00 PM: trace refresh_alarmdecoders-
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:40:00 PM: trace refreshHandler
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:39:01 PM: trace alarmdecoderAlarmHandler: off
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:39:00 PM: trace refresh_alarmdecoders: AlarmDecoder
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:39:00 PM: debug getChildDevices(true), children=2
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:39:00 PM: trace refresh_alarmdecoders-
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:39:00 PM: trace refreshHandler
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:38:44 PM: trace shmAlarmHandler -- off
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:38:44 PM: trace alarmdecoderAlarmHandler: off
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:38:39 PM: trace shmAlarmHandler -- stay
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:38:38 PM: trace alarmdecoderAlarmHandler: stay
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:38:32 PM: trace alarmdecoderAlarmHandler: off
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:38:00 PM: trace refresh_alarmdecoders: AlarmDecoder
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:38:00 PM: debug getChildDevices(true), children=2
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:38:00 PM: trace refresh_alarmdecoders-
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:38:00 PM: trace refreshHandler
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:37:00 PM: trace refresh_alarmdecoders: AlarmDecoder
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:37:00 PM: debug getChildDevices(true), children=2
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:37:00 PM: trace refresh_alarmdecoders-
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:37:00 PM: trace refreshHandler
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:36:33 PM: trace locationHandler: description=0A0A0017:1388:switch1 updated
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:36:33 PM: trace locationHandler
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:36:32 PM: trace addExistingDevices, devices.find=uuid:0c510e98-8ce0-11e7-81a5-b827eb395648={port=1388, ssdpUSN=uuid:0c510e98-8ce0-11e7-81a5-b827eb395648, devicetype=04, mac=B827EB395648, hub=936de0be-1cb7-4185-9ac9-5d255c948f98, ssdpPath=http://10.10.0.23:5000, ssdpTerm=urn:schemas-upnp-org:device:AlarmDecoder:1, ip=0A0A0017}
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:36:32 PM: trace devices=[uuid:0c510e98-8ce0-11e7-81a5-b827eb395648:[port:1388, ssdpUSN:uuid:0c510e98-8ce0-11e7-81a5-b827eb395648, devicetype:04, mac:B827EB395648, hub:936de0be-1cb7-4185-9ac9-5d255c948f98, ssdpPath:http://10.10.0.23:5000, ssdpTerm:urn:schemas-upnp-org:device:AlarmDecoder:1, ip:0A0A0017], uuid:592952ba-77b0-11e7-b0c7-b827eb932134:[port:1388, ssdpUSN:uuid:592952ba-77b0-11e7-b0c7-b827eb932134, devicetype:04, mac:B827EB932134, hub:936de0be-1cb7-4185-9ac9-5d255c948f98, ssdpPath:http://10.10.0.26:5000, ssdpTerm:urn:schemas-upnp-org:device:AlarmDecoder:1, ip:0A0A001A]]
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:36:32 PM: trace addExistingDevices, getChildDevice(0A0A0017:1388)
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:36:32 PM: trace addExistingDevices: 0A0A0017:1388
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:36:32 PM: trace initialize
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:36:32 PM: debug Installed with settings: [shmIntegration:true, shmChangeSHMStatus:true, defaultSensorToClosed:true, selectedDevices:0A0A0017:1388]
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:36:33 PM: trace locationHandler: description=0A0A0017:1388 updated
859ed3c9-9226-4674-b9d7-04e8fca7960c 9:36:33 PM: trace locationHandler


Code: Select all
 73eb0896-badd-4529-b108-f8b4439a4cd0 9:46:00 PM: trace refresh_alarmdecoders: AlarmDecoder
73eb0896-badd-4529-b108-f8b4439a4cd0 9:46:00 PM: debug getChildDevices(true), children=2
73eb0896-badd-4529-b108-f8b4439a4cd0 9:46:00 PM: trace refresh_alarmdecoders-
73eb0896-badd-4529-b108-f8b4439a4cd0 9:46:00 PM: trace refreshHandler
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:47 PM: trace addExistingDevices, devices.find=uuid:592952ba-77b0-11e7-b0c7-b827eb932134={port=1388, ssdpUSN=uuid:592952ba-77b0-11e7-b0c7-b827eb932134, devicetype=04, mac=B827EB932134, hub=936de0be-1cb7-4185-9ac9-5d255c948f98, ssdpPath=http://10.10.0.26:5000, ssdpTerm=urn:schemas-upnp-org:device:AlarmDecoder:1, ip=0A0A001A}
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:47 PM: trace devices=[uuid:0c510e98-8ce0-11e7-81a5-b827eb395648:[port:1388, ssdpUSN:uuid:0c510e98-8ce0-11e7-81a5-b827eb395648, mac:B827EB395648, devicetype:04, hub:936de0be-1cb7-4185-9ac9-5d255c948f98, ssdpPath:http://10.10.0.23:5000, ssdpTerm:urn:schemas-upnp-org:device:AlarmDecoder:1, ip:0A0A0017], uuid:592952ba-77b0-11e7-b0c7-b827eb932134:[port:1388, ssdpUSN:uuid:592952ba-77b0-11e7-b0c7-b827eb932134, devicetype:04, mac:B827EB932134, hub:936de0be-1cb7-4185-9ac9-5d255c948f98, ssdpPath:http://10.10.0.26:5000, ssdpTerm:urn:schemas-upnp-org:device:AlarmDecoder:1, ip:0A0A001A]]
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:47 PM: trace addExistingDevices, getChildDevice(0A0A001A:1388)
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:47 PM: trace addExistingDevices: 0A0A001A:1388
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:47 PM: trace initialize
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:47 PM: debug Installed with settings: [defaultSensorToClosed:true, shmChangeSHMStatus:true, selectedDevices:0A0A001A:1388, shmIntegration:true]
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:48 PM: trace locationHandler: description=0A0A001A:1388:switch1 updated
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:48 PM: trace locationHandler
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:47 PM: trace locationHandler: description=0A0A001A:1388 updated
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:47 PM: trace locationHandler
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:43 PM: trace locationHandler: device already exists.. checking for changed values
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:43 PM: trace locationHandler: description=devicetype:04, mac:B827EB395648, networkAddress:0A0A0017, deviceAddress:1388, stringCount:03, ssdpPath:http://10.10.0.23:5000, ssdpUSN:uuid:0c510e98-8ce0-11e7-81a5-b827eb395648, ssdpTerm:urn:schemas-upnp-org:device:AlarmDecoder:1
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:43 PM: trace locationHandler
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:43 PM: trace locationHandler: device already exists.. checking for changed values
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:43 PM: trace locationHandler: description=devicetype:04, mac:B827EB395648, networkAddress:0A0A0017, deviceAddress:1388, stringCount:03, ssdpPath:http://10.10.0.23:5000, ssdpUSN:uuid:0c510e98-8ce0-11e7-81a5-b827eb395648, ssdpTerm:urn:schemas-upnp-org:device:AlarmDecoder:1
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:43 PM: trace locationHandler
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:43 PM: trace locationHandler: device already exists.. checking for changed values
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:43 PM: trace locationHandler: description=devicetype:04, mac:B827EB932134, networkAddress:0A0A001A, deviceAddress:1388, stringCount:03, ssdpPath:http://10.10.0.26:5000, ssdpUSN:uuid:592952ba-77b0-11e7-b0c7-b827eb932134, ssdpTerm:urn:schemas-upnp-org:device:AlarmDecoder:1
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:43 PM: trace locationHandler
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:43 PM: trace locationHandler: device already exists.. checking for changed values
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:43 PM: trace locationHandler: description=devicetype:04, mac:B827EB932134, networkAddress:0A0A001A, deviceAddress:1388, stringCount:03, ssdpPath:http://10.10.0.26:5000, ssdpUSN:uuid:592952ba-77b0-11e7-b0c7-b827eb932134, ssdpTerm:urn:schemas-upnp-org:device:AlarmDecoder:1
73eb0896-badd-4529-b108-f8b4439a4cd0 9:45:43 PM: trace locationHandler
mathewss
Moderator
Moderator
 
Posts: 188
Joined: Fri Dec 06, 2013 11:14 am

Re: AD2Pi and SmartThings integration error

Postby jasonsf » Mon Dec 04, 2017 8:03 am

mathewss wrote:I expect multiple things have gone wrong and in order to figure it out I will need a V2 Hub.


Well, They will probably be on sale again for the holidays :D
jasonsf
Senior Nut
Senior Nut
 
Posts: 60
Joined: Sun Oct 16, 2016 2:43 pm

PreviousNext

Return to General

Who is online

Users browsing this forum: Google [Bot] and 13 guests

cron