Ring Doorbell

@Darbos could you share the traceback you are getting?

To download your videos take a look at https://github.com/tchellomello/python-ring-doorbell/tree/master/scripts and at https://github.com/tchellomello/python-ring-doorbell/pull/69

You can find me at the discord chat too.

My Ring Doorbell is flooding my log file… and I already changed the interval to 30… :rage:

2017-11-18 14:53:08 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ring_voordeur_battery is taking over 10 seconds
2017-11-18 14:53:29 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 14:54:00 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 14:54:31 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 14:55:02 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 14:55:33 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 14:56:04 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 14:56:34 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 14:57:05 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 14:57:36 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 14:58:07 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 14:58:38 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 14:59:09 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 14:59:40 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:00:11 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:00:42 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:01:13 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:01:44 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:02:15 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:02:46 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:03:17 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:03:48 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:04:19 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:04:50 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:05:21 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:05:52 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:06:23 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:06:54 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:07:25 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:07:56 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:08:27 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:08:58 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:09:29 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:10:00 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:10:31 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:11:02 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:11:33 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:12:04 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:12:35 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30
2017-11-18 15:13:06 WARNING (MainThread) [homeassistant.components.sensor] Updating ring sensor took longer than the scheduled update interval 0:00:30

Hey sorry I am just getting back to you @tchellomello.

Configuration.yaml

camera:
  - platform: ring

ffmpeg:

sensors.yaml
- platform: ring

Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/haffmpeg/core.py”, line 114, in open
stderr=stderr
File “/usr/local/lib/python3.6/asyncio/subprocess.py”, line 225, in create_subprocess_exec
stderr=stderr, **kwds)
File “/usr/local/lib/python3.6/asyncio/base_events.py”, line 1191, in subprocess_exec
bufsize, **kwargs)
File “/usr/local/lib/python3.6/asyncio/unix_events.py”, line 191, in _make_subprocess_transport
**kwargs)
File “/usr/local/lib/python3.6/asyncio/base_subprocess.py”, line 39, in init
stderr=stderr, bufsize=bufsize, **kwargs)
File “/usr/local/lib/python3.6/asyncio/unix_events.py”, line 697, in _start
universal_newlines=False, bufsize=bufsize, **kwargs)
File “/usr/local/lib/python3.6/subprocess.py”, line 709, in init
restore_signals, start_new_session)
File “/usr/local/lib/python3.6/subprocess.py”, line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘ffmpeg’: ‘ffmpeg’
2017-11-25 17:41:50 WARNING (MainThread) [haffmpeg.tools] Error starting FFmpeg.

I remember having issues finding out exactly what ffmpeg i should install. Im running ha on ubuntu. This appears to be my issue, but please correct me if i am wrong. And any advice on how I shoud install ffmpeg for this.

Thanks again.

Have you tried apt-get install ffmpeg as root?

1 Like

Dude,I might punch myself. I thought I have tried that already. I had just found the documentation for ring was updated and a link from ffmpeg. I was in the process of cloning that when i saw your note. ran the apt-get and restarted HA…sho nuf its back!

I really appreciate you taking the time to help!

I had this working a few weeks ago foloowing this thread, but i had to disable it, it was cauing ha to crash after a couple hours. Hopin thats resolved now because I really like this compenent. Great work!

1 Like

I am seeing the same thing with 0.58.0.

It seems to be breaking motion sensor triggers, and the automation I have based on it is not being triggered…

Any ideas?

2017-11-26 10:35:36 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating ring binary_sensor took longer than the scheduled update interval 0:00:05
2017-11-26 10:40:17 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating ring binary_sensor took longer than the scheduled update interval 0:00:05
2017-11-26 10:45:16 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating ring binary_sensor took longer than the scheduled update interval 0:00:05
2017-11-26 10:47:51 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating ring binary_sensor took longer than the scheduled update interval 0:00:05
2017-11-26 10:55:15 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ring_front_door_last_ding is taking over 10 seconds

Hi guys,

Got some errors with the ring camera component:

Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py”, line 521, in log
for key, value in fmt_info:
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py”, line 513, in
for key, method in self._methods)
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py”, line 473, in _format_a
ip = request.remote
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py”, line 556, in get
val = self.wrapped(inst)
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_request.py”, line 319, in remote
peername = transport.get_extra_info(‘peername’)
File “/usr/lib/python3.5/asyncio/sslproto.py”, line 306, in get_extra_info
return self._ssl_protocol._get_extra_info(name, default)
File “/usr/lib/python3.5/asyncio/sslproto.py”, line 546, in _get_extra_info
return self._transport.get_extra_info(name, default)
AttributeError: ‘NoneType’ object has no attribute ‘get_extra_info’
2017-11-28 21:09:03 ERROR (MainThread) [aiohttp.access] Error in logging
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py”, line 554, in get
return inst._cache[self.name]
KeyError: ‘remote’

Any ideas???

@broesie @avayner how many devices do you have on your account?

If you try to use the 3rd library directly as instructed at https://github.com/tchellomello/python-ring-doorbell, and try myring.update() how long does it take?

We are in the process of moving some components of ring to synchronous which could be related with this.

I’ll have a PR shortly so then you could test it.

@avayner @broesie guys, doing some troubleshooting here I found the problem.

The issue is related to how we are calling the update() and a recent enhancement on the 3rd library that will cause this issue the way the HASS module is implemented. It was working fine, but after adding more devices and sensors I can see the issue happening when forcing it to loop.

I’m working on a PR and I’ll let you know once I have everything to test it.

Thanks and sorry for any inconvenience.
mmello

1 Like

It seems you have an issue external to the ring module.

Could you share your configuration? If you disable the Ring camera, does it work?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 199, in async_update_ha_state
    yield from self.async_device_update()
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 306, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.6/asyncio/futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup
    future.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/sensor/ring.py", line 150, in update
    self._data.update()
  File "/usr/lib/python3.6/site-packages/ring_doorbell/generic.py", line 44, in update
    self._get_attrs()
  File "/usr/lib/python3.6/site-packages/ring_doorbell/generic.py", line 76, in _get_attrs
    lst = self._ring.query(url).get(self.family)
  File "/usr/lib/python3.6/site-packages/ring_doorbell/__init__.py", line 172, in query
    req = self.session.get((url), params=urlencode(params))
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 521, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)

Error!! HTTPSConnectionPool(host='api.ring.com', port=443): Max retries exceeded with url:

new log:

TypeError: program arguments must be a bytes or text string, not bool
2017-11-29 11:54:07 WARNING (MainThread) [haffmpeg.tools] Error starting FFmpeg.
2017-11-29 11:54:07 ERROR (MainThread) [haffmpeg.core] FFmpeg fails program arguments must be a bytes or text string, not bool
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/haffmpeg/core.py”, line 114, in open
stderr=stderr
File “/usr/lib/python3.5/asyncio/subprocess.py”, line 212, in create_subprocess_exec
stderr=stderr, **kwds)
File “/usr/lib/python3.5/asyncio/base_events.py”, line 1180, in subprocess_exec
% type(arg).name)
TypeError: program arguments must be a bytes or text string, not bool
2017-11-29 11:54:07 WARNING (MainThread) [haffmpeg.tools] Error starting FFmpeg.
2

These are related to the underlying ha-ffmpeg library. See here.

@arsaboo de what should i do to fix this??

Unfortunately, there is nothing we can do. Keep monitoring the issue…hopefully it will be fixed soon.

@broesie yes it seems that Ring introduced a new series of controls. 1st enforcing the subscription and now controlling the number of calls.

I’m modifying the component so then we are not going to run into this anymore.

@dennissmit on your Ring attributes, are you able to see the URL?

Also I moved to Hass.io. In my developer tools states, I’m seeing on the sensor.ring_voordeur_last_activity the time when last rang on my doorbell.

However I created also a template sensor, where I could see also the date, but this gives a empty result…
The sensor is programmed this way:

  • platform: template
    sensors:
    ring_last_ding:
    value_template: “{{ as_timestamp(states.sensor.ring_voordeur_last_activity.attributes.created_at) | timestamp_custom(’%d/%m/%y om %-H:%M’) }}”

In my sensor.ring_voordeur_last_activity there is an attribute:
created_at: 2017-12-03T07:41:22+01:00

I dont understand, why sensor.ring_last_ding gives an empty result…

Do you have an active account? Last I heard, that is what breaks the ring->HA.

Of course, I use it all the time…