DSC Alarm Integration - and Alarms in General

Stupid Noob here.

I’m trying to compile vassilisv code into my Arduino Mega and get this error message:

‘Serial2’ was not declared in this scope

What am I doing wrong? Be aware … I know absolutely nothing! This is my first Arduino project.

I’ve started a new project here: http://build.smartthings.com/projects/concord4alarm/

Figured out the Serial2 problem. Absolutely stupid mistake since I had not done anything with Arduino before, I didn’t know that I had to pick the Mega board in the IDE.

I’ve got the hardware put together now and both serial connections are working. I need help with repurposing the DSC code for use with the Concord 4.

I’m trying to setup the callback url stuff with AlarmServer but I can’t get my devices in the Smartthings IDE to change state ever.
I setup the rest API endpoint tutorial and have the URL endpoints responding properly but not device state changes ever happen.
Seems like sendEvent and createEvent just don’t do anything, I have tried using multiple device types also (contacts and motion sensors).
Does anyone have some working code they could share, the code below seems to never do anything at all.

sendEvent(name: $device, value: 'inactive')

For anyone interested… I just made a NodeJS NPM package for a node version of the python alarmproxy. You can find it here: https://www.npmjs.org/package/nodealarmproxy

Personally, my next step is going to be to integrate this with a node js server and pull in data from the alarm, smartthings, nest, cameras, and some other stuff and create my own web front-end (will also be on github at some point).

But if anyone wants to contribute or provide feedback for the nodealarmproxy package, just let me know.


I will try to upload the alarmserver version I have at home tonight. It reliably switches states of doors and motion sensors all the time unless the IP address of the EVL changes, then it basically dies. I have been swapping in and out routers as of late.

I also have a devicetype for arming/disarming the alarm, but without SSL or local LAN someone could disarm your alarm (not good).

Beta support for Smartthings on the AlarmServer project added by me.
Make sure you grab the ‘smartthings’ branch on Github per the link below.

Smartthings for AlarmServer (python project):

There are instructions in the Wiki at:

There are also some comments in the code for adjusting how the Panel device looks.
Basically it’s a single icon you can open up to see all your zones.
The main icon reports the main partition status and has various colors and icon changes to notify you of whats going on along with some simple but descriptive text. I will be adding more features to the main app soon, the first new features will be notifications so you can turn on/off other devices based on zone status events. Second feature will be ability to disarm and possibly arm your system via the Smartthings device/apps.

There is still a lot of work left to do!
Please feel free to contribute changes and suggestions on how to make it better.

Example screen shot of the device/panel in the iOS app is below:

Nice looking work. I have a DSC 1832 panel that I have yet to wire in. I wired the entire home during construction 2 years ago. I look forward to one day, using an app like ST to arm, disarm, and view the status of my panel and all items hanging off it as well as getting a push/text message of any alarm state.

Then, how far off could be the possibility to use any switch or item connected to the alarm panel as a Thing to be used to trigger ST events?

@sanity, this is what I’d really like to do vs another attempt I’m working on (I just posted a topic on that). This is awesome, great job on this!

I have a Vista 20p and I’m using an EnvisaLink 3 IP module, which does have an API (see page 2 in this post). Do you foresee something like this becoming available for those with a setup like mine?

@sanity (Kent H),

If I saw everything in github correctly, you are using the EnvisaLink 3 IP module, correct?

If that’s the case, it seems like I should be able to figure out the differences between the DSC and Ademco functions based on their API documentation. True?

Please let me know because what you’ve done here has been a great help for me, thanks again.

1 Like

The AlarmServer project interfaces via the Envisalink API so I would think it should work just fine for your system assuming the event numbers are the same?

Give it a try and if you have problems let me know so we can try and fix them.

Thanks @sanity, I really appreciate your willingness to help someone out. I think the event numbers may be the same. I will try this out as soon as I can today. Got to get to my honey-do stuff first…

@sanity, so far so good. I’m at step 5 of your documentation the the wiki, and it is the hard part for sure…

I’m going through the tutorial and I’m trying to get the App Endpoint Example to work, but no luck. This is a little more over my head than I thought, so it’s going to take me some time.

Basically you can ignore most of the REST API tutorial, the only part you need to tackle is in the exampleOauth.php portions and you don’t even need to do the PHP stuff, just extract the URL’s they are using out of that script and do them manually one at a time in a web browser with your oAuth client id and secret to get your resulting access code. The thing that I got hung up on was the redirect_uri= part since I didn’t know what to put in there. Just put “redirect_uri=http://localhost/blah” and don’t worry about running a web server on your machine or anything to actually answer at that address. It just needs a place to redirect you and your browser will throw an error message but the “access_code=” part will still show up properly in your browser, make sure you copy and save that for the AlarmServer bits.

I will write up some actual step-by-step instructions using a web browser for the REST API OAuth part shortly (tonight sometime) and post it on the Wiki instructions. It is by far the hardest part to do just because it’s not straight forward in the docs but it actually ends up being fairly easy overall.

Below is a decent reference guide to the various Smartthings API endpoints, it helped me a lot while I was building all this to just go look at some of those endpoints in a web browser, nothing fancy needed to view them.

Odd that URL didn’t show up in my previous post, here it is again.

Smartthings API Endpoints:

I wrote some better (I hope) documentation for the Authorization setup part, you can find it at the link below.
I also moved the Smartthings device and app files to a separate Github repo since they don’t really belong in the AlarmServer repo as that project is not specific to Smartthings at all. You can find the updated documentation and files at the links below.

Smartthings DSC Alarm Panel (can also be generic REST API alarm panel):

Smartthings REST API Authorization setup docs using only a web browser:

AlarmServer Repo (python project using Envisalink API to talk to DSC Alarm panels/smartthings branch):

Let me know if you have any questions or problems and I will try and help out as best I can.

@sanity, sorry I couldn’t get to this until right now. Been a long weekend. I’ll keep you posted, but thanks for all the help so far.

@sanity - success! I was able to make it through step 5 of your new documentation. I’m going to have a beer before going to step 6 because I’m not sure what/where AlarmServer is, so that’s my next challenge. That may be obvious, but any detailed help on those next steps would be great.

Thank you very much for what you’ve done.

Here’s my eventlog showing that I was successful:

Alarm Panel (Device) Events — displayed | all | from device

Date Source Type Name Value Displayed Text
30 Mar 2014 23:12:15
moments ago DEVICE zone2 closed Alarm Panel zone2 is closed

30 Mar 2014 23:12:15
moments ago APP_COMMAND closed Alarm Panel App sent closed command to Alarm Panel

30 Mar 2014 23:10:14
moments ago DEVICE zone1 open Alarm Panel zone1 is open

30 Mar 2014 23:10:14
moments ago APP_COMMAND open Alarm Panel App sent open command to Alarm Panel

AlarmServer is a python project by juggie and is available on Github at the link below.
You need to grab the “smartthings” branch when you check it out since that’s where all this callbackURL code lives right now.

AlarmServer by juggie:

AlarmServer smartthings branch:

Let me know if you have any issues getting that setup, it’s fairly straightforward if you are familiar with Python at all and it’s still pretty easy even if you are not familiar with it. :slight_smile:

@sanity this is awesome! I’m probably going to ditch my GE Concord 4 panel in order to gain this capability. Do you know if it’s possible to arm the DSC panel in both “away” and “stay” modes?