Fix invalid line endings (#5863)

This commit is contained in:
Dale Higgs 2018-07-29 05:00:02 -05:00 committed by Franck Nijhof
parent df01de7233
commit 7b4f60daaa
2 changed files with 174 additions and 174 deletions

View File

@ -1,86 +1,86 @@
--- ---
layout: page layout: page
title: "Xiaomi Cameras" title: "Xiaomi Cameras"
description: "Instructions on how to integrate a video feed (via FFmpeg) as a camera within Home Assistant." description: "Instructions on how to integrate a video feed (via FFmpeg) as a camera within Home Assistant."
date: 2018-06-20 13:00 date: 2018-06-20 13:00
sidebar: true sidebar: true
comments: false comments: false
sharing: true sharing: true
footer: true footer: true
logo: xiaomi.png logo: xiaomi.png
ha_category: Camera ha_category: Camera
ha_release: 0.72 ha_release: 0.72
ha_iot_class: "Local Polling" ha_iot_class: "Local Polling"
--- ---
The `Xiaomi` camera platform allows you to utilize Xiaomi Cameras within Home Assistant. The `Xiaomi` camera platform allows you to utilize Xiaomi Cameras within Home Assistant.
To successfully implement this platform, the Home Assistant host should be capable of multiple simultaneous reads. For every concurrent Home Assistant user, a connection will be made to the camera every 10 seconds. This should normally not be a problem. To successfully implement this platform, the Home Assistant host should be capable of multiple simultaneous reads. For every concurrent Home Assistant user, a connection will be made to the camera every 10 seconds. This should normally not be a problem.
## {% linkable_title Preparing the Device %} ## {% linkable_title Preparing the Device %}
### {% linkable_title Installing Alternative Firmware %} ### {% linkable_title Installing Alternative Firmware %}
In order to integrate the camera with Home Assistant, it is necessary to install a custom firmware on the device. Instructions for doing so can be found for each models. In order to integrate the camera with Home Assistant, it is necessary to install a custom firmware on the device. Instructions for doing so can be found for each models.
* [Yi 720p](https://github.com/fritz-smh/yi-hack) * [Yi 720p](https://github.com/fritz-smh/yi-hack)
* [Yi Home 17CN / 27US / 47US / 1080p Home / Dome / 1080p Dome](https://github.com/shadow-1/yi-hack-v3) * [Yi Home 17CN / 27US / 47US / 1080p Home / Dome / 1080p Dome](https://github.com/shadow-1/yi-hack-v3)
* [Xiaofang 1080p Camera](https://github.com/samtap/fang-hacks) * [Xiaofang 1080p Camera](https://github.com/samtap/fang-hacks)
Once installed, please ensure that you have enabled FTP. Once installed, please ensure that you have enabled FTP.
<p class='note warning'> <p class='note warning'>
Currently, version 0.1.4-beta2 of the custom firmware is the highest supported. Firmwares higher than this version use [Pure-FTPd](https://www.pureftpd.org/project/pure-ftpd), which has a bug that prevents FFmpeg from correctly rendering video files. Currently, version 0.1.4-beta2 of the custom firmware is the highest supported. Firmwares higher than this version use [Pure-FTPd](https://www.pureftpd.org/project/pure-ftpd), which has a bug that prevents FFmpeg from correctly rendering video files.
</p> </p>
<p class='note warning'> <p class='note warning'>
Hassbian users: don't forget to install ffmpeg support on your platform, otherwise, you'll not see video. Hassbian users: don't forget to install ffmpeg support on your platform, otherwise, you'll not see video.
</p> </p>
<p class='note warning'> <p class='note warning'>
The live stream writing by the camera is not an supported format when the hass reads through FTP for Yi 720p and Xiaofang Cameras, so this component retrives the video which was saved 1 minute earlier. The live stream writing by the camera is not an supported format when the hass reads through FTP for Yi 720p and Xiaofang Cameras, so this component retrives the video which was saved 1 minute earlier.
</p> </p>
<p class='note warning'> <p class='note warning'>
If you enabled RTSP server, you can connect to your camera via other Home Assistant camera platforms. However, this RTSP server disables the ability to use the supremely-useful Mi Home app. In order to maintain both Home Assistant compatibility _and_ the native app, this platform retrieves videos via FTP. If you enabled RTSP server, you can connect to your camera via other Home Assistant camera platforms. However, this RTSP server disables the ability to use the supremely-useful Mi Home app. In order to maintain both Home Assistant compatibility _and_ the native app, this platform retrieves videos via FTP.
</p> </p>
## {% linkable_title Configuring the Platform %} ## {% linkable_title Configuring the Platform %}
To enable the platform, add the following lines to your`configuration.yaml` file: To enable the platform, add the following lines to your`configuration.yaml` file:
```yaml ```yaml
camera: camera:
- platform: xiaomi - platform: xiaomi
name: Camera name: Camera
host: '192.168.1.100' host: '192.168.1.100'
model: 'yi' model: 'yi'
password: my_password_123 password: my_password_123
``` ```
Configuration variables: Configuration variables:
- **name** (*Required*): A human-friendly name for the camera. - **name** (*Required*): A human-friendly name for the camera.
- **host** (*Required*): The IP address or hostname of the camera. - **host** (*Required*): The IP address or hostname of the camera.
- **model** (*Required*): The model of Xiaomi Camera, currently supporting yi and xiaofang. - **model** (*Required*): The model of Xiaomi Camera, currently supporting yi and xiaofang.
- **password** (*Required*): The password to the FTP server on the camera (from above), can be any string as the current firmware doesn't allow setting ftp passwords. - **password** (*Required*): The password to the FTP server on the camera (from above), can be any string as the current firmware doesn't allow setting ftp passwords.
- **path** (*Optional*): The path to the raw MP4 files. Defaults to `/tmp/sd/record`. - **path** (*Optional*): The path to the raw MP4 files. Defaults to `/tmp/sd/record`.
- **username** (*Optional*): The user that can access the FTP server. Defaults to `root`. - **username** (*Optional*): The user that can access the FTP server. Defaults to `root`.
- **ffmpeg_arguments** (*Optional*): Extra options to pass to `ffmpeg` (e.g., image quality or video filter options). - **ffmpeg_arguments** (*Optional*): Extra options to pass to `ffmpeg` (e.g., image quality or video filter options).
## {% linkable_title Image quality %} ## {% linkable_title Image quality %}
Any option supported by [`ffmpeg` camera](/components/camera.ffmpeg/) can be utilized via the `ffmpeg_arguments` configuration parameter. Any option supported by [`ffmpeg` camera](/components/camera.ffmpeg/) can be utilized via the `ffmpeg_arguments` configuration parameter.
One particularly useful adjustment deals with video size. Since Yi videos are fairly large (especially on the 1080p cameras), the following configuration will bring them down to a manageable size: One particularly useful adjustment deals with video size. Since Yi videos are fairly large (especially on the 1080p cameras), the following configuration will bring them down to a manageable size:
```yaml ```yaml
camera: camera:
- platform: xiaomi - platform: xiaomi
name: My Camera name: My Camera
host: '192.168.1.100' host: '192.168.1.100'
model: 'xiaofang' model: 'xiaofang'
password: my_password_123 password: my_password_123
path: /home/camera/feed path: /home/camera/feed
ffmpeg_arguments: '-vf scale=800:450' ffmpeg_arguments: '-vf scale=800:450'
``` ```

View File

@ -1,88 +1,88 @@
--- ---
layout: page layout: page
title: "Xiaomi Cameras" title: "Xiaomi Cameras"
description: "Instructions on how to integrate a video feed (via FFmpeg) as a camera within Home Assistant." description: "Instructions on how to integrate a video feed (via FFmpeg) as a camera within Home Assistant."
date: 2018-06-20 13:00 date: 2018-06-20 13:00
sidebar: true sidebar: true
comments: false comments: false
sharing: true sharing: true
footer: true footer: true
logo: xiaomi.png logo: xiaomi.png
ha_category: Camera ha_category: Camera
ha_release: 0.72 ha_release: 0.72
ha_iot_class: "Local Polling" ha_iot_class: "Local Polling"
--- ---
The `Xiaomi` camera platform allows you to utilize Xiaomi Cameras within Home Assistant. The `Xiaomi` camera platform allows you to utilize Xiaomi Cameras within Home Assistant.
To successfully implement this platform, the Home Assistant host should be capable of multiple simultaneous reads. For every concurrent Home Assistant user, a connection will be made to the camera every 10 seconds. This should normally not be a problem. To successfully implement this platform, the Home Assistant host should be capable of multiple simultaneous reads. For every concurrent Home Assistant user, a connection will be made to the camera every 10 seconds. This should normally not be a problem.
## {% linkable_title Preparing the Device %} ## {% linkable_title Preparing the Device %}
In order to integrate the camera with Home Assistant, it is necessary to install a custom firmware on the device. Instructions for doing so can be found for each models. In order to integrate the camera with Home Assistant, it is necessary to install a custom firmware on the device. Instructions for doing so can be found for each models.
* [Yi 720p](https://github.com/fritz-smh/yi-hack) * [Yi 720p](https://github.com/fritz-smh/yi-hack)
* [Yi Home 17CN / 27US / 47US / 1080p Home / Dome / 1080p Dome](https://github.com/shadow-1/yi-hack-v3) * [Yi Home 17CN / 27US / 47US / 1080p Home / Dome / 1080p Dome](https://github.com/shadow-1/yi-hack-v3)
* [Xiaofang 1080p Camera](https://github.com/samtap/fang-hacks) * [Xiaofang 1080p Camera](https://github.com/samtap/fang-hacks)
Once installed, please ensure that you have enabled FTP. Once installed, please ensure that you have enabled FTP.
<p class='note warning'> <p class='note warning'>
Currently, version 0.1.4-beta2 of the custom firmware is the highest supported. Firmwares higher than this version use [Pure-FTPd](https://www.pureftpd.org/project/pure-ftpd), which has a bug that prevents FFmpeg from correctly rendering video files. Currently, version 0.1.4-beta2 of the custom firmware is the highest supported. Firmwares higher than this version use [Pure-FTPd](https://www.pureftpd.org/project/pure-ftpd), which has a bug that prevents FFmpeg from correctly rendering video files.
</p> </p>
<p class='note warning'> <p class='note warning'>
Hassbian users: Don't forget to install `ffmpeg` support on your platform, otherwise, you'll not see video. Hassbian users: Don't forget to install `ffmpeg` support on your platform, otherwise, you'll not see video.
</p> </p>
<p class='note warning'> <p class='note warning'>
The live stream writing by the camera is not an supported format when the hass reads through FTP for Yi 720p and Xiaofang Cameras, so this platform retrives the video which was saved 1 minute earlier. The live stream writing by the camera is not an supported format when the hass reads through FTP for Yi 720p and Xiaofang Cameras, so this platform retrives the video which was saved 1 minute earlier.
</p> </p>
<p class='note warning'> <p class='note warning'>
If you enabled RTSP server, you can connect to your camera via other Home Assistant camera platforms. However, this RTSP server disables the ability to use the supremely-useful Mi Home app. In order to maintain both Home Assistant compatibility _and_ the native app, this platform retrieves videos via FTP. If you enabled RTSP server, you can connect to your camera via other Home Assistant camera platforms. However, this RTSP server disables the ability to use the supremely-useful Mi Home app. In order to maintain both Home Assistant compatibility _and_ the native app, this platform retrieves videos via FTP.
</p> </p>
## {% linkable_title Configuring the Platform %} ## {% linkable_title Configuring the Platform %}
To enable the platform, add the following lines to your`configuration.yaml` file: To enable the platform, add the following lines to your`configuration.yaml` file:
```yaml ```yaml
camera: camera:
- platform: xiaomi - platform: xiaomi
name: Camera name: Camera
host: '192.168.1.100' host: '192.168.1.100'
model: 'yi' model: 'yi'
password: my_password_123 password: my_password_123
``` ```
Configuration variables: Configuration variables:
- **name** (*Required*): A human-friendly name for the camera. - **name** (*Required*): A human-friendly name for the camera.
- **host** (*Required*): The IP address or hostname of the camera. - **host** (*Required*): The IP address or hostname of the camera.
- **model** (*Required*): The model of Xiaomi Camera, currently supporting yi and xiaofang. - **model** (*Required*): The model of Xiaomi Camera, currently supporting yi and xiaofang.
- **password** (*Required*): The password to the FTP server on the camera (from above), can be any string as the current firmware doesn't allow setting ftp passwords. - **password** (*Required*): The password to the FTP server on the camera (from above), can be any string as the current firmware doesn't allow setting ftp passwords.
- **path** (*Optional*): The path to the raw MP4 files. Defaults to `/tmp/sd/record`. - **path** (*Optional*): The path to the raw MP4 files. Defaults to `/tmp/sd/record`.
- **username** (*Optional*): The user that can access the FTP server. Defaults to `root`. - **username** (*Optional*): The user that can access the FTP server. Defaults to `root`.
- **ffmpeg_arguments** (*Optional*): Extra options to pass to `ffmpeg` (e.g., image quality or video filter options). - **ffmpeg_arguments** (*Optional*): Extra options to pass to `ffmpeg` (e.g., image quality or video filter options).
<p class='note'> <p class='note'>
The default for `path:` will not work with all cameras. It may be needed that you add that key with the exact path for your device. The default for `path:` will not work with all cameras. It may be needed that you add that key with the exact path for your device.
</p> </p>
## {% linkable_title Image quality %} ## {% linkable_title Image quality %}
Any option supported by [`ffmpeg` camera](/components/camera.ffmpeg/) can be utilized via the `ffmpeg_arguments` configuration parameter. Any option supported by [`ffmpeg` camera](/components/camera.ffmpeg/) can be utilized via the `ffmpeg_arguments` configuration parameter.
One particularly useful adjustment deals with video size. Since Yi videos are fairly large (especially on the 1080p cameras), the following configuration will bring them down to a manageable size: One particularly useful adjustment deals with video size. Since Yi videos are fairly large (especially on the 1080p cameras), the following configuration will bring them down to a manageable size:
```yaml ```yaml
camera: camera:
- platform: xiaomi - platform: xiaomi
name: My Camera name: My Camera
host: '192.168.1.100' host: '192.168.1.100'
model: 'xiaofang' model: 'xiaofang'
password: my_password_123 password: my_password_123
path: /home/camera/feed path: /home/camera/feed
ffmpeg_arguments: '-vf scale=800:450' ffmpeg_arguments: '-vf scale=800:450'
``` ```