Nicely done… Thanks… I still keep the separate device for arm away and arm home since I have my system auto arm for away. Still nice to have this all in one view. The only issue with the individual arm away/arm stay button is they don’t reflect the true status of the alarm if I disarm it at the panel.
Very nice. I’ve been using phrases with buttons to sync SHM and DSC.
Continuing the discussion from DSC/Vista Alarm Smartapp and devices based on AlarmServer:
Any secret to getting the buttons to work? For some reason, nothing is getting to AlarmServer. I do see that it is reaching SmartThings. I’ve set the IP and Port correctly and checked it many times. I can get to the AlarmServer from any browser so I know it is up and working. I tried sending the arm API directly through a browser and it works. Here’s what I see…
- AlarmServer is working and correctly syncing my sensors with Smartthings.
- I can see “[response:Request to arm received]” in the Smartthings logs.
- I see nothing hitting my AlarmServer
- Tried turning off Windows firewall, but everything works.
- Tried looking at my router’s firewall, but I don’t see anything being blocked. I even forwarded the port just in case.
- I changed AlarmServer to HTTP instead of HTTPS since that seems to cause problems.
Any idea what might be going wrong?
Did you change the associated smartapp to point to this new Alarm Control Center? You have to select this in the smartapp. I made the same mistake and took a while before I remember about the smartapp.
Are you referring to the DSC Integration app or is there a smartapp specifically for the buttons? I’ve tried adding it as a panel and zone in the DSC Integration without luck. If it is a specific smartapp, would you mind linking it? I don’t believe I see it in the message traffic.
According to these instructions from the original post on buttons, there isn’t a SmartApp for the button. If I look at the code, it does everything self contained. It just doesn’t make sense on why it isn’t reaching my AlarmServer.
I’m starting to wonder if physicalgraph.device.HubAction just isn’t working on my network for some reason. I tried the example below and here’s what I receive. It’s not receiving a result from the remote call.
> def arm() {
> def result = new physicalgraph.device.HubAction(
> method: "GET",
> path: "/api/alarm/arm",
> headers: [
> HOST: "$ip:$port"
> ]
> )
> log.debug "result: ${result}"
> sendEvent (name: "switch", value: "arm")
> return result
> }
GET /api/alarm/arm HTTP/1.1
Accept: /
User-Agent: Linux UPnP/1.0 SmartThings
HOST: 192.168.1.80:8111
Did you configure the IP address of you alarm server? It is a configuration option for the original buttons.
Yes, if I call the alarmserver URL directly (i.e. 192.168.1.80:8111/api/alarm/stayarm) it works. The Alarm Button is also configured to point to this server.
All,
Well, here’s my contribution! I’ve drafted a document that put together a lot of the other things you guys have done. I’ve also integrated the arm/stay/disarm with Security Monitor and created a new SmartApp and Device Type (stealing from some of your code - no worries, I’ve tried attribute you where possible). This is just a draft and I’m sure there’s stuff missing. Let me know what you think!!!
Hi @phiz118,
Thanks for your work! Really nice tutorial you have!!! RIght now I’m having problems to create a new device (dsc-command-center.src). I’m getting this error:
Grails.validation.ValidationException: Validation Error(s) occurred during save(): - Field error in object ‘physicalgraph.device.DeviceType’ on field ‘author’: rejected value [null]; codes [physicalgraph.device.DeviceType.author.nullable.error.physicalgraph.device.DeviceType.author,physicalgraph.device.DeviceType.author.nullable.error.author,physicalgraph.device.DeviceType.author.nullable.error.java.lang.String,physicalgraph.device.DeviceType.author.nullable.error,deviceType.author.nullable.error.physicalgraph.device.DeviceType.author,deviceType.author.nullable.error.author,deviceType.author.nullable.error.java.lang.String,deviceType.author.nullable.error,physicalgraph.device.DeviceType.author.nullable.physicalgraph.device.DeviceType.author,physicalgraph.device.DeviceType.author.nullable.author,physicalgraph.device.DeviceType.author.nullable.java.lang.String,physicalgraph.device.DeviceType.author.nullable,deviceType.author.nullable.physicalgraph.device.DeviceType.author,deviceType.author.nullable.author,deviceType.author.nullable.java.lang.String,deviceType.author.nullable,nullable.physicalgraph.device.DeviceType.author,nullable.author,nullable.java.lang.String,nullable]; arguments [author,class physicalgraph.device.DeviceType]; default message [{0} cannot be null]
Do you have any idea why?
Thanks again!
Try it again. I removed the author by accident last night which caused this error. Thanks for checking it out!!
I also added a section to the tutorial on removing https.this wasn’t there last night but needs to be done.
This is GREAT. I’m going to beat my head against this wall on the weekend. I’ve been staring at the blinking Envisalink led for a year now with no integration. The first time I looked at this I wasn’t even sure what folders code had to be in so hopefully you’ve nailed all the Python newbie stuff.
I hope so as well! If you have questions, I’ll be monitoring the forum and will help answer them so I can update the tutorial and get you up and running.
Are you able to see the correct status of the alarm if it was armed manually?
Good question, that’s my next enhancement. I’ll add that in the next day or 2.
First read at work I see you (Ken) mention creating individual zone devices for the status.
I assume that’s zone1…16 with zonecontact device. What about the zones with motion, are they zone1…16 as well with device zonemotion?
Just deleting my last attempt at this and starting fresh with your instructions.
First steps comments (and this if for real dummies to follow like me sometimes):
- When you refer to Python 2.7.10 it’s no up to .11 so I added "scroll down to archive list to get 2.7.10
- After pip.pypa…intalling I added 'Open CMD prompt, cd to C:\Python27, type “python -m pip install -U pip” ’ to upgrad to latest version
- I did “pip freeze” and nothing happened, just came back to prompt. Am I supposed to see what you typed? You say “and the freeze command works” - if it doesn’t work where would one look to try and solve the problem?
I await your input with Scotch in hand.
PS I went ahead and did the 2 pip installs even though freeze did nothing and they both installed.
PPS You say to skip HTTPS if you don’t want to install the ST app. To clarify, if you want to use ST on your cell phone to arm/disarm etc. then you can’t use SSL but if you only want to use the ST app on your intranet with WIFI then SSL is ok?
PPS Got to verifying alarmserver web page but it fails yet logs look like all is running ok.
Log file
2015-12-05 16:12:16 Alarm Server Starting
2015-12-05 16:12:16 Currently Supporting Envisalink 2DS/3 only
2015-12-05 16:12:16 Tested on a DSC-1616 + EVL-3
2015-12-05 16:12:16 and on a DSC-1832 + EVL-2DS
2015-12-05 16:12:16 and on a DSC-1864 v4.6 + EVL-3
2015-12-05 16:12:16 Envisalink Proxy Started
2015-12-05 16:12:16 Connected to envisalink:4025
2015-12-05 16:12:16 RX < 505 - Login Interaction
2015-12-05 16:12:16 TX > 005user54
2015-12-05 16:12:16 RX < 500 - Command Acknowledge
2015-12-05 16:12:16 RX < 505 - Login Interaction
2015-12-05 16:12:16 TX > 00191
2015-12-05 16:12:17 RX < 500 - Command Acknowledge
2015-12-05 16:12:17 RX < 610 - Zone zone1 Restored
2015-12-05 16:12:18 RX < 610 - Zone zone2 Restored
2015-12-05 16:12:19 RX < 610 - Zone zone3 Restored
2015-12-05 16:12:20 RX < 610 - Zone zone4 Restored
2015-12-05 16:12:21 RX < 610 - Zone zone5 Restored
2015-12-05 16:12:22 RX < 610 - Zone zone6 Restored
2015-12-05 16:12:23 RX < 610 - Zone zone7 Restored
2015-12-05 16:12:24 RX < 610 - Zone zone8 Restored
2015-12-05 16:12:25 RX < 610 - Zone zone9 Restored
2015-12-05 16:12:26 RX < 610 - Zone zone10 Restored
2015-12-05 16:12:27 RX < 610 - Zone zone11 Restored
2015-12-05 16:12:28 RX < 610 - Zone zone12 Restored
2015-12-05 16:12:29 RX < 610 - Zone zone13 Restored
2015-12-05 16:12:30 RX < 610 - Zone zone14 Restored
2015-12-05 16:12:31 RX < 610 - Zone zone15 Restored
2015-12-05 16:12:32 RX < 610 - Zone zone16 Restored
2015-12-05 16:12:33 RX < 610 - Zone 017 Restored
2015-12-05 16:12:33 RX < 610 - Zone 018 Restored
2015-12-05 16:12:33 RX < 610 - Zone 019 Restored
2015-12-05 16:12:33 RX < 610 - Zone 020 Restored
2015-12-05 16:12:33 RX < 610 - Zone 021 Restored
2015-12-05 16:12:33 RX < 610 - Zone 022 Restored
2015-12-05 16:12:33 RX < 610 - Zone 023 Restored
2015-12-05 16:12:33 RX < 610 - Zone 024 Restored
2015-12-05 16:12:33 RX < 610 - Zone 025 Restored
2015-12-05 16:12:33 RX < 610 - Zone 026 Restored
2015-12-05 16:12:33 RX < 610 - Zone 027 Restored
2015-12-05 16:12:33 RX < 610 - Zone 028 Restored
2015-12-05 16:12:33 RX < 610 - Zone 029 Restored
2015-12-05 16:12:33 RX < 610 - Zone 030 Restored
2015-12-05 16:12:33 RX < 610 - Zone 031 Restored
2015-12-05 16:12:33 RX < 610 - Zone 032 Restored
2015-12-05 16:12:33 RX < 650 - Partition Home Ready
2015-12-05 16:12:34 RX < 673 - Partition 2 is Busy
2015-12-05 16:12:34 RX < 841 - Partition Home Trouble LED OFF
2015-12-05 16:12:34 RX < 841 - Partition 2 Trouble LED OFF
2015-12-05 16:12:34 RX < 510 - Keypad Led State - Partition 1
2015-12-05 16:12:34 RX < 550 - Time/Date Broadcast
Error when trying localhost 192.168.1.71:8111
2015-12-05 16:13:01 Incoming web connection from (‘192.168.1.71’, 1415)
2015-12-05 16:13:01 Incoming web connection from (‘192.168.1.71’, 1416)
2015-12-05 16:13:01 Incoming web connection from (‘192.168.1.71’, 1417)
I’m requesting port 8111 but it’s randomly trying other ports?
HA GOT IT, when testing for connectivity it’s https. I skipped to the next step and did the https to http change and I get the we page! Booooya!
Ah OAUTH
I created the DSC app from KHolloway and created a new Client and Secret. I put the client hex into the URL sting you provided but I get this…
Oh No! Something Went Wrong!
Error
500: Internal Server Error
URI
/oauth/authorize
Reference Id
f8fcbcd7-a50d-47dc-9bf2-5bb3d818f3ad
Date
Sun Dec 06 00:48:57 UTC 2015
What is the YOUR-SERVER-URI? In your string it’s Smartthings/OAUTH/callback - does this need to be something else?
anyone know a way to parse the json dump we get from /api?
and how to get that data within a damn deviceType.
Lots of questions so I’ll try to answer all of them.
- I changed it to 2.7.XX. 11 should work. It looks like it was released yesterday.
- Added.
- OK, you just don’t have any packages installed yet. I took this step out. If the pip install command works, then your fine.
PPS) Correct, if you want to use the ST app to arm/disarm, you can’t use SSL. I made this more obvious in the tutorial.
OAUTH) That’s in my tutorial now (added it the day after I posted so you may have missed it). You’ll get the error, but what want is in the URL string. Here’s the section in the tutorial you want.
“You will receive a “Oh No! Something Went Wrong” at the end of this process. It very likely didn’t!! Look at the URL. You should have a “code=”. Grab the information after the =, this is your new authorization code.”
YOUR-SERVER-URI) This is just the return url. This is the URL that Smartthings will redirect to after it has generated your authorization code. This would allow you to use an application to automate this setup, but I don’t know that one has been built yet (This really should have already been created by Smartthings, this is way too difficult for most folks). Just use the one in the example, and look at the resulting URL.
Thanks for running through the tutorial!! It’s hard to see what’s missing from my side of things.
What API? Are you referring to the Envisalink? JSON will just display in the browser if you call the URL correctly. What Device Type and data? You can add in debug statements like
log.debug myvariable
If you are trying to subscribe to another device type, you’ll need to look at the Smartthings Capability matrix and subscribe to its attribute.
All,
So I have a problem with integrating a manual input on the alarm and the Smartthings app. Unfortunately, it will take a bit longer than I expected. The alarm server app doesn’t pass through the arm status (Stay vs Away) to Smartthings. This means I won’t know, when manually set, if you put it in Stay or Away mode. I’m going to need to add that functionality to the Alarm Server first. It’s not too hard, but it will take a bit more time than I expected. With this, I’m planning to stop using Kholloway’s apps entirely and integrate all of that into the Smartapp I created. Again, this will take more time, but will be an all in one solution when I’m done.