Awesome, that was the issue. Thank you!
Hi Phil,
So I have been working on this for a few hours now and got to the point where I have static IP addresses created and I think my config.json is done correctly after much scrubbing, however, when I go to run node server.js, I am getting the error below that "cannot find module ‘serialport’.
Here is the copied text. Not sure where I went wrong.
pi@raspberrypi:~/Downloads/smartthings-nodeproxy $ node server.js
[2019-01-21T00:49:39.290Z] [stnp] SmartThings Node Proxy listening at http://:::8080
internal/modules/cjs/loader.js:605
throw err;
^
Error: Cannot find module ‘serialport’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Module.require (internal/modules/cjs/loader.js:657:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/home/pi/Downloads/smartthings-nodeproxy/plugins/ad2usb.js:21:18)
at Module._compile (internal/modules/cjs/loader.js:721:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:732:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
*pi@raspberrypi:~/Downloads/smartthings-nodeproxy $ *
Can you let me know what I may be doing wrong?
Here is my config.json script that seems to be working just fine:
{
“port”: 8080,
*“authCode”:
“XXXXXXX”, *
Check your plugins folder - you should only have envisalink.js in there. If you have other plugins, delete them.
Hi Phil,
Great – that worked, however, I now get this:
[2019-01-21T03:57:55.164Z] [stnp] SmartThings Node Proxy listening at http://:::8080
[2019-01-21T03:57:55.192Z] [stnp] Loaded plugin: envisalink
[2019-01-21T03:57:55.198Z] [evl3] Connected to Envisalink at 192.168.1.244:4025
[2019-01-21T03:57:55.252Z] [evl3] Envisalink connection closed.
[2019-01-21T03:57:59.264Z] [evl3] Connected to Envisalink at 192.168.1.244:4025
[2019-01-21T03:57:59.309Z] [evl3] Envisalink connection closed.
[2019-01-21T03:58:03.315Z] [evl3] Connected to Envisalink at 192.168.1.244:4025
[2019-01-21T03:58:03.368Z] [evl3] Envisalink connection closed.
and it keeps repeating. I don’t see any of the alarm system events like redloro has in his instructions.
I will move onto setting up the SmartApp and Devices, but I’m not sure it is going to work.
I added the new SmartApp and 4 new Device Handlers and added the Honeywell Security SmartApp.
They look like they all added correctly and I was able to configure the App, however, none of the zones have shown up under my THINGS.
Not sure where I went wrong.
Your config file was cut off before. Not sure that it’s the issue though since the Envisalink is immediately dropping the connection.
Make sure you can log in to the Envisalink local IP address you put in the config file, using the name and pw you put in the file. One thing with the Envisalink is that it can’t handle a long password. I think it caps out at 6 characters for the EVL3 and 10 for the EVL4. If your pw is longer, I think it still let’s you log in directly but rejects the TPI connection. Make sure your pw starts with a letter and is only letters and numbers. Actually, for testing, just change both your user name and password back to “user”. Remember to change it in the config file too.
While you’re logged into the Envisalink, what’s your firmware version? Also, check what it says under TPI status - whether it says connected/disconnected and whether the IP address (if connected) matches your Pi.
So I did some poking around. When I log into the Envisalink local IP address, it only lets me in when I use the Username: user and Password: user. This is different than the one that I had created on the EyezOn website and in which all of my personalized parameters are set for the Envisalink EVL4.
When I log into it via the local IP address, the only thing it shows me is that Partition 1 is connected to keypad 18.
For Envisalink TPI Status it states “OFFLINE” No Client
The firmware version is 01.02.130A
Should I be changing the Username and Password in config.json to “User”?
Yes. You have different passwords for when you log into their website and when you log in locally. You need the local in your config file.
I have been using redloro’s Node Proxy with an Envisalink and running Node on a Raspberry Pi3 mostly successful for a couple months. NodeProxy auto starts, I get all my Honeywell alarms devices and there status in SmartThings, I can trigger events off status changes and arm and disarm the Honeywell alarm from SmartThings SHM and if I arm the Honeywell at the panel SHM also updated with the current state.
I am experiencing one problem. When the Honeywell alarm goes in ALARM state by a door opening or a motion sensor detecting motion when the alarm is in either the arm(stay) or arm(away) state SHM doesn’t change to tripped/alarming even though the honeywell alarm is going nuts. If I look at the Things in SmartThings both that sensor and the Honeywell Security Things will show ALARM. But SHM has no state change and the actions like the “Alert with lights” doesn’t happen.
Is this a config setting that I have wrong or is this normal behavior or a bug?
Envisalink IP: ***.***.10.70
NodeProxy IP: ***.***.10.71
SmartThings IP: ***.***.10.249
Node Logs
SmartThings Live Log
Node Proxy Config
{
“port”: 8080,
“authCode”: “xxxx”,
“envisalink”: {
“address”: “xxx.xxx.10.70”,
“port”: “4025”,
“password”: “xxxx”,
“securityCode”: “xxxx”,
“panelConfig”: {
“type”: “discover”,
“partitions”: [
{
“partition”: 1,
“name”: “Security Panel”
}
],
“zones”: [
{
“zone”: 1,
“type”: “smoke”,
“name”: “#1 Smoke Detectors”
},
{
“zone”: 2,
“type”: “contact”,
“name”: “#2 Front Entry Door”
},
{
“zone”: 3,
“type”: “contact”,
“name”: “#3 Garage Entry”
},
{
“zone”: 4,
“type”: “contact”,
“name”: “#4 Back Entry Door”
},
{
“zone”: 5,
“type”: “contact”,
“name”: “#5 Glass Break Living”
},
{
“zone”: 6,
“type”: “contact”,
“name”: “#6 Glass Break Master”
},
{
“zone”: 7,
“type”: “motion”,
“name”: “#7 Motion Living”
},
{
“zone”: 8,
“type”: “motion”,
“name”: “#8 Motion Garage”
},
{
“zone”: 9,
“type”: “smoke”,
“name”: “#9 Heat Garage”
},
{
“zone”: 10,
“type”: “smoke”,
“name”: “#10 Heat Garage Attic”
},
{
“zone”: 11,
“type”: “smoke”,
“name”: “#11 Heat Office Attic”
},
{
“zone”: 12,
“type”: “smoke”,
“name”: “#12 Heat Main Attic”
},
{
“zone”: 13,
“type”: “smoke”,
“name”: “#13 Heat Water Attic”
},
{
“zone”: 14,
“type”: “contact”,
“name”: “#14 Garage Door MAIN”
},
{
“zone”: 15,
“type”: “contact”,
“name”: “#15 Garage Door SIDE”
}
]
}
},
“notify”: {
“address”: “xxx.xxx.10.249”,
“port”: “39500”
}
}
@JoshLarsen I’ve played around a bit with SHM, and I think the linkage is just what you’ve seen - the disarm/arm status is mirrored but not the alarm. I have my Vista set up to give push and text notifications via a smartapp without using SHM.
To get SHM to alarm based on the Vista, you could add all of your Vista zones to SHM. The trouble with that is SHM doesn’t allow entry/exit delays. So then you could install SHM Delay and configure that.
An alternative would be to create a virtual contact sensor that you include in SHM. Then use a piston/smartapp to open that contact when your Vista goes to alarm status and close it when the alarm is cleared. This would let you use the delays programmed into your Vista for SHM.
@redloro , so, I’ve had the Envisalink/Honeywell integration running smoothly for nearly the past two years, but lately I’ve had an issue.
About a week ago, I noticed that the contact states weren’t updating as they were in the past. I don’t know what changed, but I decided to upgrade everything (Smartapp, Device Handlers and code running on a Windows PC) to the latest to see if that would help. I now get a periodic error " [stnp] Notify error: Error: read ECONNRESET". Any ideas? Thx!
Issue resolved: I spent a day and a half on this. I tried re-installations of everything. I tried to go to a previous version of node.js (my PC crashed in October and I upgraded Node at that time). I went back to my known working versions of the Smartapp and Device Handlers (from 2016). I went back to STNP from 2016 as well. I moved STNP to another PC. The issue kept repeating. Finally I bounced the Smartthings Hub. That did it! The issue is gone and all is working once again! I have to say, this was frustrating.
I was looking at the Konnected.io solution (which seems fantastic and easy to use), but i’m shut out because most of my home’s sensors are connected to the Vista 20p over a wireless connection.
Does this Envisalink solution work with the wireless sensors?
Will each of the sensors/zones show up in SmartThings (each sensor is its own zone, I believe)?
I’ve never actually used the alarm system since I moved into my house four years ago because I didn’t want to pay ADT - can I use this solution without having the alarm system connected to a provider (such as ADT)?
Are there any pre-reqs I need to do to have it disconnected from ADT?
Thanks for helping out a noob to the home security system world!
@schwibs Any zone that shows up in the Vista (wired or wireless) will show up in ST. If you have any wired sensors, they might be wired as multiple door/window sensors on one zone - they’ll show up as one zone, not individual sensors. Also, the wireless sensors and key fobs for the Vista system aren’t too expensive on Amazon if you want to add more.
No alarm service necessary to get this going. If you’re not currently with ADT, you shouldn’t need to deal with them. Actually, if you learn how to navigate the Vista installer menus then you can check if the system is still set up to call them.
Need some help please. I am using Ad2USB module with my Vista 20p alarm which is connected to a Windows 10 PC currently on COM4. It is currently working great with HomeSeer but I am moving to SmartThings and alarm integration is a key for me. Tried to follow the steps in the first post (thanks for putting together the solution) and seeing a ton of errors when running npm run install:ad2usb
command. Any help is appreciated, here is what I am seeing:
C:\home\smartthings-nodeproxy>npm run install:ad2usb
smartthings-nodeproxy@1.0.0 install:ad2usb C:\home\smartthings-nodeproxy
npm install && npm install serialport@5.0.0
audited 159 packages in 4.531s
found 0 vulnerabilities
serialport@5.0.0 install C:\home\smartthings-nodeproxy\node_modules\serialport
node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download/5.0.0/serialport-v5.0.0-node-v64-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for serialport@5.0.0 and node@10.15.0 (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download/5.0.0/serialport-v5.0.0-node-v64-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for serialport@5.0.0 and node@10.15.0 (node-v64 ABI) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can’t find Python executable “python”, you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 10.0.17134
gypgyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “configure” “–fallback-to-build” “–module=C:\home\smartthings-nodeproxy\node_modules\serialport\build\Release\serialport.node” “–module_name=serialport” “–module_path=C:\home\smartthings-nodeproxy\node_modules\serialport\build\Release”
ERR! gypconfigure error
ERR! cwd C:\home\smartthings-nodeproxy\node_modules\serialport
gyp gypERR! node -vERR! v10.15.0
gyp ERR! stacknode-gyp -v Error: Can’t find Python executable “python”, you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “configure” “–fallback-to-build” “–module=C:\home\smartthings-nodeproxy\node_modules\serialport\build\Release\serialport.node” “–module_name=serialport” “–module_path=C:\home\smartthings-nodeproxy\node_modules\serialport\build\Release”
gyp ERR! cwd C:\home\smartthings-nodeproxy\node_modules\serialport
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute ‘C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\home\smartthings-nodeproxy\node_modules\serialport\build\Release\serialport.node --module_name=serialport --module_path=C:\home\smartthings-nodeproxy\node_modules\serialport\build\Release’ (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\home\smartthings-nodeproxy\node_modules\serialport\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:962:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\home\smartthings-nodeproxy\node_modules\serialport\node_modules\node-pre-gyp\bin\node-pre-gyp” “install” “–fallback-to-build”
node-pre-gyp ERR! cwd C:\home\smartthings-nodeproxy\node_modules\serialport
node-pre-gyp ERR! node -v v10.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute ‘C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\home\smartthings-nodeproxy\node_modules\serialport\build\Release\serialport.node --module_name=serialport --module_path=C:\home\smartthings-nodeproxy\node_modules\serialport\build\Release’ (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! serialport@5.0.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@5.0.0 install 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! C:\Users\Yefim\AppData\Roaming\npm-cache_logs\2019-01-25T14_14_31_178Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! smartthings-nodeproxy@1.0.0 install:ad2usb: npm install && npm install serialport@5.0.0
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the smartthings-nodeproxy@1.0.0 install:ad2usb 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! C:\Users\Yefim\AppData\Roaming\npm-cache_logs\2019-01-25T14_14_31_444Z-debug.log
C:\home\smartthings-nodeproxy>
It looks like the error is when serialport is being installed. Possibly looking for an old version that isn’t available anymore. In package.json, try deleting @5.0.0 from this line:
"install:ad2usb": "npm install && npm install serialport@5.0.0",
I would like to thank you redloro for such a great project! The ability to integrate my security system with ST has opened up all kinds of possibilities to further automating my smart home. The only issue I’m having is for some reason, I must have missed a step, I cannot get any of the wireless window sensors (ADEMCO 5816) to show up in ST. The wireless smoke detectors showed up along with the wired window and door sensors. All display on the 20P Honeywell display when tripped. When I trip one of these wireless sensors each will display their status in the nodeproxy terminal with no problem, but for some reason the device does not show up in ST. I tried to manually set up the devices but of course that did not work. I have deleted them from ST, rebooted the hub and the rpi with no success. Any ideas on how to troubleshoot this issue would be greatly appreciated.
@Mark_H I would start by looking in your config file. Did you do anything differently when you listed the window zones compared to the other contact sensors that are working? Is the type listed as contact? Since you’re getting some, but not all, zones populating in ST, I think something in the way you listed those zones doesn’t match what the smartapp is expecting.
Also, you can try running discovery with live logging open in the ST IDE to see if any errors pop.
Thanks! That did the trick. I went past the errors, can see the messages, added the SmartApp, added handlers, and added the app to SmartThings app. I have the “Discover Zones” checked in the Honeywell Security app but no devices/zones showed up. Anything else I need to do to have my wired/wireless zones show up in devices? I did not list them in the config.json because I thought it will be discovered… should they all be added manually?
I’m pretty sure the program isn’t set up to discover zones by querying the Vista. The Discover Zones option causes the smartapp to query the STNP server for the info in the config file, creating all listed zones. Go ahead and list them in config.json, leave the discovery option turned on in the smartapp, then go back into the smartapp settings and hit save to rerun discovery. Hopefully everything pops up as new devices.
Thanks again. Added them (well most of them) in config. The good news they showed up in the app but they are all stuck in “Checking status…” mode. I am also not sure if I did it right in the config. I have three types of zones: wired zones (no serial number), wireless zones (with transmitter serial number), and relay zones. The reason for relays is to be able to report motion in the “armed” state. Vista 20p does not report motion sensor status if the alarm status is “armed”. So if the alarm is in Armed-Stay mode (at night for example) and I need to trigger events based on motion - it would not be possible since it doesn’t report it. As a workaround, the virtual relays sensors are configured that work of the real sensors and they do report the status. They are configured as zone 13-1 (relay 1), 13-2 (relay 2), etc. Here is what I have in the config for now:
"panelConfig": {
"type": "discover",
"partitions": [
{
"partition": 1,
"name": "Security Panel"
}
],
"zones": [
{
"zone": 1,
"type": "contact",
"name": "Kitchen Garage Door"
},
{
"zone": 2,
"type": "contact",
"name": "Kitchen Back Door"
},
{
"zone": 3,
"type": "contact",
"name": "Patio Door"
},
{
"zone": 4,
"type": "contact",
"name": "Basement Door"
},
{
"zone": 5,
"type": "motion",
"name": "Bedroom Motion Sensor",
"serial": "0180040"
},
{
"zone": 10,
"type": "contact",
"name": "Front Door"
},
{
"zone": 11,
"type": "contact",
"name": "First Garage Door",
"serial": "0373168"
},
{
"zone": 12,
"type": "contact",
"name": "Second Garage Door",
"serial": "0081315"
},
{
"zone": 13,
"type": "motion",
"name": "Bedroom Motion Relay"
}
]
}
All sensors show “Checking Status”. Any hints? Thanks