SimpliSafe Alarm Integration (cloud to cloud)

I am not sure who controls this thread any more but @tobycth3 I have been doing my own coding for an integration into Homekit with SS systems. I have it so that the sensor get refreshed and security system can be changed but did anyone figure out the Camera’s URL? If I had more time today I would look into it more today.

I am not sure if @tobycth3 has done anything with the cameras, but I can say that I have not. I have a different camera system, so have never really looked into the simplisafe cameras.

Okay I did some more digging to and found some stuff. I think I might able to get it working… I will post the js code in the future.

Far as I got today is the cameras are here…
https://media.simplisafe.com/v1/{UUID}/mp4 but each time I try to access it, I get unauthorized.

Of course I feel the UUID is the camera UUID but I could be wrong.

1 Like

I am not sure if you guys are tracking but WOW!! I found it…
this is a big insight to simplisafe API. They do have a push to the webapp… This is huge!!!

https://api.simplisafe.com/socket.io/?ns=%2Fv1%2Fuser%2F{oUserID}&accessToken={oAuth_TokenID}&EIO=3&transport=websocket

It is a watcher… I have to learn socket.io calls a little but it is major. Finally we have a push from the API.

2 Likes

That would be awesome. I really hate the polling approach we had to take, so this would be great.

I thought you all may enjoy my SimpliSafe / ST ‘integration’ :joy:

Using a SimpliSafe door sensor I am able to trigger my SimpliSafe alarm using Smart Home Monitor, two MIMOlite devices, two small motors and CoRE. Its admittedly not a very elegant solution, and I’m sure some smart people on this forum could refine it. But hey, I’m just a lowly chemical engineer, so I did my best :man_shrugging:.

When Smart Home Monitor is triggered, it activates one relay which moves the magnet, triggering SimpliSafe if its armed. It will then reset the magnet using the other relay.

The MIMOlite devices make this not particularly cost efficient, but I had them laying around.

The UUID is the camera’s UUID not a randomly generated one. As for the Unauthorized, you need an access token.

I was able to use the following POST request to get an access token:

curl -X POST \
  https://api.simplisafe.com/v1/api/token \
  -H 'Authorization: Basic NGRmNTU2MjctNDZiMi00ZTJjLTg2NmItMTUyMWIzOTVkZWQyLjEtMC0wLldlYkFwcC5zaW1wbGlzYWZlLmNvbTo=' \
  -H 'Content-Type: application/x-www-form-urlencoded'\
  -d 'grant_type=password&device_id=WebApp&username=yourusername&password=yourpassword'

This should get you back the following as a response:

{
    "access_token": "{token}",
    "expires_in": 3600,
    "token_type": "Bearer"
}

Also, I get 400 Bad Request when using

https://media.simplisafe.com/v1/{UUID}/mp4

Using

https://media.simplisafe.com/v1/{UUID}/flv

seems to work though and returns:

Content-Type	application/octet-stream

Here is the code that works for me with

https://media.simplisafe.com/v1/{UUID}/flv

curl -X GET \
  https://media.simplisafe.com/v1/{UUID}/flv \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {token}' 

Appending > test.flv to the end of my curl command put the output into an FLV file that was able to be read by VLC.

Unfortunately framerate is garbage. There has to be a way to get a better quality file out of this.

How is it going? Anything testing we can do to help?

Have you been able to get this into the device handler to start using the push instead of polling.

I tried several different ways but I think I need help in getting the TLS fixed in order to get it working. Since it is the website providing the TLS automatically it works from Simplisafe/cdn websites.

Any help would be great to get this going!!!

I think you need to add in the specs for the desired connection. I’ve haven’t had time into looking on the exact code. I do have a start on the API I’ve been working on.

Unfortunately the code is beyond my ability.

I’m a pro beta testing and finding ways to break things :wink:

I’m using webCoRE to check the status of SimpliSafe and update the indicator lights on a HomeSeer switch to reflect whether the alarm is armed or not. SmartThings doesn’t seem to update reliably though with the SimpliSafe status. Is there a known issue with this? For example, SmartThings doesn’t always get notified when SimpliSafe status changes from exitDelay to away. At least, not immediately or without me prompting it. For example, once the exitDelay starts SimpliSafe told SmartThings the status was exitDelay, but it took me opening up the SmartThings app and clicking on the SimpliSafe “thing” for SimpliSafe to update SmartThings about the status now being away. (It was about 4 minutes for that to happen, even thought it delay is only 1 minute).

Since there is no official API for SimpliSafe we have to poll the status which we do every 5 minutes. So you could be waiting up to 5 minutes but for an update. You can lower this in the code if you like, but you risk SimpliSafe seeing you are using an unofficial API.

Could I code it to poll every 5 minutes by default, but poll every 35 seconds while the status is exitDelay? Would that pose less risk?

The problem is you don’t know it is In an exit delay unless you are setting the alarm from the SmartThings app. If you set it from the SimpliSafe app or the keypad you don’t know you are in that state until a refresh occurs.

Ok, that will work for the majority use case for us though, since I’m primarily concerned about times when the alarm will indeed be set by SmartThings. I tried putting “runIn(70, poll)” at the end of the away() function, but it didn’t work like I expected. I figured that would poll and update the status shortly after the 60 second exit delay. But it never updated. What gives?

Honestly not sure on that one. It should have run as long as that function was called when away was pressed. Did you press away in the SimpliSafe device in smartthings or in the smartthings home monitor? It’s been a while since I have looked or messed with this as it has been working fine and meeting my needs.

Honestly not sure on that one. It should have run as long as that function was called when away was pressed. Did you press away in the SimpliSafe device in smartthings or in the smartthings home monitor? It’s been a while since I have looked or messed with this as it has been working fine and meeting my needs.

I pressed away in the Simplisafe device in the smartthings app, to mimic what happens when the away mode is triggered by a smartthings sensor. Looking at the log, it seems i’m getting some timeout errors too:

8:03:55 PM: info ╚Received event [Simplisafe].status = off with a delay of 111ms

8:03:55 PM: info Events: System Disarmed: Your SimpliSafe security system was disarmed by Remote Management at XXXXX on 9-2-19 at 8:03 pm

8:03:55 PM: info Alarm State1: off

8:03:55 PM: info Executing polling…

8:03:55 PM: info Checking to see if time has expired…

8:03:55 PM: info Checking to see if time has expired…

8:03:45 PM: debug Alarm SET to OFF Error: java.net.SocketTimeoutException: Read timed out

8:03:35 PM: info Checking to see if time has expired…

8:03:35 PM: info Setting SimpliSafe mode to ‘Off’

8:03:16 PM: info ╚Received event [Simplisafe].status = away with a delay of 66ms

8:03:16 PM: info Events: System Armed (away mode): Your SimpliSafe System was armed (away) at XXXXX on 9-2-19 at 8:01 pm

8:03:16 PM: info Alarm State1: away

8:03:16 PM: info Executing polling…

8:03:16 PM: info Checking to see if time has expired…

8:03:16 PM: info Checking to see if time has expired…

8:01:48 PM: info Executing polling…

8:01:48 PM: info Checking to see if time has expired…

8:00:38 PM: info Refreshing SimpliSafe state in 70 seconds…

8:00:38 PM: debug Alarm SET to AWAY Error: java.net.SocketTimeoutException: Read timed out

8:00:28 PM: info Checking to see if time has expired…

8:00:28 PM: info Setting SimpliSafe mode to ‘Away’

Wow someone figured it out good here…

They got the push working and cameras

and for the cameras just add ?x=720 for the resolution