Here’s what That provides (killed after the third attempt):
Using configuration file alarmserver.cfg
2014-03-31 20:22:26 Alarm Server Starting
2014-03-31 20:22:26 Currently Supporting Envisalink 2DS/3 only
2014-03-31 20:22:26 Tested on a DSC-1616 + EVL-3
2014-03-31 20:22:26 and on a DSC-1832 + EVL-2DS
2014-03-31 20:22:26 and on a DSC-1864 v4.6 + EVL-3
2014-03-31 20:22:26 Connected to 192.168.1.27:4025
input: Login:
error: uncaptured python exception, closing channel <main.EnvisalinkClient connected at 0x2444e90> (<type ‘exceptions.ValueError’>:invalid literal for int() with base 10: ‘Log’ [C:\Python27\lib\asyncore.py|read|83] [C:\Python27\lib\asyncore.py|handle_read_event|444] [C:\Python27\lib\asynchat.py|handle_read|158] [C:\Python27\AlarmServer-smartthings\alarmserver.py|found_terminator|239] [C:\Python27\AlarmServer-smartthings\alarmserver.py|handle_line|271])
2014-03-31 20:22:26 Disconnected from 192.168.1.27:4025
2014-03-31 20:22:26 Connection failed, retrying in 10 seconds
2014-03-31 20:22:36 Connected to 192.168.1.27:4025
input: Login:Login:
error: uncaptured python exception, closing channel <main.EnvisalinkClient connected at 0x2444e90> (<type ‘exceptions.ValueError’>:invalid literal for int() with base 10: ‘Log’ [C:\Python27\lib\asyncore.py|read|83] [C:\Python27\lib\asyncore.py|handle_read_event|444] [C:\Python27\lib\asynchat.py|handle_read|158] [C:\Python27\AlarmServer-smartthings\alarmserver.py|found_terminator|239] [C:\Python27\AlarmServer-smartthings\alarmserver.py|handle_line|271])
2014-03-31 20:22:36 Disconnected from 192.168.1.27:4025
2014-03-31 20:22:36 Connection failed, retrying in 10 seconds
2014-03-31 20:22:46 Connected to 192.168.1.27:4025
input: Login:Login:Login:
error: uncaptured python exception, closing channel <main.EnvisalinkClient connected at 0x2444e90> (<type ‘exceptions.ValueError’>:invalid literal for int() with base 10: ‘Log’ [C:\Python27\lib\asyncore.py|read|83] [C:\Python27\lib\asyncore.py|handle_read_event|444] [C:\Python27\lib\asynchat.py|handle_read|158] [C:\Python27\AlarmServer-smartthings\alarmserver.py|found_terminator|239] [C:\Python27\AlarmServer-smartthings\alarmserver.py|handle_line|271])
2014-03-31 20:22:46 Disconnected from 192.168.1.27:4025
2014-03-31 20:22:46 Connection failed, retrying in 10 seconds
Looking at the documentation for the Evl3, there is a pretty significant difference in the application and TPI commands. Makes me wish I would have installed a DSC panel instead of a Honeywell, oh well. I’m going to keep plugging away at this because I am so close that I can taste it.
@johnconstantelos Ok so that is showing that you are getting a Login: prompt from your Envisalink device.
Did you change the default Envisalink password?
If so you need to update that in the alarmserver.cfg file, specifically the password because I think the only user is one called ‘user’.
Also double check that you can login to the web server part of the Envisalink device.
On your local network you should just be able to open a web browser to http://envisalink to see it.
Envisalink default login info:
User: user
pass: user
@johnconstantelos You can also try using telnet or netcat to connect to the Envisalink on port 4025 (that’s the TPI port) and see if you can login that way.
Hi @sanity, yes I can login locally (via IP address, not a host name) using the default credentials. I’ll try the TPI port this afternoon when I get home. I had/have some very early meetings today, so I had to get to bed rather early otherwise I would have had a chance to reply to you yesterday.
The only things I changed in the CFG file were the Smartthings callback URL to include the ID and code, and for “host=” I used the local IP address of the EVL3 instead of the hostname of “envisalink”.
@sanity, just tried a couple telnet clients, all with the same results.
Specifically using PuTTY via IP or the hostname envisalink on port 4025, I get to the login prompt but can’t supply a username because it returns failed every time and the connection gets closed. I have no problem via port 80 for the web server.
I’m sure I’m missing something simple. Is there something that needs enabled on the EVL3?
Try using Netcat, I saw some post on the Envisalink forums about testing with that on Windows and working better than telnet/putty.
Basically once you get the TPI logged in it should start echoing commands to the screen/status updates. If you make it to that point the AlarmServer code should work just fine since the Envisalink TPI stuff seems to be the same for both panels as near as I can tell.
Remember though that you can only have one connection at a time to the TPI port so if something else is using it you can’t use it at the same time. On my setup the TPI port wasn’t in use even when using the Envisalink web site for reporting so the AlarmServer project uses it now.
@sgonsalves Depending on how handy you are you could look at getting the “GE Interlogix ITI SuperBus 2000 RS-232 Automation Module” for your current panel. While it doesn’t have ethernet/IP functionality it does have a good old serial port for interfacing with whatever.
You could attach that to some other device (Unix/Linux/Windows/Whatever server, Arduino, etc…) and interface with Smartthings that way.
On the other hand I’m pretty happy with my DSC panel, other than slightly odd programming procedures (seems like lots of Alarm panels have this issue) it works great and was well priced.
Kent - I have a Vista20P panel, but the Smartthings bits you’ve put together should be a great start. I may be taking a different approach using a RaspberryPi + AD2USB to push data to SmartThings…but I’ll get there later.
However, I’m trying to at least get through the OAuth pieces with your current code, and I’m hung up at the first URL in your walk-thru. The authorization page indicates that the alarm panel is “(required)” and doesn’t allow selection. When clicking “Authorize” I get a popup “Please select at least one device to authorize” message. Tried in both IE and Chrome. Even if I select a few other controllable items, I get the message and cannot get to the next page (error page w/ code in the URL that you describe).
Maybe something has changed in the last couple of weeks?
I changed the capability that the Smartapp is looking for from the device and that helped resolve that particular issue for me at least.
Make sure you have also pre-created the “Alarm Panel” device from the “DSC Panel” device type that you created before doing the REST API setup bits.
I have added garage door opening/closing to the panel also by way of a Raspberry Pi with a simple relay and using ThingSpeak.com (using the Talkback app they have) to post the button presses and securely retrieve them. I’m also adding event notifications/push messages/text messages and triggering of other devices like say turning on/off lights when you open the garage door for example.
I need to clean up the code a little and make some minor fixes before I can post the changes.
I have a question though for anyone using this panel device and app.
Do you like having all the zones be contained in one device or would you rather have them broken out so each zone is a single device in your Smartthings app? The big benefit to that is each zone could be identified as a contact sensor (or a switch depending on what your zone does) which would then let you use ANY other Smartapp that supports a contact sensor to subscribe to events and trigger other things.
I like the panel as a single device right now but I have a feeling it would be a lot more useful as individual zones/devices so I’m looking for some feedback from anyone using it.
Got it now - thanks. Had to replace “device.polling” from the github code with “capability.polling” as shown above. It always helps to try to understand the code one copies and pastes from the interwebs.
Being able to identify individual zones as “native” contact sensor / switch / motion sensor / etc. devices would make sense. I’m also trying to get a feel for how composite devices work (like the garage door device Smartthings provides), and how that would work with things connected via an alarm panel. For instance, a Honeywell door sensor + Schlage deadbolt = door that can be monitored/locked/unlocked
On my Vista panel, I’m using wireless for a half dozen zones, but I’ve got 7 or 8 wired zone inputs completely unused. I would like to be able to use those as ~generic contact inputs to SmartThings. I think your proposed new approach would support that better.
Kent, thanks to your strong start, I managed to get some of my ADT (Ademco/Honeywell) wireless sensors reporting to SmartThings. It’s also doing it on a device-by-device basis through REST, so the sensors can be readily integrated into other SmartApps, Dashboard etc.
It might make sense to combine forces, but I don’t yet know enough about the DSC system vs. Ademco, how devices are addressed, existing tools for extracting the data, etc.
Hey guys, I have not been following this but I see a branch has been made of the alarmserver. Let me know if you need any help or any assistance as I was the person who posted the initial instructions on how to do this… just never had the time to post the complete instructions.
I never bought a smartthings, but today after my wife left the garage door open I decided to order one. Now that I have one on order, I think it would be even better to do LAN communication to the EnvisaLink. I still have everything up and running, but have never been comfortable enabling arming and disarming via HTTP (no SSL cert). With the ability to now to LAN communication, I think this is the next step to arming/disarming the alarm in a secure manner and don’t mind writing the code once I have a hub.
Look forward to you getting a hub… I got mine close to working but never did get the alarmserver to send stuff to smart things for some reason. I probably missed a step somewhere… Lol
I Followed these
Alarmserver repo (custom branch for Smartthings):
I have been following this threat quietly as well. I have an old laptop ready to act as a server for alarmserver and I installed an EVL-3 last week. Just waiting for the install instructions to be a little more “linear/step by step” if at all possible. Otherwise I’ll press on one day soon.
Once I get my hub I will pull it down… I had to rebuild my server and lost my code, so I can check it out… what I wrote does look different than what is in github. It is very straight forward and I will be able to help.
@daven Following my README and RESTAPISetup documents on my github repo is the closest step-by-step instructions available for the code I wrote. I’m sure there are other options/smartapps available elsewhere also if you don’t like this particular one (that’s the best part about Smartthings, lots of choice!).
Step 1:
Use AlarmServer project OR anything that can talk to your Alarm panel and send GET request to Smartthings for each event (there is another project in this thread using NodeJS I think instead of Python and it works great as well).
I use the custom branch I created in the AlarmServer project (I am NOT the AlarmServer project owner, I simply added the Smartthings branch and the callback URL code to the project). Clone the Smartthings Repo, switch to the Smartthings branch and edit the alarm server.cfg file to fit your needs. NOTE: You will need the URL stuff from the RESTAPI setup in the alarmserver.cfg file later.
Step 4 - Start it all up and tweak/debug:
Once everything is setup open up the logs link in the Smartthings IDE and then fire up the alarmserver.py program.
You should see events arriving in the log file within a second or so if everything is configured right.
<minor rant>
While all this does work for me I’m not 100% happy with it as it can be flaky at times and the SmartApp sometimes “forgets” what state a particular zone is in. Part of the reason for the long setup process is I can’t find good documentation for Smartthings in general so it’s a lot of trial and error to get to where I’m at now. I’m still investigating how to make the App ask for more things like your zone numbers or query the AlarmServer to get your zones. This would all be a LOT easier if the Hub could talk directly to my internal AlarmServer app. Right now you can get the LAB access from Smartthings which gives you some internal LAN connectivity but you still can’t receive data from a internal site, you can only send a GET or POST to a remote device, no option to take returned data oh and you can’t do SSL either on your internal LAN, no idea why, they just don’t support it.
</minor rant>
Anyway it sounds like Smartthings is working on getting better documentation and hopefully at some point the internal LAN options will include both SSL support and returned data support. Until they do though this is the best we can do. Now you also have other hardware based choices via the Smartthings Arduino shield and implement this all that way (someone else on the forums has already done that). There is a higher cost there though as you need an Arduino ($40’ish depending on model + Power supply and various parts/case/etc) and the Smartthings Shield which is $35. So you could easily be in the $100 range if you go the Arduino shield route. Then you have to learn how to program an Arduino which would probably be another fun side project.
If you have any questions or get stuck somewhere let me know, I’m happy to help.
@dbmet If you are getting a specific error or message let me know.
If you just are not seeing any events but think you have everything else setup you can make the AlarmServer code print out the entire URL we are sending. You can then use that URL to test using a web browser to see if you are getting a specific error message.
Add a line right below line 648 in alarmserver.py (just copy/paste the line below).
Then kill and restart alarmserver.py and watch the log file or the console if you launched it in the foreground, you should see each URL printed on the screen as it’s being sent to Smartthings. Copy one of those URL’s and paste it into a browser, hopefully you get a nice error message back from Smartthings but who knows…
Add this line (make sure it’s indented with spaces to the same point as the line directly above it): print myURL
This is what that whole block of code looks like when done:
try:
# Note: I don't currently care about the return value, fire and forget right now
requests.get(myURL)
print myURL
except:
print sys.exc_info()[0]
You are using the Envisalink on your Ademco right?
If so I think the Evvisalink TPI doesn’t change much if at all so it all should work for both panels but I’m not sure either since I only have a DSC to test with.