Skip to content

Commit

Permalink
Update ring docs for camera live view
Browse files Browse the repository at this point in the history
  • Loading branch information
sdb9696 committed Nov 27, 2024
1 parent 4ec961d commit db156fc
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions source/_integrations/ring.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ There is currently support for the following device types within Home Assistant:
- [Light](#light)
- [Number](#number)

{% note %}
This integration does NOT allow for live viewing of your Ring camera within Home Assistant.
{% endnote %}

{% include integrations/config_flow.md %}

Expand All @@ -66,22 +63,26 @@ Once you have enabled the [Ring integration](/integrations/ring), you can start

## Camera

Once you have enabled the [Ring integration](/integrations/ring), you can start using the camera platform.
Currently, it supports doorbells and stickup cameras.
Two camera entities are provided: `live_view` and `last_recording`.
`last_recording` is disabled by default.

{% important %}
Please note that downloading and playing Ring video will require a Ring Protect plan.
Please note that downloading and playing Ring video from the `last_recording` camera will require a Ring Protect plan.
{% endimportant %}

Once you have enabled the [Ring integration](/integrations/ring), you can start using the camera platform. Currently, it supports doorbell and stickup cameras.

### 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](/integrations/downloader) along with either an [automation](/integrations/automation) or [python_script](/integrations/python_script). First, enable the [downloader](/integrations/downloader) integration in your configuration by adding the following to your `configuration.yaml`.
You can save locally the latest video captured by your Ring Door Bell using the [downloader](/integrations/downloader) along with either an [automation](/integrations/automation) or [python_script](/integrations/python_script).
First, enable the [downloader](/integrations/downloader) integration in your configuration by adding the following to your `configuration.yaml`.

```yaml
downloader:
download_dir: downloads
```
Then you can use the following automation, with the entities from your system, which will save the video file under `<config>/downloads/<camera_name>/<camera_name>/`:
Then you can use the following automation, with the entities from your system, which will save the video file under `<config>/downloads/<camera_name>/<camera_name>.mp4`:

{% raw %}

Expand All @@ -90,14 +91,20 @@ automation:
alias: "Save the video when the doorbell is pushed"
triggers:
- trigger: state
entity_id: binary_sensor.front_doorbell_ding
to: "on"
entity_id: event.front_doorbell_ding
from: null
actions:
- delay:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- action: downloader.download_file
data:
url: "{{ state_attr('camera.front_door', 'video_url') }}"
subdir: "{{state_attr('camera.front_door', 'friendly_name')}}"
filename: "{{state_attr('camera.front_door', 'friendly_name')}}"
overwrite: true
url: "{{ state_attr('camera.front_door_last_recording', 'video_url') }}"
subdir: "{{state_attr('camera.front_door_last_recording', 'friendly_name')}}"
filename: "{{state_attr('camera.front_door_last_recording', 'friendly_name')}}.mp4"
```

{% endraw %}
Expand All @@ -107,8 +114,8 @@ You may consider some modifications in the subdirectory and the filename to suit
{% raw %}
```yaml
data:
url: "{{ state_attr('camera.front_door', 'video_url') }}"
subdir: "{{ state_attr('camera.front_door', 'friendly_name') }}/{{ now().strftime('%Y.%m') }}"
url: "{{ state_attr('camera.front_door_last_recording', 'video_url') }}"
subdir: "{{ state_attr('camera.front_door_last_recording', 'friendly_name') }}/{{ now().strftime('%Y.%m') }}"
filename: "{{ now().strftime('%Y-%m-%d-at-%H-%M-%S') }}.mp4"
```
{% endraw %}
Expand All @@ -126,7 +133,7 @@ You can then use the following `python_script` to save the video file:
```python
# obtain ring doorbell camera object
# replace the camera.front_door by your camera entity
ring_cam = hass.states.get("camera.front_door")
ring_cam = hass.states.get("camera.front_door_last_recording")
subdir_name = f"ring_{ring_cam.attributes.get('friendly_name')}"
Expand Down

0 comments on commit db156fc

Please sign in to comment.