From 66651b4c5a37e5fb7c83f3499828eb1c0c8fb5cb Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Thu, 14 Feb 2019 21:00:37 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9C=20Merges/Redirect=20Ring=20compone?= =?UTF-8?q?nt=20pages=20(#8581)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_components/binary_sensor.ring.markdown | 40 ----- source/_components/camera.ring.markdown | 85 ---------- source/_components/ring.markdown | 151 +++++++++++++++++- source/_components/sensor.ring.markdown | 50 ------ 4 files changed, 149 insertions(+), 177 deletions(-) delete mode 100644 source/_components/binary_sensor.ring.markdown delete mode 100644 source/_components/camera.ring.markdown delete mode 100644 source/_components/sensor.ring.markdown diff --git a/source/_components/binary_sensor.ring.markdown b/source/_components/binary_sensor.ring.markdown deleted file mode 100644 index f06297d9cec..00000000000 --- a/source/_components/binary_sensor.ring.markdown +++ /dev/null @@ -1,40 +0,0 @@ ---- -layout: page -title: "Ring Binary Sensor" -description: "Instructions on how to integrate your Ring.com devices within Home Assistant." -date: 2017-04-01 10:00 -sidebar: true -comments: false -sharing: true -footer: true -logo: ring.png -ha_category: Doorbell -ha_release: 0.42 -ha_iot_class: "Cloud Polling" ---- - -To get your [Ring.com](https://ring.com/) binary sensors working within Home Assistant, please follow the instructions for the general [Ring component](/components/ring). - -## {% linkable_title Configuration %} - -Once you have enabled the [Ring component](/components/ring), add the following to your `configuration.yaml` file: - -```yaml -# Example configuration.yaml entry -binary_sensor: - - platform: ring -``` - -{% configuration %} -monitored_conditions: - description: Conditions to display in the frontend. The following conditions can be monitored. If not specified, all conditions below will be enabled. - required: false - type: list - keys: - ding: - description: Return a boolean value when the doorbell button was pressed. - motion: - description: Return a boolean value when a movement was detected by the Ring doorbell. -{% endconfiguration %} - -Currently it supports doorbell, external chimes and stickup cameras. diff --git a/source/_components/camera.ring.markdown b/source/_components/camera.ring.markdown deleted file mode 100644 index 9236be6f4fb..00000000000 --- a/source/_components/camera.ring.markdown +++ /dev/null @@ -1,85 +0,0 @@ ---- -layout: page -title: "Ring Camera" -description: "Instructions on how to integrate your Ring.com devices within Home Assistant." -date: 2017-10-20 10:00 -sidebar: true -comments: false -sharing: true -footer: true -logo: ring.png -ha_category: Camera -ha_release: 0.57 -ha_iot_class: "Cloud Polling" ---- - -To get your [Ring.com](https://ring.com/) cameras working within Home Assistant, please follow the instructions for the general [Ring component](/components/ring). Please note that downloading and playing Ring video will require a Ring Protect plan. - -## {% linkable_title Configuration %} - -Once you have enabled the [Ring component](/components/ring), add the following to your `configuration.yaml` file: - -```yaml -# 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](/components/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](/components/downloader) along with either an [automation](/components/automation) or [python_script](/components/python_script). First, enable the [downloader](/components/downloader) component in your configuration by adding the following to your `configuration.yaml`. - -```yaml -downloader: - download_dir: downloads -``` -Then you can use the following `action` in your automation (this will save the video file under `/downloads/ring_/`): - -```yaml -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: -```yaml -python_script: -``` -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') - -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) -``` diff --git a/source/_components/ring.markdown b/source/_components/ring.markdown index e600e3e140a..f0c3e3ec0d8 100644 --- a/source/_components/ring.markdown +++ b/source/_components/ring.markdown @@ -8,12 +8,27 @@ comments: false sharing: true footer: true logo: ring.png -ha_category: Doorbell +ha_category: + - Doorbell + - Binary Sensor + - Camera + - Sensor ha_release: 0.42 +ha_iot_class: "Cloud Polling" +redirect_from: + - /components/binary_sensor.ring/ + - /components/camera.ring/ + - /components/sensor.ring/ --- The `ring` implementation allows you to integrate your [Ring.com](https://ring.com/) devices in Home Assistant. +There is currently support for the following device types within Home Assistant: + +- [Binary Sensor](#binary-sensor) +- [Camera](#camera) - downloading and playing Ring video will require a Ring Protect plan. +- [Sensor](#sensor) + Currently only doorbells are supported by this sensor. ## {% linkable_title Configuration %} @@ -38,4 +53,136 @@ password: type: string {% endconfiguration %} -Finish its configuration by visiting the [Ring binary sensor](/components/binary_sensor.ring/) or [Ring sensor](/components/sensor.ring/) documentation. +## {% linkable_title Binary Sensor %} + +Once you have enabled the [Ring component](/components/ring), you can start using a binary sensor. Add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +binary_sensor: + - platform: ring +``` + +{% configuration %} +monitored_conditions: + description: Conditions to display in the frontend. The following conditions can be monitored. If not specified, all conditions below will be enabled. + required: false + type: list + keys: + ding: + description: Return a boolean value when the doorbell button was pressed. + motion: + description: Return a boolean value when a movement was detected by the Ring doorbell. +{% endconfiguration %} + +Currently it supports doorbell, external chimes and stickup cameras. + +## {% linkable_title Camera %} + +

+Please note that downloading and playing Ring video will require a Ring Protect plan. +

+ +Once you have enabled the [Ring component](/components/ring), you can start using the camera platform. Add the following to your `configuration.yaml` file: + +```yaml +# 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](/components/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](/components/downloader) along with either an [automation](/components/automation) or [python_script](/components/python_script). First, enable the [downloader](/components/downloader) component in your configuration by adding the following to your `configuration.yaml`. + +```yaml +downloader: + download_dir: downloads +``` + +Then you can use the following `action` in your automation (this will save the video file under `/downloads/ring_/`): + +```yaml +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: + +```yaml +python_script: +``` + +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') + +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) +``` + +## {% linkable_title Sensor %} + +Once you have enabled the [Ring component](/components/ring), you can start using the sensor platform. Add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sensor: + - platform: ring +``` + +{% configuration %} +monitored_conditions: + type: list + required: false + description: Conditions to display in the frontend. The following conditions can be monitored. If not specified, all conditions below will be enabled. + keys: + battery: + description: Return the battery level from device. + last_activity: + description: Return the timestamp from the last event captured (ding/motion/on demand) by the Ring doorbell camera. + last_ding: + description: Return the timestamp from the last time the Ring doorbell button was pressed. + last_motion: + description: Return the timestamp from the last motion event captured by the Ring doorbell camera. + volume: + description: Return the volume level from the device. + wifi_signal_category: + description: Return the WiFi signal level from the device. + wifi_signal_strength: + description: Return the WiFi signal strength (dBm) from the device. +{% endconfiguration %} + +Currently it supports doorbell, external chimes and stickup cameras. \ No newline at end of file diff --git a/source/_components/sensor.ring.markdown b/source/_components/sensor.ring.markdown deleted file mode 100644 index 5aeeb4f042c..00000000000 --- a/source/_components/sensor.ring.markdown +++ /dev/null @@ -1,50 +0,0 @@ ---- -layout: page -title: "Ring Sensor" -description: "Instructions on how to integrate your Ring.com devices within Home Assistant." -date: 2017-04-01 10:00 -sidebar: true -comments: false -sharing: true -footer: true -logo: ring.png -ha_category: Doorbell -ha_release: "0.40" -ha_iot_class: "Cloud Polling" ---- - -To get your [Ring.com](https://ring.com/) binary sensors working within Home Assistant, please follow the instructions for the general [Ring component](/components/ring). - -## {% linkable_title Configuration %} - -Once you have enabled the [Ring component](/components/ring), add the following to your `configuration.yaml` file: - -```yaml -# Example configuration.yaml entry -sensor: - - platform: ring -``` - -{% configuration %} -monitored_conditions: - type: list - required: false - description: Conditions to display in the frontend. The following conditions can be monitored. If not specified, all conditions below will be enabled. - keys: - battery: - description: Return the battery level from device. - last_activity: - description: Return the timestamp from the last event captured (ding/motion/on demand) by the Ring doorbell camera. - last_ding: - description: Return the timestamp from the last time the Ring doorbell button was pressed. - last_motion: - description: Return the timestamp from the last motion event captured by the Ring doorbell camera. - volume: - description: Return the volume level from the device. - wifi_signal_category: - description: Return the WiFi signal level from the device. - wifi_signal_strength: - description: Return the WiFi signal strength (dBm) from the device. -{% endconfiguration %} - -Currently it supports doorbell, external chimes and stickup cameras.