mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Merge branch 'current' into next
This commit is contained in:
commit
5cbc85d51c
@ -69,3 +69,12 @@ Configuration variables:
|
||||
- **zones** (*Optional*): Envisalink boards have no way to tell us which zones are actually in use, so each zone must be configured in Home Assistant. For each zone, at least a name must be given. For more information on the available zone types, take a look at the [Binary Sensor](/components/binary_sensor.envisalink/) docs. *Note: If no zones are specified, Home Assistant will not load any binary_sensor components.*
|
||||
- **partitions** (*Optional*): Again, Envisalink boards do not tell us what is in use and what is not, so each partition must be configured with a partition name. If no partition parameter is specified, then no alarm_panel or sensor components are loaded.
|
||||
|
||||
Supported services:
|
||||
|
||||
The following services are supported by Envisalink and can be used to script or automate the alarm.
|
||||
|
||||
- **alarm_disarm**: Disarms the alarm with the user code provided, or the code specified in the configuration.
|
||||
- **alarm_arm_home**: Arms the alarm in home mode.
|
||||
- **alarm_arm_away**: Arms the alarm in standard away mode.
|
||||
- **alarm_trigger**: Trigger an alarm on the Envisalink connected alarm system. For example, a newer zwave/zigbee sensor can now be integrated into a legacy alarm system using a Home Assistant automation.
|
||||
- **alarm_keypress**: Sends a string of up to 6 characters to the alarm. *DSC alarms only*
|
||||
|
@ -33,20 +33,28 @@ Create a symlink to the `cec` installation.
|
||||
$ ln -s /usr/local/lib/python3.4/dist-packages/cec /path/to/your/venv/lib/python3.4/site-packages
|
||||
```
|
||||
|
||||
For the default virtual environment of a [Raspberry Pi AIO](/getting-started/installation-raspberry-pi-all-in-one/) the command would be as follows.
|
||||
For the default virtual environment of a [Raspberry Pi All-In-One installation](/getting-started/installation-raspberry-pi-all-in-one/) the command would be as follows.
|
||||
|
||||
```bash
|
||||
$ ln -s /usr/local/lib/python3.4/dist-packages/cec /srv/hass/hass_venv/lib/python3.4/site-packages
|
||||
```
|
||||
|
||||
<p class='note'>If after symlinking and adding `hdmi_cec:` to your configuration you are getting the following error in your logs,
|
||||
`* failed to open vchiq instance` you will also need to add the user account Home Asssistant runs under, to the `video` group. To add the Home Assisitant's user account to the `video` group, run the following command. `$ usermod -a -G video <hass_user_account>`
|
||||
`* failed to open vchiq instance` you will also need to add the user account Home Asssistant runs under, to the `video` group. To add the Home Assistant user account to the `video` group, run the following command. `$ usermod -a -G video <hass_user_account>`
|
||||
</p>
|
||||
|
||||
## {% linkable_title Testing your installation %}
|
||||
|
||||
* Login to Raspberry Pi `ssh pi@your_raspberry_pi_ip`
|
||||
* at the command line type: `echo scan | cec-client -s -d 1`
|
||||
* Login to Raspberry Pi
|
||||
|
||||
```bash
|
||||
ssh pi@your_raspberry_pi_ip
|
||||
```
|
||||
* at the command line type:
|
||||
|
||||
```bash
|
||||
echo scan | cec-client -s -d 1
|
||||
```
|
||||
* This will give you the list of devices that are on the bus
|
||||
|
||||
```bash
|
||||
|
@ -110,3 +110,48 @@ automation:
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
|
||||
Exampleof `input_slider` being used in a bidirectional manner, both being set by and controlled by an MQTT action in an automation.
|
||||
|
||||
```yaml
|
||||
{% raw %}
|
||||
# Example configuration.yaml entry using 'input_slider' in an action in an automation
|
||||
|
||||
# Define input_slider
|
||||
input_slider:
|
||||
target_temp:
|
||||
name: Target Heater Temperature Slider
|
||||
min: 1
|
||||
max: 30
|
||||
step: 1
|
||||
unit_of_measurement: step
|
||||
icon: mdi:target
|
||||
|
||||
# Automation.
|
||||
# This automation script runs when a value is received via MQTT on retained topic: setTemperature
|
||||
# It sets the value slider on the GUI. This slides also had its own automation when the value is changed.
|
||||
- alias: Set temp slider
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "setTemperature"
|
||||
# entity_id: input_slider.target_temp
|
||||
action:
|
||||
service: input_slider.select_value
|
||||
data_template:
|
||||
entity_id: input_slider.target_temp
|
||||
value: '{{ trigger.payload}}'
|
||||
|
||||
# This automation script runs when the target temperature slider is moved.
|
||||
# It publishes its value to the same MQTT topic it is also subscribed to.
|
||||
- alias: Temp slider moved
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: input_slider.target_temp
|
||||
action:
|
||||
service: mqtt.publish
|
||||
data_template:
|
||||
topic: "setTemperature"
|
||||
retain: true
|
||||
payload: '{{ states.input_slider.target_temp.state | int }}'
|
||||
{% endraw %}
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ Configuration variables:
|
||||
|
||||
<p class='note'>
|
||||
Before trying to control your light through Home Assistant, you have to setup your bulb using Yeelight app. ( [Android](https://play.google.com/store/apps/details?id=com.yeelight.cherry&hl=fr), [IOS](https://itunes.apple.com/us/app/yeelight/id977125608?mt=8) ).
|
||||
In the bulb property, you have to enable "Developer Mode"
|
||||
In the bulb property, you have to enable "Developer Mode" Developer mode may only be available with the latest firmware installed on your bulb. Firmware can be updated in the application after connecting the bulb.
|
||||
Determine your bulb ip (using router, software, ping ...)
|
||||
</p>
|
||||
|
||||
|
@ -29,6 +29,6 @@ media_player:
|
||||
Configuration variables:
|
||||
|
||||
- **host** (*Required*): The host name or address of the device that is running Emby.
|
||||
- **api_key** (*Requred*): The api-key you would like home-assistant to use to authenticate.
|
||||
- **api_key** (*Required*): The api-key you would like home-assistant to use to authenticate.
|
||||
- **ssl** (*Optional*): True if you want to connect with https. Be sure to set the port also.
|
||||
- **port** (*Optional*): The port number. Defaults to 8096.
|
||||
|
@ -91,7 +91,7 @@ Configuration variables:
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
openalpr:
|
||||
engine: local
|
||||
engine: cloud
|
||||
region: eu
|
||||
api_key: SK_AAABBBBCCCEEEE
|
||||
entities:
|
||||
|
@ -44,7 +44,7 @@ There are several ways to get the temperature of your hard drive. A simple solut
|
||||
$ hddtemp -n /dev/sda
|
||||
```
|
||||
|
||||
To use those information, the entry for a command-line sensor in the `configuration.yaml` file will look like this.
|
||||
To use this information, the entry for a command-line sensor in the `configuration.yaml` file will look like this.
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
@ -68,10 +68,9 @@ Thanks to the [`proc`](https://en.wikipedia.org/wiki/Procfs) file system, variou
|
||||
value_template: '{% raw %}{{ value | multiply(0.001) }}{% endraw %}'
|
||||
```
|
||||
|
||||
### {% linkable_title Monitoring the failed login attempt on HA %}
|
||||
|
||||
If you want to get the fillowing in case you want to know if someone is hammering your server is open on the net
|
||||
### {% linkable_title Monitoring failed login attempts on Home Assistant %}
|
||||
|
||||
If you'd like to know how many failed login attempts are made to Home Assistant, add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
@ -81,7 +80,7 @@ sensor:
|
||||
command: grep -c 'Login attempt' /home/hass/.homeassistant/home-assistant.log
|
||||
```
|
||||
|
||||
Make sure to configure the logger to monitor the proper component at the proper level.
|
||||
Make sure to configure the [logger component](/components/logger) to monitor the [http component](https://home-assistant.io/components/http/) at least the `warning` level.
|
||||
|
||||
```yaml
|
||||
# Example working logger settings that works
|
||||
@ -115,7 +114,7 @@ sensor:
|
||||
|
||||
### {% linkable_title Use an external script %}
|
||||
|
||||
The example is doing the same as the [aREST sensor](/components/sensor.arest/) but with an external Python script. It should give you an idea about interacting with devices which are exposing a RESTful API.
|
||||
The example is doing the same as the [aREST sensor](/components/sensor.arest/) but with an external Python script. It should give you an idea about interfacing with devices which are exposing a RESTful API.
|
||||
|
||||
The one-line script to retrieve a value is shown below. Of course would it be possible to use this directly in the `configuration.yaml` file but need extra care about the quotation marks.
|
||||
|
||||
|
@ -16,10 +16,6 @@ ha_iot_class: depends
|
||||
|
||||
This `synologydms` sensor allows getting various statistics from your [Synology NAS](https://www.synology.com).
|
||||
|
||||
<p class='note warning'>
|
||||
This sensor will wake up your Synology NAS if it's in hibernation mode.
|
||||
</p>
|
||||
|
||||
To use the `synologydsm` sensor in your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
@ -34,7 +30,14 @@ sensor:
|
||||
- memory_real_usage
|
||||
- network_up
|
||||
```
|
||||
Note: After booting Home Assistant it can take up to 15 minutes for the sensors to show up. This is due to the fact that sensors are created after Home Assistant has fully been initialized.
|
||||
|
||||
<p class='note'>
|
||||
After booting Home Assistant it can take up to 15 minutes for the sensors to show up. This is due to the fact that sensors are created after Home Assistant has fully been initialized.
|
||||
</p>
|
||||
|
||||
<p class='note warning'>
|
||||
This sensor will wake up your Synology NAS if it's in hibernation mode.
|
||||
</p>
|
||||
|
||||
Configuration variables:
|
||||
|
||||
|
@ -38,6 +38,10 @@ Configuration variables:
|
||||
- **value_template** (*Optional*): If specified, `command_state` will ignore the result code of the command but the template evaluating to `true` will indicate the switch is on.
|
||||
- **friendly_name** (*Optional*): The name used to display the switch in the frontend.
|
||||
|
||||
A note on `friendly_name`:
|
||||
|
||||
When set, the `friendly_name` had been previously used for API calls and backend configuration instead of the `object_id` ("identifier"), but [this behavior is changing](https://github.com/home-assistant/home-assistant/pull/4343) to make the `friendly_name` for display purposes only. This allows users to set an `identifier` that emphasizes uniqueness and predictability for API and config purposes but have a prettier `friendly_name` still show up in the UI. As an additional benefit, if a user wanted to change the `friendly_name` / display name (e.g. from "Kitchen Lightswitch" to "Kitchen Switch" or "Living Room Light", or remove the `friendly_name` altogether), he or she could do so without needing to change existing automations or API calls. See aREST device below for an example.
|
||||
|
||||
## {% linkable_title Examples %}
|
||||
|
||||
In this section you find some real life examples of how to use this switch.
|
||||
@ -51,14 +55,16 @@ The example below is doing the same as the [aREST switch](/components/switch.are
|
||||
switch:
|
||||
platform: command_line
|
||||
switches:
|
||||
arest_pin4:
|
||||
arest_pin_four:
|
||||
command_on: "/usr/bin/curl -X GET http://192.168.1.10/digital/4/1"
|
||||
command_off: "/usr/bin/curl -X GET http://192.168.1.10/digital/4/0"
|
||||
command_state: "/usr/bin/curl -X GET http://192.168.1.10/digital/4"
|
||||
value_template: '{% raw %}{{ return_value == "1" }}{% endraw %}'
|
||||
friendly_name: aREST Pin 4
|
||||
friendly_name: Kitchen Lightswitch
|
||||
```
|
||||
|
||||
Given this example, in the UI one would see the `friendly_name` of "Kitchen Light". However, the `identifier` is `arest_pin_four`, making the `entity_id` `switch.arest_pin_four`, which is what one would use in [`automation`](https://home-assistant.io/components/automation/) or in [API calls](https://home-assistant.io/developers/).
|
||||
|
||||
### {% linkable_title Shutdown your local host %}
|
||||
|
||||
This switch will shutdown your system that is hosting Home Assistant.
|
||||
|
@ -44,7 +44,7 @@ Visit [http://localhost:8123/local/sse.html](http://localhost:8123/local/sse.htm
|
||||
|
||||
## {% linkable_title Examples %}
|
||||
|
||||
A simple way to consume server-sent events is to use a command-line http client like [httpie][https://httpie.org/]. Installation info is on the site (if you use Homebrew, it's `brew install httpie`). Once installed, run this snippet from your terminal:
|
||||
A simple way to consume server-sent events is to use a command-line http client like [httpie](https://httpie.org/). Installation info is on the site (if you use Homebrew, it's `brew install httpie`). Once installed, run this snippet from your terminal:
|
||||
|
||||
```bash
|
||||
$ http --stream http://localhost:8123/api/stream x-ha-access:YOUR_PASSWORD content-type:application/json
|
||||
@ -62,11 +62,7 @@ If you want to test the server-sent events without creating a website, the Pytho
|
||||
$ pip3 install sseclient
|
||||
```
|
||||
|
||||
<<<<<<< HEAD
|
||||
The simplest script to consume the SSE looks like the following snippet.
|
||||
=======
|
||||
The simplest script to consume the SSE in Python looks like this:
|
||||
>>>>>>> current
|
||||
A simple script to consume SSE in Python looks like this:
|
||||
|
||||
```python
|
||||
from sseclient import SSEClient
|
||||
@ -75,4 +71,3 @@ messages = SSEClient('http://localhost:8123/api/stream?api_password=YOUR_PASSWOR
|
||||
for msg in messages:
|
||||
print(msg)
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user