diff --git a/atom.xml b/atom.xml index a62003797c..0af96d67fa 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
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.
-You can save locally the latest video captured by your Ring Door Bell by enabling the downloader and the python_scripts components.
-configuration.yaml
the downloader
and python_scripts
. Visit the component page for further details.python_script:
-downloader:
- download_dir: downloads
-
+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
+
ring_downloader.py
in the folder <config>/python_scripts
and give it this content: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: ""
+ subdir: ""
+ filename: ""
+
+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')
@@ -111,18 +118,13 @@
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)
python_script/ring_downloader
You should be able to see a video file saved under <config>/<downloader_dir>/ring_<camera_name>/
.
You can also automate the process by integrating it with the (automation)[/components/automation) component.