I have a SimpliSafe security system and I was using the DTH with some automations to arm/disarm the security system. The code attached was written by Toby and Scott over on the SmartThings community.
The DTH connects and gets status updates on the alarm. When I try to set the alarm to either home/away/off, I get this error:
Alarm SET to OFF Error: groovy.lang.MissingMethodException: No signature of method: dev1519955406307370838064.httpPost() is applicable for argument types: (java.util.LinkedHashMap) values: [[uri:https://api.simplisafe.com/v1/subscriptions/XXXXXX/state?state=off, …]].
Does anyone have an idea what might cause the MissingMethodException error?
I’ve had the same httpPost error on my attempt to bring over Sinope thermostat api from smartthings and haven’t received any suggestions so I hope you have better luck… Maybe I can get my answer from yours.
Thank you. The other issue I think I’m going to face is how to access things like the alarm state (away/home/off) in Rule Machine. I can make the custom commands, but those are actions after a trigger or condition set. I need to make those states triggers.
Looks like httpPost requires the closure at the end of the statement (even if you don’t need the response).
If you add {resp -> } at the end of lines 88, 97, and 106 the errors should go away.
Presence is set based on the alarm state: ‘present’ for OFF/Home, ‘not present’ for Away. Looks like it’s set whenever the state changes or is polled every 5 minutes. I tested the code section manually and it seems to be working correctly/no errors. ST documentation says a null value means ‘not present’ but in your screenshot the status is off so it should actually be present. Might be helpful to add some extra logging around that section to see the values.
Line 213:
That makes sense. I posted a question about adding a “capability” called alarm in another thread so it may appear to be a duplicate posting. That said, the response was similar to yours. I will put your code in and see how the response and interaction with the triggers are.
And, thank you @mattw. I’ll take all the advice I can get
@homeauto2112 have you Incorporated your changes into your dth. Just getting around to my simplisafe. Everything working as expected? Are you on SS2 or SS3?
Awesome. I took some time to play with it tonight. In ST, they had a companion smart app to go a long with it. But looking closer, it seems we can just interact with it directly. In my case with webCoRE. Above you comment on custom commands.
In most cases, in my pistons I was monitoring state of it and then taking action - works fantastic. However I got to a piston where I wanted to arm it, in this case to Away. Seems like I can do that based on this screen shot:
The first command available is a custom one, and is suggestive of arming it into away status. I am guessing 'device Turn off' will disarm. This piston is harder to test. However how to I set up an option to arm it to Home?
The custom commands I spoke of are inside of RM. I had to create three custom commands in RM for "off"/"home"/"away" to allow rule manager to execute them. I have a few rules for SimpliSafe which include arming the "home" when I push a lutron pico button, or arming the "away" when I leave the house (also locks the door and has Alexa tell me all the windows and doors are closed).
I figured the custom commands were in RM, I've build a few custom commands elsewhere already. And I can work with that, however I am not sure how to build them. When I go into RM to create a custom command, the first thing you need to do is select a capability. I guess my first question is which capability to pick, that will include the Simplisafe device (using your custom DTH).
I have been chatting with Hubitat over a lot of noise in my logs that were degrading performance. Specifically something that was not 'the app not to be named'.
The review has so far pointed to this driver.
Details:
User Logs:
|2018-11-28 09:22:12.030|INFO |dev|321|Simplisafe|Checking to see if time has expired....|
|---|---|---|
|2018-11-28 09:22:12.261|INFO |dev|321|Simplisafe|Executing Login...|
|2018-11-28 09:22:13.806|INFO |dev|321|Simplisafe|Executing polling...|
|2018-11-28 09:22:14.085|INFO |dev|321|Simplisafe|Alarm State1: AWAY|
|2018-11-28 09:22:14.086|INFO |dev|321|Simplisafe|Messages: []|
|2018-11-28 09:22:14.364|INFO |dev|321|Simplisafe|Events: System Armed (away mode): ...
Could someone recommend how to, or someone update the driver to, add some debug lines to help us see what is happening? Looks like around the 'check to see if time expired' area - something around like 275 (check time) or lines 223 (logging in).
I can ask this request, but I would have no idea where / what to add into the driver.
Separately, I reviewed this entire thread again, and see an old, but unaddressed question about using Simplisafe driver status as trigger (as oppose to something used to take action upon).
Yes, I use it, it creates a lot of log traffic, especially if you are monitoring motion sensors, and you need to poll the alarm much more frequently than the 5-minutes in the driver to make it practical. I'm polling once a minute right now. There was a concern voiced about SS noticing and taking action against the device doing the polling, but I'm not sure what they could / would do
Can you elaborate a bit on how you got it setup? I got my Hubitat setup yesterday, and I got my Philips Hue Hub and lights added in, and now want to try and get our SimpliSafe system integrated, but unfortunately, I can't find really any actual documentation on how to start.
I will try, but I'm rather new at this too. There is an option on the Hubitat menu (left hand side of the screen towards the bottom) for "Driver Code". Select "New Driver" and paste the code from Github above into that window, and save it.
From there, move to the Devices menu, and select "Add Virtual Device". Name it what you will, label it what you will. The Device type will be simplisafe (it will be in the user section at the bottom of the list). Save the new device, then edit it and enter your credentials.