[OBSOLETE] DSC -> EVL-3(4) -> Alarmserver -> Smartthings

Hey guys, looks like some good work is being done here. @Xero What would be required to start making the new device setup with multiple switches? I’m having some reliability issues with arming and I’ve really just been using one panel for the moment. The issue I have is that CoRE won’t let me access the extended functions in the conditions. I can only access them as a reaction, or the 2nd step of the piston. It’s only really giving me half the function which means a lot of work arounds to try and get things working. Am I just missing something with CoRE or is this a flaw of the SmartApp/device?

it’s based on it - but no longer compatible with any of it.

it can definitely send 071 commands - are you trying to bypass zones with *106#?? This version already supports zone-bypassing - so if you’re just trying to do that - maybe you should give it a try! I think i’ve already added what you are trying to do. The zone device for zone 06 has a bypass button which will already send exactly the command you are trying to send! this version of alarmserver/smartthings app also creates the devices for you automatically in smart things - so you dont have to create all the individual devices manually anymore.

you need to send 071, the partition, then the command, so like, 0711*106# is what ends up getting sent to the envisalink client

it’s somewhat annoying that other smartapps can’t see all the tiles and switches inside of another app’s panel. I have no idea why this isn’t exposed, but as far as I know - it’s the main limitation causing what you are talking about. a device is limited to one “main type” that it shows itself to other smartapps, and that type has a set, defined, list of capabilities that must be followed. So, when we want to add custom devices, we are basically rigging this thing up to present itself with capabilities of some dumb predefined device, like an on/off switch to show and change status of a single function, when in actuality it’s a device with a ton of said switches like this. there’s just no good way to expose them, that i’m aware, without creating some kind of configurable “switch”, anyway, which is maybe the next thing i’ll have to do

I just bought an Envisalink and would like to use it with Smartthings.
Is there a detailed installation guide somewhere?

I read this thread, as well as the github repo of XXero but couldn’t find one. Do I need NodeJS?

I would appreciate the help

Did a first attempt at setting the Envisalink with your repository today. I think I’ll need your help to go further.

So far I have:

  • Installed the smartapp through the smartthings github integration
  • installed the device handlers
  • went 1/2 way through the REST API setup until I got an error. First URL worked (screenshot attached). Got a code from the localhost return.
    Second URL I was without luck. It returned an error.

Oh No! Something Went Wrong!
Error 500: Internal Server Error
URI /oauth/token
Reference Id xxxxxx
Date Mon May 22 23:25:38 UTC 2017

Anyone been through the same issues?

There’s a bunch of trouble shooting in the threads above. check around post 1000

Thank you Chris.

I have read almost all posts from 1000-1200 now and got some good information out of it, appreciate the suggestion.

I am a little lost on what the order of things to do are though.

I have all the hardware (envisalink, raspberry π, smarthings).
I originally followed the readme here, and started with installing AlarmServer. Is this correct? Or have I missed a step?

I am stuck in the Oauth authorization. (my post just above describes the error I have with a screenshot). Thank you

Any idea why the Alarm Stay/Away Things does not show up in ActionTiles, even though Action Tiles has been authorised to access the DSC Things? (The sensors show up in Action Tiles, but not the activation switches, which I would like to display in Action Tiles so that the current Alarm State is easily visible in action Things.

I managed to figure one out (I think) the Alarm Stay/Away not showing up in Action Tiles - I had to add the following lines in the Away and Stay Panels device handlers:
capability "Sensor"
capability "Actuator"
I hope that did not destroy the device handler.

did a local checkout of the github repo to my rapberry π 3
moved screen@user.service to /lib/systemd/system/screen@pi.service
edited the config (left envisalink / user / port as default, and added envisalink IP in /etc/hosts).

Could anyone help?
Is it possible to try the connection settings? If I put the Envisalink IP in the browser all I get is “it works!” without any config page

now I get this error.

./alarmserver.py
Using configuration file alarmserver.cfg
Writing logfile to /home/pi/alarmserver/alarmserver.log
error: uncaptured python exception, closing channel <main.EnvisalinkClient envisalink:4025 at 0x764be530> (<class ‘socket.error’>:[Errno 111] Connection refused [/usr/lib/python2.7/asyncore.py|read|83] [/usr/lib/python2.7/asyncore.py|handle_read_event|446] [/usr/lib/python2.7/asyncore.py|handle_connect_event|454])
error: uncaptured python exception, closing channel <main.EnvisalinkClient connected envisalink:4025 at 0x764be530> (<class ‘socket.error’>:[Errno 111] Connection refused [/usr/lib/python2.7/asynchat.py|handle_read|115] [/usr/lib/python2.7/asyncore.py|recv|387])

Output of the log file:

2017-05-24 16:32:05 Alarm Server Starting
2017-05-24 16:32:05 Currently Supporting Envisalink 2DS/3 only
2017-05-24 16:32:05 Tested on a DSC-1616 + EVL-3
2017-05-24 16:32:05 and on a DSC-1832 + EVL-2DS
2017-05-24 16:32:05 and on a DSC-1864 v4.6 + EVL-3
2017-05-24 16:32:05 myURL: https://graph.api.smartthings.com/api/smartapps/installations/xxx
2017-05-24 16:32:05 myURL: https://graph.api.smartthings.com/api/smartapps/installations/xxx
2017-05-24 18:07:09 Envisalink Proxy Started
2017-05-24 18:07:09 Disconnected from 10.0.1.9:4025
2017-05-24 18:07:09 Connection failed, retrying in 10 seconds
2017-05-24 18:07:19 Connected to 10.0.1.9:4025
2017-05-24 18:07:20 Disconnected from 10.0.1.9:4025
2017-05-24 18:07:20 Connection failed, retrying in 10 seconds
2017-05-24 18:07:30 Disconnected from 10.0.1.9:4025
2017-05-24 18:07:30 Connection failed, retrying in 10 seconds
2017-05-24 18:07:40 Connected to 10.0.1.9:4025

If I go to the Envisalink home page 10.0.1.9:80, I get “It worked!”.
No configuration option. Could that be the issue? How to get out of it?

I didn’t do none of that.

I just put the alarm server folder in the Root directory. Edited the config file. Made sure my Pi and Python was updated and executed the following:

cd alarmserver
python alarmserver.py

However, when I was having issues likes yours, it was because I had the local or cloud connection to the envisalink open.

I don’t have anything else open.
Just tried again, killed all my browsers on computer & phone, same error :confused:

Are you sure you have the IP address for the envisalink configured correctly in your cfg file? It should be the ip for the envisalink and not your Pi. It should also be the actual ip and not the common name.

Yes, I am using the correct IP. I tried with a different IP and get a different error message (host unreachable)

If I go to the Envisalink home page 10.0.1.9:80, I get “It worked!”.
No configuration option. Could that be the issue? How to get out of it?

How’s the envisalink hooped up to the network? Switch, Router, AP…?

All my devices are connected to Ethernet to my router (router acts as a switch).
I can ping without any issues

I made it further! turns out it was a very stupid mistake. The IP address I was using for the envisalink was wrong (The iPhone app Fing told me it was *.9 when it actually was *.10).

alarmserver runs great on the Pi now.

Next hurdle: Oath.

Step 1 worked. (I get a 404 error but it returns a 6 letter code)

When I try step 2,
https://graph.api.smartthings.com/oauth/token?grant_type=authorization_code&scope=app&redirect_uri=http://localhost&client_id=$client&client_secret=$secret&code=$code

with all 3 $variables replaced, I get:

Oh No! Something Went Wrong! Error
500: Internal Server Error
URI /oauth/authorize
Reference Id xyz
Date Thu May 25 06:24:05 UTC 2017

I have tried deleting the Smartapp, rebooting the hub, regenerating the Oauth client ID/token probably 3 or 4 times now, I can never manage to get past step 2

It works!

I had to install curl. after that, everything was pretty smooth.

Thank you all!

Great! This was me when I first tried to install this. Took me 2 weeks! This was partly because I was just missing small little steps. Mainly because the instructions were all over the place.

In hindsight, I can probably get this up and running in 15 minutes now if I had to start from scratch. Really easy once you understand what the heck you are doing.

Why curl?

not sure why curl. I installed it, tried step 2 Oath again, and worked like a charm.

2 other questions now:
1 ) Is there any easy way to extract the Zone labels out of the DSC system?
I bought a house with an alarm system (contacts & smoke detectors). Everything is labeled in the DSC.
However I have no clue which zones it corresponds to. How can I figure it out?
Is there a way to read it out of the DSC keyboard/panel?

  1. The DSC Integration app cannot find the icon images. The links do not seem to point to anything. It doesn’t bother me, just thought it could be something easy to fix that almost everyone would notice :slight_smile:
    https://dl.dropboxusercontent.com/u/2760581/dscpanel_small.png