core: Ring integration stops working

The problem

The Ring integration stops reporting motion and events after a while and the only way to fix it is a restart of home assistant.

Environment

  • Home Assistant Core release with the issue: 0.112.4
  • Last working Home Assistant Core release (if known): none
  • Operating environment (OS/Container/Supervised/Core): HassOS 4.11 running on VmWare ESXi 6.5
  • Integration causing this issue: Ring
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/ring

Problem-relevant configuration.yaml

No specific configuration done to the ring integration

Traceback/Error logs

Logger: homeassistant.components.ring
Source: components/ring/__init__.py:303
Integration: Ring (documentation, issues)
First occurred: July 11, 2020, 10:33:53 PM (41 occurrences)
Last logged: 2:21:56 AM

Error fetching Ring history data for device xxxx: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Error fetching Ring history data for device xxxx: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Error fetching Ring history data for device xxxx: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Error fetching Ring history data for device xxxx: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
Error fetching Ring history data for device xxxx: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Logger: homeassistant.helpers.entity
Source: __main__.py:356
First occurred: July 11, 2020, 4:05:13 AM (1323 occurrences)
Last logged: July 20, 2020, 10:02:29 PM

Update of camera.front_door is taking over 10 seconds
Update of camera.living_room is taking over 10 seconds
Update of camera.office is taking over 10 seconds
Update of camera.front is taking over 10 seconds
Update of camera.garden is taking over 10 seconds

Logger: homeassistant.components.ring.camera
Source: components/ring/camera.py:153
Integration: Ring (documentation, issues)
First occurred: July 11, 2020, 2:40:26 PM (55 occurrences)
Last logged: July 20, 2020, 8:26:04 PM

Time out fetching recording url for camera camera.front
Time out fetching recording url for camera camera.front_door
Time out fetching recording url for camera camera.garden

Additional information

The timeouts from the logs occur even when the integration is working so i’m not sure if it’s relevant. The whole integration just seems to stop and give up and doesn’t even retry or recover ever and i’m forced to restart home assistant. Is there any way to reload or restart a single integration ? i’d rather not restart the whole home assistant instance due to z-wave integration firing alot of event upon restart.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 6
  • Comments: 68 (2 by maintainers)

Most upvoted comments

Same issue here (core-2021.6.6). Ring was working fine for the last ~12 months. Suddenly, HA is not showing camera snapshots nor video footage anymore and there are a lot of errors in the logs. Reloading the Ring integration seems to fix things only for a few minutes. I have also tried to remove & reinstall the integration completely, but this did not solve anything.

2021-07-01 01:47:09 WARNING (MainThread) [homeassistant.components.ring] Error fetching Ring active dings data: HTTPSConnectionPool(host='api.ring.com', port=443): Max retries exceeded with url: /clients_api/dings/active?api_version=9 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f82b49xxxxx>: Failed to establish a new connection: [Errno -3] Try again'))
2021-07-01 01:47:09 WARNING (MainThread) [homeassistant.components.ring] Time out fetching Ring active dings data
2021-07-01 01:49:33 WARNING (SyncWorker_1) [homeassistant.components.ring] Error fetching Ring history data for device 3ce1a1ade68b: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Hi All - also receiving errors in my logs :

“WARNING (MainThread) [homeassistant.components.ring] Error fetching Ring active dings data: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’))”

I think Ring is rate limiting us because the integration hits their api too hard. Can a poll frequency be added to fix this?

I have the same problem, with the Ring integration.

Its not just live stream. It can play last 5 motion events. Last 5 ding events. Last 5 custom recorded events. It has a motion sensor, last motion sensor, last ding sensor, all the info attributes for every device regardless of battery or hardwire (update available, battery level, wifi strength sensors etc.). It can do camera snapshots at predefined periods (or follow whats set in the app). Works with all the Ring Alarm devices, base stations, door and window sensors, motion sensors, sirens. Ring floodlights. For cameras with sirens and lights the are all sensors you can turn on and off. I have all the above in my system. Its really worth trying out.

Quite how this integration hasn’t been removed yet is beyond me. Just use this and get this core integration uninstalled: https://community.home-assistant.io/t/ring-device-integration-via-mqtt/102105. I have zero issues with it and he just added live and event streaming.

@bartvollebregt any further progress on debugging? anything rest of us can do to help?

–updated info– I pip installed ring-doorbell.py 0.7.0 - didn’t fix

Any update on this? I’m using 2021.1.0 and my logs have this message every two minutes.

2021-01-07 05:55:55 WARNING (MainThread) [homeassistant.components.ring] Error fetching Ring active dings data: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Quite how this integration hasn’t been removed yet is beyond me. Just use this and get this core integration uninstalled: https://community.home-assistant.io/t/ring-device-integration-via-mqtt/102105. I have zero issues with it and he just added live and event streaming.

Are there detailed instructions somewhere as to how to set this up (seems almost automatic) and use it?

In that linked forum post the first post has links to the githubs. The wiki on those gits has all the documentation. You need MQTT setup, but yeah once configured with your ring token devices are auto discovered. Prob best to ask further question on the forum post. I just wanted to raise it as recently hes added more functionality which allowed me personally to switch over completely and doesn’t come with the problems still existing in this integration.

Is the Ring integration essentially unmaintained? There’s multiple issues about this problem and essentially no response from maintainers.

Same issue as the last update from @donagrejja. Seen previously on other recent versions but still present on HA 0.118.2

2020-11-21 16:23:43 WARNING (MainThread) [homeassistant.components.ring] Error fetching Ring active dings data: 504 Server Error: Gateway Time-out for url: https://api.ring.com/clients_api/dings/active?api_version=9

Now there’s a new error that has surfaced with Home Assistant version 1.116.x - the effect is still that the ring integration just stops working but now it even affects the data of the sensors. So when it’s unable to connect to ring it stops trying and both binary sensors and data sensors stops working. I even get low battery warnings because the battery stops getting data.

Here’s something from the log.

Logger: homeassistant.components.ring Source: components/ring/init.py:210 Integration: Ring (documentation, issues) First occurred: October 27, 2020, 2:11:49 PM (20 occurrences) Last logged: 9:09:59 AM

Error fetching Ring active dings data: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’)) Error fetching Ring device data: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’)) Error fetching Ring device data: 401 Client Error: Unauthorized for url: https://api.ring.com/clients_api/ring_devices?api_version=9 Error fetching Ring active dings data: 502 Server Error: Bad Gateway for url: https://api.ring.com/clients_api/dings/active?api_version=9

I have the same problem. Binary sensor for ring doorbell (motion and ding) is not updating. Last activity, last motion and last ding is updating correctly.

This also happens daily in the logs:

2020-07-12 14:09:05 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.garden fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 426, 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 421, 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 275, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

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 725, 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 403, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 426, 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 421, 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 275, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 272, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 463, in async_device_update
    await self.async_update()  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/ring/camera.py", line 149, in async_update
    self._device.recording_url, self._last_event["id"]
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/ring_doorbell/doorbot.py", line 354, in recording_url
    req = self._ring.query(url)
  File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 101, in query
    timeout=timeout,
  File "/usr/local/lib/python3.7/site-packages/ring_doorbell/auth.py", line 84, in query
    req = getattr(self._oauth, method.lower())(url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 516, in request
    method, url, headers=headers, data=data, **kwargs
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2020-07-13 00:24:35 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.front_door fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 426, 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 421, 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 275, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

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 725, 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 403, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 426, 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 421, 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 275, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 272, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 463, in async_device_update
    await self.async_update()  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/ring/camera.py", line 149, in async_update
    self._device.recording_url, self._last_event["id"]
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/ring_doorbell/doorbot.py", line 354, in recording_url
    req = self._ring.query(url)
  File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 101, in query
    timeout=timeout,
  File "/usr/local/lib/python3.7/site-packages/ring_doorbell/auth.py", line 84, in query
    req = getattr(self._oauth, method.lower())(url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 516, in request
    method, url, headers=headers, data=data, **kwargs
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))