DSC Alarm Integration - and Alarms in General

Here is a snippet of ST code to talk internally on your LAN from the ST Hub as an example.

def ip = "192.168.0.10"
def deviceNetworkId = "C0A8000A:1F90"
sendHubCommand(new physicalgraph.device.HubAction("""GET / HTTP/1.1\r\nHOST: $ip\r\n\r\n""", physicalgraph.device.Protocol.LAN, "${deviceNetworkId}"))

Kent,

I am not using @ethomasiiā€™s at all. Infact right now my setup is completely using your setup. But I do have a VISTA 20P panel so I use HoneyAlarmServer. Do you have DSC or Vista20P ? May be I can investigate. Where do you put that code to internally talk to ST? Would it go in the Smart App? Or somewhere else ?

Adwait

I have a DSC panel, I wrote the plugin for HoneyAlarmServer for ST but I donā€™t have a Vista/Honeywell panel to test with so I have relied on folks in the forums here to test and report back issues. Until now AFAIK no one has reported issues with the panel device and itā€™s status.

Put HoneyAlarmServer into debug mode and then open (wait 5 seconds) then close a door/sensor in your house and post the debug log here. You can also open up the ST IDE and watch the logs there as well to see if something is obviously wrong or missing.

I think there are multiple ways to skin a cat. I did it first and probably the least elegantly. Kents work is potentially better for mostā€¦ Iā€™ve never looked into using his as mine works just fine. If you donā€™t want to arm or disarm then you never have to expose your server to the Internet with mine. Smartthings doesnā€™t work with self signed certs as far as I am aware but I have not looked into it much. If it did, then you could enable https. You could also consider local communication from the hub.

In the end, and I think I posted this elsewhereā€¦ Exposing my alarmserver to the Internet is little to no risk. So someone hacks it and arms my houseā€¦ Big deal. Someone unarms itā€¦ Again big deal. With SmartThings in the mix I can always be notified if my alarm status changesā€¦ If one day someone really feels like hacking into my alarm, Iā€™ll turn it off but seems like minimal risk
If we could whitelist SmartThings IP address there would be even less risk.

Iā€™ll switch the arm and disarm device types over to to sendhubcmd In the next few days when I get a chance. Itā€™s worked well enough for me but I see there is a desire to do it locally

Well said!
Right now there are at least 5 known projects for doing this:

  • @ethomasiiā€™s version which is a fork of AlarmServer below and was the first one discussed in the original ST forums (his suggestions paved the way for my devices and changes to AlarmServer so thanks again!)
  • juggie/AlarmServer (smarthings branch with my code)
  • MattTW/HoneyAlarmServer - Vista/HoneyWell panels
  • oehokie/NodeAlarmProxy - NodeJS AlarmServer
  • Arduino/ST dev board with IT-100 serial to DSC panel (sorry Iā€™m not sure who the original author of this was but it was posted on the original ST forums long ago)

Then we have the ST smartapps and device types to integrate with each of these projects.
My app/device types work with the original AlarmServer and the HoneyAlarmServer. The other ones tend to only work with their source AlarmServer project but could probably easily be updated to work with others (as could mine).

Basically there are a lot of ways to solve the same problem, none of them standardized in any manner and none of them super easy to setup unless you have some basic programming knowledge.

If we could get ethomasiiā€™s solution to use LAN communication, I think it would address almost all users concerns. Since evl-3 is already open to your internal LAN on port 4025 and 80, there is no security risk that I can see. I love the fact he uses the alarmserver API to arm/disarm.

Kent, your code worked great also, until i realized how much customization your configuration allowed, so i realized i wanted your device types, with ethomasiiā€™s arm switches.

really in the end, iā€™d like to have one project that is secure, and easy to be managed by a couple of you experts. say you dont want arm/disarm, then you dont install that device-type, but the alarmserver still works just fine.

alsoā€¦while weā€™re on the topicā€¦iā€™d love for the app to interface directly with the evl-3 instead of alarmserver, but im sure thats a long way away.

Itā€™s a nice wishlist and one we could get to eventually.

ST will likely never be able to talk directly to the EVL3 device because itā€™s a custom TCP socket interface on the EVL3 side (which needs to be constantly connected or you lose events) and ST doesnā€™t support anything like that.

Thatā€™s the whole reason we need the intermediary/AlarmServer app in the middle. Now what would be nice is if the EVL3 device exposed a proper WebUI with an API that we could access (and had either callbacks or registered events). That would remove the need for AlarmServer itself and would be very nice. As far as I know neither of those options are on the table so until then this is what we have.

@isriam you know @mattmartzā€™s NodeJS/SmartDSC has all these features already just FYI including Arming/Disarming via the local ST hub -> EVL link instead of out over the internet.

ST Bits w/Arm/Disarm/Other features:
https://github.com/oehokie/SmartDSC

NodeJS AlarmServer:
https://github.com/oehokie/NodeAlarmProxy

actually i tried but i can handle python but nodejs i couldnā€™t ever get the app to even load. i figured i have the integration that works, i shouldnt have to learn another language lol.

i might give it another try though, but honestly iā€™m a network engineer not a developer. its quite the learning curve to come here with no experience and try to make ST work for every wifi device already in our lives.

im sure iā€™ll report back here if i can get the nodejs working, because honestly i dont think anyone here cares what is better or who does what as long as it requires the functionality we all need.

FYI i have relatives that do alarm installations for a living, so my goal here was to kinda show off and say ā€˜look i took your lame dsc alarm and made it 21st centuryā€™ but it isnā€™t turning out that way. alarm systems seem to be really behind todays technology. althought iā€™m now buying more dsc sensors, to integrate into ST because i can get a wireless or wired sensor for 20-40 bucks which totally blows away the ST sensor prices.

Sorry, guess I saw this a little late to actually help you out. Did you ever get it working with either? Iā€™ll add writing a more step-by-step guide to my todo list.

@sanity FYI I added this to my repo:
https://github.com/oehokie/SmartDSC/blob/master/Bonus%20Apps/everyone-away.groovy

it MIGHT play well with yours tooā€¦ I donā€™t see why it wouldnā€™t at least. Itā€™s a smart app that detects when everyoneā€™s phone/presence sensor is away from the house and arms the alarm.

Matt Iā€™ve been using ethomasii code. He had alarmserver built as two switches for away and stay arming. I use hello home to stay arm at 830pm and away arm if everyone is gone. I got most of the nodejs stuff working but honestly Erics stuff worked great so I havenā€™t looked back. My only concern is using sendhubcmd instead of sendcmd but havenā€™t fixed that yet.

DSC integration is working very well for me.

Has anyone tried to add delay to deactivate motion ? What happens now is , as I walk and pause the motion turns off immediately turning off light attached to it. I did put delay to keep light on but then multiple active motion events some how messes the light events.

DiskStation integration app has implemented delay to deactivate motion which is very handy and useful feature as below. It would be good to have similar feature in DSC. Due to my limited technical abilities I am not able to program it, hope somebody implements it.

def checkMotionDeactivate() {
def timeRemaining = null

def delay = (parent?.motionOffDelay) ? parent.motionOffDelay : 5
delay = delay * 60
if (state.lastMotion != null) {
timeRemaining = delay - ((now() - state.lastMotion)/1000)
}

if ((timeRemaining != null) && (timeRemaining < 0)) {
sendEvent(name: ā€œmotionā€, value: ā€œinactiveā€)
state.lastMotion = null
timeRemaining = null
}

return timeRemaining
}

@coolcatiger I use one of my motion sensors to turn on a night light only after 10pm and then when motion stops turn it off 2 minutes later. It works great and doesnā€™t rely on any custom code in the DSC app. To setup open the Smartthings app on your phone and click ā€œLights & Switchesā€ then click the gear icon on the top right. You get a list of lights, pick the one you want to turn on/off with motion and click on it. Click ā€œTurn on when there is motionā€ , click ā€œTurn off when motion stopsā€ slider so itā€™s on/green. Choose the motion sensor at the top that you want to trigger this light then in the ā€œwait this many minutes to turn off after motion stops (optional)ā€ put 2 or whatever time value you want. I also have ā€œonly when mode isā€ equal to night which for me is after the sun goes down every night via a different app.

So overall most of my lights come on just as the sun is setting at night and my night light also only comes on later at night if there is motion by the front door/garage door entry.

Hope that helps, if you are already doing that and itā€™s not working you should file a bug report to Smartthings. Mine is working great just FYI.

@coolcatiger, whoā€™s implementation are you using? I am avoiding setting up DSC until after ver 2 hub comes out. I donā€™t want to really have a server running as a proxy if the new hub will allow sockets and directly talk to my Envisalink. I really miss having my alarm no integrated into ST.

@daven

I use this one. is there any other better one ?

I believe this one is Kents but is doesnā€™t arm/disarm? The other one which I was unclear about how to install uses JSON and employs a hole in the ST system to allow arming and disarming remotely. Just wish the install docs were a bit more step by step as Iā€™m unfamiliar with JSON and what is required in a Win platform; do I need Alarmserver still, how do they interact, what folders do the scripts go into etc. There are so many folders with the Win Python, full of examples and crap it muddies the water for me. Must be getting older, back to COBOL :smile:

It does need alarmserver, I run it on MacOSX (virtual machine) , it is very reliable. The setup is complex tough.

It does not arm/disarm

if you search github or these forums for ethomasii youā€™ll find his code. you can also look on github for me, isriam as i uploaded my code also in case @ethomasii decided to up and leave on us :smile:

i use a raspberry pi running alarmserver.py and can arm/disarm and use my motion/door sensors for anything i need in smartthings. this version is more complex because youā€™re using calls to/from alarmserver so it took me a long time to figure out and needed a lot of help but eventually got it.

First I would like to thank everyone for the work that they have done to connect the DSC Alarm System with Smartthings. Next I would like to contribute. Iā€™ve not done any programing in the past but I do have a strong unix/linux shell scripting background and have looked at tons of code in the past. Still I have a lot to learn and have already started to learn groovy.

So here is my contribution today. The one thing we were lacking was a way to arm/disarm our systems from Smartthings using only the local LAN. So that is what I have created. An on/off switch that sends the arm/disarm commands over to the alarmserver via the local LAN.

Also being new to GitHub I hope that I got this setup correctly and that you all can access it.