home-assistant.io/source/_components/camera.ring.markdown
Jorim Tielemans db30e60a44 More various improvements (#6991)
Things starting with 'ca'
2018-10-21 17:03:41 +02:00

2.9 KiB

layout title description date sidebar comments sharing footer logo ha_category ha_release ha_iot_class
page Ring Camera Instructions on how to integrate your Ring.com devices within Home Assistant. 2017-10-20 10:00 true false true true ring.png Camera 0.57 Cloud Polling

To get your Ring.com cameras working within Home Assistant, please follow the instructions for the general Ring component. Please note that downloading and playing Ring video will require a Ring Protect plan.

{% linkable_title Configuration %}

Once you have enabled the Ring component, add the following to your configuration.yaml file:

# Example configuration.yaml entry
camera:
  - platform: ring

{% configuration %} ffmpeg_arguments: description: Extra options to pass to ffmpeg, e.g., image quality or video filter options. required: false type: string scan_interval: description: How frequently to query for new video in seconds. required: false type: integer default: 90 {% endconfiguration %}

Note: To be able to playback the last capture, it is required to install the ffmpeg component. Make sure to follow the steps mentioned at FFMPEG documentation.

Currently it supports doorbell and stickup cameras.

{% linkable_title Saving the videos captured by your Ring Door Bell %}

You can save locally the latest video captured by your Ring Door Bell using the downloader along with either an automation or python_script. First, enable the downloader component in your configuration by adding the following to your configuration.yaml.

downloader:
  download_dir: downloads

Then you can use the following action in your automation (this will save the video file under <config>/downloads/ring_<camera_name>/):

action:
  - service: downloader.download_file
    data_template:
      url: "{{ states.camera.front_door.attributes.video_url }}"
      subdir: "{{states.camera.front_door.attributes.friendly_name}}"
      filename: "{{states.camera.front_door.attributes.friendly_name}}"

If you want to use python_script, enable it your configuration.yaml file first:

python_script:

You can then use the following python_script to save the video file:

# obtain ring doorbell camera object
# replace the camera.front_door by your camera entity
ring_cam = hass.states.get('camera.front_door')

subdir_name = 'ring_{}'.format(ring_cam.attributes.get('friendly_name'))

# get video URL
data = {
    'url': ring_cam.attributes.get('video_url'),
    'subdir': subdir_name,
    'filename': ring_cam.attributes.get('friendly_name')
}

# call downloader component to save the video
hass.services.call('downloader', 'download_file', data)