SmartThings Community

[RELEASE] Honeywell / Ademco Vista 20P Integration

honeywell
dth_security
smartapp_security
project_security
alarmdecoder

#1

While there are a bunch of integration options for the DSC / Honeywell / Ademco alarm panels, none quite fit my needs: keep traffic on my local LAN, offer async updates and are easy to install and configure. At the risk of offering yet another Envisalink integration option, set out to solve this and hopefully help others. Obviously leveraged much of the good work from kholloway, MattTW and oehokie.

Provides integration support for a Honeywell / Ademco Vista 20p alarm panel, connected to an Envisalink 3/4 module over local LAN (or AlarmDecoder AD2USB), supports automatic zone discovery, asynchronous status updates with support for the following zones and actions;

  • Zone Support
  • Door, Window Contact
  • Motion Sensor
  • Smoke Detector
  • Actions
  • Arm Stay
  • Arm Away
  • Instant Arm
  • Disarm
  • Chime
  • Zone Bypass
  • Output Trigger 1 and 2

And the following requirements / dependencies:

Update 07/29/2017

  • Added support for Output Triggers 1 and 2

Update 02/27/2017

  • Plugin support for Alarm Decoder devices; AD2USB has been tested and verified.

Connecting to a Local LAN Device with Async Updates
Realized that I needed a good framework to offer outside integration with SmartThings, so decided to write a proxy service in Node, making local LAN integration with SmartThings easier, offering async update support, as well as the flexibility to connect to devices via USB, serial, etc which are not natively supported by SmartThings. Connectivity to the Honeywell / Ademco alarm panel is provided by a plugin to the proxy service (SmartThings Node Proxy) - basic schematic of how this is wired together is provided below. Mode details on the proxy service, how to get it installed and configured in under 5 mins is available here: github.com/redloro/smartthings#smartthings-node-proxy

SmartThings Hub <-> SmartThings Node Proxy <-> Envisalink/AlarmDecoder plugin <-> Envisalink/AlarmDecoder module <-> Honeywell / Ademco Vista panel

Installation
Since the Honeywell Security SmartApp communicates with the alarm panel via the SmartThings Node Proxy, make sure that you have the proxy and the Envisalink / AlarmDecoder plugin installed and working before adding the SmartApp and Devices to SmartThings.

  1. SmartThings Node Proxy + Envisalink/AlarmDecoder plugin installed and configured on a machine; machine is connected to same local LAN as Envisalink module in alarm panel (or AD2USB)
  2. Create a new SmartApp and use this code: https://github.com/redloro/smartthings/blob/master/smartapps/redloro-smartthings/honeywell-security.src/honeywell-security.groovy
  3. Create 4 new Device Handlers and use this code: https://github.com/redloro/smartthings/tree/master/devicetypes/redloro-smartthings
  • honeywell-partition.groovy
  • honeywell-zone-contact.groovy
  • honeywell-zone-motion.groovy
  • honeywell-zone-smoke.groovy
  1. Add the Honeywell Security SmartApp from the SmartThings marketplace
  2. Configure the SmartApp
  • SmartThings Hub: REQUIRED
  • SmartThings Node Proxy: REQUIRED to connect to the SmarThings Node Proxy
  • Envisalink Vista TPI: OPTIONAL to connect to the Envisalink module
  • Security Panel: OPTIONAL code used to arm/disarm the panel
  • Smart Home Monitor: OPTIONAL integration with SmartThings Smart Home Monitor
  1. Done! Note that all the zones defined in config.json will be loaded 10 seconds after the SmartApp is configured and all the devices should show up under your Things. If the zones/devices do not show up, simply open the SmartApp again and hit done to force a refresh of the zones/devices.

Enjoy…

FAQ
Going to cover a couple questions here to hopefully aid others in their quest to get this setup.

  • Do you have an installation video?
    Why as a matter of fact I do… https://www.youtube.com/watch?v=XC2X8Qiyxqs

  • What the heck is Node?
    Node is awesome! https://nodejs.org

  • What the heck is JSON?
    JSON… pronounced like the name Jason (JAY-sun) is also awesome… http://www.json.org/

  • Why do I need SmartThings Node Proxy?
    If you want to direct connect your EVL to SmartThings and not go through the SmartThings Cloud, you need STNP. It registers with the EVL and monitors for alarm events and passes these notifications directly to the SmartThings Hub. So all traffic stays on your local LAN and notifications happen in near-realtime.

  • How does SmartThings Node Proxy connect with the EVL and the SmartThings Hub?

  • What do I need to do to get this running?

  1. Forget about SmartThings for a second… we’ll come back to that.
  2. First things first, let’s get SmartThings Node Proxy installed, configured and working.
  3. Identify a host machine on your network that can run NodeJS
  4. Download and install NodeJS from here: https://nodejs.org
  5. Download SmartThings Node Proxy and place in a target folder on your machine (ie. /home/smartthings-nodeproxy)
  6. Create a subfolder called plugins (ie. /smartthings-nodeproxy/plugins)
  7. Move envisalink.js from avail_plugins to your new plugins folder
  8. Copy the contents of config.json.sample and paste them here: http://jsonmate.com/
  9. Edit the document so that it matches your configuration… remove all comments (anthing starting with //) and then click “Beautify”.
  10. Create a new file named config.json in your SmartThings Node Proxy folder
  11. Copy the contents of the json document into config.json
  12. Install dependencies by running: npm run install:envisalink -OR- npm run install:ad2usb
  13. Fire up the server by typing: npm run start
  14. Make sure that it connects with the EVL and you should start to see alarm system events like motion sensors and door sensors reporting, etc.
  15. Now we can move on to setting up the SmartApp and Devices in SmartThings…
  • How do I know it’s running?
    When you start SmartThings Node Proxy you should see something like the following:
$ node server.js
SmartThings Node Proxy listening at http://:::8080
Loaded plugin: envisalink
Connected to Envisalink at 192.168.2.32:4025
{"type":"partition","partition":1,"state":"ready","alpha":"****DISARMED****  Ready to Arm"}
  • What’s all this nonsense about restart.me and forever??
    You can honestly ignore all that if it doesn’t work or you are having issues getting it run. restart.me is a script that I created to make starting/restarting the service easy, but it may only run on specific operating systems. forever is a Node module that allows you run a Node application continuously… sort of like a service.

  • But how do I run SmartThings Node Proxy unattended or guarantee that it runs on startup?
    While I don’t have a solution to that here, there are many solutions available online for wrapping a Node app into a service that auto-starts, etc. and it all depends on your host operating system. Google is your friend: http://bfy.tw/8Qp9. For Windows users, the simplest is to probably create a shortcut to “node server.js” and put that in your startup folder.

  • What are all these password and code fields in the config.json?
    Good question and I’m often left wondering the same… like what the heck was I thinking when I wrote this?? But here it is…

  • authCode is a passcode you set for the SmartThings Node Proxy to prevent unauthorized access to SmartThings Node Proxy from anybody/anything who could be snooping around your local network and happen to stumble upon SmartThings Node Proxy listening on port 8080. It’s not Ft Knox but it’s not meant to be… just a basic passcode to keep everyone out. NOTE: this is the passcode you have to use during the SmartApp configuration to allow the SmartApp to communicate with SmartThings Node Proxy.

  • password is the password required to access the EVL. The default on the EVL is user

  • securityCode is your 4 digit (or whatever) code you enter on the alarm panel to arm/disarm. We need this code so that you can arm/disarm from SmartThings.

  • installerCode PLEASE DO NOT USE THIS… I have actually deleted this from the sample config.json. It’s risky and there’s a 50/50 chance it leaves your alarm panel in a state that will require an installer to get out of. I’ve only tested this on my panel at home and while it works and saves me maybe 10 mins of configuration, it’s really not worth the risk.

Let me know if there are any other gotchas, questions, etc so that I can add them to this list.

Thanks!


EnvisaLink 4 vs. AD2SmartThings Honeywell Vista 20P?
Smartthings > Ademco alarm Panel
Using existing Home Security System (Honeywell, Vista, etc) Sensors with Smartthings
AD2SmartThings
Setting up ST to work with Envisa link EVL-4EZ and DSC Alarm system
Wired system with smart Things? (Existing wires, no devices--what now?)
AD2SmartThings
[DEPRECATED Thread: visit community.webcore.co for assistance] webCoRE - Piston Design Help (ask your fellow members for assistance)
[RELEASE] Russound Multi-Zone Controller Integration
DSC/Vista Alarm Smartapp and devices based on AlarmServer
Holy Moly - has SmartThings come a long way
SmartThings Integration With Home Security
SmartThings Integration With Home Security
New App: Integration with HoneyWell TotalConnect Alarm & Monitoring System
Traditional Security Panel Replacement - Kansas City
Envisalink 4 + DSC
AD2SmartThings
Honeywell Vista 21ip & home automation advice needed
Holy Moly - has SmartThings come a long way
[RELEASE] Russound Multi-Zone Controller Integration
Looking for Honeywell Vista Alarm Support - Not Unit 20P
#2

Thanks, @redloro! I will try this out hopefully tonight or tomorrow and let you know how it goes. I do have an EVL-4 so I don’t know if there are any changes needed to make it compatible with that.


#3

Awesome…let me know how it goes and happy to help if you run into any issues.


(Isriam) #4

Awesome thanks for doing this. Is it possible to use @xero device types to help you out? He already has almost every code from envisalink accepted and usable in his devices.


#5

This is pretty awesome! I was planning on looking into local LAN support soon but now I don’t have to! Probably try and convert my AlarmServer setup over later today.


#6

Wow, this looks very interesting. I have a Vista 20p and have been looking for a way to integrate into ST, it does seem like this would work.

@redloro I have a couple of questions before I spend $100 on the Envisalink:

-Do you have a screenshot of the UI of the SmartApp to see how it looks?
-In my case we arm the house using Instant. We currently do this by hitting the alarm code and then 7 to arm instant. Is it possible to send a key combination to the panel. For example, a tile that when pressed sends alarm code + 7?
-Do you happen to use SmartTiles, and if so does it work well to see Alarm status and send Arm function?

Thank you in advance!


#7

@isriam the plugin could be modified or a new one built to support additional device types; this has support for the standard device types door/contact, motion and smoke. Can you point me to the @zero device types??


#8

@Louis96 this should work (fingers crossed)… only thing is I haven’t tested with EVL-4 and that’s what they’re selling now. With regards to your questions;

  • Screen shot of the smart app, which is only used for configuration:
  • Screen shots of the security panel thing which have arm and disarm smarttiles:
  • The envisalink plugin (envisalink.js) has routes to support the armAway and armStay actions - you could change the last character key from 2 (in the case of Away) or 3 (in the case of Stay) to 7. This would allow you to do Instant arm. You could also add an additional button to the security panel thing and tie to the custom command route in the plugin, which has been disabled by default as it allows you to send whatever key combination you want to the panel (see line 79).

(Isriam) #9

sorry i had a phone autocorrect error. its @xero you can check our thread called dsc integration or dsc -> evl3 -> smartthings.

im pretty sure it would take minor changes to make it work on ademco


#10

@isriam Hey checked out your project and it’s similar to some of the other AlarmServer integrations… There are some major differences in my approach worth calling out:

  1. The most important for me is that all DSC / HoneyWell / Ademco / AlarmServer integrations require SmartThings OAUTH integration to support web services callback. This to me is completely retarded especially if all your devices are on your local LAN… this makes sense if you are integrating with an external system such as IFTTT, but not if you’re connecting to an alarm panel that sits on the same network as your ST. What I’ve done is work around this handicap and the only documented callback method from ST: http://docs.smartthings.com/en/latest/smartapp-web-services-developers-guide/overview.html
  2. There are big differences between DSC and Honeywell / Ademco panels. The inputs and responses from the systems are completely different, even though Envisalink is being used to talk to the panel. If you look at the GitHub projects from kholloway, MattTW and oehokie you’ll see what I mean.
  3. This is childish, but I hate Python and love Node…

Would love to see someone build an envisalink-dsc plugin for the SmartThings Node Proxy; that seems like a much easier task and would eliminate all the OAUTH nonsense.


(Kurt Sanders) #11

This is indeed a great application, especially using Smart Node proxy which is so scalable to other potential home systems!

I was able to install node.js and NPM for Raspberry Pi and then the SmartThings Node Proxy. I had to manually install a the dependencies since the NPM Install on my Raspberry Pi server failed on selected OSX dependancies. I was able to install ‘Forever’ to get the SmartThings Node proxy server to run as a dameon. It’s all working beautifully now, including the Partition/Zone Discovery, Arm and DisArm from the my local LAN direct to SmartThings Hub.

I had a customized Python program using an ADD2Pi VISTA alarm hardware interface and a SmartThings REST point to a SmartThings APP. My public communication to SmartThings was over the Internet, hence I decided not to permit Arm and DisArm, just monitoring. I can eliminate this and use SmartThings Node Proxy!

My next project will be extending SmartThings Node proxy to monitor my Raspberry PI systems CPU load, running processes, temperature, etc, including the ability to reboot from SmartThings.

Thanks!


#12

Hi @kurtsanders and @redloro, I tried it out and I got everything installed on my RPi3 and SmartThings - except - mine somehow does not connect to my >>EVL-4<<. I am monitoring the http service and it gets a 404 Not Found error right after I press Done and exit from the SmartThings App and it tries to connect to my EVL-4 which is on a static IP address. Any ideas on what I can check next or what the issue might be? Thanks in advance!


(Kurt Sanders) #13

I am assuming that you can connect and logon to EVL-4’s local HTTP webpage at port 80 to verify that you have the correct IP address of the EVL-4 and it shows activated? Once logged in, on the Network page of the EVL webpage, this is what I am showing for TPI status which shows that a client @ 10.0.0.41 is connected, which is the raspberry pi I have running the smartthings-nodeproxy.

Here is the bolded section of my ~/smartthings-nodeproxy config.json file that connects to my EVL-3 at 10.0.0.37… The Vista 21p security code has been changed to ‘0000’ in this example, but should reflect your alarm code.

“envisalink”: {
> “address”: “10.0.0.37”,
> “port”: “4025”,
> “password”: “user”,
“securityCode”: “0000”,
“panelConfig”: {
“type”: “discover”,
“partitions”: [
{
“partition”: 1,
“name”: “Security Panel”
}
],
“zones”: [
{
“zone”: 1,
“type”: “contact”,
“name”: “Front Door”
}…

When I activate the ./restart file, here is what is in my forever log file:

SmartThings Node Proxy listening at http://0.0.0.0:8080
Starting Discovery
GetZone Data
Loaded plugin: envisalink
Connected to Envisalink at 10.0.0.37:4025
{“type”:“partition”,“partition”:1,“state”:“ready”,“alpha”:“DISARMED Ready to Arm”}
APP.use 10.0.0.45 GET /subscribe/10.0.0.45:39500
APP.use 10.0.0.45 GET /plugins/envisalink/config/10.0.0.37:4025:user:0000
APP.use 10.0.0.45 GET /plugins/envisalink/discover
[{“zone”:1,“type”:“contact”,“name”:“Front Door”},{“zone”:2,“type”:“contact”,“name”:“Walkout LL Door”},{“zone”:3,“type”:“contact”,“name”:“Side of Garage Door”},{“zone”:4,“type”:“motion”,“name”:“Living Rm/Hall”},{“zone”:5,“type”:“motion”,“name”:“Upstairs”},{“zone”:6,“type”:“motion”,“name”:“Garage”},{“zone”:7,“type”:“motion”,“name”:“Kitchen/BR/Living Rm”},{“zone”:8,“type”:“contact”,“name”:“Panic”},{“zone”:9,“type”:“contact”,“name”:“Kitchen to Garage Door”},{“zone”:10,“type”:“contact”,“name”:“Sound - Theater Rm”},{“zone”:11,“type”:“contact”,“name”:“Sound - Living Rm”},{“zone”:12,“type”:“contact”,“name”:“Sound - Furnace Rm”},{“zone”:13,“type”:“smoke”,“name”:“Fire - Upstairs”},{“zone”:14,“type”:“smoke”,“name”:“Fire - Main”},{“zone”:15,“type”:“smoke”,“name”:“Fire - Furnace”}]}
Completed panel discovery!


#14

@kurtsanders great to hear! Please feel free to contribute to the github repo… and let me know if there is anything I can do to help!


#15

@pin exactly what @kurtsanders said… you need to first make sure that the SmartThings Node Proxy is connecting to the EVL successfully. Recommend you take the following steps:

  1. Open web browser and verify access to the EVL-4 via static IP (ie. http://10.0.0.41)
  2. Manually edit your config.json and verify that the address, port and password are correct under envisalink. Note that the port default is 4025 and the password default is user.
  3. Execute the restart file and then check your log file… should be in ~/.forever/ the log file name is actually listed when you do the restart.
  4. Top of the log file should say that it loaded the envisalink plugin and that is connected… or give you some indication of the error. See the example log file that @kurtsanders has shared.

Once you’ve verified that the SmartThings Node Proxy is running and connected to the EVL-4, then go ahead and setup the SmartApp and devices. Let us know how it goes.


(Kurt Sanders) #16

Will do @redloro! You have created a great node.js framework and alarm integration application for many of my next projects. I have been looking to talk directly to the hub and this works perfectly. Using your EnVISALink plugin with the SmartApps and Device Drivers really makes it easy for me to clone sections in other projects. I can just add a new section to the config.json file and make slight modifications to the smartapp you created in and after the following section.

   //verify that this message is for this plugin
   if (headers.'stnp-plugin' != 'envisalink') {
     return

I am a Python programmer for most of my raspberry pi systems that integrate with my family (e.g. sonos, harmony hub, ecobee, fitbit, Alexa, etc), but willing to learn node.js language using your templates.

I am not sure how or if you want me to send selected updates. I expect I will need to learn the github fork and request?

For now, for my needs, I added a binary user input switch to your Honeywell Security SmartApp preferences section (“Envisalink Vista TPI”) to allow a user to restrict removing the existing auto generated child devices discovered when the script.js runs after the first time. Once I have the alarm zones auto-created on the first run of the server.js and grouped into a separate room (“Honeywell Alarm”) in the iOS SmartThings app, running this discovery again whenever I go into the Honeywell Security SmartThings APP deleted them from my “Honeywell Alarm” room. Since my alarm system zones are static (for now), I can switch the booleon switch so the previous child devices are retained when I restart the application. For example…

  section("Envisalink Vista TPI") {
    input "evlAddress", "text", title: "Host Address", description: "(ie. 192.168.1.11)", required: false
    input "evlPort", "text", title: "Host Port", description: "(ie. 4025)", required: false
    input "evlPassword", "password", title: "Password", description: "", required: false
    input "enableDiscovery", "bool", title: "Enable-Discovery of Partitions & Zones", required: false, defaultValue: false
  }

The updated() section looks like this using the settings.enableDiscovery variable

def updated() {
  //remove child devices as we will reload
  if (settings.enableDiscovery) {
    log.debug "Deleting Exisiting Child Devices"
  	removeChildDevices()
  }
  
  //subscribe to callback/notifications from STNP
  log.debug "'/subscribe/' {getNotifyAddress()}"
  sendCommand('/subscribe/'+getNotifyAddress())

  //save envisalink settings to STNP config
  if (settings.evlAddress && settings.evlPort && settings.evlPassword && settings.securityCode) {
    sendCommand('/plugins/envisalink/config/'+settings.evlAddress+":"+settings.evlPort+":"+settings.evlPassword+":"+settings.securityCode)
  }

  if (settings.enableDiscovery) {
  //delay discovery for 5 seconds
	log.debug "Queue discoverChildDevices function in 5 seconds"
  	runIn(5, discoverChildDevices)
  }
}

#17

@kurtsanders exactly why I built SmartThings Node Proxy… to allow for quick integrations without having to reinvent the wheel. Great to see it’s useful to someone besides me!

I’ve taken your enableDiscovery addition and committed it to the repo. You should be able to pull the repo and submit changes yourself… quick primer available here if you’re interested: https://guides.github.com/


(Mark H) #18

@redloro, thanks again, another GREAT app! I installed this today to replace another monitoring integration I had installed earlier and this is superior. It was much easier to install and I get valid zone reporting. Great Work!


#19

My pleasure… let me know if there is anything I can do to help make this SmartApp better!


(Solutionssquad) #20

Please forgive my ignorance but is there an idiots guide to doing this (SmartThings Node Proxy) for a Windows guy who does have a Pi laying around!?

I found this:https://nodejs.org/ which can run windoz.
Now I just have to see if it can work!