SimpliSafe Alarm Integration (cloud to cloud)

java.lang.NullPointerException: Cannot get property 'respAuthHeader' on null object @line 313 (getUserId)

Same here! The simplisafe smart app no longer updates the correct status of the simplisafe alarm, it no longer arms or disarms the simplisafe alarm in accordance with the shm. Even using the simplisafe device within smartthings will not arm or disarm the alarm, it only says “pending” with no action at all. It seems likely something is totally broken right now. Maybe someone much smarter than I will be able to correct this or figure out what’s going on. It’s possible simplisafe made a change that broke this smart app altogether.

I spoke to Simplisafe Technical department inquiring if they made any recent changes. They advised on Sun as a security measure all devices attempting to connect to simplisafe would need to reauthorized. The process includes logging into your email and verifying you’re giving that device access. Not sure if it’s related to Chris and my issue but the error I posted above ‘respAuthHeader’ makes me think it might be.

Mine is now working and I did not have to authorize anything via email. I think it was more a ST error.

Wasn’t sure if you were still around here or not. I am using a rewritten version that seems to work well and adds a few new features. I haven’t done much with it lately as I have been playing with HomeKit/HomeBridge and Home-Assistant. I would be happy to send you the code if you would like to see it.

I’d like to see it!

I second that! Share that rewritten code please.

Let me take a look at it tomorrow. I rewrote it to use the smart app as part of the install to hopefully one day support multiple simplisafe instances. The smart app will automatically create a device during the setup.

Still here in the shadows. So far this has been pretty stable (knock on wood) and hasn’t needed too much attention. I would love to see what improvements you’ve made, in addition to all the work you’ve already put in.

Looks like the issue has come back. I’ll see if I have any time to debug this but I suspect the login change may be causing some issues for us.

I put the same code into Hubitat and it works just fine. Pointing the finger back at something with SmartThings

Procedures for Install
These are slightly different from the old one. I am having to split the code up over two posts, so grab the Device Type from Here and the SmartApp from the next.

The following is done in the SmartThings API

  1. Log into the Smartthings API (https://graph.api.smartthings.com)
  2. In the top bar goto the “My Device Handlers” tab.
  3. Click on the blue button on the right “Create new Device Handler”
  4. On the next screen, select From Code.
  5. Copy and paste the code above from the Device Type box
  6. Click Create
  7. On the next screen Click Save, followed by Publish -> For Me
  8. In the top bar goto the “My SmartApps” tab.
  9. Click on the blue button on the right “+ New SmartApp”
  10. On the next screen, select From Code.
  11. Copy and paste the code above from the Companion SmartApp box
  12. Click Create
  13. On the next screen Click Save, followed by Publish -> For Me
  14. You are complete online, grab your phone for the rest of the install

The following is done in the SmartThings App on your Phone

  1. Open SmartThings on your phone and select the MarketPlace tab at the bottom
  2. Click on SmartApps at the top
  3. Scroll down to the bottom and select My Apps
  4. Click on the one labeled “SimpliSafe Control”
  5. On the first screen enter your Username, Password, and SS Version (note you cannot advance from this screen unless these are valid and it communicates with simplisafe)
  6. On the next screen select your Polling Interval. There is also a new option to have Simplisafe update the Location Modes of your SmartThings based on Mode.
  7. Click save at the top right of the screen.
  8. Navigate to Home, and you will see the new Simplisafe Entry

Note, any settings changes (poll interval, timing, etc…) should be done under the smart app settings.

Ok, let’s try the above. See if you can get to my GitHub to get the files.

5c3151c1-537c-4365-8f64-55b64c62014a 2:00:17 PM: error apiLogin() - General Exception: groovyx.net.http.HttpResponseException: Too Many Requests

5c3151c1-537c-4365-8f64-55b64c62014a 2:00:17 PM: info getAPIUrl() entered with urlType: null

5c3151c1-537c-4365-8f64-55b64c62014a 2:00:17 PM: info apiLogin() entered

5c3151c1-537c-4365-8f64-55b64c62014a 2:00:17 PM: error checkApiAuth() - General Exception on authCheck: java.lang.NullPointerException: Cannot get property ‘respAuthHeader’ on null object

5c3151c1-537c-4365-8f64-55b64c62014a 2:00:17 PM: info getAPIUrl() entered with urlType: null

5c3151c1-537c-4365-8f64-55b64c62014a 2:00:17 PM: error apiLogin() - General Exception: groovyx.net.http.HttpResponseException: Too Many Requests

5c3151c1-537c-4365-8f64-55b64c62014a 2:00:16 PM: info getAPIUrl() entered with urlType: null

5c3151c1-537c-4365-8f64-55b64c62014a 2:00:16 PM: info apiLogin() entered

5c3151c1-537c-4365-8f64-55b64c62014a 2:00:16 PM: warn checkApiAuth() Token Time has Expired, executing login

5c3151c1-537c-4365-8f64-55b64c62014a 2:00:16 PM: info checkApiAuth() entered

Looks like my logging code was off a little. The line “info getAPIUrl() entered with urlType: null” I am seeing on my initial install also (just redid it, but mine will continue and work fine). Looks like the null should be your sid, which doesn’t happen initially, that get’s populated later. So that is probably fine.

The Too Many Requests sounds like you have been blocked by SimpliSafe. Maybe that explains what others are having happen. I got blocked by SimpliSafe when I was playing around with the SimpliSafe plugins for Homebridge and Home-Assistant. I had to wait about 1 to 2 hours for it to be unblocked. You can confirm by trying to login on a browser into your SS account. The SS App on your phone will continue to work until you log out. Check that and see if you are blocked.

Also note, my latest version doesn’t do anything with the SHM. I was having some issues with it, and didn’t investigate very far.

I was able to get my system to disarm, but it did not arm automatically based on location. I checked the error and I am seeing this:

568bf1f8-8ec1-4e48-9cfd-89999 6:06:27 PM: error java.lang.NullPointerException: Cannot get property ‘respAuthHeader’ on null object @line 313 (getUserId)

568bf1f8-8ec1-4e48-9cfd-89999 6:06:27 PM: info Executing Login…

568bf1f8-8ec1-4e48-9cfd-89999 6:06:27 PM: info Executing Login…

568bf1f8-8ec1-4e48-9cfd-89999 6:06:27 PM: info Token Time has expired, excecuting re-login…

568bf1f8-8ec1-4e48-9cfd-89999 6:06:27 PM: info Checking to see if time has expired…

I expect this ties to my comments back in December of '18 (like post 799). For some reason the device handler keeps logging in. I reported that basically the cookie invalidates immediately, so every API call requires a re-login. I would not be surprised if this is related to @tobycth3’s ‘Too Many Requests’ too. Logging the token after the API authorization needs to be cleaned up, I think.

I was also receiving those errors on Hubitat. What I found was that when I logged in to SimpliSafe via a web browser while on my network, the error stopped immediately. It did have me validate my email and everything, but it did do the trick. I know that ST and it’s cloud dependency will make it act different, but I thought I’d share.

Edit: One more thing, SimpliSafe made me change my password. My logon was being issued by the hub which locked my account. Initially I kept getting caught in this loop until I figured out what was going on. I stopped the device. Reset my password again. Zero errors.

This looks like an error related to code from tobycth3. Were you using his, or mine? Make sure you are not getting them mixed up.

I was using tobycth3 and have not touched it for a long time. Should I update it to yours?