Ring Doorbell

FFMPEG seems to cause issues in Hassio…check https://github.com/home-assistant/home-assistant/issues/7572

This is awesome, excellent update!!! Works great for me on both of my doorbells.

Would it be possible to add an ‘include’ and/or ‘exclude’ option to the ring: component? Goal being the ability to decide what devices to pull into HA.

Also confirming that this worked for me! The video playback is a little fast, but that’s okay. Would it be possible to add an attribution link that goes to the same video in Ring’s website?

Hello @justyns,
Yes we can add an attribute with the raw URL to download the video.

Then you can automate a rule using the downloader component to auto-save the video or to click it and see directly in the browser if you want.

Thanks for the suggestion.
mmello

1 Like

@subnetangel can you test if you ring floodlight works directly on the external python library? We will probably need to extend the python-ringdoorbell library if that is not being displayed.

If not, you can file an issue https://github.com/tchellomello/python-ring-doorbell and then we can work together on this.

@tchellomello I will test today and will create an issue! Will love to collaborate with you on this!! Ideally i would like to be able to grab the live view and display it like the Generic cam component as well

@tchellomello I am pretty new to Python, how can I test the library quickly?

@tchellomello Ok I can validate that the Library can see the Flood light cam as per my tests below:

Account ID:  [REDACTED]
Address:    [REDACTED]
Family:     stickup_cams
ID:          [REDACTED]
Name:       Front house
Timezone:   America/Chicago
Wifi Name:   [REDACTED]
Wifi RSSI:  -52
Connection Status:  online
Volume:     5
Volume:     5
https://ring-transcoded-videos.s3.amazonaws.com/6477917516918700692.mp4?X-Amz-Expires=3600&X-Amz-Date=20171017T173520Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential= [REDACTED]/20171017/us-east-1/s3/aws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature= [REDACTED]
Alert Status:  None

This means it sees my Flood Light cam as a Stickup cam, and I saw that in issue: https://github.com/tchellomello/python-ring-doorbell/issues/38

They were able to get the data for the Flood lights and Siren working.

What else can I do to help test on HA?

PS> This is the python code I used to test:

from ring_doorbell import Ring
myring = Ring('foo@bar', 'secret')

myring.is_connected
True



for dev in list(myring.stickup_cams + myring.chimes + myring.doorbells):

    # refresh data
    dev.update()

    print('Account ID: %s' % dev.account_id)
    print('Address:    %s' % dev.address)
    print('Family:     %s' % dev.family)
    print('ID:         %s' % dev.id)
    print('Name:       %s' % dev.name)
    print('Timezone:   %s' % dev.timezone)
    print('Wifi Name:  %s' % dev.wifi_name)
    print('Wifi RSSI:  %s' % dev.wifi_signal_strength)
    print('Connection Status:  %s' % dev.connection_status)    

    # setting dev volume
    print('Volume:     %s' % dev.volume)
    dev.volume = 5
    print('Volume:     %s' % dev.volume)
    print(dev.recording_url(dev.last_recording_id))
    print('Alert Status:  %s' % dev.check_alerts())

I am testing this and it seems to work great. I do NOT have a cloud subscription and it allows me to view the last video. Havent run into any issues except the speed of playback is too fast. Maybe add that to the configuration of the camera component. Ill test ffmpeg settings and report back.

1 Like

Hi @tchellomello, I would love to see this feature get through in Home Assistant. I am testing this and I bumped into a 500 server error. Do you have any clue on what might be going on?
Stuff I’ve done:
• Placed the custom .py component in the proper directory
• Installed FFmpeg on RPi
• Added the sensor to the correct group

Thanks in advance and keep up the good work!

51

2017-10-17 20:47:00 WARNING (MainThread) [haffmpeg.core] FFmpeg isn't running!
2017-10-17 20:56:29 ERROR (MainThread) [haffmpeg.core] FFmpeg fails 
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.4/site-packages/haffmpeg/core.py", line 114, in open
    stderr=stderr
  File "/usr/lib/python3.4/asyncio/subprocess.py", line 226, in create_subprocess_exec
    stderr=stderr, **kwds)
  File "/usr/lib/python3.4/asyncio/base_events.py", line 866, in subprocess_exec
    bufsize, **kwargs)
  File "/usr/lib/python3.4/asyncio/unix_events.py", line 174, in _make_subprocess_transport
    yield from transp._post_init()
  File "/usr/lib/python3.4/asyncio/base_subprocess.py", line 106, in _post_init
    proc.stdin)
  File "/usr/lib/python3.4/asyncio/base_events.py", line 797, in connect_write_pipe
    yield from waiter
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
concurrent.futures._base.CancelledError
2017-10-17 20:56:29 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.4/site-packages/aiohttp/web_protocol.py", line 422, in start
    resp = yield from self._request_handler(request)
  File "/srv/homeassistant/lib/python3.4/site-packages/aiohttp/web.py", line 306, in _handle
    resp = yield from handler(request)
  File "/usr/lib/python3.4/asyncio/coroutines.py", line 143, in coro
    res = yield from res
  File "/usr/lib/python3.4/asyncio/coroutines.py", line 143, in coro
    res = yield from res
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/http/ban.py", line 58, in ban_middleware_handler
    return (yield from handler(request))
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/http/__init__.py", line 428, in handle
    result = yield from result
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/camera/__init__.py", line 340, in get
    response = yield from self.handle(request, camera)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/camera/__init__.py", line 360, in handle
    image = yield from camera.async_camera_image()
  File "/home/homeassistant/.homeassistant/custom_components/camera/ring.py", line 78, in async_camera_image
    extra_cmd=self._ffmpeg_arguments)
  File "/srv/homeassistant/lib/python3.4/site-packages/haffmpeg/tools.py", line 82, in get_image
    self._proc.communicate(), loop=self._loop)

@tchellomello Can you provided an updated ring.py file to test with the custom components that included the stickup cams and flood lights, I will test as soon as today or when ever it is available

Hello guys,

I’ve submitted the PR https://github.com/home-assistant/home-assistant/pull/9962 that introduces the Ring Door Bell camera support to HASS.
It includes the sensor and camera support to the stickup camera however it does not include support to fire the siren for floodlights yet.
If anyone has it and would like to extend the component would be great. Maybe a switch to turn it on/off would be amazing!
Furthermore, the video playback with the ffmpeg==1.9 worked great for me. It played the correct speed so I hope it works for you guys too.
Please let me know if anything goes wrong!!

Thank you all!!
mmello

1 Like

@Harmen that was a bug on ffmpeg==1.8 which has been already fixed by @pvizeli.

If you test using the branch mentioned on the PR https://github.com/home-assistant/home-assistant/pull/9962 should work fine.

@subnetangel see PR https://github.com/home-assistant/home-assistant/pull/9962

Please let me know if your tests work as expected. :+1:

Mello, any special files we need to update to test the PR or just replace ring.py?

@ian611 the patch has been merged today to the dev branch. You can run directly the dev branch to test it.

Mello sorry I am still new to this, what do you mean run the dev branch?

Seems like /components/ring.py didn’t get updated with 0.56 release :frowning:

Yes…it is still in the dev branch. It will be available in 0.57

Hey, first of all thanks for your awesome work! I did integrate the ring into my setup - including showing a snaphsot of the last movement. When I click on it, it also shows me the actual video.
So far so good. However, the snapshot/video is not refreshed when there is a new movement on my front door. It always shows me the last movement before HASS service has been started.

I guess there is an issue to refresh the picture/video. This is my log:

    2017-10-26 13:52:44 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/srv/hass/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in start
    resp = yield from self._request_handler(request)
  File "/srv/hass/lib/python3.6/site-packages/aiohttp/web.py", line 306, in _handle
    resp = yield from handler(request)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 213, in coro
    res = yield from res
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 213, in coro
    res = yield from res
  File "/srv/hass/lib/python3.6/site-packages/homeassistant/components/http/ban.py", line 58, in ban_middleware_handler
    return (yield from handler(request))
  File "/srv/hass/lib/python3.6/site-packages/homeassistant/components/http/__init__.py", line 430, in handle
    result = yield from result
  File "/srv/hass/lib/python3.6/site-packages/homeassistant/components/camera/__init__.py", line 333, in get
    response = yield from self.handle(request, camera)
  File "/srv/hass/lib/python3.6/site-packages/homeassistant/components/camera/__init__.py", line 353, in handle
    image = yield from camera.async_camera_image()
  File "/home/hass/.homeassistant/custom_components/camera/ring.py", line 70, in async_camera_image
    self.update()
  File "/home/hass/.homeassistant/custom_components/camera/ring.py", line 115, in update
    self._refresh_attrs()
  File "/home/hass/.homeassistant/custom_components/camera/ring.py", line 123, in _refresh_attrs
    self._video_url = self._camera.recording_url(self._last_video_id)
  File "/srv/hass/lib/python3.6/site-packages/ring_doorbell/__init__.py", line 615, in recording_url
    if req.status_code == 200:
AttributeError: 'NoneType' object has no attribute 'status_code'

Any ideas? Thanks!

HA Version 0.56.2
Ring Doorbell (old version)
HA running in virtualenv under Rasbian Stretch