Core: Simplisafe integration starts getting 401 errors

Created on 4 May 2019  ·  58Comments  ·  Source: home-assistant/core

Home Assistant release with the issue:
0.92.1

Last working Home Assistant release (if known):
UNKNOWN

Operating environment (Hass.io/Docker/Windows/etc.):
hass.io raspberry pi 3B

Component/platform:
https://www.home-assistant.io/components/simplisafe/
Setup through "Configuration/integrations"

Description of problem:
Ive reset my entire home assistant setup a couple times now from a fresh hassio release and every time after a couple weeks of working perfectly it will stop getting updates and stop sending events and start getting this error:

There was error updating "MYADDRESS": Error requesting data from users/823242/subscriptions: 401, message='Unauthorized'

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):


Traceback (if applicable):


Additional information:

simplisafe

Most helpful comment

In correcting the unhandled exception, I think I also addressed a use case where the access token could be "corrupted" due to overlapping calls: #23680

All 58 comments

More errors found in dev info log

<!---->Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/simplipy/api.py", line 173, in request
    resp.raise_for_status()
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 942, in raise_for_status
    headers=self.headers)
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 375, in async_device_update
    await self.async_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/simplisafe/alarm_control_panel.py", line 122, in async_update
    await self._system.update()
  File "/usr/local/lib/python3.7/site-packages/simplipy/system.py", line 208, in update
    await self._update_location_info()
  File "/usr/local/lib/python3.7/site-packages/simplipy/system.py", line 89, in _update_location_info
    subscription_resp = await self.api.get_subscription_data()
  File "/usr/local/lib/python3.7/site-packages/simplipy/api.py", line 134, in get_subscription_data
    params={'activeOnly': 'true'})
  File "/usr/local/lib/python3.7/site-packages/simplipy/api.py", line 184, in request
    'Error requesting data from {0}: {1}'.format(endpoint, err))
simplipy.errors.RequestError: Error requesting data from users/823242/subscriptions: 500, message='Internal Server Error'
<!---->

Thanks, @kevindurb. RE: the 401 errors, do you get several in a row? How long does "it will stop getting updates and stop sending events" last before you have to restart?

RE: 500 errors, that will happen from time to time – that's 100% on SimpliSafe's cloud. That said, I should handle the exception properly.

In correcting the unhandled exception, I think I also addressed a use case where the access token could be "corrupted" due to overlapping calls: #23680

I actually never tried to just restart to fix it.. :facepalm: once i restart it works hahah thank you so much!! And thank you for the fixes!! Its so cool to have everything integrated with my alarm system!

Oh and once i start getting the errors it seems like everything it does (relating to simplisafe) produces an error and the only fix is to restart. (I realized i didnt really answer your questions sorry hahaha)

Got it! Once this fix is officially released, give it a try and let me know how you get on.

@bachya I'm seeing this as well, at least as of 0.99.3, and it's been an issue for a while before that. SimpliSafe API calls work for a while, then start to fail with a 401 error. Restarting resolves it, but it's the biggest reliability issue I'm seeing with Home Assistant right now.

Thoughts on reactivating this issue?

@joshkoon I've been running mine for several weeks with a reboot and haven't seen that. Do you have a sense of any sort of pattern? Certain times of the day, after certain events occur, etc.?

@bachya No pattern other than elapsed time since reboot, as far as I've noticed. I just updated to 0.100.3 last night; I'll leave it on that version for a while and start tracking when it begins to fail.

Has there been any discussion about adding an event to HA when a service call fails? I found a few threads that involve scraping the logs for error messages, but it would be nice to be able to trigger on an event in order to send a push notification to my phone.

@joshkoon Appreciate the help!

Firing an event is an interesting idea... I've not seen that done before, but there's no reason it _couldn't_ be done. Let me chat with @balloob on this and get his thoughts.

@joshkoon Spoke with @balloob and he proposed a better idea: if the HASS integration should see the error you're seeing, it'll mark the alarm control panel entity as unavailable (and will return a "normal" state – off, armed_away, etc. – when if/when it can be reached again). In this scenario, you could base your push notification automation on the state of the entity changing to unavailable.

I'll get that submitted shortly. In the meantime, thanks for any help you can provide over time in deducing the pattern behind your tokens invalidating.

@joshkoon Looking at the codebase and I see a possibility. What version of simplisafe-python are you using?

Not sure. I'm running Hass.io on a Pi 3B, and my Home Assistant version is at 0.100.3. What's the easiest way to check lib versions?

Should be fairly straightforward. Make sure you have the SSH Hass.io add-on installed. Once you do, SSH into your device and run the following commands:

# This first command will list your running containers.
# Make sure you see one labeled `homeassistant`:
$ docker ps

# Assuming you see that container, exec into it:
$ docker exec -it homeassistant /bin/bash

# Once inside:
bash-5.0# pip3 list

Find the simplisafe-python line from that output and post the version here.

I didn't install Hass.io via docker, and pip3 command isn't present. I installed HA using the standard instructions here.

How is simplipy deployed/updated normally? I'd assume it comes as part of the HA integration, which ship with HA versions?

My instructions are for the normal Hass.io installation. Does pip list (instead of pip3 list) do anything?

Normally, Home Assistant is told which versions of client libraries to use via a manifest file; however, I've seen instances where that can fail to happen. The error message that @kevindurb originally described shouldn't be possible anymore, so I'm wanting to confirm that you have the most up-to-date version. If you don't, we update; if you do, that indicates a bug.

Alright, I think I found the problem - the SSH add-on has limited access and doesn't allow you to install packages or do anything as root. https://www.home-assistant.io/addons/ssh/

That said, here are the errors as they show up in the logs. So far, the integration has been able to recover, though I'm watching for it to get into a state that it doesn't recover:

<timestamp> ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
<timestamp> ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating <name>: 

That looks like your SimpliSafe refresh token failed, which returned some sort of unknown exception (assuming that there wasn't anything after the : in SimpliSafe error while updating <name>:).

Is that the entirety of the SimpliSafe log items (since you've started fresh)? Seeing the surrounding context will help me. To date, I've not seen a refresh token fail like that.

Oddly, there's nothing after the :. The next line is just the next error log, with a timestamp between 10-30 minutes later:
<later timestamp> ERROR (MainThread) [aiohttp.server] Error handling request

Here's the before/after logs of the first time the 401 occurred since I updated to HA 0.100.3.

2019-10-27 23:01:09 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 275, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp\_http_parser.pyx", line 523, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method
2019-10-27 23:48:19 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-27 23:48:19 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<name>": 
2019-10-28 00:06:28 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 275, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp\_http_parser.pyx", line 523, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method

I've gotten a 401 error 19 times since that one.

Hmm, okay. Could you do me a favor and change your log level for simplisafe to debug (instructions here) and restart HASS? Let it build up for a few hours/tomorrow and then paste back only logs related to simplipy and homeassistant.components.simplisafe. Thanks for your help!

Sure thing. Before I clear the logs, here are the timestamps of the errors:

2019-10-27 23:48:19 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-28 00:47:44 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-28 01:47:07 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-28 07:43:33 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-28 10:41:43 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-28 12:40:32 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-28 16:38:06 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-28 20:35:41 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-28 21:35:06 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-28 23:33:56 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-29 05:30:22 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-29 08:28:35 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-29 17:23:11 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-29 21:20:47 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-30 02:17:46 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-30 07:14:48 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-10-30 16:09:25 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401

Okay! I'm back in the bad state, and it's been stuck there for about 10 hours now. There have been occasional 401 errors over the last few days, but they always recovered. Here are the logs from the last reported "good" states, through the errors, and to the "bad" state which it isn't recovering from:

Looking back in the logs, I see other spots where I was getting errors on port 443, but it was able to recover without hitting the "Connect call failed: " error.

Attempting to arm the alarm via HA now results in the following error:
"Failed to call service alarm_control_panel/alarm_arm_home"

2019-11-02 11:12:20 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:12:51 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:13:22 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:13:53 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:14:25 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:15:05 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:15:05 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:15:36 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:15:36 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:16:07 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:16:07 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:16:38 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:16:38 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:17:09 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:17:09 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:17:40 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:17:40 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:18:11 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:18:11 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:18:42 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:18:42 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:19:13 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:19:13 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:19:44 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:19:44 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:20:15 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:20:15 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:20:46 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:20:46 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:21:17 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:21:17 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:21:48 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:21:48 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:22:19 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:22:19 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:22:50 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:22:50 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:23:21 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:23:21 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:23:52 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:23:52 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:24:23 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:24:23 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:24:54 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:24:54 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:25:25 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:25:25 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:25:56 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:25:56 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:26:27 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:26:27 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:26:58 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:26:58 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:27:29 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:27:29 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:28:00 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:28:00 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:28:31 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:28:31 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:29:02 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:29:02 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:29:33 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:29:33 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:30:04 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:30:04 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:30:35 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:30:35 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:31:06 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:31:06 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:31:37 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:31:37 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:32:08 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:32:08 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:32:39 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:32:39 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:33:10 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:33:10 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:33:41 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:33:41 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:34:12 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:34:12 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:34:33 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Connect call failed ('<RouterIPv4Address>', 443)]
2019-11-02 11:34:33 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:35:14 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:35:14 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:35:45 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:35:45 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:36:16 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:36:16 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:36:47 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:36:47 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:37:18 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:37:18 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:37:49 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:37:49 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:38:20 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:38:20 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:38:51 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:38:51 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:39:22 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:39:22 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:39:53 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:39:53 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:40:24 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:40:24 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:40:55 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:40:55 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:41:26 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:41:26 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:41:57 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:41:57 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:42:28 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:42:28 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:42:59 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:42:59 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:43:30 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:43:30 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:44:01 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:44:01 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:44:32 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:44:32 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:45:03 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:45:03 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:45:34 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:45:34 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:46:05 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:46:05 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:46:36 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:46:36 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:47:07 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:47:07 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:47:38 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:47:38 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:48:09 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:48:09 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:48:40 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:48:40 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:49:11 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:49:11 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:49:42 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:49:42 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:50:13 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:50:13 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:50:44 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:50:44 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:51:15 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:51:15 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:51:46 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:51:46 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:52:17 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:52:17 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:52:48 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:52:48 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:53:19 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:53:19 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:53:50 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:53:50 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:54:21 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:54:21 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:54:52 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:54:52 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:55:23 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:55:23 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:55:54 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:55:54 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:56:25 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:56:25 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:56:56 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:56:56 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:57:27 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:57:27 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:57:58 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:57:58 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:58:29 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:58:29 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:59:00 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:59:00 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 11:59:31 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 11:59:31 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 12:00:02 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 12:00:02 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 12:00:33 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 12:00:33 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 12:01:04 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 12:01:04 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 12:01:35 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 12:01:35 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 12:02:06 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 12:02:06 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 12:02:37 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Try again]
2019-11-02 12:02:37 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 12:03:00 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": Error requesting data from subscriptions/1392348/events: Cannot connect to host api.simplisafe.com:443 ssl:None [Connect call failed ('<RouterIPv4Address>', 443)]
2019-11-02 12:03:00 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 12:03:29 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": 
2019-11-02 12:03:29 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 12:04:00 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": 
2019-11-02 12:04:00 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 12:04:31 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": 
2019-11-02 12:04:31 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 12:05:02 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": 
2019-11-02 12:05:02 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-02 12:05:33 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "<Home Name>": 

Those errors seem to indicate that your machine is having difficulty connecting to SimpliSafe's API via SSL; since I don't see this in my environment, I imagine it might be environmental. Are you using some kind of proxy on your network?

No, I don't have a proxy, just a Netgear Nighthawk R7000P router.

@joshkoon I've been thinking on this and don't have any great ideas. I'd appreciate it if you could do some testing using simplisafe-python (my underlying library).

Test 1: No Changes

In a terminal, clone the repo:

$ git clone https://github.com/bachya/simplisafe-python.git
$ cd simplisafe-python/

Initialize the dev environment:

$ make init

Open up example.py in a text editor and paste your SimpliSafe email/password in lines 13 and 14:

SIMPLISAFE_EMAIL = "<EMAIL>"
SIMPLISAFE_PASSWORD = "<PASSWORD>"

Run example.py (which will list out system information, arm the system in Home mode, wait 3 seconds, then disarm the system):

$ pipenv run python3 example.py

Please paste the output here (removing sensitive details as appropriate).

Test 2: Changing aiohttp Connector Type

Once more, open up example.py in a text editor and, as a test, change line 19 from this:

async with ClientSession() as websession:

...to this:

async with ClientSession(connector=TCPConnector(verify_ssl=False)):

Close your text editor and run example.py one more time:

$ pipenv run python3 example.py

Any difference? Paste the output here once more.

I seem to be experiencing similar symptoms as @joshkoon. I restarted last night, so the errors are gone for the time being. I’ll go ahead and change my log to debug, see if I’m getting the same errors and report back.

For reference I’m running HA in a docker container on my Synology NAS. I’m running tomato on my router. I haven’t always has this issue, just for about the last month.

Thanks, @DaveCo1701. Two people experiencing this is enough to re-open the issue.

Could you please assist in debugging by following the directions above?

@bachya, I tried your steps above. I'm not a developer, so please bear with me if I'm missing anything obvious. I ended up running the example_sensor_properties.py example since I couldn't find example.py. I'm not sure if it matters, but I don't subscribe to SimpliSafe's interactive monitoring. This has never caused issues using their iOS App or this Home Assistant component to read the current state of the alarm system.

When I did the test with no changes, I got this:

INFO:root:System ID: <PRIVATE>
INFO:root:Version: 2
INFO:root:User ID: <PRIVATE>
INFO:root:Access Token: <PRIVATE>
INFO:root:Refresh Token: <PRIVATE>
INFO:root:Number of Events: 50
ERROR:root:Cannot determine triggered state for sensor:

When I changed the connector type, I got this:

Traceback (most recent call last):
  File "example_sensors_properties.py", line 51, in <module>
    asyncio.get_event_loop().run_until_complete(main())
  File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
    return future.result()
  File "example_sensors_properties.py", line 19, in main
    async with ClientSession(connector=TCPConnector(verify_ssl=False)):
NameError: name 'TCPConnector' is not defined

At the moment I'm not getting any errors in the Home Assistant log. I restarted HA this morning when I changed the logging setting; based on previous experience I won't start seeing this issue for a few days.

@bachya, I tried your steps above. I'm not a developer, so please bear with me if I'm missing anything obvious. I ended up running the example_sensor_properties.py example since I couldn't find example.py. I'm not sure if it matters, but I don't subscribe to SimpliSafe's interactive monitoring. This has never caused issues using their iOS App or this Home Assistant component to read the current state of the alarm system.

When I did the test with no changes, I got this:

INFO:root:System ID:
INFO:root:Version: 2
INFO:root:User ID:
INFO:root:Access Token:
INFO:root:Refresh Token:
INFO:root:Number of Events: 50
ERROR:root:Cannot determine triggered state for sensor:

Got it – makes sense.

When I changed the connector type, I got this:

Traceback (most recent call last):
 File "example_sensors_properties.py", line 51, in <module>
   asyncio.get_event_loop().run_until_complete(main())
 File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
   return future.result()
 File "example_sensors_properties.py", line 19, in main
   async with ClientSession(connector=TCPConnector(verify_ssl=False)):
NameError: name 'TCPConnector' is not defined

At the moment I'm not getting any errors in the Home Assistant log. I restarted HA this morning when I changed the logging setting; based on previous experience I won't start seeing this issue for a few days.

That's my fault: I forgot to have you import that package. At any rate, that test was slightly flawed: since this error seems to manifest after a while, a one-off test wouldn't show it.

Let's let your system run for a bit and see what the logs say when the issue reoccurs. Thanks for your patience!

Well... This started happening to me, too. 😒I see these logs:

2019-11-13 16:34:17 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "1234 Main Street": 
2019-11-13 16:34:48 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-11-13 16:34:48 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-11-13 16:34:48 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-11-13 16:34:48 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "1234 Main Street": 
2019-11-13 16:35:16 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-11-13 16:35:16 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/simplipy/api.py", line 178, in request
    resp.raise_for_status()
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 946, in raise_for_status
    headers=self.headers)
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url='https://api.simplisafe.com/v1/ss3/subscriptions/xxxxxxxx/state/away

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1236, in async_call
    await asyncio.shield(self._execute_service(handler, service_call))
  File "/usr/src/homeassistant/homeassistant/core.py", line 1261, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    self._platforms.values(), func, call, service_name, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 348, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 370, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/usr/src/homeassistant/homeassistant/components/simplisafe/alarm_control_panel.py", line 167, in async_alarm_arm_away
    await self._system.set_away()
  File "/usr/local/lib/python3.7/site-packages/simplipy/system.py", line 179, in set_away
    await self._set_state(SystemStates.away)
  File "/usr/local/lib/python3.7/site-packages/simplipy/system.py", line 457, in _set_state
    "post", f"ss3/subscriptions/{self.system_id}/state/{value.name}"
  File "/usr/local/lib/python3.7/site-packages/simplipy/api.py", line 184, in request
    raise InvalidCredentialsError
simplipy.errors.InvalidCredentialsError

Same story: after I restart HASS, everything starts working again. This tells me that the refresh token stored by HASS is still valid; it's just not getting picked up when there's an error. That gives me something to work with. More soon.

Quick update for everyone: I've run a script for about 18 hours now that gently exercises the API. Thus far, the refresh token is working as expected – no invalid credential errors. Going to keep it running; hopefully, I can get it to fail and understand the chain of events that leads it there.

Thanks for the update. Unfortunately the server I run home assistant on automatically updated and restarted yesterday, so I’m back at day zero. I’ll continue to monitor and post any relevant logs once the error message shows up again.

No worries, @DaveCo1701 – I'm often in the same boat. 😆It's frustrating that this error only appears after a length of time, but I'm confident we'll track it down.

Well, my sample script has been running for over two days now and this issue hasn't appeared. This makes me think that there isn't anything wrong with simplisafe-python – perhaps every now and again, a SimpliSafe cloud outage invalidates existing tokens or something. 🤷‍♂

Perhaps the HASS integration can use its existing refresh token when this occurs since we know that works (given that a restart fixes things). Will thnk on this more.

My script is now 7 days in and the error hasn't reoccurred. 😠 @joshkoon and @DaveCo1701: what can you both report?

@bachya, I haven't noticed any issues within Home Assistant. Everything seems to be working as normal. I had two 401 errors occur on 11-21-2019, but they appeared to be isolated issues and the next poll cycle (~30 secs later) it was able to successfully reconnect after the 401 error. Here's what the two 401 errors show in the log...

2019-11-21 21:07:50 DEBUG (MainThread) [simplipy.system] Sensor response: {###PRIVATE###}
2019-11-21 21:07:50 DEBUG (MainThread) [simplipy.api] Subscription response: {###PRIVATE###}
2019-11-21 21:07:50 DEBUG (MainThread) [simplipy.system] Events response: {###PRIVATE###}
2019-11-21 21:07:50 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-21 21:08:21 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-11-21 21:08:21 DEBUG (MainThread) [simplipy.system] Sensor response: {###PRIVATE###}
2019-11-21 21:08:21 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "1234 Somewhere Rd": 
2019-11-21 21:08:21 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-21 21:08:52 DEBUG (MainThread) [simplipy.system] Sensor response: {###PRIVATE###}
2019-11-21 21:08:52 DEBUG (MainThread) [simplipy.api] Subscription response: {###PRIVATE###}
2019-11-21 21:08:52 DEBUG (MainThread) [simplipy.system] Events response: {###PRIVATE###}
2019-11-21 21:08:52 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems


2019-11-21 23:06:20 DEBUG (MainThread) [simplipy.system] Sensor response: {###PRIVATE###}
2019-11-21 23:06:20 DEBUG (MainThread) [simplipy.api] Subscription response: {###PRIVATE###}
2019-11-21 23:06:20 DEBUG (MainThread) [simplipy.system] Events response: {###PRIVATE###}
2019-11-21 23:06:20 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-21 23:06:51 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-11-21 23:06:51 DEBUG (MainThread) [simplipy.system] Sensor response: {###PRIVATE###}
2019-11-21 23:06:51 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "1234 Somewhere Rd": 
2019-11-21 23:06:51 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2019-11-21 23:07:21 DEBUG (MainThread) [simplipy.system] Sensor response: {###PRIVATE###}
2019-11-21 23:07:21 DEBUG (MainThread) [simplipy.api] Subscription response: {###PRIVATE###}
2019-11-21 23:07:21 DEBUG (MainThread) [simplipy.system] Events response: {###PRIVATE###}
2019-11-21 23:07:21 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems

Thanks, @DaveCo1701 – that looks like it's working as expected.

Since there isn't a meaningful way to reproduce this right now, I'm going to close. Should it arise again, please reach out.

Yep, I haven't hit this lately, either - though I've had to restart HA a few times, so it may have just not reached the requisite time. Thanks for diving into this. I'll keep an eye out for it in the future; leaving SimpliSafe in debug mode for now.

I just had this pop up last night. I don't have the debug logs, I'll go ahead and turn it back on. Here's what my logs do show...

2019-12-06 17:15:36 ERROR (MainThread) [simplipy.system] Error while retrieving entities: Error requesting data from api/token: 502, message='Bad Gateway', url='https://api.simplisafe.com/v1/api/token
2019-12-06 17:16:37 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-12-06 17:16:37 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-12-06 17:16:37 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "[PRIVATE]": 
2019-12-06 17:17:08 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-12-06 17:17:08 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-12-06 17:17:08 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "[PRIVATE]": 

After that I get the same simplipy.api and homeassistant.components.simplisafe errors repeating over and over. Anyone else notice this?

I just got the following errors this morning as well. I wonder if Simplisafe is doing something on their end??

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/simplipy/api.py", line 175, in request
    resp.raise_for_status()
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 946, in raise_for_status
    headers=self.headers)
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url='https://api.simplisafe.com/v1/subscriptions/808274/state?state=away

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 133, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1236, in async_call
    await asyncio.shield(self._execute_service(handler, service_call))
  File "/usr/src/homeassistant/homeassistant/core.py", line 1261, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    self._platforms.values(), func, call, service_name, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 348, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 370, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/usr/src/homeassistant/homeassistant/components/simplisafe/alarm_control_panel.py", line 123, in async_alarm_arm_away
    await self._system.set_away()
  File "/usr/local/lib/python3.7/site-packages/simplipy/system.py", line 260, in set_away
    await self._set_state(SystemStates.away)
  File "/usr/local/lib/python3.7/site-packages/simplipy/system.py", line 374, in _set_state
    params={"state": value.name},
  File "/usr/local/lib/python3.7/site-packages/simplipy/api.py", line 181, in request
    raise InvalidCredentialsError
simplipy.errors.InvalidCredentialsError

I saw some of these errors yesterday, as well:

2019-12-07 20:28:40 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-12-07 20:28:40 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "ADDRESS":
2019-12-07 22:27:17 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-12-07 22:27:17 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-12-07 22:27:17 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "ADDRESS":
2019-12-08 02:24:39 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-12-08 02:24:39 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "ADDRESS":
2019-12-08 07:21:13 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-12-08 07:21:13 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "ADDRESS":2019-12-07 20:28:40 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-12-07 20:28:40 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "ADDRESS":
2019-12-07 22:27:17 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-12-07 22:27:17 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-12-07 22:27:17 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "ADDRESS":
2019-12-08 02:24:39 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-12-08 02:24:39 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "ADDRESS":
2019-12-08 07:21:13 ERROR (MainThread) [simplipy.api] Refresh token was unsuccessful on 401
2019-12-08 07:21:13 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "ADDRESS":

However, without a restart, I am now able to arm/disarm the system and see its status in HASS, so it looks like it recovered fine. @DaveCo1701 and @gmalbert: I understand that you saw these logs, but are you unable to control your SS without a HASS restart?

Correct. In my case it went down and didn’t work for ~24 hours until I noticed it wasn’t updating the alarm state. The 401 error kept repeating itself every 30 seconds. Once I restarted home assistant, it worked fine.

Not sure if this matters, but I don’t subscribe to the SimpliSafe Remote Control (I just have the basic subscription). I just use this integration to monitor the alarm state.

That is a useful data point, @DaveCo1701 – I _do_ have the remote control plan. I'll take a look in the code and see if anything pops out.

Yes, I'm unable to control my device w/o a restart. I'm subscribed to the full remote control, so I have the ability to full control the system through the Simplisafe app. I just tried again and I'm still getting the error. Have not restarted.

Well darn – there goes that theory.

I’m still able to control my SS after those errors and am not seeing why you aren’t able to... Will keep investigating.

I had the problem noted above, ended up moving up to 102.3 through docker. Upon updating/restarting, simplisafe doesn't show up at all in my states. It still shows as a connected integration, but it's otherwise unavailable to home assistant. I assume this is related but wanted to let you know.

@gmalbert Please don't blend different bugs; it makes it hard to track. Open up a new bug and I'll take a look.

@bachya respectfully, I have no way of knowing if it is a different bug or the result of the connection issue noted above. I was just offering it here to see if it figured into your analysis on the existing issue. But your point is well-made. If I can give you something to go on with removal issue above, I'll add it as a second bug for tracking purposes.

@gmalbert No problem! I suppose we can figure that out by seeing your logs when you started up 0.102.3 – can you post those here?

This issue showed up again. I'm currently running home assistant 0.103.3. A restart seemed to solve the issue.

2020-01-01 01:10:12 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2020-01-01 01:10:43 ERROR (MainThread) [simplipy.system] Error while getting latest system values: Repeated 401s despite refreshing access token
2020-01-01 01:10:43 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "[PRIVATE]": Repeated 401s despite refreshing access token
2020-01-01 01:10:43 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems
2020-01-01 01:11:14 ERROR (MainThread) [simplipy.system] Error while getting latest system values: Repeated 401s despite refreshing access token
2020-01-01 01:11:14 ERROR (MainThread) [homeassistant.components.simplisafe] SimpliSafe error while updating "[PRIVATE]": Repeated 401s despite refreshing access token
2020-01-01 01:11:14 DEBUG (MainThread) [homeassistant.components.simplisafe] Updated data for all SimpliSafe systems

The last 3 lines repeat themselves over and over until I restarted HA. After a restart it went back to functioning normally. Anyone else notice this?

I had the same thing happen once over the holidays, @DaveCo1701. Going to re-open this issue.

Here's my theory on what's happening – given that sporadic nature of this event, it's impossible to verify:

  1. At random times, an event occurs where something invalidates the SimpliSafe refresh token stored by simplisafe-python.
  2. simplisafe-python attempts to refresh its stored access token, but fails (leading to the Repeated 401s despite refreshing access token log message).
  3. A HASS reboot "fixes" things, indicating that the refresh token stored by the HASS integration is still good.

Again, wild conjecture, but it seems reasonable. I'll think on how to address it.

Alright, I think I have something – my forthcoming PR should fall back to the refresh token stored in the HASS config directory (which always seems to be good since HASS restarts fix things) when we get in this strange loop.

I just had another instance where my HASS ran into multiple SimpliSafe 401s, but recovered without a restart. Ugh. 🤷‍♂ I guess we may have to accept that from time to time, a change to SimpliSafe's cloud (which seems to be shaky) will require a HASS restart.

WELL... I had another one of these today (precipiated by something in SimpliSafe's cloud triggering both 500 and 502 responses):

2020-01-23 11:54:50 ERROR (MainThread) [simplipy.system] Error while getting latest settings values: Error requesting data from ss3/subscriptions/SID/settings/normal: 502, message='Bad Gateway', url='https://api.simplisafe.com/v1/ss3/subscriptions/SID/settings/normal?forceUpdate=false
2020-01-23 11:54:50 ERROR (MainThread) [custom_components.simplisafe] SimpliSafe error while updating "MY ADDRESS": Repeated 401s despite refreshing access token
2020-01-23 11:55:21 ERROR (MainThread) [simplipy.system] Error while getting latest system values: Repeated 401s despite refreshing access token
2020-01-23 11:55:21 ERROR (MainThread) [simplipy.system] Error while getting latest settings values: Repeated 401s despite refreshing access token

Yet again, a HASS restart fixed things. So, I'm going to make this assumption: at times, a 500 or 502 will seemingly harm simplisafe-python's existing access token _and_ refresh token, thus preventing the integration from recovering. However, the refresh token stored in the config entry escapes unscathed (again, apparently); so, if we detect that we're in such a situation, try a last-ditch effort by re-authenticating with the stored token.

I'll get a PR going.

Seeing this error message on mine as well. A hassio restart fixes it for a short time. 12hrs or so.

Just another user reporting the same behavior. I’d also like to say thank you. I’m a week in to using HA and to see such dedication to this kind of problem makes me happy with my switch from other paid softwares.

Thanks for the comments, @bigcspecv. I own this code and promise you that no one will take it more seriously than I. 👍🏻

I look forward to a fix for it, thank you for your work @bachya , so very nice to automate alarm disengagement with certain secure events.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arangates picture arangates  ·  3Comments

Elmardus picture Elmardus  ·  3Comments

TheZoker picture TheZoker  ·  3Comments

ofuangka picture ofuangka  ·  3Comments

aweb-01 picture aweb-01  ·  3Comments