MisterWil / skybellpy

A thin Python wrapper for the Skybell alarm API
MIT License
9 stars 7 forks source link

Skybell Authorization = Internal Server error? #12

Closed GaryOkie closed 5 years ago

GaryOkie commented 5 years ago

Within the past day or so, Skybellpy communications are failing. Below is a log with skybellpy (and HASSIO skybell component) with debug enabled. Personal identifying information snipped and maybe a few things that weren't that I wasn't sure about.

There are other reports on HA forum of other users experiencing the same.

EDIT: the skybell_cache.pickle file had been previously deleted. The cache found here was newly created the previous reboot.

2019-11-11 16:42:27 DEBUG (SyncWorker_8) [skybellpy] Cache found at: /config/./skybell_cache.pickle
2019-11-11 16:42:27 INFO (SyncWorker_8) [skybellpy] Updating all devices...
2019-11-11 16:42:27 DEBUG (SyncWorker_8) [skybellpy] HTTP get https://cloud.myskybell.com/api/v3/devices/ Request with headers: {'Authorization': 'Bearer <snip>', 'user-agent': 'SkyBell/3.4.1 (iPhone9,2; iOS 11.0; loc=en_US; lang=en-US) com.skybell.doorbell/1', 'content-type': 'application/json', 'accepts': '*/*', 'x-skybell-app-id': '2cd2f885-***', 'x-skybell-client-id': '51b80520-***'}
2019-11-11 16:42:28 DEBUG (SyncWorker_8) [skybellpy] <Response [200]> [{"user":"5ad123***","uuid":"3885***","resourceId":"5bf5f0***","deviceInviteToken":"70851feb05***","location":{"lat":"-33.894113","lng":"151.277414"},"name":"Front Door","type":"skybell hd","status":"up","createdAt":"2018-11-21T23:56:24.579Z","updatedAt":"2018-11-25T01:45:41.678Z","id":"5bf5f0***","acl":"owner"}]
2019-11-11 16:42:28 DEBUG (SyncWorker_8) [skybellpy] Get Devices Response: [{"user":"5ad123***","uuid":"3885***","resourceId":"5bf5f0***a","deviceInviteToken":"70851feb***","location":{"lat":"-33.***","lng":"151.***"},"name":"Front Door","type":"skybell hd","status":"up","createdAt":"2018-11-21T23:56:24.579Z","updatedAt":"2018-11-25T01:45:41.678Z","id":"5bf5f0***","acl":"owner"}]
2019-11-11 16:42:28 DEBUG (SyncWorker_8) [skybellpy] HTTP get https://cloud.myskybell.com/api/v3/devices/5bf5f0a***/avatar/ Request with headers: {'Authorization': 'Bearer <snip>', 'user-agent': 'SkyBell/3.4.1 (iPhone9,2; iOS 11.0; loc=en_US; lang=en-US) com.skybell.doorbell/1', 'content-type': 'application/json', 'accepts': '*/*', 'x-skybell-app-id': '2cd2f885-***', 'x-skybell-client-id': '51b80520-***'}
2019-11-11 16:42:28 DEBUG (SyncWorker_8) [skybellpy] <Response [200]> {"createdAt":"2019-11-11T22:42:28.781Z","url":"https://v3-production-devices-avatar.s3-us-west-2.amazonaws.com/5bf5f0a***.jpg?AWSAccessKeyId=ASIAVX5YOCNYIHEMVW3Q&Expires=1573512448&Signature=6Q5%2FBJO%2Br8snBCPzav4v6gikfrA%3D&response-content-type=image%2Fjpeg&x-amz-security-token=<snip>"}
2019-11-11 16:42:28 DEBUG (SyncWorker_8) [skybellpy] HTTP get https://cloud.myskybell.com/api/v3/devices/5bf5f0a87268440008faaf99/info/ Request with headers: {'Authorization': 'Bearer <snip>', 'user-agent': 'SkyBell/3.4.1 (iPhone9,2; iOS 11.0; loc=en_US; lang=en-US) com.skybell.doorbell/1', 'content-type': 'application/json', 'accepts': '*/*', 'x-skybell-app-id': '2cd2f885-9451-448b-9c12-9879d03609af', 'x-skybell-client-id': '51b80520-***'}
2019-11-11 16:42:28 DEBUG (SyncWorker_8) [skybellpy] <Response [200]> {"essid":"WiFidelity","wifiBitrate":"28","proxy_port":"5683","wifiLinkQuality":"70","port":"5683","mac":"d0:c1:93:05:76:18","serialNo":"3885064191","wifiTxPwrEeprom":"13","region":"us-west-2","hardwareRevision":"SKYBELL_TRIMPLUS_1000030-F","proxy_address":"10.0.20.205","wifiSignalLevel":"-37","localHostname":"ip-10-0-20-205.us-west-2.compute.internal","wifiNoise":"0","address":"107.141.41.146","clientId":"6ab4ea***","timestamp":"63740731336","deviceId":"5bf5f0***","firmwareVersion":"7045","checkedInAt":"2019-11-11T22:42:16.000Z","status":{"wifiLink":"good"}}
2019-11-11 16:42:29 DEBUG (SyncWorker_8) [skybellpy] HTTP get https://cloud.myskybell.com/api/v3/devices/5bf5f0a87268440008faaf99/settings/ Request with headers: {'Authorization': 'Bearer <snip>', 'user-agent': 'SkyBell/3.4.1 (iPhone9,2; iOS 11.0; loc=en_US; lang=en-US) com.skybell.doorbell/1', 'content-type': 'application/json', 'accepts': '*/*', 'x-skybell-app-id': '2cd2f885-9451-448b-9c12-9879d03609af', 'x-skybell-client-id': '51b80520-***'}
2019-11-11 16:42:29 DEBUG (SyncWorker_8) [skybellpy] <Response [500]> {"message": "Internal server error"}
2019-11-11 16:42:29 DEBUG (SyncWorker_8) [skybellpy] HTTP post https://cloud.myskybell.com/api/v3/login/ Request with headers: {'user-agent': 'SkyBell/3.4.1 (iPhone9,2; iOS 11.0; loc=en_US; lang=en-US) com.skybell.doorbell/1', 'content-type': 'application/json', 'accepts': '*/*', 'x-skybell-app-id': '2cd2f885-***', 'x-skybell-client-id': '51b80520-***'}
2019-11-11 16:42:31 DEBUG (SyncWorker_8) [skybellpy] <Response [200]> {"firstName":"GJ","lastName":"***","resourceId":"5ad123***","createdAt":"2018-04-13T21:39:58.699Z","updatedAt":"2018-04-13T21:39:58.699Z","id":"5ad123***","userLinks":[],"access_token":"<snip>"}
2019-11-11 16:42:31 DEBUG (SyncWorker_8) [skybellpy] Login Response: {"firstName":"GJ","lastName":"***","resourceId":"<snip>","createdAt":"2018-04-13T21:39:58.699Z","updatedAt":"2018-04-13T21:39:58.699Z","id":"<snip>","userLinks":[],"access_token":"c<snip>"}
2019-11-11 16:42:31 INFO (SyncWorker_8) [skybellpy] Login successful
2019-11-11 16:42:31 DEBUG (SyncWorker_8) [skybellpy] HTTP get https://cloud.myskybell.com/api/v3/devices/5bf5f***/settings/ Request with headers: {'Authorization': 'Bearer <snip>, 'user-agent': 'SkyBell/3.4.1 (iPhone9,2; iOS 11.0; loc=en_US; lang=en-US) com.skybell.doorbell/1', 'content-type': 'application/json', 'accepts': '*/*', 'x-skybell-app-id': '2cd2f885***', 'x-skybell-client-id': '51b80520-***'}
2019-11-11 16:42:34 DEBUG (SyncWorker_8) [skybellpy] <Response [500]> {"message": "Internal server error"}
2019-11-11 16:42:34 ERROR (MainThread) [homeassistant.setup] Error during setup of component skybell
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 176, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/skybell/__init__.py", line 46, in setup
    username=username, password=password, get_devices=True, cache_path=cache
  File "/usr/local/lib/python3.7/site-packages/skybellpy/__init__.py", line 66, in __init__
    self.get_devices()
  File "/usr/local/lib/python3.7/site-packages/skybellpy/__init__.py", line 143, in get_devices
    device = SkybellDevice(device_json, self)
  File "/usr/local/lib/python3.7/site-packages/skybellpy/device.py", line 27, in __init__
    self._settings_json = self._settings_request()
  File "/usr/local/lib/python3.7/site-packages/skybellpy/device.py", line 76, in _settings_request
    json_data=json_data)
  File "/usr/local/lib/python3.7/site-packages/skybellpy/__init__.py", line 198, in send_request
    return self.send_request(method, url, headers, json_data, False)
  File "/usr/local/lib/python3.7/site-packages/skybellpy/__init__.py", line 200, in send_request
    raise SkybellException(ERROR.REQUEST, "Retry failed")
skybellpy.exceptions.SkybellException: Request failed: Retry failed
2019-11-11 16:42:35 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform skybell.binary_sensor: Unable to set up component.
2019-11-11 16:42:36 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform skybell.switch: Unable to set up component.
2019-11-11 16:42:36 ERROR (SyncWorker_14) [homeassistant.components.scrape.sensor] Unable to extract data from HTML
2019-11-11 16:42:39 ERROR (SyncWorker_1) [homeassistant.components.scrape.sensor] Unable to extract data from HTML
2019-11-11 16:42:39 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform skybell.camera: Unable to set up component.
2019-11-11 16:42:39 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform skybell.light: Unable to set up component.
GaryOkie commented 5 years ago

UPDATE: Just reported on the HA community that the settings option in the Android app results in "An error occurred while requesting your Skybell's information. try again later". All other functions seem to be working OK such as live view and viewing recorded images.

So this is apparently an issue with Skybell's server and hopefully nothing needs to be done but wait. I'll close this once confirmed.

GaryOkie commented 5 years ago

Skybell server back in operation. Just needed to restart HASS to reload component connection.