Ring Doorbell

If you are on Ubuntu and get the error No such file or directory: 'ffmpeg', follow the following steps to install ffmpeg on your system:

sudo add-apt-repository ppa:jonathonf/ffmpeg-3
sudo apt install ppa-purge && sudo ppa-purge ppa:jonathonf/ffmpeg-3
1 Like

For those who are using the Ring camera, how soon does the thumbnail update for you all after a motion/ring is detected? It is taking some time at my end and I am guessing it is because Ring has to stop recording, process, and upload the video before it becomes available.

I am having the same error as you now, what folder did you go to get rid of stuff. I installed ffmpeg now, what update requests did you do?

Here is the error, I did what you said arsaboo to install ffmpeg it installed but did i need to that in venv?

2017-10-06 19:18:58 ERROR (MainThread) [haffmpeg.core] FFmpeg fails [Errno 2] No such file or directory: ‘ffmpeg’
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 1079, in subprocess_exec
bufsize, **kwargs)
File “/usr/lib/python3.5/asyncio/unix_events.py”, line 184, in _make_subprocess_transport
**kwargs)
File “/usr/lib/python3.5/asyncio/base_subprocess.py”, line 40, in init
stderr=stderr, bufsize=bufsize, **kwargs)
File “/usr/lib/python3.5/asyncio/unix_events.py”, line 649, in _start
universal_newlines=False, bufsize=bufsize, **kwargs)
File “/usr/lib/python3.5/subprocess.py”, line 947, in init
restore_signals, start_new_session)
File “/usr/lib/python3.5/subprocess.py”, line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: ‘ffmpeg’
2017-10-06 19:18:58 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_protocol.py”, line 422, in start
resp = yield from self._request_handler(request)
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web.py”, line 306, in _handle
resp = yield from handler(request)
File “/usr/lib/python3.5/asyncio/coroutines.py”, line 209, in coro
res = yield from res
File “/usr/lib/python3.5/asyncio/coroutines.py”, line 209, in coro
res = yield from res
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/http/ban.py”, line 58, in ban_middleware_handler
return (yield from handler(request))
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/http/init.py”, line 424, in handle
result = yield from result
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/camera/init.py”, line 340, in get
response = yield from self.handle(request, camera)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/camera/init.py”, line 360, in handle
image = yield from camera.async_camera_image()
File “/home/ian/.homeassistant/custom_components/camera/ring.py”, line 78, in async_camera_image
extra_cmd=self._ffmpeg_arguments)
File “/srv/homeassistant/lib/python3.5/site-packages/haffmpeg/tools.py”, line 82, in get_image
self._proc.communicate(), loop=self._loop)
AttributeError: ‘NoneType’ object has no attribute ‘communicate’
2017-10-06 19:18:58 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting

Ok got it to work, video moving slowly. Little bit choppy but working. Thanks guys for the help and pointers.

Tmello, my ring platform time is an hour behind of the actual time. Server time and homeassistant times are all good.

Update from my side: All working!! Thanks for all the hard work @tchellomello

1 Like

@ian611 did you check the preferences on the ring app?

I am seeing frequent ffmpeg errors in the logs, anyone else?

2017-10-08 07:49:19 ERROR (MainThread) [haffmpeg.core] FFmpeg fails 
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 1079, in subprocess_exec
    bufsize, **kwargs)
  File "/usr/lib/python3.5/asyncio/unix_events.py", line 201, in _make_subprocess_transport
    raise err
  File "/usr/lib/python3.5/asyncio/unix_events.py", line 189, in _make_subprocess_transport
    yield from waiter
  File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 266, in result
    raise CancelledError
concurrent.futures._base.CancelledError

Looks like you solved the problem but for anyone else reading the thread, the folder I had to delete was in my Users folder. So for me it was: /Users/mediacenter/requests

Hi,

Have you considered (somehow) to make this feature available via Zoneminder as opposed to using FFMPEG? The FFMPEG part of this config is killing my HA insrtance (Docker container on Syno Nas DS1515+)

I think what you have done is awesome otherwise

Thanks again for all the work on this…

I have not, but would be great to have another option like zoneminder.

Works perfectly for me hopefully we can get this into .56 :slight_smile:

@tchellomello Would this work with a Ring Flood light? I also wanted to be able to get access to the live stream or a jpg snapshot similar to the generic camera component? is this possible with the Python API?

I ran into this issue any Ideas:

2017-10-11 11:44:32 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.camera.ring. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/loader.py", line 142, in get_component
    module = importlib.import_module(path)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/home/homeassistant/.homeassistant/custom_components/camera/ring.py", line 10, in <module>
    import dateutil.parser
ImportError: No module named 'dateutil'

There was a post above suggesting to manually install some dependencies…try this…

pip install python-dateutil

Thanks that worked.

But I dont see the camera component yet will do more testing

Is ring included in your camera components? Also, you have to install ffmpeg (install varies depending on what platform you run HA on) manually and then add it to your config like this:

camera:
  - platform: ring
 
ffmpeg:
1 Like

It was working for a little bit on hass.io… but then the whole homeassistant instance hangs and becomes unresponsive. Only way to clear it up is to reboot but then the same thing happens after a while. If i remove the ring camera from the config ha runs fine no issues.

I do have the correct info now.

But my setup is AIO script. Again I am using the Ring Floodlight. I added to wink and it see’s it as a stickup cam, I would assume it could be accessed via this ring.py any ideas?

@tchellomello