Merge branch 'current' into next
This commit is contained in:
commit
d5e7847682
29 changed files with 335 additions and 51 deletions
|
@ -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/).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue