mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Merge branch 'current' into next
This commit is contained in:
commit
d5e7847682
@ -11,6 +11,10 @@ footer: true
|
||||
|
||||
Setup and manage a [Let's Encrypt](https://letsencrypt.org/) certificate. This will create a certificate on the first run and renew it if the certificate is expiring in the next 30 days.
|
||||
|
||||
<p class='note warning'>
|
||||
This add-on need port 80/443 to verify the certificate request, please stop all add-ons they use also this ports, otherwise you can not start this add-on.
|
||||
</p>
|
||||
|
||||
```json
|
||||
{
|
||||
"email": "example@example.com",
|
||||
|
25
source/_addons/nginx_proxy.markdown
Normal file
25
source/_addons/nginx_proxy.markdown
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Nginx SSL proxy"
|
||||
description: "Nginx HomeAssistant SSL proxy"
|
||||
date: 2017-04-30 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
Setup a SSL proxy with nginx and redirect port 80 to 443. Make sure you have generate certificate before you start this add-on.
|
||||
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"domain": "home.example.com"
|
||||
}
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **domain** (*Required*): Domain they will proxy run with it.
|
||||
|
@ -17,7 +17,7 @@ redirect_from: /components/binary_sensor.ffmpeg/
|
||||
The `ffmpeg` platform allows you to use any video feed with [FFmpeg](http://www.ffmpeg.org/) for motion sensors in Home Assistant.
|
||||
|
||||
<p class='note'>
|
||||
If the `ffmpeg` process is broken, the sensor will be unavailable. To controll the ffmpeg process of sensor, use the service *ffmpeg.start*, *ffmpeg.stop*, *ffmpeg.restart*.
|
||||
If the `ffmpeg` process is broken, the sensor will be unavailable. To control the ffmpeg process of sensor, use the service *ffmpeg.start*, *ffmpeg.stop*, *ffmpeg.restart*.
|
||||
</p>
|
||||
|
||||
### {% linkable_title Motion %}
|
||||
|
@ -16,7 +16,7 @@ ha_release: 0.27
|
||||
The `ffmpeg` platform allows you to use any video or audio feed with [FFmpeg](http://www.ffmpeg.org/) for various sensors in Home Assistant.
|
||||
|
||||
<p class='note'>
|
||||
If the `ffmpeg` process is broken, the sensor will be unavailable. To controll the ffmpeg process of sensor, use the service *ffmpeg.start*, *ffmpeg.stop*, *ffmpeg.restart*.
|
||||
If the `ffmpeg` process is broken, the sensor will be unavailable. To control the ffmpeg process of sensor, use the service *ffmpeg.start*, *ffmpeg.stop*, *ffmpeg.restart*.
|
||||
</p>
|
||||
|
||||
### {% linkable_title Noise %}
|
||||
|
@ -92,3 +92,17 @@ binary_sensor:
|
||||
- sensor.kitchen_co_status
|
||||
- sensor.wardrobe_co_status
|
||||
```
|
||||
### {% linkable_title Change the icon %}
|
||||
|
||||
This example shows how to change the icon based on the day/night cycle.
|
||||
|
||||
```yaml
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
day_night:
|
||||
friendly_name: 'Day/Night'
|
||||
value_template: {% raw %}'{% if is_state("sun.sun", "above_horizon") %}Day{% else %}Night{% endif %}'{% endraw %}
|
||||
icon_template: {% raw %}'{% if is_state("sun.sun", "above_horizon") %}mdi:weather-sunny{% else %}mdi:weather-night{% endif %}'{% endraw %}
|
||||
|
||||
```
|
||||
|
@ -42,7 +42,144 @@ You can use V_TEMP to send the current temperature from the node to Home Assista
|
||||
|
||||
For more information, visit the [serial api] of MySensors.
|
||||
|
||||
### {% linkable_title Example sketch %}
|
||||
### {% linkable_title Example sketch for MySensors 2.x %}
|
||||
|
||||
|
||||
```cpp
|
||||
/*
|
||||
* Documentation: http://www.mysensors.org
|
||||
* Support Forum: http://forum.mysensors.org
|
||||
*/
|
||||
|
||||
#define MY_RADIO_NRF24
|
||||
#define CHILD_ID_HVAC 0
|
||||
|
||||
#include <MySensors.h>
|
||||
|
||||
// Uncomment your heatpump model
|
||||
//#include <FujitsuHeatpumpIR.h>
|
||||
//#include <PanasonicCKPHeatpumpIR.h>
|
||||
//#include <PanasonicHeatpumpIR.h>
|
||||
//#include <CarrierHeatpumpIR.h>
|
||||
//#include <MideaHeatpumpIR.h>
|
||||
//#include <MitsubishiHeatpumpIR.h>
|
||||
//#include <SamsungHeatpumpIR.h>
|
||||
//#include <SharpHeatpumpIR.h>
|
||||
//#include <DaikinHeatpumpIR.h>
|
||||
|
||||
//Some global variables to hold the states
|
||||
int POWER_STATE;
|
||||
int TEMP_STATE;
|
||||
int FAN_STATE;
|
||||
int MODE_STATE;
|
||||
int VDIR_STATE;
|
||||
int HDIR_STATE;
|
||||
|
||||
IRSenderPWM irSender(3); // IR led on Arduino digital pin 3, using Arduino PWM
|
||||
|
||||
//Change to your Heatpump
|
||||
HeatpumpIR *heatpumpIR = new PanasonicNKEHeatpumpIR();
|
||||
|
||||
/*
|
||||
new PanasonicDKEHeatpumpIR()
|
||||
new PanasonicJKEHeatpumpIR()
|
||||
new PanasonicNKEHeatpumpIR()
|
||||
new CarrierHeatpumpIR()
|
||||
new MideaHeatpumpIR()
|
||||
new FujitsuHeatpumpIR()
|
||||
new MitsubishiFDHeatpumpIR()
|
||||
new MitsubishiFEHeatpumpIR()
|
||||
new SamsungHeatpumpIR()
|
||||
new SharpHeatpumpIR()
|
||||
new DaikinHeatpumpIR()
|
||||
*/
|
||||
|
||||
MyMessage msgHVACSetPointC(CHILD_ID_HVAC, V_HVAC_SETPOINT_COOL);
|
||||
MyMessage msgHVACSpeed(CHILD_ID_HVAC, V_HVAC_SPEED);
|
||||
MyMessage msgHVACFlowState(CHILD_ID_HVAC, V_HVAC_FLOW_STATE);
|
||||
|
||||
void presentation() {
|
||||
sendSketchInfo("Heatpump", "2.1");
|
||||
present(CHILD_ID_HVAC, S_HVAC, "Thermostat");
|
||||
}
|
||||
|
||||
void setup() {
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
}
|
||||
|
||||
void receive(const MyMessage &message) {
|
||||
if (message.isAck()) {
|
||||
Serial.println("This is an ack from gateway");
|
||||
return;
|
||||
}
|
||||
|
||||
Serial.print("Incoming message for: ");
|
||||
Serial.print(message.sensor);
|
||||
|
||||
String recvData = message.data;
|
||||
recvData.trim();
|
||||
|
||||
Serial.print(", New status: ");
|
||||
Serial.println(recvData);
|
||||
switch (message.type) {
|
||||
case V_HVAC_SPEED:
|
||||
Serial.println("V_HVAC_SPEED");
|
||||
|
||||
if(recvData.equalsIgnoreCase("auto")) FAN_STATE = 0;
|
||||
else if(recvData.equalsIgnoreCase("min")) FAN_STATE = 1;
|
||||
else if(recvData.equalsIgnoreCase("normal")) FAN_STATE = 2;
|
||||
else if(recvData.equalsIgnoreCase("max")) FAN_STATE = 3;
|
||||
break;
|
||||
|
||||
case V_HVAC_SETPOINT_COOL:
|
||||
Serial.println("V_HVAC_SETPOINT_COOL");
|
||||
TEMP_STATE = message.getFloat();
|
||||
Serial.println(TEMP_STATE);
|
||||
break;
|
||||
|
||||
case V_HVAC_FLOW_STATE:
|
||||
Serial.println("V_HVAC_FLOW_STATE");
|
||||
if (recvData.equalsIgnoreCase("coolon")) {
|
||||
POWER_STATE = 1;
|
||||
MODE_STATE = MODE_COOL;
|
||||
}
|
||||
else if (recvData.equalsIgnoreCase("heaton")) {
|
||||
POWER_STATE = 1;
|
||||
MODE_STATE = MODE_HEAT;
|
||||
}
|
||||
else if (recvData.equalsIgnoreCase("autochangeover")) {
|
||||
POWER_STATE = 1;
|
||||
MODE_STATE = MODE_AUTO;
|
||||
}
|
||||
else if (recvData.equalsIgnoreCase("off")){
|
||||
POWER_STATE = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
sendHeatpumpCommand();
|
||||
sendNewStateToGateway();
|
||||
}
|
||||
|
||||
void sendNewStateToGateway() {
|
||||
send(msgHVACSetPointC.set(TEMP_STATE));
|
||||
send(msgHVACSpeed.set(FAN_STATE));
|
||||
send(msgHVACFlowState.set(MODE_STATE));
|
||||
}
|
||||
|
||||
void sendHeatpumpCommand() {
|
||||
Serial.println("Power = " + (String)POWER_STATE);
|
||||
Serial.println("Mode = " + (String)MODE_STATE);
|
||||
Serial.println("Fan = " + (String)FAN_STATE);
|
||||
Serial.println("Temp = " + (String)TEMP_STATE);
|
||||
|
||||
heatpumpIR->send(irSender, POWER_STATE, MODE_STATE, FAN_STATE, TEMP_STATE, VDIR_AUTO, HDIR_AUTO);
|
||||
}
|
||||
```
|
||||
|
||||
### {% linkable_title Example sketch for MySensors 1.x %}
|
||||
|
||||
```cpp
|
||||
/*
|
||||
|
@ -7,6 +7,7 @@ sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: home-assistant.png
|
||||
ha_category: Hub
|
||||
ha_release: 0.27
|
||||
ha_iot_class: "Local Push"
|
||||
|
@ -25,7 +25,7 @@ ffmpeg:
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **ffmpeg_bin** (*Optional*): Default 'ffmpeg'. The name or path to the `ffmpeg` binary.
|
||||
- **ffmpeg_bin** (*Optional*): Default `ffmpeg`. The name or path to the `ffmpeg` binary.
|
||||
- **run_test** (*Optional*): Default True. Check if `input` is usable by ffmpeg.
|
||||
|
||||
### {% linkable_title Raspbian Debian Jessie Lite Installations %}
|
||||
@ -36,7 +36,9 @@ $ sudo echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get -t jessie-backports install ffmpeg
|
||||
```
|
||||
|
||||
We can use now following in the configuration:
|
||||
|
||||
```
|
||||
ffmpeg:
|
||||
ffmpeg_bin: /usr/bin/ffmpeg
|
||||
@ -52,7 +54,44 @@ First check that your stream is playable by `ffmpeg` outside of Home Assistant w
|
||||
$ ffmpeg -i INPUT -an -f null -
|
||||
```
|
||||
|
||||
Now you should be able to see what is going wrong. The following list contains some common problems and solutions:
|
||||
Now you should be able to see what is going wrong. The following list contains some common problems and solutions:
|
||||
|
||||
- `[rtsp @ ...] UDP timeout, retrying with TCP`: You need to set an RTSP transport in the configuration with: `input: -rtsp_transport tcp -i INPUT`
|
||||
- `[rtsp @ ...] Could not find codec parameters for stream 0 (Video: ..., none): unspecified size`: FFmpeg needs more data or time for autodetection (the default is 5 seconds). You can set the `analyzeduration` and/or `probesize` options to experiment with giving FFmpeg more leeway. If you find the needed value, you can set it with: `input: -analyzeduration xy -probesize xy -i INPUT`. More information about this can be found [here](https://www.ffmpeg.org/ffmpeg-formats.html#Description).
|
||||
|
||||
#### {% linkable_title USB cameras %}
|
||||
|
||||
For `INPUT` a valid source is needed. USB camera are an easy way to test your video setup. To get all available USB cameras connected to the system, eg. use the v4l2 tools on a Linux machine.
|
||||
|
||||
```bash
|
||||
$ v4l2-ctl --list-devices
|
||||
UVC Camera (046d:0825) (usb-0000:00:14.0-1):
|
||||
/dev/video1
|
||||
|
||||
Integrated Camera (usb-0000:00:14.0-10):
|
||||
/dev/video0
|
||||
```
|
||||
|
||||
Record a test video with your USB device `/dev/video1`:
|
||||
|
||||
```bash
|
||||
$ ffmpeg -i /dev/video1 -codec:v libx264 -qp 0 lossless.mp4
|
||||
[...]
|
||||
Input #0, video4linux2,v4l2, from '/dev/video1':
|
||||
Duration: N/A, start: 43556.376974, bitrate: 147456 kb/s
|
||||
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
|
||||
[...]
|
||||
Output #0, mp4, to 'lossless.mp4':
|
||||
Metadata:
|
||||
encoder : Lavf57.41.100
|
||||
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv422p, 640x480, q=-1--1, 30 fps, 15360 tbn, 30 tbc
|
||||
Metadata:
|
||||
encoder : Lavc57.48.101 libx264
|
||||
Side data:
|
||||
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
|
||||
Stream mapping:
|
||||
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
|
||||
Press [q] to stop, [?] for help
|
||||
frame= 223 fps= 40 q=-1.0 Lsize= 16709kB time=00:00:07.40 bitrate=18497.5kbits/s dup=58 drop=0 speed=1.32x
|
||||
```
|
||||
|
||||
|
@ -109,7 +109,7 @@ It will read all your state_change events from the database and add them as data
|
||||
You can specify the source database either by pointing the `--config` option to the config directory which includes the default sqlite database or by giving a sqlalchemy connection URI with `--uri`.
|
||||
The writing to InfluxDB is done in batches that can be changed with `--step`.
|
||||
|
||||
You can control, which data is imported by using the commandline options `--exclude-entities` and `--exclude-domain`.
|
||||
You can control, which data is imported by using the commandline options `--exclude_entities` and `--exclude_domains`.
|
||||
Both get a comma separated list of either entity-ids or domain names that are excluded from the import.
|
||||
|
||||
To test what gets imported you can use the `--simulate` option, which disables the actual write to the InfluxDB instance.
|
||||
@ -120,7 +120,7 @@ Example to run the script:
|
||||
```bash
|
||||
$ hass --script influxdb_import --config CONFIG_DIR \
|
||||
-H IP_INFLUXDB_HOST -u INFLUXDB_USERNAME -p INFLUXDB_PASSWORD \
|
||||
--dbname INFLUXDB_DB_NAME --exclude-domain automation,configurator
|
||||
--dbname INFLUXDB_DB_NAME --exclude_domains automation,configurator
|
||||
```
|
||||
Script arguments:
|
||||
|
||||
|
@ -33,7 +33,7 @@ Turns one light on or multiple lights on using [groups]({{site_root}}/components
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `entity_id` | no | String or list of strings that point at `entity_id`s of lights. Else targets all.
|
||||
| `transition` | yes | Integer that represents the time the light should take to transition to the new state in seconds. *not supported by Wink
|
||||
| `transition` | yes | Integer that represents the time the light should take to transition to the new state in seconds. *Not supported by all lights.
|
||||
| `profile` | yes | String with the name of one of the built-in profiles (relax, energize, concentrate, reading) or one of the custom profiles defined in `light_profiles.csv` in the current working directory. Light profiles define a xy color and a brightness. If a profile is given and a brightness or xy color then the profile values will be overwritten.
|
||||
| `xy_color` | yes | A list containing two floats representing the xy color you want the light to be. Two comma separated floats that represent the color in XY.
|
||||
| `rgb_color` | yes | A list containing three integers representing the rgb color you want the light to be. Three comma separated integers that represent the color in RGB. You can find a great chart here: [Hue Color Chart](http://www.developers.meethue.com/documentation/hue-xy-values)
|
||||
@ -42,7 +42,7 @@ Turns one light on or multiple lights on using [groups]({{site_root}}/components
|
||||
| `color_name` | yes | A human readable string of a color name, such as `blue` or `goldenrod`. All [CSS3 color names](https://www.w3.org/TR/2010/PR-css3-color-20101028/#svg-color) are supported.
|
||||
| `brightness` | yes | Integer between 0 and 255 for how bright the color should be.
|
||||
| `brightness_pct`| yes | Alternatively, you can specify brightness in percent (a number between 0 and 100).
|
||||
| `flash` | yes | Tell light to flash, can be either value `short` or `long`. *not supported by Wink
|
||||
| `flash` | yes | Tell light to flash, can be either value `short` or `long`. *Not supported by all lights.
|
||||
| `effect`| yes | Applies an effect such as `colorloop` or `random`.
|
||||
|
||||
### {% linkable_title Service `light.turn_off` %}
|
||||
|
@ -23,4 +23,5 @@ light:
|
||||
Configuration variables:
|
||||
|
||||
- **host** (*Required*): IP address of the Osram Lightify bridge, eg. `192.168.1.50`.
|
||||
- **allow_lightify_groups** (*Optional*): (true/false) Edit this to stop homeassistant from importing the lightify groups.
|
||||
|
||||
|
@ -7,6 +7,7 @@ sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: home-assistant.png
|
||||
ha_category: Other
|
||||
ha_release: 0.44
|
||||
---
|
||||
|
@ -7,6 +7,7 @@ sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: home-assistant.png
|
||||
ha_category: Front end
|
||||
ha_release: 0.44
|
||||
---
|
||||
|
@ -7,6 +7,7 @@ sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
logo: home-assistant.png
|
||||
ha_category: Sensor
|
||||
ha_iot_class: "Cloud Polling"
|
||||
ha_release: "0.40"
|
||||
|
@ -42,10 +42,46 @@ Configuration variables:
|
||||
Device configuration variables:
|
||||
|
||||
- **name** (*Optional*): Name for the device, defaults to RFLink ID.
|
||||
- **sensor_type** (*Required*): Override automatically detected type of sensor.
|
||||
- **sensor_type** (*Required*): Override automatically detected type of sensor. For list of values see below.
|
||||
- **unit_of_measurement** (*Optional*): Override automatically detected unit of sensor.
|
||||
- **aliasses** (*Optional*): Alternative RFLink ID's this device is known by.
|
||||
|
||||
Sensor type values:
|
||||
|
||||
- average_windspeed
|
||||
- barometric_pressure
|
||||
- battery
|
||||
- weather_forecast
|
||||
- doorbell_melody
|
||||
- command
|
||||
- co2_air_quality
|
||||
- current_phase_1
|
||||
- current_phase_2
|
||||
- current_phase_3
|
||||
- distance
|
||||
- firmware
|
||||
- humidity_status
|
||||
- humidity
|
||||
- hardware
|
||||
- kilowatt
|
||||
- light_intensity
|
||||
- meter_value
|
||||
- total_rain
|
||||
- rain_rate
|
||||
- total_rain
|
||||
- revision
|
||||
- noise_level
|
||||
- temperature
|
||||
- uv_intensity
|
||||
- version
|
||||
- voltage
|
||||
- watt
|
||||
- windchill
|
||||
- winddirection
|
||||
- windgusts
|
||||
- windspeed
|
||||
- windtemp
|
||||
|
||||
### {% linkable_title Hiding/ignoring sensors %}
|
||||
|
||||
Sensors are added automatically when the RFLink gateway intercepts a wireless command in the ether. To prevent cluttering the frontend use any of these methods:
|
||||
|
@ -34,6 +34,7 @@ Configuration variables:
|
||||
- **community** (*Optional*): The SNMP community which is set for the device. Most devices have a default community set to to `public` with read-only permission (which is sufficient).
|
||||
- **baseoid** (*Required*): The OID where the information is located. It's advised to use the numerical notation.
|
||||
- **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any.
|
||||
- **version** (*Optional*) version of SNMP protocol, `1` or `2c` defaults to `1`. Version `2c` is needed to read data from 64-bit counters.
|
||||
|
||||
The OIDs may vary on different system because they are vendor-specific. Beside the device's manual is the [OID Repository](http://www.oid-info.com/) a good place to start if you are looking for OIDs. The following OIDs are for the load of a Linux systems.
|
||||
|
||||
|
@ -223,7 +223,7 @@ action:
|
||||
|
||||
An example to show the use of event_data in the action:
|
||||
|
||||
```
|
||||
```yaml
|
||||
- alias: 'Kitchen Telegram Speak'
|
||||
trigger:
|
||||
platform: event
|
||||
|
@ -35,5 +35,5 @@ Configuration variables:
|
||||
- **api_key** (*Required*): The API token of your bot.
|
||||
- **parse_mode** (*Optional*): Default parser for messages if not explicit in message data: 'html' or 'markdown'. Default is 'markdown'.
|
||||
|
||||
To get your `chat_id` and `api_key` follow the instructions [here](/components/notify.telegram/) .
|
||||
To get your `chat_id` and `api_key` follow the instructions [here](/components/notify.telegram/).
|
||||
|
||||
|
@ -247,7 +247,7 @@ $ sudo adduser hass sudo
|
||||
If you did not already log in as the user that currently runs Home Assistant, change to that user (usually `hass` or `homeassistant` - you may have used a command similar to this in the past):
|
||||
|
||||
```bash
|
||||
$ su -s /bin/bash hass
|
||||
$ sudo su -s /bin/bash hass
|
||||
```
|
||||
|
||||
Make sure you are in the home directory for the HA user:
|
||||
|
@ -21,5 +21,5 @@ $ sudo apt-get install python3-dev python3-pip
|
||||
Install Home Assistant.
|
||||
|
||||
```bash
|
||||
$ pip3 install homeassistant
|
||||
$ sudo pip3 install homeassistant
|
||||
```
|
||||
|
@ -14,7 +14,7 @@ footer: true
|
||||
Install the development package of Python.
|
||||
|
||||
```bash
|
||||
$ sudo dnf -y install python3-devel
|
||||
$ sudo dnf -y install python3-devel redhat-rpm-config
|
||||
```
|
||||
|
||||
and Home Assistant itself.
|
||||
@ -27,7 +27,6 @@ To isolate the Home Assistant installation a [venv](https://docs.python.org/3/li
|
||||
|
||||
```bash
|
||||
$ sudo mkdir -p /opt/homeassistant
|
||||
$ cd /opt/homeassistant
|
||||
```
|
||||
Now switch to the new directory, setup the venv, and activate it.
|
||||
|
||||
@ -40,7 +39,7 @@ $ source bin/activate
|
||||
Install Home Assistant itself.
|
||||
|
||||
```bash
|
||||
$ pip3 install homeassistant
|
||||
$ pip3 install homeassistant colorlog
|
||||
```
|
||||
|
||||
Check the [autostart](/docs/autostart/systemd/) section in the documentation for further details.
|
||||
Check the [autostart](/docs/autostart/systemd/) section in the documentation for further details and the [Firewall section](/docs/installation/troubleshooting/#no-access-to-the-frontend) if you want to access your Home Assistant installation.
|
||||
|
@ -8,6 +8,7 @@
|
||||
<li>{% active_link /hassio/installation/ Installation %}</li>
|
||||
<li>{% active_link /addons/ Available add-ons %}</li>
|
||||
<li>{% active_link /hassio/installing_third_party_addons/ Installing third-party add-ons %}</li>
|
||||
<li>{% active_link /hassio/external_storage/ External storage %}</li>
|
||||
<li>{% active_link /hassio/architecture/ Architecture %}</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -10,7 +10,7 @@ categories: How-To
|
||||
og_image: /images/blog/2017-02-babyphone/social.png
|
||||
---
|
||||
|
||||
One of the hardest part of being a parent is keeping a constant eye on the baby to make sure that baby is doing well. Thus, it is not surprising that baby monitors are one of the fastest growing baby product category. However, many of the baby monitors available on the market are rather dumb and expect the parents to keep looking at the video stream or listen to the audio. This how-to will help you create a smart baby monitor on a budget and integrate it with Home Assitant. Instead of relying on the poor quality baby monitor speakers, we use our existing speakers (eg. Sonos). We can also send notifications (with pictures) to avoid constant monitoring of the feed.
|
||||
One of the hardest part of being a parent is keeping a constant eye on the baby to make sure that the baby is doing well. Thus, it is not surprising that baby monitors are one of the fastest growing baby product category. However, many of the baby monitors available on the market are rather dumb and expect the parents to keep looking at the video stream or listen to the audio. This how-to will help you create a smart baby monitor on a budget and integrate it with Home Assitant. Instead of relying on the poor quality baby monitor speakers, we use our existing speakers (eg. Sonos). We can also send notifications (with pictures) to avoid constant monitoring of the feed.
|
||||
|
||||
Obviously, you can use the setup as a general purpose surveillance system to monitor noise in the whole house.
|
||||
|
||||
@ -18,9 +18,9 @@ Obviously, you can use the setup as a general purpose surveillance system to mon
|
||||
|
||||
### {% linkable_title Setup %}
|
||||
|
||||
We need an IP camera that can capture sound in the baby's room. It is also possible to use a Raspberry Pi with a microphone and send the audio to Home Assistant with `ffmpeg -f alsa -i hw:1,0 -vn -f rtp rtp://236.0.0.1:2000` over multicast. We can set the `input` option on the Home Assistant side to `rtp://236.0.0.1:2000` in same network.
|
||||
We need an IP camera that can capture sound in the baby's room. It is also possible to use a Raspberry Pi with a microphone and send the audio to Home Assistant with `ffmpeg -f alsa -i hw:1,0 -vn -f rtp rtp://236.0.0.1:2000` over multicast. We can set the `input` option on the Home Assistant side to `rtp://236.0.0.1:2000` in the same network.
|
||||
|
||||
Next, we attach a FFmpeg noise binary sensor to our IP camera. The sensor has an output `option` that allows us to send the output to an [icecast2](http://icecast.org/) server for playing over speakers integrated with Home Assistant (eg. Sonos). We can use the binary sensor in our automation. You can ignore the icecast2 setup if you don't want to play the audio after the noise sensor trigger.
|
||||
Next, we attach a `ffmpeg_noise` binary sensor to our IP camera. The sensor has an output `option` that allows us to send the output to an [icecast2](http://icecast.org/) server for playing over speakers integrated with Home Assistant. We can use the binary sensor in our automation. You can ignore the icecast2 setup if you don't want to play the audio after the noise sensor trigger.
|
||||
|
||||
<p class='note'>
|
||||
We change the platform name for binary sensor in 0.38 from `ffmpeg` to `ffmpeg_noise`. Also all service going to component and was rename from `binary_sensor.ffmpeg_xy` to `ffmpeg.xy`.
|
||||
@ -47,7 +47,7 @@ We setup a icecast mount point for our babyphone and update `/etc/icecast2/iceca
|
||||
</mount>
|
||||
```
|
||||
|
||||
Now we can add the noise sensor to Home Assistant. We can lower the sensitivity of the sensor (so that you are not inundated with notifications for every cough of the baby) to 2 seconds using the `duration` option. The sensor should wait 60 seconds before restoring and it prevent us that a wine break will triggering a new alarm.
|
||||
Now we can add the noise sensor to Home Assistant. We lower the sensitivity of the sensor (so that you are not inundated with notifications for every cough of the baby) to 2 seconds using the `duration` option. The sensor should wait 60 seconds before restoring and it prevent us that a wine break will triggering a new alarm.
|
||||
|
||||
We can optimize the audio stream for human voice by using a highpass filter with 300 Hz and a lowpass filter with 2500 Hz. This filters out all non-human sounds such as background noise. We can even add a volume amplifier if the microphone volume is too low (you can remove it from `extra_arguments`). For icecast2 we convert the audio stream to mp3 with samplerate of 16000 (which is the minimum for Sonos speakers). We use `peak` to set the threshold for noise detection, where 0 dB is very loud and -100 dB is low.
|
||||
|
||||
|
@ -36,9 +36,9 @@ Support for these components is provided by the Home Assistant community.
|
||||
<div class="filter-button-group">
|
||||
<a href='#all' class="btn">All ({{tot}})</a>
|
||||
<a href='#featured' class="btn featured">Featured</a>
|
||||
<a href='#added_in_current_version' class="btn added_in_current_version">Added in {{ current_version }} ({{ current_version_components_count }})</a>
|
||||
<a href='#added_one_version_ago' class="btn added_one_version_ago">Added in {{ added_one_ago_version }} ({{ one_ago_version_components_count }})</a>
|
||||
<a href='#added_two_versions_ago' class="btn added_two_versions_ago">Added in {{ added_two_ago_version }} ({{ two_ago_version_components_count }})</a>
|
||||
<a href='#version/{{ current_version }}' class="btn added_in_current_version">Added in {{ current_version }} ({{ current_version_components_count }})</a>
|
||||
<a href='#version/{{ added_one_ago_version }}' class="btn added_one_version_ago">Added in {{ added_one_ago_version }} ({{ one_ago_version_components_count }})</a>
|
||||
<a href='#version/{{ added_two_ago_version }}' class="btn added_two_versions_ago">Added in {{ added_two_ago_version }} ({{ two_ago_version_components_count }})</a>
|
||||
|
||||
{% for category in categories %}
|
||||
{% if category and category != 'Other' %}
|
||||
@ -87,16 +87,14 @@ Support for these components is provided by the Home Assistant community.
|
||||
{% endraw %}
|
||||
|
||||
<script type="text/javascript">
|
||||
var current_minor_version = {{site.current_minor_version}};
|
||||
var added_one_ago_minor_version = {{added_one_ago_minor_version}};
|
||||
var added_two_ago_minor_version = {{added_two_ago_minor_version}};
|
||||
// This object contains all components we have
|
||||
var allComponents = [
|
||||
{% for component in components %}
|
||||
{% if component.ha_category %}
|
||||
{% assign sliced_version = component.ha_release | split: '.' %}
|
||||
{% assign minor_version = sliced_version[1]|plus: 0 %}
|
||||
{url:"{{ component.url }}", title:"{{component.title}}", cat:"{{component.ha_category | slugify}}", featured: {% if component.featured %}true{% else %}false{% endif %}, v: {{minor_version}}, logo: "{{component.logo}}"},
|
||||
{% assign major_version = sliced_version[0]|plus: 0 %}
|
||||
{url:"{{ component.url }}", title:"{{component.title}}", cat:"{{component.ha_category | slugify}}", featured: {% if component.featured %}true{% else %}false{% endif %}, v: "{{major_version}}.{{minor_version}}", logo: "{{component.logo}}"},
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
false
|
||||
@ -114,24 +112,24 @@ allComponents.pop(); // remove placeholder element at the end
|
||||
allComponents[i].titleLC = allComponents[i].title.toLowerCase();
|
||||
allComponents[i].catLC = allComponents[i].cat.toLowerCase();
|
||||
}
|
||||
|
||||
|
||||
// sort the components alphabetically
|
||||
allComponents.sort(function(a, b){
|
||||
return a.titleLC.localeCompare(b.titleLC);
|
||||
});
|
||||
|
||||
|
||||
if (location.hash !== '' && location.hash.indexOf('#search/') === 0) {
|
||||
// set default value in search from URL
|
||||
jQuery('.component-search input').val(decodeURIComponent(location.hash).substring(8));
|
||||
}
|
||||
|
||||
|
||||
// add focus to the search field - even on IE
|
||||
setTimeout(function () {
|
||||
jQuery('.component-search input').focus();
|
||||
}, 1);
|
||||
}
|
||||
init();
|
||||
|
||||
|
||||
/**
|
||||
* filter all components, based on the location's hash and render them into the component box
|
||||
*/
|
||||
@ -171,26 +169,22 @@ allComponents.pop(); // remove placeholder element at the end
|
||||
|
||||
} else if(hash === '#featured' || hash === '') {
|
||||
// only show those with featured = true
|
||||
filter = function(comp) {
|
||||
filter = function(comp) {
|
||||
return comp.featured;
|
||||
};
|
||||
|
||||
} else if(hash === '#added_in_current_version' || hash === '#added_one_version_ago' || hash === '#added_two_versions_ago') {
|
||||
} else if(hash.indexOf('#version/') === 0) {
|
||||
// compare against a version
|
||||
search = current_minor_version;
|
||||
if (hash === '#added_one_version_ago') {
|
||||
search = added_one_ago_minor_version;
|
||||
} else if (hash === '#added_two_versions_ago') {
|
||||
search = added_two_ago_minor_version;
|
||||
}
|
||||
filter = function(comp) {
|
||||
search = decodeURIComponent(hash).substring(9).toLowerCase();
|
||||
filter = function(comp) {
|
||||
// compare version string against version js
|
||||
return comp.v === search;
|
||||
};
|
||||
|
||||
} else {
|
||||
// regular filter categories
|
||||
search = hash.substring(1);
|
||||
filter = function(comp) {
|
||||
filter = function(comp) {
|
||||
return comp.catLC === search;
|
||||
};
|
||||
}
|
||||
@ -210,7 +204,7 @@ allComponents.pop(); // remove placeholder element at the end
|
||||
}
|
||||
|
||||
/**
|
||||
* update the browser location hash. This enables users to use the browser-history
|
||||
* update the browser location hash. This enables users to use the browser-history
|
||||
*/
|
||||
function updateHash(newHash) {
|
||||
if ('replaceState' in history) {
|
||||
|
@ -263,7 +263,7 @@ footer: true
|
||||
s_a[163] = "Drenthe|Flevoland|Friesland|Gelderland|Groningen|Limburg|Noord-Brabant|Noord-Holland|Overijssel|Utrecht|Zeeland|Zuid-Holland";
|
||||
s_a[164] = "Netherlands Antilles";
|
||||
s_a[165] = "Iles Loyaute|Nord|Sud";
|
||||
s_a[166] = "Akaroa|Amuri|Ashburton|Bay of Islands|Bruce|Buller|Chatham Islands|Cheviot|Clifton|Clutha|Cook|Dannevirke|Egmont|Eketahuna|Ellesmere|Eltham|Eyre|Featherston|Franklin|Golden Bay|Great Barrier Island|Grey|Hauraki Plains|Hawera|Hawke's Bay|Heathcote|Hikurangi|Hobson|Hokianga|Horowhenua|Hurunui|Hutt|Inangahua|Inglewood|Kaikoura|Kairanga|Kiwitea|Lake|Mackenzie|Malvern|Manaia|Manawatu|Mangonui|Maniototo|Marlborough|Masterton|Matamata|Mount Herbert|Ohinemuri|Opotiki|Oroua|Otamatea|Otorohanga|Oxford|Pahiatua|Paparua|Patea|Piako|Pohangina|Raglan|Rangiora|Rangitikei|Rodney|Rotorua|Runanga|Saint Kilda|Silverpeaks|Southland|Stewart Island|Stratford|Strathallan|Taranaki|Taumarunui|Taupo|Tauranga|Thames-Coromandel|Tuapeka|Vincent|Waiapu|Waiheke|Waihemo|Waikato|Waikohu|Waimairi|Waimarino|Waimate|Waimate West|Waimea|Waipa|Waipawa|Waipukurau|Wairarapa South|Wairewa|Wairoa|Waitaki|Waitomo|Waitotara|Wallace|Wanganui|Waverley|Westland|Whakatane|Whangarei|Whangaroa|Woodville";
|
||||
s_a[166] = "Akaroa|Amuri|Ashburton|Bay of Islands|Bruce|Buller|Chatham Islands|Cheviot|Clifton|Clutha|Cook|Dannevirke|Egmont|Eketahuna|Ellesmere|Eltham|Eyre|Featherston|Franklin|Golden Bay|Great Barrier Island|Grey|Hauraki Plains|Hawera|Hawke's Bay|Heathcote|Hikurangi|Hobson|Hokianga|Horowhenua|Hurunui|Hutt|Inangahua|Inglewood|Kaikoura|Kairanga|Kiwitea|Lake|Mackenzie|Malvern|Manaia|Manawatu|Mangonui|Maniototo|Marlborough|Masterton|Matamata|Mount Herbert|Ohinemuri|Opotiki|Oroua|Otamatea|Otorohanga|Oxford|Pahiatua|Paparua|Patea|Piako|Pohangina|Raglan|Rangiora|Rangitikei|Rodney|Rotorua|Runanga|Saint Kilda|Silverpeaks|Southland|Stewart Island|Stratford|Strathallan|Taranaki|Taumarunui|Taupo|Tauranga|Thames-Coromandel|Tuapeka|Vincent|Waiapu|Waiheke|Waihemo|Waikato|Waikohu|Waimairi|Waimarino|Waimate|Waimate West|Waimea|Waipa|Waipawa|Waipukurau|Wairarapa South|Wairewa|Wairoa|Waitaki|Waitomo|Waitotara|Wallace|Wanganui|Waverley|Wellington|Westland|Whakatane|Whangarei|Whangaroa|Woodville";
|
||||
s_a[167] = "Atlantico Norte|Atlantico Sur|Boaco|Carazo|Chinandega|Chontales|Esteli|Granada|Jinotega|Leon|Madriz|Managua|Masaya|Matagalpa|Nueva Segovia|Rio San Juan|Rivas";
|
||||
s_a[168] = "Agadez|Diffa|Dosso|Maradi|Niamey|Tahoua|Tillaberi|Zinder";
|
||||
s_a[169] = "Abia|Abuja Federal Capital Territory|Adamawa|Akwa Ibom|Anambra|Bauchi|Bayelsa|Benue|Borno|Cross River|Delta|Ebonyi|Edo|Ekiti|Enugu|Gombe|Imo|Jigawa|Kaduna|Kano|Katsina|Kebbi|Kogi|Kwara|Lagos|Nassarawa|Niger|Ogun|Ondo|Osun|Oyo|Plateau|Rivers|Sokoto|Taraba|Yobe|Zamfara";
|
||||
|
@ -33,12 +33,11 @@ echo '{ "target": "beer" }' | jq -r ".target"
|
||||
|
||||
## {% linkable_title Add-on Docker file %}
|
||||
|
||||
All add-ons are based on Alpine Linux 3.5. Hass.io will automatically substitute the right base image based on the machine architecture. The Dockerfile is also required to have a VERSION environment variable which we will substitute with the version of the add-on.
|
||||
All add-ons are based on Alpine Linux 3.5. Hass.io will automatically substitute the right base image based on the machine architecture.
|
||||
|
||||
```
|
||||
FROM %%BASE_IMAGE%%
|
||||
|
||||
ENV VERSION %%VERSION%%
|
||||
ENV LANG C.UTF-8
|
||||
|
||||
# Install requirements for add-on
|
||||
@ -51,6 +50,11 @@ RUN chmod a+x /run.sh
|
||||
CMD [ "/run.sh" ]
|
||||
```
|
||||
|
||||
If you don't use local build on device or our build script, make sure that the Dockerfile have also a set of labels include:
|
||||
```
|
||||
LABEL io.hass.version="VERSION" io.hass.type="addon" io.hass.arch="armhf|aarch64|i386|amd64"
|
||||
```
|
||||
|
||||
## {% linkable_title Add-on config %}
|
||||
|
||||
The config for an add-on is stored in `config.json`.
|
||||
@ -68,7 +72,7 @@ The config for an add-on is stored in `config.json`.
|
||||
"ports": {
|
||||
"123/tcp": 123
|
||||
},
|
||||
"map": ["config", "ssl"],
|
||||
"map": ["config:rw", "ssl"],
|
||||
"options": {},
|
||||
"schema": {},
|
||||
"image": "repo/{arch}-my-custom-addon"
|
||||
@ -86,7 +90,9 @@ The config for an add-on is stored in `config.json`.
|
||||
| startup | yes | `before` homeassistant will start. `after` homeassistant will start or `once` for application they don't run as deamon.
|
||||
| boot | yes | `auto` by system and manual or only `manual`
|
||||
| ports | no | Network ports to expose from the container. Format is `"container-port/type": host-port`.
|
||||
| map | no | List of maps for additional hass.io folders. Possible values: `config`, `ssl`, `addons`, `backup`
|
||||
| devices | no | Device list to map into add-on. Format is: `<path_on_host>:<path_in_container>:<cgroup_permissions>`
|
||||
| map | no | List of maps for additional hass.io folders. Possible values: `config`, `ssl`, `addons`, `backup`, `share`, `mnt`. Default it map it `ro`, you can change that if you add a ":rw" at the end of name.
|
||||
| environment | no | A dict of environment variable to run add-on.
|
||||
| options | yes | Default options value of the add-on
|
||||
| schema | yes | Schema for options value of the add-on
|
||||
| image | no | For use dockerhub.
|
||||
|
@ -15,13 +15,14 @@ Right now add-ons will work with images that are stored on Docker Hub (using `im
|
||||
|
||||
## {% linkable_title Local run %}
|
||||
|
||||
You can build an try the addon on your developer machine also. Move all addon stuff into a temp folder. Replace in the Dockerfile: `%%VERSION%%` with your version and `%%BASE_IMAGE%%` with:
|
||||
You can build an try the addon on your developer machine also. Move all addon stuff into a temp folder. Replace in the Dockerfile `%%BASE_IMAGE%%` with:
|
||||
|
||||
- armhf: `resin/armhf-alpine:3.5`
|
||||
- aarch64: `resin/aarch64-alpine:3.5`
|
||||
- amd64: `resin/amd64-alpine:3.5`
|
||||
- i386: `resin/i386-alpine:3.5`
|
||||
|
||||
Add also a `LABEL io.hass.version="xy"` into your dockerfile.
|
||||
Use `docker` to build the test addon: `docker build -t local/my-test-addon .`
|
||||
|
||||
Create a new folder for data and add a test _options.json_ file. After that you can run your add-on with: `docker run --rm -v /tmp/my_test_data:/data -p PORT_STUFF_IF_NEEDED local/my-test-addon`
|
||||
|
@ -40,7 +40,6 @@ Once you have located your add-on directory, it's time to get started!
|
||||
```
|
||||
FROM %%BASE_IMAGE%%
|
||||
|
||||
ENV VERSION %%VERSION%%
|
||||
ENV LANG C.UTF-8
|
||||
|
||||
# Copy data for add-on
|
||||
|
23
source/hassio/external_storage.markdown
Normal file
23
source/hassio/external_storage.markdown
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
layout: page
|
||||
title: "External device"
|
||||
description: "How to map external device on Hass.io."
|
||||
date: 2017-04-30 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
|
||||
### {% linkable_title ResinOS / Generic %}
|
||||
|
||||
Map the usb drive into add-on with `devices` options. If you need it on multible add-ons you can use the `/share` folder which is accessable from multibe add-ons.
|
||||
It is also possible to create a add-on that only mount stuff to `share`.
|
||||
|
||||
You can format the usb device with multible volumes and map it to the specific add-on.
|
||||
|
||||
### {% linkable_title Generic %}
|
||||
|
||||
The `share` is default on `/usr/share/hassio/share` so you can mount your volumes into this folder.
|
||||
|
Loading…
x
Reference in New Issue
Block a user