
* 🔥 Removes octopress.js * 🔥 Removes use of root_url var * 🔥 Removes Octopress generator reference from feed * 🔥 Removes delicious support * 🔥 Removes support for Pinboard * 🔥 Removes support for Disqus * 🔥 Removes support for Google Plus * ↩️ Migrate custom after_footer to default template * ↩️ Migrate custom footer to default template * ↩️ Migrate custom header to default template * 🔥 Removes unused template files * 🚀 Places time to read directly in post template * 🚀 Removes unneeded capture from archive_post.html template * 🔥 🚀 Removes unused, but heaving sorting call in component page * 🚀 Merged javascripts into a single file * 🔥 Removes more uses of root_url * 🚀 Removal of unneeded captures from head * 🔥 🚀 Removal of expensive liquid HTML compressor * 🔥 Removes unneeded templates * 🚀 Replaces kramdown with GitHub's CommonMark 🚀 * 💄 Adds Prism code syntax highlighting * ✨ Adds support for redirect in Netlify * ↩️ 🔥 Let Netlify handle all developer doc redirects * ✏️ Fixes typo in redirects file: Netify -> Netlify * 🔥 Removes unused .themes folder * 🔥 Removes unused aside.html template * 🔥 Removes Disqus config leftover * 🔥 Removes rouge highlighter config * 🔥 Removes Octopress 🎉 * 💄 Adjust code block font size and adds soft wraps * 💄 Adds styling for inline code blocks * 💄 Improve styling of note/warning/info boxes + div support * 🔨 Rewrites all note/warning/info boxes
3.9 KiB
title, description, logo, ha_category, ha_release, ha_iot_class, redirect_from
title | description | logo | ha_category | ha_release | ha_iot_class | redirect_from | ||
---|---|---|---|---|---|---|---|---|
Xiaomi Cameras | Instructions on how to integrate a video feed (via FFmpeg) as a camera within Home Assistant. | xiaomi.png |
|
0.72 | Local Polling |
|
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.
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.
Once installed, please ensure that you have enabled FTP.
Currently, version 0.1.4-beta2 of the custom firmware is the highest supported. Firmwares higher than this version use Pure-FTPd, which has a bug that prevents FFmpeg from correctly rendering video files.
Hassbian users: Don't forget to install ffmpeg
support on your platform, otherwise, you'll not see video.
Configuring the Platform
To enable the platform, add the following lines to yourconfiguration.yaml
file:
camera:
- platform: xiaomi
name: Camera
host: '192.168.1.100'
model: 'yi'
password: YOUR_PASSWORD
{% configuration %}
name:
description: A human-friendly name for the camera.
required: true
type: string
host:
description: The IP address or hostname of the camera.
required: true
type: string
model:
description: The model of Xiaomi Camera, currently supporting yi and xiaofang.
required: true
type: string
password:
description: 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.
required: true
type: string
path:
description: The path to the raw MP4 files.
required: false
type: string
default: /media/mmcblk0p1/record
username:
description: The user that can access the FTP server.
required: false
type: string
default: root
ffmpeg_arguments:
description: Extra options to pass to ffmpeg
.
required: false
type: string
{% endconfiguration %}
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.
Image quality
Any option supported by ffmpeg
camera 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:
camera:
- platform: xiaomi
name: My Camera
host: '192.168.1.100'
model: 'xiaofang'
password: YOUR_PASSWORD
path: /home/camera/feed
ffmpeg_arguments: '-vf scale=800:450'