[NEEDS UPDATING] DSC/Vista Alarm Smartapp and devices based on AlarmServer

I spent several days messing with my config file and all the RestAPI’s until I realized I had to actually setup the Panel using my Smartthings phone app. Make sure the Panel is set to use the integration app and add all the zones.
Once I did that all my zones went from “Open” to their actual state. In other words, my config file was fine the whole time, I just didn’t complete the setup.

1 Like

Are you executing the program from the directory that contains alarmserver.py or from another directory like root? I got that error only when trying to execute the program from another directory, I believe it’s was a path issue for me.
I wrote a .sh script to launch the app
cd /
cd /home/pi/AlarmServer
sudo nohup python alarmserver.py &
cd /
That script changes to root directory, then to the AlarmServer directory, launches alarmserver in the background with no interupts, then switches back to root.
I added that to the crontab on startup. The file is called launch.sh and it’s in the same directory as alarmserver.py.
To add it to crontab, open a terminal and type crontab -e
scroll to a blank line and type
@reboot /home/pi/AlarmServer/launch.sh
to exit hit cntrl and x then y and enter.

Ive managed to get everything working for the most part. Moved my alarmserver to a windows machine, smartthings is showing when zones open and close etc. Only thing I cant get working is the Arm and Disarm. Im currently using the instructions listed in this post

Im pretty sure i’ve followed the instructions properly, Alarmserver is reporting incoming web connections as I try to Arm and Disarm, but my panel does not respond at all. Any ideas?
Ive tried to use some other builds including one that required inputing deviceIDs, which i have no idea where to find?

Try using this code. https://github.com/carloss66/AlarmServer

The one you posted will only arm and disarm. This one has arm away and stay. Also make sure you input your dsc password in the alarm config file, it’s at the very bottom. FYI I used juggies alarmserver following kholloway instructions and then used Carloss alarm buttons. All is working perfect.

This one does not have the “callbackurl” information like the others do?
I have all the token, appid, oauth codes etc… can I copy and paste the info from juggies?

Experimental CallbackURL functionality - Mainly for Smartthings right now
The resulting path for callbackurls looks like this
This likely needs to be fixed to allow more flexibility for any service?
Suggestions welcome
${callbackurl_base}/${callbackurl_app_id}/panel/${code}/${zoneorpartitionnumber}?      access_token=${callbackurl_access_token}
Smartthings or generic callback URL setup
callbackurl_base=https://graph.api.smartthings.com/api/smartapps/installations
callbackurl_app_id=MY ID IS HERE
callbackurl_access_token=MY TOKEN IS HERE

cover zone open/close, partition ready, not ready, armed, exit delay, entry delay and in alarm status
these should cover most use cases
callbackurl_event_codes=601,602,609,610,650,651,652,654,656,657

That is how my current config is, and everything seems to work, except for these arm/disarm buttons.
UPDATE
I have tried carloss66 build. The master one did not seem to work right at all, kept saying “debug” on the server.
Used his Smartthings branch, just copied over my existing alarmserver.cfg and same deal. All zones restore properly, I can see zones opening and closing on my phone, but using his arm and disarm buttons don’t do anything. The server says its getting incoming web traffic from my phones ip, but my panel does not seem to respond.

I only used the alarm buttons from carloss66. The rest of my setup is using the smartthings branch of juggies alarmserver. Do you have this line at the end of your config?

Alarm code: If defined you can disarm the alarm without having to
enter a code.
alarmcode=1111

Phil make sure you configure the alarm buttons with the IP address of the Alarm Server and the port is 8111.

I’ve set my servers IP and port at the IDE level and in the Smartthings app. I have the alarmcode set to my panel code, but still not working.
I know the server is receiving the request but its not processing it. The alarmserver just shows:

2015-10-11 20:08:34 Incoming web connection from ('192.168.1.199', 17364)
2015-10-11 20:08:36 Incoming web connection from ('192.168.1.199', 17365)

every time I hit either the Stay or Arm button in the app on my phone. The port # goes up incrementally every time, but the physical DSC panel does not show any activity.
Could it be the api/alarm/stayarm stuff? Im under the assumption the “urlcallback_event_codes” above “609,610,651, etc” are what that is?
Sorry I have no coding experience at all and just following instructions best I can, which have been pretty good for the most part!

Thanks to everyone for all their work on this, I’m new to SmartThings and have made this one of my first integrations. I’m running into some trouble however.

I am using this with a Honeywell Vista 20P panel and the recently released Eyez-On EnvisaLink 4 (EVL-4) module. HoneyAlarmServer loads up and I’m getting good output from it, it appears to be talking to the Envisalink properly. I can get the SmartApp installed and am able to test my door contact sensors manually submitting the URL and watching them flip open and close in the App.

The problem is it appears the SmartThings plug-in for the HoneyAlarmServer thinks all zones are closed, and submits the URL to close a zone even if it opens. When a zone is faulted I see the panel status update correctly, but I’m not seeing the appropriate Zone flip to open as well. If I manually submit the URL to mark the zone as open as a test, the script flips it to close on its next cycle.

I’m wondering if maybe it’s not interpreting the data from the EVL-4 properly. I didn’t think there was any difference to the TPI on the EVL-4 from the previous EVL-3 model, but maybe that’s not the case.

Is anyone else seeing similar results? I can post logs if that helps. Thanks for any assistance.

If the codes for open or close changed in the TPI that would cause the problem you are having.

Where is there talk of opening up the IP sockets for V2. That would be the holy grail for me as i had this running smooth with Vera but smartthings has been a different story. I tried following this guide previously but got so confused i gave up.

i am pretty sure i understand whats causing Carlos buttons not to work (for me).

like PHIL said the server is receiving the request but its not processing it.

2015-10-11 20:08:34 Incoming web connection from ('192.168.1.199', 17364)
2015-10-11 20:08:36 Incoming web connection from ('192.168.1.199', 17365)

the reason is that the call is over Http and not Https…
even on my browser http://localhost:8111/ is not working but https://localhost:8111/ works great.

do someone knows how to make the

 def result = new physicalgraph.device.HubAction(
        method: "GET",
        path: "/api/alarm/arm",
        headers: [
            HOST: "$ip:$port"
            //HOST: getHostAddress()
        ]
    )

to work on https??? or maybe i should fix it somewhere else?

Have you followed https://github.com/rfish8u/Smartthings-DSC-Alarm/blob/master/README.md

You need to edit the alarmserver.py to listen for HTTP traffic instead of HTTPS.

Hope this helps.

Didn’t see that !!!

Thank you!!! Works!!!

So crazy I still can’t get this working. Reading over everything, I definitely have the alarmserver.py changed. When I don’t have that proper I get all sorts of python errors.

  path: "/api/alarm/stayarm",

Do I need to physically put these API codes in, or are they already in there? And if so where?

## ${callbackurl_base}/${callbackurl_app_id}/panel/${code}/${zoneorpartitionnumber}?access_token=${callbackurl_access_token}

Is it a problem these devices are “switches” and the callbackurl is designated as a panel?

Edited this post several times as I progressed, got it all working except for the “smart home monitor” arm/away, arm/stay, and disarm buttons. They don’t update to reflect the alarm status either. Should this be working?

Thanks for everyone’s effort in this project.

Jim

Ever get this working? I get no ST indication of smoke alarm but see the activity through alarmserver & eyeson.

Same boat for me… I have a vista 21ip and I’m just getting started with ST. The idea of using the alarmserver is compelling, but not with the vista limitations. I will probably end up doing a bunch of parallel monitors for the contacts… Using an arduino smart things shield or something. Every sensor is home run, so it shouldn’t be a big deal, even if it is a bit less elegant.

Too bad there isn’t just an Alarmnet module for ST. :disappointed:

The other issue that parallel monitoring avoids is cybersecurity… Opening all of this to the Internet via http REST calls to ST increases your threat surface.

Yeah, I haven’t seen much for Alarmnet / Total Connect, just this really:

I’m still thinking I’ll do the sensors directly to have the most flexibility (and probably performance), and then lift some code from that Total Connect Smart App to control arming that system when desired. Although it seems like the Alarmnet API could be used for the zones also, but would probably involve constant polling. Which just doesn’t seem like as fun of a project to me. :smiley: svcTC2API Web Service

For the life of me I can’t figure out what I am doing wrong to arm/disarm the alarm. I’ve created the device type from code, added the device. Entered the local ip address with port 4025 (same port in my config file for alarmserver). I made sure the code is entered in the alarm server config file. I am I missing something somewhere?

I should add I am using the Honeywell version and I did try 8111 first but my port in the config file is 4025 so I changed back to that. I have full communication in my app with the alarmserver just can’t arm/disarm.