0.103.5 works, but not fine…it generates a large amount of traffic on the network due to an auth bug in the ring library (on my instance, 200 sessions per minute to the ring servers)
I’ve update to 0.103.5 and ring-doorbell==0.2.9. Everything seems to be working fine, except motion sensors on cameras (binary-sensor) are staying in the clear state. The last motion time (sensor) is updating fine. Any thoughts?
Update 0.103.6 still has the same bug…, when can we expect 0.2.9 to be built into an official release ?
It already is on the the dev branch
You can modify the manifest.json file in the ring components folder to 0.2.9
Rather than wait for it
OK, finally found all the steps to get SSH access to the docker container and update the Ring component to 0.2.9. I followed some instructions from a previous post in this thread:
phil@Desktop-PC:~$ ssh root@hassio -p 22222
_ _ _
| | | | (_)
| |__| | __ _ ___ ___ _ ___
| __ |/ _` / __/ __| | |/ _ \
| | | | (_| \__ \__ \_| | (_) |
|_| |_|\__,_|___/___(_)_|\___/
Welcome on Hass.io CLI.
For more details use 'help' and 'exit' to close.
If you need access to host system use 'login'.
hassio > login
docker exec -it homeassistant /bin/bash
pip install ring-doorbell==0.2.9
Collecting ring-doorbell==0.2.9
Downloading https://files.pythonhosted.org/packages/fa/c4/8e8b68efeff61e8fbe30ab85d79d48c26cca74dfb951beffee9e169d3696/ring_doorbell-0.2.9-py3-none-any.whl
Requirement already satisfied: pytz in /usr/local/lib/python3.7/site-packages (from ring-doorbell==0.2.9) (2019.3)
Requirement already satisfied: requests-oauthlib==1.3.0 in /usr/local/lib/python3.7/site-packages (from ring-doorbell==0.2.9) (1.3.0)
Requirement already satisfied: oauthlib==3.1.0 in /usr/local/lib/python3.7/site-packages (from ring-doorbell==0.2.9) (3.1.0)
Requirement already satisfied: requests==2.22.0 in /usr/local/lib/python3.7/site-packages (from ring-doorbell==0.2.9) (2.22.0)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/site-packages (from requests==2.22.0->ring-doorbell==0.2.9) (1.25.7)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/site-packages (from requests==2.22.0->ring-doorbell==0.2.9) (2019.11.28)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.7/site-packages (from requests==2.22.0->ring-doorbell==0.2.9) (2.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/site-packages (from requests==2.22.0->ring-doorbell==0.2.9) (3.0.4)
Installing collected packages: ring-doorbell
Found existing installation: ring-doorbell 0.2.8
Uninstalling ring-doorbell-0.2.8:
Successfully uninstalled ring-doorbell-0.2.8
Successfully installed ring-doorbell-0.2.9
bash-5.0# exit
Then restarted Home Assistant, so far so good… However, on checking the network traffic, it is still generating around 180-200 sessions per minute to ring.api.com
This picture above shows only the sessions generated by Hassio and below are a couple of seconds of those session events.
2020-01-07 14:15:36.715 6 hassio 192.168.10.217 43488 104.17.127.1 443
2020-01-07 14:15:36.6 6 hassio 192.168.10.217 57720 104.17.128.1 443
2020-01-07 14:15:36.053 6 hassio 192.168.10.217 43480 104.17.127.1 443
2020-01-07 14:15:35.901 6 hassio 192.168.10.217 57712 104.17.128.1 443
2020-01-07 14:15:35.358 6 hassio 192.168.10.217 43476 104.17.127.1 443
2020-01-07 14:15:35.125 6 hassio 192.168.10.217 57708 104.17.128.1 443
2020-01-07 14:15:34.654 6 hassio 192.168.10.217 57706 104.17.128.1 443
2020-01-07 14:15:34.511 6 hassio 192.168.10.217 43470 104.17.127.1 443
2020-01-07 14:15:33.97 6 hassio 192.168.10.217 57702 104.17.128.1 443
2020-01-07 14:15:33.968 6 hassio 192.168.10.217 43466 104.17.127.1 443
2020-01-07 14:15:33.811 6 hassio 192.168.10.217 57698 104.17.128.1 443
2020-01-07 14:15:33.268 6 hassio 192.168.10.217 43462 104.17.127.1 443
2020-01-07 14:15:33.037 6 hassio 192.168.10.217 57694 104.17.128.1 443
So, my questions…,
- Did I screw this up the update to 0.2.9 of the ring library ?
- If NO to 1), then is this either
a) Still broken, or
b) the expected behaviour
Thoughts ?
PS. I can also confirm that just like alexmorford the binary_sensor for detected motion no longer works, but the ‘Ding’ sensor does.
UPDATE: SOLVED.
OK, so I’m answering my own question here, 1) YES, I screwed up the library update. Two further steps were necessary:
/usr/src/homeassistant/requirements_all.txt
/usr/src/homeassistant/homeassistant/components/ring/manifest.json
Updated both of these files to require the 0.2.9 ring library and after a restart, normal network traffic… hurray ! (however, motion sensor still does not update…)
Motion sensor failure…
Log Details (ERROR)
Tue Jan 07 2020 19:55:15 GMT+0000 (Greenwich Mean Time)
Update for binary_sensor.ring_front_door_motion fails
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 416, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.7/http/client.py", line 1344, in getresponse
response.begin()
File "/usr/local/lib/python3.7/http/client.py", line 306, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.7/http/client.py", line 267, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "/usr/local/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 326, in recv_into
raise timeout("The read operation timed out")
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 400, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 735, in reraise
raise value
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 423, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 331, in _raise_timeout
self, url, "Read timed out. (read timeout=%s)" % timeout_value
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.ring.com', port=443): Read timed out. (read timeout=5)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 281, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 461, in async_device_update
await self.hass.async_add_executor_job(self.update)
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/ring/binary_sensor.py", line 116, in update
self._data.check_alerts()
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/doorbot.py", line 85, in check_alerts
self.update()
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/generic.py", line 55, in update
self._get_attrs()
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/generic.py", line 87, in _get_attrs
lst = self._ring.query(url).get(self.family)
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 238, in query
headers=auth_header, timeout=self._timeout)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.ring.com', port=443): Read timed out. (read timeout=5)
Okay now I think your confident to handle the next thing to try.
Go to the git page for python ring-doorbell
Download the current master
And Do the following as per
And reboot
Thanks Gerorge, that fixes the issue with the binary_sensor for motion, now working as expected.
Cheers.
Good to know, cause I’m going to have to do the same
Hello, I have problems again with the binary ring movement sensor, does anyone know if this will be fixed with any updates?
here the same problems…
Error during setup of component ring
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/ring/init.py”, line 55, in setup
ring = Ring(username=username, password=password, cache_file=cache)
File “/usr/local/lib/python3.7/site-packages/ring_doorbell/init.py”, line 62, in init
self._process_cached_session()
File “/usr/local/lib/python3.7/site-packages/ring_doorbell/init.py”, line 91, in _process_cached_session
req = self.query(url, raw=True)
File “/usr/local/lib/python3.7/site-packages/ring_doorbell/init.py”, line 198, in query
‘Bearer {}’.format(self._get_oauth_token())
File “/usr/local/lib/python3.7/site-packages/ring_doorbell/init.py”, line 111, in _get_oauth_token
self.auth = oauth.refresh_tokens()
File “/usr/local/lib/python3.7/site-packages/ring_doorbell/auth.py”, line 59, in refresh_tokens
token = self._oauth.refresh_token(OAuth.ENDPOINT)
File “/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py”, line 446, in refresh_token
self.token = self._client.parse_request_body_response(r.text, scope=self.scope)
File “/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py”, line 421, in parse_request_body_response
self.token = parse_token_response(body, scope=scope)
File “/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py”, line 431, in parse_token_response
validate_token_parameters(params)
File “/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py”, line 441, in validate_token_parameters
raise MissingTokenError(description=“Missing access token parameter.”)
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.
Nick, I have this error now…
2020-01-09 20:20:24 ERROR (MainThread) [homeassistant.setup] Error during setup of component ring
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/ring/__init__.py", line 55, in setup
ring = Ring(username=username, password=password, cache_file=cache)
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 69, in __init__
self._process_cached_session()
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 98, in _process_cached_session
req = self.query(url, raw=True)
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 225, in query
'Bearer {}'.format(self._get_oauth_token())
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 127, in _get_oauth_token
self.auth = oauth.refresh_tokens()
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/auth.py", line 71, in refresh_tokens
token = self._oauth.refresh_token(OAuth.ENDPOINT)
File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 446, in refresh_token
self.token = self._client.parse_request_body_response(r.text, scope=self.scope)
File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 421, in parse_request_body_response
self.token = parse_token_response(body, scope=scope)
File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 431, in parse_token_response
validate_token_parameters(params)
File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 441, in validate_token_parameters
raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.
2020-01-09 20:20:24 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform ring.binary_sensor: Unable to set up component.
2020-01-09 20:20:24 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform ring.camera: Unable to set up component.
2020-01-09 20:20:24 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform ring.sensor: Unable to set up component.
having the exact same issue, i received an email from ring stating that an Android app had signed in momentarily after it stopped working, I tried reboot, change password, reboot but no luck error continues to persist
Just rebooted HA and Ring seems to be dead again. Was working just fine all day. Deleted pickle file but didn’t seem to work.
Error doing job: Future exception was never retrieved
Traceback (most recent call last):
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/ring/__init__.py", line 79, in timer_hub_refresh
hub_refresh()
File "/usr/src/homeassistant/homeassistant/components/ring/__init__.py", line 87, in hub_refresh
camera.update()
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/generic.py", line 55, in update
self._get_attrs()
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/generic.py", line 87, in _get_attrs
lst = self._ring.query(url).get(self.family)
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 198, in query
'Bearer {}'.format(self._get_oauth_token())
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 111, in _get_oauth_token
self.auth = oauth.refresh_tokens()
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/auth.py", line 59, in refresh_tokens
token = self._oauth.refresh_token(OAuth.ENDPOINT)
File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 446, in refresh_token
self.token = self._client.parse_request_body_response(r.text, scope=self.scope)
File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 421, in parse_request_body_response
self.token = parse_token_response(body, scope=scope)
File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 431, in parse_token_response
validate_token_parameters(params)
File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 441, in validate_token_parameters
raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.
and
Update for binary_sensor.ring_videoportero_ding fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 281, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 461, in async_device_update
await self.hass.async_add_executor_job(self.update)
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/ring/binary_sensor.py", line 116, in update
self._data.check_alerts()
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/doorbot.py", line 85, in check_alerts
self.update()
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/generic.py", line 55, in update
self._get_attrs()
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/generic.py", line 87, in _get_attrs
lst = self._ring.query(url).get(self.family)
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 198, in query
'Bearer {}'.format(self._get_oauth_token())
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 111, in _get_oauth_token
self.auth = oauth.refresh_tokens()
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/auth.py", line 59, in refresh_tokens
token = self._oauth.refresh_token(OAuth.ENDPOINT)
File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 446, in refresh_token
self.token = self._client.parse_request_body_response(r.text, scope=self.scope)
File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 421, in parse_request_body_response
self.token = parse_token_response(body, scope=scope)
File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 431, in parse_token_response
validate_token_parameters(params)
File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 441, in validate_token_parameters
raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.
Likely Ring up to shenanigans once more.
FYI, a github issue has been opened regarding this:
Me to?
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/ring/__init__.py", line 55, in setup
ring = Ring(username=username, password=password, cache_file=cache)
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 62, in __init__
self._process_cached_session()
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 91, in _process_cached_session
req = self.query(url, raw=True)
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 198, in query
'Bearer {}'.format(self._get_oauth_token())
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 111, in _get_oauth_token
self.auth = oauth.refresh_tokens()
File "/usr/local/lib/python3.7/site-packages/ring_doorbell/auth.py", line 59, in refresh_tokens
token = self._oauth.refresh_token(OAuth.ENDPOINT)
File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 446, in refresh_token
self.token = self._client.parse_request_body_response(r.text, scope=self.scope)
File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 421, in parse_request_body_response
self.token = parse_token_response(body, scope=scope)
File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 431, in parse_token_response
validate_token_parameters(params)
File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 441, in validate_token_parameters
raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.
2020-01-09 23:10:39 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform ring.sensor: Unable to set up component.
2020-01-09 23:10:39 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform ring.camera: Unable to set up component.
2020-01-09 23:10:39 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform ring.binary_sensor: Unable to set up component.
2020-01-09 23:10:39 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform ring.switch: Unable to set up component.
Yes I had to restart HA today and now my Ring integration is not working again too.
Snap
Just restarted and it stopped. Going to check the logs now