DSC Alarm Integration - and Alarms in General

Hello,

See that you are or were attempting to integrate an arduino with a GE Concord board. Wondering if you have gotten anywhere with it? I am totally new to using arduino and am trying to connect it or a raspberry pi if it is easier to an older Concord 2 alarm panel? Thanks!

Wow, I have not been receiving notifications from this thread. Iā€™ve been using @caesarsghost code with slight modifications (https://github.com/caesarsghost/device-type.condor4monitor/) with success for over a month. Iā€™ll have to read through everyoneā€™s work in the last while ā€¦ the internal IP arm/disarm sound like a great addition.

Iā€™m been try to do the OAuth steps with no success. Any help?

Iā€™ve got everthing setup and working but when I try and login with a CHrome Browser I get this error on the server:

incoming web connection from (ā€˜192.168.15.177ā€™, 53202)
error: uncaptured python exception, closing channel <main.AlarmServer listening :8111 at 0x75ea7b48> (:certfile must be specified for server-side operations [/usr/lib/python2.7/asyncore.py|read|83] [/usr/lib/python2.7/asyncore.py|handle_read_event|443] [./alarmserver.py|handle_accept|456] [/usr/lib/python2.7/ssl.py|wrap_socket|891] [/usr/lib/python2.7/ssl.py|init|498])

Any ideas how to fix?

Just wondering how to make or get my app to display the icon with labels on it, as well as all the zones into that same page you have above.

I believe I changed those in the ide section to match what I had on my systemā€¦ I donā€™t use smart things anymore so I canā€™t really checkā€¦

Sorry to post a newbie question here but is there a write-up somewhere on how to setup SmartThings with DSC integration from start to finish?

1 Like

You can take a look at my GitHub repo here - https://github.com/obycode/DSCAlarmSmartThings. My project was forked from another user here, and several others have forked and improved on mine. The wiki there includes a decent writeup on the setup process.

1 Like

I am glad I found this, I have been wanting to put some smarts behind my DSC system or replace it. I just ordered the EnvisaLink and will start working on this project this weekend. Is anyone using a Raspberry PI to run AlarmServer? It would be dedicated to AlarmServer but I donā€™t know if it is fast enough for the job.

To answer my own question, a Raspberry PI works just fine to run Alarm Server. The EnvisaLink came in today (gotta love Amazonā€™s Sunday deliveries) and I was able to configure everything. Thanks a lot to the people that made this possible.

So, Iā€™m trying to get AlarmServer running on a Raspberry Pi and Iā€™m getting some errors when I try to run alarmserver.py

Iā€™ve been working through errors and the latest seems to be a syntax error with line 415:

except:
print sys.exc_info()[0]

and Iā€™ve also had problems with these lines (around 510):

except IOError as e:
print ā€œI/O error({0}): {1}ā€.format(e.errno, e.strerror)

Iā€™m running Python 3.2 and Iā€™m pretty much a non-programmer so this could be something very easy that Iā€™m just overlooking. Any help would be much appreciated.

BTW, Iā€™ve got the Envisalink 3 all attached to my DSC Alarm system, and it seems to be working on the Envisalink web interface.

Also, a further noob question ā€“ does the Raspberry Pi (or whateverā€™s running the Python script) have to be placed anywhere in particular in the system? Or just anywhere so long as itā€™s on the same network? Sorry if these are silly queries. Iā€™m using this whole home automation project to teach myself a little more about programming, etc.

Downgrade your Python to 2.X and it should start working fine.

Oh and anywhere on the same networks fine or anywhere where your Pi can talk to both your envisalink device and the Internet.

1 Like

There is an existing device(called PIM) is being used for openhome smart-hubs for DSC & Honeywell panel integration. Zigbee PIM (Panel interface module)
http://www.openhome.io/deviceDetails?productId=25

I think will be much easier to use PIM as Smartthings is already zigbee compatible.

Does anyone have one of these baby installed?

I am not sure how this will work if i have a two keypads and will the envisalink still work with this?

Here is my contribution to this thread. I forked juggieā€™s AlarmServer and added the following REST APIs:
/api/alarm/panic
ā€¢Triggers panic alarm (police)

/api/alarm/ambulance
ā€¢Triggers ambulance alarm

/api/alarm/fire
ā€¢Triggers fire alarm

/api/alarm/duress
ā€¢Disarms system and triggers duress alarm. Defaults to the 0000 duress code.

/api/alarm/chime
ā€¢Toggles chime sound just like pressing *4 on keypad

The duress alarm code right now is hardcoded to 0000. I will eventually change it to a variable in the cfg file. My version of AlarmServer is at https://github.com/carloss66/AlarmServer. I am not a developer, but this was easy to figure out using Envisalinkā€™s TPI documentation. Here is the code I added:

elif query.path == '/api/alarm/panic':
    channel.pushok(json.dumps({'response' : 'Request to trigger panic alarm received'}))
    self._envisalinkclient.send_command('060', '3')
elif query.path == '/api/alarm/ambulance':
    channel.pushok(json.dumps({'response' : 'Request to trigger ambulance alarm received'}))
    self._envisalinkclient.send_command('060', '2')
elif query.path == '/api/alarm/fire':
    channel.pushok(json.dumps({'response' : 'Request to trigger fire alarm received'}))
    self._envisalinkclient.send_command('060', '1')
elif query.path == '/api/alarm/duress':
    channel.pushok(json.dumps({'response' : 'Request to disarm with duress code received'}))
    self._envisalinkclient.send_command('040', '0000')
elif query.path == '/api/alarm/chime':
    channel.pushok(json.dumps({'response' : 'Request to enable/disable chime received'}))
    self._envisalinkclient.send_command('071', '1' + "*4")

I just made the duress code a variable at the end of the cfg file and made the appropriate changes to alarmserver.py. I tested it on my system and it is working.

2 Likes

Iā€™m sure this has been addressed but when AlarmServer.py is reconnecting after a disconnect event from TPI, itā€™s possible the input it receives from Envisalink may be causing unhandled exceptions:

Exception

error: uncaptured python exception, closing channel <main.EnvisalinkClient connected 192.168.0.201:4025 at 0x102eeeb00> (<type ā€˜exceptions.KeyErrorā€™>:ā€˜typeā€™ [/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py|read|83] [/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py|handle_read_event|449] [/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asynchat.py|handle_read|158] [alarmserver.py|found_terminator|238] [alarmserver.py|handle_line|280] [alarmserver.py|handle_event|374] [alarmserver.py|callbackurl_event|388])

Log

2015-08-08 06:48:05 RX < 511 - Keypad Led Flash State - Partition 1
2015-08-08 06:48:05 Disconnected from 192.168.0.201:4025
2015-08-08 06:48:05 Connection failed, retrying in 10 seconds
2015-08-08 06:48:15 Connected to 192.168.0.201:4025

I understand two things shouldnā€™t attempt to access TPI port but in the event it does, it looks like some validation may be needed for this handle correctly, seems like a race condition.

Granted, Iā€™ve had about 3 hours of experience total with this now trying to get SmartThings linked up to my DSC panel. Its hitting the callback URL and triggering the event so long as I donā€™t connect to eyez-on to trigger some action.

Iā€™ll read back up through the thread after stepping through some of this code.

Questions

  • DSC Shock Sensor Zone
  • AC Smoke Detectors
  • D-Link/Swann cameras for motion detection

Has anyone tried to use the shock sensor zone (DSC EV-DW4927SS ) with SmartThings? Iā€™ve never actually had the shock sensor zone open before, it does beep though, Iā€™m thinking I just have to configure it as a different type.

Also, I have about 5-6 smoke alarms that were ran when my home was built. Each are linked together. Unfortunately, they were using AC power so connecting them to any sort of panel becomes difficult since they expect DC. I used a relay converter kit and ran a wire to the respective place on my DSC 1832 Powerseries board. Itā€™s set as Zone1 and one zone represents all alarms. If they go off for any reason, the zone is opened and a fire alarm triggered to my monitoring company. Unfortunately, zone 1 may show as open even though its not. In any event, Iā€™m guessing I could create a device for this simply as a zone type. Has anyone tried to do anything like this?

Finally, has anyone been successful using a D-Link Camera/Swann wired in SmartThings (DCS-2132L/DCS-932)? Could motion detection from the camera be used to open a zone in DSC?

If anyone read this, much appreciated!

I imagine I could rig up something with IFTT with a smartapp.

Iā€™m thinking when a disconnect occurs unexpectedly, upon reconnecting, handle_accept and handle_event may be making assumptions about the data its receiving. Iā€™m reading up the thread now about the same thing before adding validation to these methods.

I added a condition in handle_event @ 340ish (beginning of def):

 if self._isloggedin == True:

This way I donā€™t attempt to handle an event and do some action if Iā€™m not even logged in yet. Now, Iā€™m reconnecting successfully for this case.

2015-08-08 08:09:13 RX < 511 - Keypad Led Flash State - Partition 1
2015-08-08 08:09:13 Disconnected from 192.168.0.201:4025
2015-08-08 08:09:13 Connection failed, retrying in 10 seconds
2015-08-08 08:09:23 Connected to 192.168.0.201:4025
2015-08-08 08:09:23 RX < 511 - Keypad Led Flash State - Partition 1
2015-08-08 08:09:23 RX < 505 - Login Interaction
2015-08-08 08:09:23 TX > 005060305C3
2015-08-08 08:09:23 RX < 500 - Command Acknowledge
2015-08-08 08:09:23 RX < 505 - Login Interaction
2015-08-08 08:09:23 TX > 00191
2015-08-08 08:09:23 RX < 500 - Command Acknowledge
2015-08-08 08:09:23 RX < 609 - Zone A Open

Iā€™m using eyez-on to disarm/arm alarm and other TPI clients at the same time to force a disconnect by AlarmServer too.