Merge remote-tracking branch 'origin/current' into next

This commit is contained in:
Paulus Schoutsen 2017-11-18 12:20:12 -08:00
commit 2511f63c98
18 changed files with 538 additions and 32 deletions

View file

@ -32,19 +32,30 @@ Configuration variables:
Currently it supports doorbell and stickup cameras.
## {% linkable_title Saving the videos captured by your Ring Door Bell %}
## {% linkable_title Saving locally 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`.
You can save locally the latest video captured by your Ring Door Bell by enabling the [downloader](/components/downloader) and the [python_scripts](/components/python_script) components.
- Add to the `configuration.yaml` the `downloader` and `python_scripts`. Visit the component page for further details.
```json
python_script:
```yaml
downloader:
download_dir: downloads
```
- Create a file `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>/`):
```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
@ -57,15 +68,9 @@ subdir_name = 'ring_{}'.format(ring_cam.attributes.get('friendly_name'))
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)
```
- Start Home Assistant
- Call the server `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.

View file

@ -52,5 +52,6 @@ Currently known supported models:
- LC-52LE925UN
- LC-60LE925UN
- LC-60LE857U
- LC-60EQ10U
If your model is not on the list then give it a test, if everything works correctly then add it to the list on [GitHub](https://github.com/home-assistant/home-assistant.github.io/tree/current/source/_components/media_player.aquostv.markdown).

View file

@ -62,7 +62,7 @@ sensor:
- platform: thethingsnetwork
device_id: ha-demo
values:
sensor_value: unit of measurment
sensor_value: unit of measurement
voltage: V
```