ADT Pulse integration


#103

I have smoke/co detector, break glass, and a camera. I’m also getting " No other devices installed."


#104

Hi there, I got so damn excited discovering this thread!
However, I can’t install the hassio addon, spins and gets back on the “Install” state…so it isn’t installing.

I am on x86 (Ubuntu VM in Win10), is this why?

Edit: Saw this in the config.json…

“arch”: [
“armhf”,
“amd64”
]

Any idea why it doesn’t install?

Edit2: This is the log from HASSIO:
18-08-05 12:35:34 INFO (SyncWorker_2) [hassio.docker.addon] Start build 411e20be/amd64-addon-adt-pulse-mqtt:0.2.1.2
18-08-05 12:35:34 ERROR (SyncWorker_2) [hassio.docker.addon] Can’t build 411e20be/amd64-addon-adt-pulse-mqtt:0.2.1.2: Please provide a source image with from prior to commit


#105

Damn…read about my errors, and many mentioned it was fixed after version 17.05. I checked mine and docker was 17.03 of course.
Upgraded Docker to latest 18.06 and addon installed without issue.

I’m excited again!


#106

@haruny, plus all others providing help through this thread, thank you so much!
I got all my contact and motion sensors in HASS, and I can now arm/disarm within HASS as well. So all works perfectly in HASS.

Has anyone however been able to get the ST integration to work?
Is this still early for it?

Here is a good example:
Client mosqsub/12636-HASS received PUBLISH (d0, q0, r0, m0, ‘home/alarm/state’, … (10 bytes))
armed_home
Client mosqsub/12636-HASS received PUBLISH (d0, q0, r0, m0, ‘smartthings/ADT Alarm System/alarm/cmd’, … (6 bytes))
strobe

I received “armed_home” from ADT, and this pushes “strobe” as a command…

Would there also any way to customize the state/command topics? I have ST integrated with HASS for all my lights and found that using cmd and state were creating issues, such as turning lights on in the middle of the night.

An mqtt message would pretty much look like:
-t “smartthings/nightstands/switch” -m “on”

ST -> HASS or HASS -> ST sends that exact message, and both systems are always in sync. ST will not (in my case) understand the extra “/cmd” and “/state” on ADT’s status messages…

Thanks


#107

Hey @damien,

ST integration works half way at the moment. You can do HASS->ADT (obviously) and HASS->ST. I’m using it that way. ST->HASS->ADT is not working yet. I’m working on it.

Pls follow the instructions on https://github.com/haruny/adt-pulse-mqtt#smartthings-support
Let me know if there is anything unclear in the instructions, you’re kind of test driving the docs :slight_smile:
thanks.


#108

Hi folks,

I added support for ST -> HASS -> ADT support.
Now you can manage ADT alarm states from Smartthings directly.
It’s still experimental. There are significant delays sometimes. I need a better Device Handler in the future to handle delays properly.

Don’t forget to update your ADT Alarm System device handler if you have the previous version installed in your graph api.

thanks.


#109

Hey man, thanks for your work on this. Works great, almost (getting to this soon)
First of all, I gave up with the Smartthings integration, simply because Google Assistant has now native compatibility with ADT Pulse! My idea last week was to integrate ADT -> HASS -> ST to hopefully be able to have Google Home trigger alarm statuses through ST, back to HASS and finally ADT Pulse. Since full integration is here between ADT and GHome, I don’t have any benefits having ADT in ST (I want HASS to be my frontend for everything).

Ok, now to some issue…
Every other day, the alarm stays stuck to “Armed Away”, but I know the alarm is disarmed.
When I look at the addon logs, I find the following:

2018-8-11 10:24:00 Pulse.Sync: Syncing 6383-0-0
2018-8-11 10:24:10 Pulse.Sync: Syncing undefined
2018-8-11 10:24:10 Pulse.Sync: Sync Failed
2018-8-11 10:24:15 Pulse: Login called Authenticating
2018-8-11 10:26:20 Pulse.Sync: Syncing undefined
2018-8-11 10:26:20 Pulse.Sync: Sync Failed
/usr/src/app/adt-pulse.js:88
					if (hResp.request==null){
					          ^

TypeError: Cannot read property 'request' of undefined
    at Request._callback (/usr/src/app/adt-pulse.js:88:16)
    at self.callback (/usr/src/app/node_modules/request/request.js:185:22)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at Request.onRequestError (/usr/src/app/node_modules/request/request.js:877:8)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at TLSSocket.socketErrorListener (_http_client.js:387:9)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-08-11T14_26_26_489Z-debug.log

I checked the mentionned file, which states:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/src/app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle [email protected]~start: CWD: /usr/src/app
10 silly lifecycle [email protected]~start: Args: [ '-c', 'node server.js' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `node server.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd /usr/src/app
16 verbose Linux 4.9.0-7-amd64
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v8.11.3
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `node server.js`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

At this point the addon is stopped. If I simply start it all starts without issue. Alarm status updates and everything is synced.

Any idea what is happening?
Anyone else seen this?

Thanks!!!


#110

Hey @damien,
thank you for the detailed post!
I’ve seen this happening on my end as well. I’m guessing sometimes ADT’s servers do not respond and this happens. It’s totally harmless and as you’ve pointed out a restart helps… but it’s annoying that you have to restart.
In the next release I’ll add some error checking on this.
I created a bug on this:


#111

By the way, Smartthings integration works great. I’ve been using it for a while now. I don’t even use the ADT Pulse app anymore. I also added support for calling Routines based on an alarm state. I can automate things over ST side based on I arm/disarm.


#112

I made switches to set the alarm.

  • platform: mqtt
    name: “ADT Switch Home”
    state_topic: “home/alarm/state”
    command_topic: “home/alarm/cmd”
    payload_on: “arm_home”
    payload_off: “disarm”
    retain: yes

  • platform: mqtt
    name: “ADT Switch Home Instant”
    state_topic: “home/alarm/state”
    command_topic: “home/alarm/cmd”
    payload_on: “armed_home”
    payload_off: “disarm”
    retain: yes

  • platform: mqtt
    name: “ADT Switch Disable”
    state_topic: “home/alarm/state”
    command_topic: “home/alarm/cmd”
    payload_on: “disarm”
    payload_off: “disarm”
    retain: yes

  • platform: mqtt
    name: “ADT Switch Away”
    state_topic: “home/alarm/state”
    command_topic: “home/alarm/cmd”
    payload_on: “arm_away”
    payload_off: “disarm”
    retain: yes

You can see i was able to set the alarm home_instant with the Armed_Home command

If you have other commands on the alarm panel you want then run this and change the alarm and you will see the output

mosquitto_sub -h YOUR_MQTT_IP -v -t “home/alarm/#”


#113

I never thought of it. This is nice!


#114

I tried to fix it in 0.2.2.2.


#115

Hey Ben, are you placing those instructions under a switch in the configuration.yaml?

I added one for arm home with the rest of my switches but it never actually did anything and it didn’t change if I set my alarm through another method.

Also, Haruny, so far so good since this last update. I haven’t had the add-on stop since I updated yesterday.


#116

Hello everyone,

I really appreciate the kinds words, support and patience from everyone.
I just pushed 0.2.2.3 attempting to squash a few lingering bugs on retry logic on shaky internet connections/connection errors to ADT.

as always, all feedback welcome. bugs to:

Cheers.
H.


#117

The add on is no longer stopping but it’s still losing connection to sensors until I restart it.


#118

Do you get anything in the logs when it loses track of the sensors?
There’s been reports of unable to recover from errors silently.


#119

This is a snippet of what I got when it failed this morning.

2018-8-23 09:05:02 Pulse.Sync: Syncing undefined
2018-8-23 09:05:02 Pulse.Sync: Sync Failed
2018-8-23 09:05:07 Pulse: Login called Authenticating
2018-8-23 09:05:07 Pulse.Sync: Syncing undefined
2018-8-23 09:05:07 Pulse.Sync: Sync Failed
2018-8-23 09:05:12 Pulse: Authentication bad response error:{“code”:“EAI_AGAIN”,“errno”:“EAI_AGAIN”,“syscall”:“getaddrinfo”,“hostname”:“portal.adtpulse.com”,“host”:“portal.adtpulse.com”,“port”:443}


#120

Thanks!. Apparently EAI_AGAIN is a DNS failure. At any rate, I’ll add a delay and ensure that there are multiple retries. Currently, it silently stops after 1 try.


#121

Hi folks,

thank you so much for your feedback and encouragement. I feel I finally squashed the EAI_AGAIN and all similar errors that was causing the addon to be silently stuck.
Sorry it took a while to get to it. I’m still testing it but I wanted to get it out there for you as soon as possible.
Please give it a try. Please let me know if it’s broken.

Version 0.2.2.4.


#122

This is great! I meant to get back to working on this at some point.