Bump remark-lint-no-shell-dollars from 2.0.0 to 2.0.1 (#13639)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
dependabot-preview[bot] 2020-06-01 15:33:05 +02:00 committed by GitHub
parent cfb15c667f
commit dcd633cf66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
53 changed files with 610 additions and 553 deletions

6
package-lock.json generated
View File

@ -2157,9 +2157,9 @@
} }
}, },
"remark-lint-no-shell-dollars": { "remark-lint-no-shell-dollars": {
"version": "2.0.0", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/remark-lint-no-shell-dollars/-/remark-lint-no-shell-dollars-2.0.0.tgz", "resolved": "https://registry.npmjs.org/remark-lint-no-shell-dollars/-/remark-lint-no-shell-dollars-2.0.1.tgz",
"integrity": "sha512-1uEM0kSGlV6UY7w3PdIeIf/USFFvVuU1352myQdaiw/Wof7+uVXznFFCPnhJDTVlPN4vrgwFnLb32UwXrjkrQw==", "integrity": "sha512-N+wOq3nmZ8WnCreWhi/rfIKQJPAz+pcbErQATcnQzH0znzldXlX8Ovlm54yDx/A+TmGMex/epkCwuiewIj9m4g==",
"dev": true, "dev": true,
"requires": { "requires": {
"unified-lint-rule": "^1.0.0", "unified-lint-rule": "^1.0.0",

View File

@ -8,7 +8,7 @@
"remark-frontmatter": "^2.0.0", "remark-frontmatter": "^2.0.0",
"remark-lint": "^7.0.0", "remark-lint": "^7.0.0",
"remark-lint-fenced-code-flag": "^2.0.0", "remark-lint-fenced-code-flag": "^2.0.0",
"remark-lint-no-shell-dollars": "^2.0.0", "remark-lint-no-shell-dollars": "^2.0.1",
"remark-stringify": "^8.0.0", "remark-stringify": "^8.0.0",
"textlint": "^11.6.3", "textlint": "^11.6.3",
"textlint-rule-common-misspellings": "^1.0.1", "textlint-rule-common-misspellings": "^1.0.1",

View File

@ -6,7 +6,7 @@ redirect_from: /topics/secrets/
The `configuration.yaml` file is a plain-text file, thus it is readable by anyone who has access to the file. The file contains passwords and API tokens which need to be redacted if you want to share your configuration. By using `!secret` you can remove any private information from your configuration files. This separation can also help you to keep easier track of your passwords and API keys, as they are all stored at one place and no longer spread across the `configuration.yaml` file or even multiple YAML files if you [split up your configuration](/docs/configuration/splitting_configuration/). The `configuration.yaml` file is a plain-text file, thus it is readable by anyone who has access to the file. The file contains passwords and API tokens which need to be redacted if you want to share your configuration. By using `!secret` you can remove any private information from your configuration files. This separation can also help you to keep easier track of your passwords and API keys, as they are all stored at one place and no longer spread across the `configuration.yaml` file or even multiple YAML files if you [split up your configuration](/docs/configuration/splitting_configuration/).
### Using `secrets.yaml` ## Using `secrets.yaml`
The workflow for moving private information to `secrets.yaml` is very similar to the [splitting of the configuration](/docs/configuration/splitting_configuration/). Create a `secrets.yaml` file in your Home Assistant [configuration directory](/docs/configuration/). The workflow for moving private information to `secrets.yaml` is very similar to the [splitting of the configuration](/docs/configuration/splitting_configuration/). Create a `secrets.yaml` file in your Home Assistant [configuration directory](/docs/configuration/).
@ -34,7 +34,7 @@ The `secrets.yaml` file contains the corresponding password assigned to the iden
http_password: YOUR_PASSWORD http_password: YOUR_PASSWORD
``` ```
### Debugging secrets ## Debugging secrets
When you start splitting your configuration into multiple files, you might end up with configuration in sub folders. Secrets will be resolved in this order: When you start splitting your configuration into multiple files, you might end up with configuration in sub folders. Secrets will be resolved in this order:
@ -49,17 +49,18 @@ To see where secrets are being loaded from, you can either add an option to your
```yaml ```yaml
logger: debug logger: debug
``` ```
This will not print the actual secret's value to the log. This will not print the actual secret's value to the log.
*Option 2*: To view where secrets are retrieved from and the contents of all `secrets.yaml` files used, you can use the [`check_config` script](/docs/tools/check_config/) from the command line: *Option 2*: To view where secrets are retrieved from and the contents of all `secrets.yaml` files used, you can use the [`check_config` script](/docs/tools/check_config/) from the command line:
```bash ```bash
$ hass --script check_config --secrets hass --script check_config --secrets
``` ```
This will print all your secrets. This will print all your secrets.
## Alternatives to `secrets.yaml` ## Alternatives to `secrets.yaml`
- [Using a keyring that is managed by your OS to store secrets](/docs/tools/keyring/) - [Using a keyring that is managed by your OS to store secrets](/docs/tools/keyring/)
- [Storing passwords securely in AWS](/docs/tools/credstash/) - [Storing passwords securely in AWS](/docs/tools/credstash/)

View File

@ -22,7 +22,7 @@ Connect to the Raspberry Pi over SSH. Default password is `raspberry`.
You will need to enable SSH access. The Raspberry Pi website has instructions [here](https://www.raspberrypi.org/documentation/remote-access/ssh/). You will need to enable SSH access. The Raspberry Pi website has instructions [here](https://www.raspberrypi.org/documentation/remote-access/ssh/).
```bash ```bash
$ ssh pi@ipaddress ssh pi@ipaddress
``` ```
Changing the default password is encouraged. Changing the default password is encouraged.
@ -67,6 +67,7 @@ cd /srv/homeassistant
python3 -m venv . python3 -m venv .
source bin/activate source bin/activate
``` ```
Once you have activated the virtual environment (notice the prompt change to `(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $`) you will need to run the following command to install a required Python package. Once you have activated the virtual environment (notice the prompt change to `(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $`) you will need to run the following command to install a required Python package.
```bash ```bash
@ -84,6 +85,7 @@ Start Home Assistant Core for the first time. This will complete the installatio
```bash ```bash
hass hass
``` ```
You can now reach your installation on your Raspberry Pi over the web interface on `http://ipaddress:8123`. You can now reach your installation on your Raspberry Pi over the web interface on `http://ipaddress:8123`.
<div class='note'> <div class='note'>
@ -92,7 +94,7 @@ When you run the `hass` command for the first time, it will download, install an
</div> </div>
### Updating ## Updating
To update to the latest version of Home Assistant Core follow these simple steps: To update to the latest version of Home Assistant Core follow these simple steps:
@ -104,7 +106,7 @@ pip3 install --upgrade homeassistant
Once the last command executes, restart the Home Assistant Core service to apply the latest updates. Please keep in mind that some updates may take longer to start up than others. If Home Assistant Core fails to start, make sure you check the **Breaking Changes** from the [Release Notes](https://github.com/home-assistant/home-assistant/releases). Once the last command executes, restart the Home Assistant Core service to apply the latest updates. Please keep in mind that some updates may take longer to start up than others. If Home Assistant Core fails to start, make sure you check the **Breaking Changes** from the [Release Notes](https://github.com/home-assistant/home-assistant/releases).
### Run a specific version ## Run a specific version
In the event that a Home Assistant Core version doesn't play well with your hardware setup, you can downgrade to a previous release. For example: In the event that a Home Assistant Core version doesn't play well with your hardware setup, you can downgrade to a previous release. For example:
@ -114,7 +116,7 @@ source /srv/homeassistant/bin/activate
pip3 install homeassistant==0.XX.X pip3 install homeassistant==0.XX.X
``` ```
### Run the beta version ## Run the beta version
If you would like to test next release before anyone else, you can install the beta version released every two weeks, for example: If you would like to test next release before anyone else, you can install the beta version released every two weeks, for example:
@ -124,7 +126,7 @@ source /srv/homeassistant/bin/activate
pip3 install --pre --upgrade homeassistant pip3 install --pre --upgrade homeassistant
``` ```
### Run the development version ## Run the development version
If you want to stay on the bleeding-edge Home Assistant Core development branch, you can upgrade to `dev`. If you want to stay on the bleeding-edge Home Assistant Core development branch, you can upgrade to `dev`.
@ -140,7 +142,7 @@ source /srv/homeassistant/bin/activate
pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev
``` ```
### Activating the virtual environment ## Activating the virtual environment
When instructions tell you to activate the virtual environment, the following commands will do this: When instructions tell you to activate the virtual environment, the following commands will do this:

View File

@ -41,7 +41,7 @@ Startup can take a considerable amount of time (i.e., minutes) depending on your
[BRUH automation](https://www.bruhautomation.io/) has created [a tutorial video](https://www.youtube.com/watch?v=tuG2rs1Cl2Y) explaining how to upgrade Home Assistant. [BRUH automation](https://www.bruhautomation.io/) has created [a tutorial video](https://www.youtube.com/watch?v=tuG2rs1Cl2Y) explaining how to upgrade Home Assistant.
#### Run a specific version ## Run a specific version
In the event that a Home Assistant version doesn't play well with your hardware setup, you can downgrade to a previous release: In the event that a Home Assistant version doesn't play well with your hardware setup, you can downgrade to a previous release:
@ -49,7 +49,7 @@ In the event that a Home Assistant version doesn't play well with your hardware
pip3 install homeassistant==0.XX.X pip3 install homeassistant==0.XX.X
``` ```
#### Run the beta version ## Run the beta version
If you would like to test the next release before anyone else, you can install the beta version released every two weeks: If you would like to test the next release before anyone else, you can install the beta version released every two weeks:
@ -57,7 +57,7 @@ If you would like to test the next release before anyone else, you can install t
pip3 install --pre --upgrade homeassistant pip3 install --pre --upgrade homeassistant
``` ```
#### Run the development version ## Run the development version
If you want to stay on the bleeding-edge Home Assistant development branch, you can upgrade to `dev`. If you want to stay on the bleeding-edge Home Assistant development branch, you can upgrade to `dev`.
@ -66,10 +66,10 @@ If you want to stay on the bleeding-edge Home Assistant development branch, you
</div> </div>
```bash ```bash
$ pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev
``` ```
### Update Home Assistant installation ## Update Home Assistant installation
Best practice for updating a Home Assistant installation: Best practice for updating a Home Assistant installation:

View File

@ -71,6 +71,7 @@ In the value of configuration variables ending with `_topic`, `~` will be replac
Configuration variable names in the discovery payload may be abbreviated to conserve memory when sending a discovery message from memory constrained devices. Configuration variable names in the discovery payload may be abbreviated to conserve memory when sending a discovery message from memory constrained devices.
Supported abbreviations: Supported abbreviations:
```txt ```txt
'act_t': 'action_topic', 'act_t': 'action_topic',
'act_tpl': 'action_template', 'act_tpl': 'action_template',
@ -254,6 +255,7 @@ Supported abbreviations:
``` ```
Supported abbreviations for device registry configuration: Supported abbreviations for device registry configuration:
```txt ```txt
'cns': 'connections', 'cns': 'connections',
'ids': 'identifiers', 'ids': 'identifiers',
@ -263,7 +265,7 @@ Supported abbreviations for device registry configuration:
'sw': 'sw_version', 'sw': 'sw_version',
``` ```
### Support by third-party tools ## Support by third-party tools
The following software has built-in support for MQTT discovery: The following software has built-in support for MQTT discovery:
@ -276,9 +278,9 @@ The following software has built-in support for MQTT discovery:
- [Zwave2Mqtt](https://github.com/OpenZWave/Zwave2Mqtt) (starting with 2.0.1) - [Zwave2Mqtt](https://github.com/OpenZWave/Zwave2Mqtt) (starting with 2.0.1)
- [IOTLink](https://iotlink.gitlab.io) (starting with 2.0.0) - [IOTLink](https://iotlink.gitlab.io) (starting with 2.0.0)
### Examples ## Examples
#### Motion detection (binary sensor) ### Motion detection (binary sensor)
A motion detection device which can be represented by a [binary sensor](/integrations/binary_sensor.mqtt/) for your garden would send its configuration as JSON payload to the Configuration topic. After the first message to `config`, then the MQTT messages sent to the state topic will update the state in Home Assistant. A motion detection device which can be represented by a [binary sensor](/integrations/binary_sensor.mqtt/) for your garden would send its configuration as JSON payload to the Configuration topic. After the first message to `config`, then the MQTT messages sent to the state topic will update the state in Home Assistant.
@ -289,21 +291,22 @@ A motion detection device which can be represented by a [binary sensor](/integra
To create a new sensor manually. For more details please refer to the [MQTT testing section](/docs/mqtt/testing/). To create a new sensor manually. For more details please refer to the [MQTT testing section](/docs/mqtt/testing/).
```bash ```bash
$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/config" -m '{"name": "garden", "device_class": "motion", "state_topic": "homeassistant/binary_sensor/garden/state"}' mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/config" -m '{"name": "garden", "device_class": "motion", "state_topic": "homeassistant/binary_sensor/garden/state"}'
``` ```
Update the state. Update the state.
```bash ```bash
$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/state" -m ON mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/state" -m ON
``` ```
Delete the sensor by sending an empty message. Delete the sensor by sending an empty message.
```bash ```bash
$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/config" -m '' mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/binary_sensor/garden/config" -m ''
``` ```
#### Sensors with multiple values ### Sensors with multiple values
Setting up a sensor with multiple measurement values requires multiple consecutive configuration topic submissions. Setting up a sensor with multiple measurement values requires multiple consecutive configuration topic submissions.
@ -313,7 +316,7 @@ Setting up a sensor with multiple measurement values requires multiple consecuti
- Configuration payload no2: `{"device_class": "humidity", "name": "Humidity", "state_topic": "homeassistant/sensor/sensorBedroom/state", "unit_of_measurement": "%", "value_template": "{% raw %}{{ value_json.humidity}}{% endraw %}" }` - Configuration payload no2: `{"device_class": "humidity", "name": "Humidity", "state_topic": "homeassistant/sensor/sensorBedroom/state", "unit_of_measurement": "%", "value_template": "{% raw %}{{ value_json.humidity}}{% endraw %}" }`
- Common state payload: `{ "temperature": 23.20, "humidity": 43.70 }` - Common state payload: `{ "temperature": 23.20, "humidity": 43.70 }`
#### Switches ### Switches
Setting up a switch is similar but requires a `command_topic` as mentioned in the [MQTT switch documentation](/integrations/switch.mqtt/). Setting up a switch is similar but requires a `command_topic` as mentioned in the [MQTT switch documentation](/integrations/switch.mqtt/).
@ -323,16 +326,17 @@ Setting up a switch is similar but requires a `command_topic` as mentioned in th
- Payload: `{"name": "garden", "command_topic": "homeassistant/switch/irrigation/set", "state_topic": "homeassistant/switch/irrigation/state"}` - Payload: `{"name": "garden", "command_topic": "homeassistant/switch/irrigation/set", "state_topic": "homeassistant/switch/irrigation/state"}`
```bash ```bash
$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/switch/irrigation/config" \ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/switch/irrigation/config" \
-m '{"name": "garden", "command_topic": "homeassistant/switch/irrigation/set", "state_topic": "homeassistant/switch/irrigation/state"}' -m '{"name": "garden", "command_topic": "homeassistant/switch/irrigation/set", "state_topic": "homeassistant/switch/irrigation/state"}'
``` ```
Set the state. Set the state.
```bash ```bash
$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/switch/irrigation/set" -m ON mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/switch/irrigation/set" -m ON
``` ```
#### Abbreviating topic names ### Abbreviating topic names
Setting up a switch using topic prefix and abbreviated configuration variable names to reduce payload length. Setting up a switch using topic prefix and abbreviated configuration variable names to reduce payload length.
@ -341,7 +345,7 @@ Setting up a switch using topic prefix and abbreviated configuration variable na
- State topic: `homeassistant/switch/irrigation/state` - State topic: `homeassistant/switch/irrigation/state`
- Configuration payload: `{"~": "homeassistant/switch/irrigation", "name": "garden", "cmd_t": "~/set", "stat_t": "~/state"}` - Configuration payload: `{"~": "homeassistant/switch/irrigation", "name": "garden", "cmd_t": "~/set", "stat_t": "~/state"}`
#### Lighting ### Lighting
Setting up a [light that takes JSON payloads](/integrations/light.mqtt/#json-schema), with abbreviated configuration variable names: Setting up a [light that takes JSON payloads](/integrations/light.mqtt/#json-schema), with abbreviated configuration variable names:
@ -363,7 +367,7 @@ Setting up a [light that takes JSON payloads](/integrations/light.mqtt/#json-sch
} }
``` ```
#### Climate control ### Climate control
Setting up a climate integration (heat only): Setting up a climate integration (heat only):

View File

@ -7,25 +7,28 @@ logo: mqtt.png
The `mosquitto` broker package ships commandline tools (often as `*-clients` package) to send and receive MQTT messages. As an alternative have a look at [hbmqtt_pub](http://hbmqtt.readthedocs.org/en/latest/references/hbmqtt_pub.html) and [hbmqtt_sub](http://hbmqtt.readthedocs.org/en/latest/references/hbmqtt_sub.html) which are provided by HBMQTT. For sending test messages to a broker running on localhost check the example below: The `mosquitto` broker package ships commandline tools (often as `*-clients` package) to send and receive MQTT messages. As an alternative have a look at [hbmqtt_pub](http://hbmqtt.readthedocs.org/en/latest/references/hbmqtt_pub.html) and [hbmqtt_sub](http://hbmqtt.readthedocs.org/en/latest/references/hbmqtt_sub.html) which are provided by HBMQTT. For sending test messages to a broker running on localhost check the example below:
```bash ```bash
$ mosquitto_pub -h 127.0.0.1 -t home-assistant/switch/1/on -m "Switch is ON" mosquitto_pub -h 127.0.0.1 -t home-assistant/switch/1/on -m "Switch is ON"
``` ```
If you are using the embedded MQTT broker, the command looks a little different because you need to add the MQTT protocol version and your [broker credentials](/docs/mqtt/broker#embedded-broker). If you are using the embedded MQTT broker, the command looks a little different because you need to add the MQTT protocol version and your [broker credentials](/docs/mqtt/broker#embedded-broker).
```bash ```bash
$ mosquitto_pub -V mqttv311 -u homeassistant -P <broker password> -t "hello" -m world mosquitto_pub -V mqttv311 -u homeassistant -P <broker password> -t "hello" -m world
``` ```
Another way to send MQTT messages by hand is to use the "Developer Tools" in the Frontend. Choose the "MQTT" tab. Enter something similar to the example below into the "Topic" field. Another way to send MQTT messages by hand is to use the "Developer Tools" in the Frontend. Choose the "MQTT" tab. Enter something similar to the example below into the "Topic" field.
```bash ```bash
home-assistant/switch/1/power home-assistant/switch/1/power
``` ```
and in the Payload field
```bash and in the Payload field
```bash
ON ON
``` ```
In the "Listen to a topic" field, type # to see everything, or "home-assistant/switch/#" to just follow the published topic. Press "Start Listening" and then press "Publish". The result should appear similar to the text below
In the "Listen to a topic" field, type # to see everything, or "home-assistant/switch/#" to just follow the published topic. Press "Start Listening" and then press "Publish". The result should appear similar to the text below
```bash ```bash
Message 23 received on home-assistant/switch/1/power/stat/POWER at 12:16 PM: Message 23 received on home-assistant/switch/1/power/stat/POWER at 12:16 PM:
@ -41,12 +44,11 @@ QoS: 0 - Retain: false
For reading all messages sent on the topic `home-assistant` to a broker running on localhost: For reading all messages sent on the topic `home-assistant` to a broker running on localhost:
```bash ```bash
$ mosquitto_sub -h 127.0.0.1 -v -t "home-assistant/#" mosquitto_sub -h 127.0.0.1 -v -t "home-assistant/#"
``` ```
For the embedded MQTT broker the command looks like: For the embedded MQTT broker the command looks like:
```bash ```bash
$ mosquitto_sub -v -V mqttv311 -u homeassistant -P <broker password> -t "#" mosquitto_sub -v -V mqttv311 -u homeassistant -P <broker password> -t "#"
``` ```

View File

@ -8,6 +8,5 @@ For testing the performance of Home Assistant the Benchmark script runs until yo
Firing and handling of a million events. Firing and handling of a million events.
```bash ```bash
$ hass --script benchmark async_million_events hass --script benchmark async_million_events
``` ```

View File

@ -6,7 +6,7 @@ description: "Script to perform a check of the current configuration"
Test any changes to your `configuration.yaml` file before launching Home Assistant. This script allows you to test changes without the need to restart Home Assistant. Test any changes to your `configuration.yaml` file before launching Home Assistant. This script allows you to test changes without the need to restart Home Assistant.
```bash ```bash
$ hass --script check_config hass --script check_config
``` ```
The script has further options like checking configuration files which are not located in the default directory or showing your secrets for debugging. The script has further options like checking configuration files which are not located in the default directory or showing your secrets for debugging.
@ -28,4 +28,3 @@ optional arguments:
-f, --files Show used configuration files -f, --files Show used configuration files
-s, --secrets Show secret information -s, --secrets Show secret information
``` ```

View File

@ -8,7 +8,7 @@ Using [Credstash](https://github.com/fugue/credstash) is an alternative way to `
Before using credstash, you need to set up AWS credentials either via the `aws` command line tool or using environment variables as explained in the [AWS CLI documentation](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) as well as creating a KMS key named `credstash` as explained in the [credstash Readme](https://github.com/fugue/credstash#setting-up-kms). After that is complete, you can use the provided script to add secrets to your Home Assistant secret store in credstash. Before using credstash, you need to set up AWS credentials either via the `aws` command line tool or using environment variables as explained in the [AWS CLI documentation](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) as well as creating a KMS key named `credstash` as explained in the [credstash Readme](https://github.com/fugue/credstash#setting-up-kms). After that is complete, you can use the provided script to add secrets to your Home Assistant secret store in credstash.
```bash ```bash
$ hass --script credstash --help hass --script credstash --help
``` ```
To store a password in credstash, replace your password or API key with `!secret` and an identifier in `configuration.yaml` file. To store a password in credstash, replace your password or API key with `!secret` and an identifier in `configuration.yaml` file.
@ -21,12 +21,11 @@ example:
Create an entry in your credstash store. Create an entry in your credstash store.
```bash ```bash
$ hass --script credstash put http_password 123 hass --script credstash put http_password 123
``` ```
List your secrets. List your secrets.
```bash ```bash
$ hass --script credstash list hass --script credstash list
``` ```

View File

@ -6,7 +6,7 @@ description: "Script to store secrets in a keyring"
Using [Keyring](https://github.com/jaraco/keyring) is an alternative way to `secrets.yaml`. The secrets can be managed from the command line via the `keyring` script. Using [Keyring](https://github.com/jaraco/keyring) is an alternative way to `secrets.yaml`. The secrets can be managed from the command line via the `keyring` script.
```bash ```bash
$ hass --script keyring --help hass --script keyring --help
``` ```
To store a password in keyring, replace your password or API key with `!secret` and an identifier in `configuration.yaml` file. To store a password in keyring, replace your password or API key with `!secret` and an identifier in `configuration.yaml` file.
@ -19,7 +19,7 @@ integration1:
Create an entry in your keyring. Create an entry in your keyring.
```bash ```bash
$ hass --script keyring set integration1_key hass --script keyring set integration1_key
``` ```
If you launch Home Assistant now, you will be prompted for the keyring password to unlock your keyring. If you launch Home Assistant now, you will be prompted for the keyring password to unlock your keyring.
@ -31,7 +31,5 @@ Please enter password for encrypted keyring:
``` ```
<div class='note warning'> <div class='note warning'>
If you are using the Python Keyring, automatic starting of Home Assistant Core will no longer work. If you are using the Python Keyring, automatic starting of Home Assistant Core will no longer work.
</div> </div>

View File

@ -41,19 +41,19 @@ Each individual value in the defined key can be anywhere from 0x00 to 0xFF. Defi
An easy script to generate a random key: An easy script to generate a random key:
```bash ```bash
$ cat /dev/urandom | tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g' -e 's/, $//' cat /dev/urandom | tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g' -e 's/, $//'
``` ```
On macOS, this script will generate a random key: On macOS, this script will generate a random key:
```bash ```bash
$ cat /dev/urandom | LC_CTYPE=C tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g' -e 's/, $//' cat /dev/urandom | LC_CTYPE=C tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g' -e 's/, $//'
``` ```
If the above command doesn't work then replace `LC_CTYPE=C` with `LC_ALL=C`: If the above command doesn't work then replace `LC_CTYPE=C` with `LC_ALL=C`:
```bash ```bash
$ cat /dev/urandom | LC_ALL=C tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g' -e 's/, $//' cat /dev/urandom | LC_ALL=C tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g' -e 's/, $//'
``` ```
<div class='note warning'> <div class='note warning'>
@ -80,7 +80,7 @@ To remove (exclude) a Z-Wave device from your system:
1. Go to the Z-Wave control panel in the Home Assistant frontend 1. Go to the Z-Wave control panel in the Home Assistant frontend
2. Click the **Remove Node** button in the *Z-Wave Network Management* card - this will place the controller in exclusion mode 2. Click the **Remove Node** button in the *Z-Wave Network Management* card - this will place the controller in exclusion mode
3. Activate your device to be excluded by following the instructions provided with the device 3. Activate your device to be excluded by following the instructions provided with the device
4. The device will now be removed, but that won't show until you restart Home Assistant 4. The device will now be removed, but that won't show until you restart Home Assistant
5. Run a *Heal Network* so all the other nodes learn about its removal 5. Run a *Heal Network* so all the other nodes learn about its removal
If your device isn't responding to this process, possibly because you've factory reset it or it has failed, you can remove it using **Remove Failed Node**. This only works for devices marked as `"is_failed": true`, but you can trick the system into thinking that this the case: If your device isn't responding to this process, possibly because you've factory reset it or it has failed, you can remove it using **Remove Failed Node**. This only works for devices marked as `"is_failed": true`, but you can trick the system into thinking that this the case:
@ -98,7 +98,7 @@ If your device isn't responding to this process, possibly because you've factory
5. Click **Set State** 5. Click **Set State**
6. Go to the Z-Wave control panel in the Home Assistant frontend 6. Go to the Z-Wave control panel in the Home Assistant frontend
7. Click the **Remove Failed Node** button in the *Z-Wave Node Management* card 7. Click the **Remove Failed Node** button in the *Z-Wave Node Management* card
8. The device will now be removed, but that won't show until you restart Home Assistant 8. The device will now be removed, but that won't show until you restart Home Assistant
## Troubleshooting ## Troubleshooting

View File

@ -32,13 +32,13 @@ Use the following example commands from a terminal session on your Pi where your
Turn off "Disco lights": Turn off "Disco lights":
```bash ```bash
$ echo -e -n "\x01\x08\x00\xF2\x51\x01\x00\x05\x01\x51" > /dev/serial/by-id/usb-0658_0200-if00 echo -e -n "\x01\x08\x00\xF2\x51\x01\x00\x05\x01\x51" > /dev/serial/by-id/usb-0658_0200-if00
``` ```
Turn on "Disco lights": Turn on "Disco lights":
```bash ```bash
$ echo -e -n "\x01\x08\x00\xF2\x51\x01\x01\x05\x01\x50" > /dev/serial/by-id/usb-0658_0200-if00 echo -e -n "\x01\x08\x00\xF2\x51\x01\x01\x05\x01\x50" > /dev/serial/by-id/usb-0658_0200-if00
``` ```
If the above two commands give errors about not having that device, you should try replacing the `/dev/serial/by-id/usb-0658_0200-if00` with `/dev/ttyACM0` or `/dev/ttyACM1` (depending on which tty your Aeotec stick is addressed to). If the above two commands give errors about not having that device, you should try replacing the `/dev/serial/by-id/usb-0658_0200-if00` with `/dev/ttyACM0` or `/dev/ttyACM1` (depending on which tty your Aeotec stick is addressed to).
@ -60,13 +60,13 @@ dtoverlay=pi3-disable-bt
Then disable the Bluetooth modem service: Then disable the Bluetooth modem service:
```bash ```bash
$ sudo systemctl disable hciuart sudo systemctl disable hciuart
``` ```
Once Bluetooth is off, enable the serial interface via the `raspi-config` tool. After reboot run: Once Bluetooth is off, enable the serial interface via the `raspi-config` tool. After reboot run:
```bash ```bash
$ sudo systemctl mask serial-getty@ttyAMA0.service sudo systemctl mask serial-getty@ttyAMA0.service
``` ```
so that your serial interface looks like: so that your serial interface looks like:
@ -77,7 +77,7 @@ crw-rw---- 1 root dialout 204, 64 Sep 2 14:38 /dev/ttyAMA0
at this point simply add your user (homeassistant) to the dialout group: at this point simply add your user (homeassistant) to the dialout group:
```bash ```bash
$ sudo usermod -a -G dialout homeassistant sudo usermod -a -G dialout homeassistant
``` ```
<div class='note'> <div class='note'>
@ -170,12 +170,12 @@ To provide Central Scene support you need to **stop your Z-Wave network** and mo
For Inovelli switches, you'll need to update (or possibly add) the `COMMAND_CLASS_CENTRAL_SCENE` for each node in your `zwcfg` file with the following: For Inovelli switches, you'll need to update (or possibly add) the `COMMAND_CLASS_CENTRAL_SCENE` for each node in your `zwcfg` file with the following:
```xml ```xml
<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="0"> <CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="0">
<Instance index="1" /> <Instance index="1" />
<Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="2" /> <Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="2" />
<Value type="int" genre="user" instance="1" index="1" label="Bottom Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3" /> <Value type="int" genre="user" instance="1" index="1" label="Bottom Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3" />
<Value type="int" genre="user" instance="1" index="2" label="Top Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3" /> <Value type="int" genre="user" instance="1" index="2" label="Top Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3" />
</CommandClass> </CommandClass>
``` ```
Once this is complete, you should see the follow `zwave.scene_activated` events: Once this is complete, you should see the follow `zwave.scene_activated` events:
@ -198,6 +198,7 @@ Many Zooz switches that have been sold do not have the latest firmwares. Contact
Once the firmware is updated, the the new configuration parameters will have to be added to the `zwcfg` file. Replace the existing `COMMAND_CLASS_CONFIGURATION` with the one of the following options (depending on your model of switch): Once the firmware is updated, the the new configuration parameters will have to be added to the `zwcfg` file. Replace the existing `COMMAND_CLASS_CONFIGURATION` with the one of the following options (depending on your model of switch):
Zen21v2 (On/Off Switch): Zen21v2 (On/Off Switch):
```xml ```xml
<CommandClass id="112" name="COMMAND_CLASS_CONFIGURATION" version="1"> <CommandClass id="112" name="COMMAND_CLASS_CONFIGURATION" version="1">
<Instance index="1" /> <Instance index="1" />
@ -278,6 +279,7 @@ Zen21v2 (On/Off Switch):
``` ```
Zen22v2 (Dimmer): Zen22v2 (Dimmer):
```xml ```xml
<CommandClass id="112" name="COMMAND_CLASS_CONFIGURATION" version="1"> <CommandClass id="112" name="COMMAND_CLASS_CONFIGURATION" version="1">
<Instance index="1" /> <Instance index="1" />
@ -399,6 +401,7 @@ Zen22v2 (Dimmer):
``` ```
Zen26 (On/Off Switch): Zen26 (On/Off Switch):
```xml ```xml
<CommandClass id="112" name="COMMAND_CLASS_CONFIGURATION" version="1"> <CommandClass id="112" name="COMMAND_CLASS_CONFIGURATION" version="1">
<Instance index="1" /> <Instance index="1" />
@ -474,6 +477,7 @@ Zen26 (On/Off Switch):
``` ```
Zen27 (Dimmer): Zen27 (Dimmer):
```xml ```xml
<CommandClass id="112" name="COMMAND_CLASS_CONFIGURATION" version="1"> <CommandClass id="112" name="COMMAND_CLASS_CONFIGURATION" version="1">
<Instance index="1" /> <Instance index="1" />
@ -588,155 +592,158 @@ Zen27 (Dimmer):
``` ```
Zen30 (Double Switch): Zen30 (Double Switch):
```xml ```xml
<CommandClass id="112"> <CommandClass id="112">
<Value type="list" genre="config" index="1" label="LED Indicator Mode for Dimmer" size="1" min="0" max="3" value="0"> <Value type="list" genre="config" index="1" label="LED Indicator Mode for Dimmer" size="1" min="0" max="3" value="0">
<Help>LED Indicator Mode for Dimmer. Normal has the dimmer (top) LED indication on when the switch is off, off when the switch is on. Default: Normal</Help> <Help>LED Indicator Mode for Dimmer. Normal has the dimmer (top) LED indication on when the switch is off, off when the switch is on. Default: Normal</Help>
<Item label="Normal" value="0"/> <Item label="Normal" value="0"/>
<Item label="Reverse" value="1"/> <Item label="Reverse" value="1"/>
<Item label="Always Off" value="2"/> <Item label="Always Off" value="2"/>
<Item label="Always On" value="3"/> <Item label="Always On" value="3"/>
</Value> </Value>
<Value type="list" genre="config" index="2" label="LED Indicator Mode for Relay" size="1" min="0" max="3" value="0"> <Value type="list" genre="config" index="2" label="LED Indicator Mode for Relay" size="1" min="0" max="3" value="0">
<Help>LED Indicator Mode for Relay. Normal has the relay (bottom) LED indication on when the switch is off, off when the switch is on. Default: Normal</Help> <Help>LED Indicator Mode for Relay. Normal has the relay (bottom) LED indication on when the switch is off, off when the switch is on. Default: Normal</Help>
<Item label="Normal" value="0"/> <Item label="Normal" value="0"/>
<Item label="Reverse" value="1"/> <Item label="Reverse" value="1"/>
<Item label="Always Off" value="2"/> <Item label="Always Off" value="2"/>
<Item label="Always On" value="3"/> <Item label="Always On" value="3"/>
</Value> </Value>
<Value type="list" genre="config" index="3" label="LED Indicator Color for Dimmer" size="1" min="0" max="3" value="0"> <Value type="list" genre="config" index="3" label="LED Indicator Color for Dimmer" size="1" min="0" max="3" value="0">
<Help>LED Indicater color for Dimmer. White, Blue, Green or Red. Default: White</Help> <Help>LED Indicater color for Dimmer. White, Blue, Green or Red. Default: White</Help>
<Item label="white" value="0"/> <Item label="white" value="0"/>
<Item label="blue" value="1"/> <Item label="blue" value="1"/>
<Item label="green" value="2"/> <Item label="green" value="2"/>
<Item label="red" value="3"/> <Item label="red" value="3"/>
</Value> </Value>
<Value type="list" genre="config" index="4" label="LED Indicator Color for Relay" size="1" min="0" max="3" value="0"> <Value type="list" genre="config" index="4" label="LED Indicator Color for Relay" size="1" min="0" max="3" value="0">
<Help>LED Indicater color for Relay. White, Blue, Green or Red. Default: White</Help> <Help>LED Indicater color for Relay. White, Blue, Green or Red. Default: White</Help>
<Item label="white" value="0"/> <Item label="white" value="0"/>
<Item label="blue" value="1"/> <Item label="blue" value="1"/>
<Item label="green" value="2"/> <Item label="green" value="2"/>
<Item label="red" value="3"/> <Item label="red" value="3"/>
</Value> </Value>
<Value type="list" genre="config" index="5" label="LED Indicator Brightness for Dimmer" size="1" min="0" max="2" value="1"> <Value type="list" genre="config" index="5" label="LED Indicator Brightness for Dimmer" size="1" min="0" max="2" value="1">
<Help>LED Indicater Brightness for Dimmer. Bright (100%), Medium (60%) or Low (30%). Default: Medium</Help> <Help>LED Indicater Brightness for Dimmer. Bright (100%), Medium (60%) or Low (30%). Default: Medium</Help>
<Item label="bright" value="0"/> <Item label="bright" value="0"/>
<Item label="medium" value="1"/> <Item label="medium" value="1"/>
<Item label="low" value="2"/> <Item label="low" value="2"/>
</Value> </Value>
<Value type="list" genre="config" index="6" label="LED Indicator Brightness for Relay" size="1" min="0" max="2" value="1"> <Value type="list" genre="config" index="6" label="LED Indicator Brightness for Relay" size="1" min="0" max="2" value="1">
<Help>LED Indicater Brightness for Relay. Bright (100%), Medium (60%) or Low (30%). Default: Medium</Help> <Help>LED Indicater Brightness for Relay. Bright (100%), Medium (60%) or Low (30%). Default: Medium</Help>
<Item label="bright" value="0"/> <Item label="bright" value="0"/>
<Item label="medium" value="1"/> <Item label="medium" value="1"/>
<Item label="low" value="2"/> <Item label="low" value="2"/>
</Value> </Value>
<Value type="list" genre="config" index="7" label="LED Indicator Mode for Scene Control" size="1" min="0" max="1" value="1"> <Value type="list" genre="config" index="7" label="LED Indicator Mode for Scene Control" size="1" min="0" max="1" value="1">
<Help>LED Indicator Mode for Scene Control. Enable/Disable LED indicators next to the dimmer lighting up when a scene is selected. Default: disabled</Help> <Help>LED Indicator Mode for Scene Control. Enable/Disable LED indicators next to the dimmer lighting up when a scene is selected. Default: disabled</Help>
<Item label="enabled" value="0"/> <Item label="enabled" value="0"/>
<Item label="disabled" value="1"/> <Item label="disabled" value="1"/>
</Value> </Value>
<Value type="int" genre="config" index="8" label="Auto Turn-Off Timer for Dimmer" size="4" min="0" max="65535" value="0" units="minutes"> <Value type="int" genre="config" index="8" label="Auto Turn-Off Timer for Dimmer" size="4" min="0" max="65535" value="0" units="minutes">
<Help>Auto Turn-Off Timer for Dimmer. Sets the time (in minutes) after which you want the dimmer to automatically turn off once it has been turned on. Range: 1-65535. Default: 0 (disabled)</Help> <Help>Auto Turn-Off Timer for Dimmer. Sets the time (in minutes) after which you want the dimmer to automatically turn off once it has been turned on. Range: 1-65535. Default: 0 (disabled)</Help>
</Value> </Value>
<Value type="int" genre="config" index="9" label="Auto Turn-On Timer for Dimmer" size="4" min="0" max="65535" value="0" units="minutes"> <Value type="int" genre="config" index="9" label="Auto Turn-On Timer for Dimmer" size="4" min="0" max="65535" value="0" units="minutes">
<Help>Auto Turn-On Timer for Dimmer. Sets the time (in minutes) after which you want the dimmer to automatically turn on once it has been turned off. Range: 1-65535. Default: 0 (disabled)</Help> <Help>Auto Turn-On Timer for Dimmer. Sets the time (in minutes) after which you want the dimmer to automatically turn on once it has been turned off. Range: 1-65535. Default: 0 (disabled)</Help>
</Value> </Value>
<Value type="int" genre="config" index="10" label="Auto Turn-Off Timer for Relay" size="4" min="0" max="65535" value="0" units="minutes"> <Value type="int" genre="config" index="10" label="Auto Turn-Off Timer for Relay" size="4" min="0" max="65535" value="0" units="minutes">
<Help>Auto Turn-Off Timer for Relay. Sets the time (in minutes) after which you want the relay to automatically turn off once it has been turned on. Range: 1-65535. Default: 0 (disabled)</Help> <Help>Auto Turn-Off Timer for Relay. Sets the time (in minutes) after which you want the relay to automatically turn off once it has been turned on. Range: 1-65535. Default: 0 (disabled)</Help>
</Value> </Value>
<Value type="int" genre="config" index="11" label="Auto Turn-On Timer for Relay" size="4" min="0" max="65535" value="0" units="minutes"> <Value type="int" genre="config" index="11" label="Auto Turn-On Timer for Relay" size="4" min="0" max="65535" value="0" units="minutes">
<Help>Auto Turn-On Timer for Relay. Sets the time (in minutes) after which you want the relay to automatically turn on once it has been turned off. Range: 1-65535. Default: 0 (disabled)</Help> <Help>Auto Turn-On Timer for Relay. Sets the time (in minutes) after which you want the relay to automatically turn on once it has been turned off. Range: 1-65535. Default: 0 (disabled)</Help>
</Value> </Value>
<Value type="list" genre="config" index="12" label="On Off Status After Power Failure" size="1" min="0" max="8" value="3"> <Value type="list" genre="config" index="12" label="On Off Status After Power Failure" size="1" min="0" max="8" value="3">
<Help>On Off Status After Power Failure. Default: Restore both to prior state</Help> <Help>On Off Status After Power Failure. Default: Restore both to prior state</Help>
<Item label="Both forced off" value="0"/> <Item label="Both forced off" value="0"/>
<Item label="Dimmer off/Relay on" value="1"/> <Item label="Dimmer off/Relay on" value="1"/>
<Item label="Dimmer on/Relay off" value="2"/> <Item label="Dimmer on/Relay off" value="2"/>
<Item label="Restore both to prior state" value="3"/> <Item label="Restore both to prior state" value="3"/>
<Item label="Restore Dimmer/Relay On" value="4"/> <Item label="Restore Dimmer/Relay On" value="4"/>
<Item label="Restore Dimme/Relay Off" value="5"/> <Item label="Restore Dimme/Relay Off" value="5"/>
<Item label="Dimmer On/Restore Relay" value="6"/> <Item label="Dimmer On/Restore Relay" value="6"/>
<Item label="Dimmer Off/Restore Relay" value="7"/> <Item label="Dimmer Off/Restore Relay" value="7"/>
<Item label="Both forced on" value="8"/> <Item label="Both forced on" value="8"/>
</Value> </Value>
<Value type="byte" genre="config" index="13" label="Ramp Rate Control for Dimmer" size="1" min="0" max="99" value="1" units="seconds"> <Value type="byte" genre="config" index="13" label="Ramp Rate Control for Dimmer" size="1" min="0" max="99" value="1" units="seconds">
<Help>Ramp Rate Control for Dimmer. Adjust the ramp rate for your dimmer (fade-in / fade-out effect for on / off operation). Values correspond to the number of seconds it take for the dimmer to reach full brightness or turn off when operated manually. Note that 0 is instant. Default: 1</Help> <Help>Ramp Rate Control for Dimmer. Adjust the ramp rate for your dimmer (fade-in / fade-out effect for on / off operation). Values correspond to the number of seconds it take for the dimmer to reach full brightness or turn off when operated manually. Note that 0 is instant. Default: 1</Help>
</Value> </Value>
<Value type="byte" genre="config" index="14" label="Minimum Brightness" size="1" min="1" max="99" value="1" units="%"> <Value type="byte" genre="config" index="14" label="Minimum Brightness" size="1" min="1" max="99" value="1" units="%">
<Help>Minimum Brightness. Set the minimum brightness level (in %) for your dimmer. You won't be able to dim the light below the set value. Default: 1</Help> <Help>Minimum Brightness. Set the minimum brightness level (in %) for your dimmer. You won't be able to dim the light below the set value. Default: 1</Help>
</Value> </Value>
<Value type="byte" genre="config" index="15" label="Maximum Brightness" size="1" min="1" max="99" value="99" units="%"> <Value type="byte" genre="config" index="15" label="Maximum Brightness" size="1" min="1" max="99" value="99" units="%">
<Help>Maximum Brightness. Set the maximum brightness level (in %) for your dimmer. You won't be able to add brightness to the light beyond the set value. Default: 99</Help> <Help>Maximum Brightness. Set the maximum brightness level (in %) for your dimmer. You won't be able to add brightness to the light beyond the set value. Default: 99</Help>
</Value> </Value>
<Value type="list" genre="config" index="17" label="Double Tap Function for Dimmer" size="1" min="0" max="1" value="0"> <Value type="list" genre="config" index="17" label="Double Tap Function for Dimmer" size="1" min="0" max="1" value="0">
<Help>Double Tap Function for Dimmer. When set to full, turns light on to 100%. If set to maximum level, turns light on to % set in Parameter 15. Default: full</Help> <Help>Double Tap Function for Dimmer. When set to full, turns light on to 100%. If set to maximum level, turns light on to % set in Parameter 15. Default: full</Help>
<Item label="full" value="0"/> <Item label="full" value="0"/>
<Item label="maximum level" value="1"/> <Item label="maximum level" value="1"/>
</Value> </Value>
<Value type="list" genre="config" index="18" label="Enable/Disable Double-tap for Dimmer" size="1" min="0" max="2" value="0"> <Value type="list" genre="config" index="18" label="Enable/Disable Double-tap for Dimmer" size="1" min="0" max="2" value="0">
<Help>Enable/Disable Double-tap for Dimmer. Enables/Disables the double-tap fucntion and assign brightness to single tap. enabled: single tap turns on to maximum brightness level. disabled (last level): single tap returns to last brightness level. disabled (full/max level): single tap returns to full brightmess. Default: enabled</Help> <Help>Enable/Disable Double-tap for Dimmer. Enables/Disables the double-tap fucntion and assign brightness to single tap. enabled: single tap turns on to maximum brightness level. disabled (last level): single tap returns to last brightness level. disabled (full/max level): single tap returns to full brightmess. Default: enabled</Help>
<Item label="enabled" value="0"/> <Item label="enabled" value="0"/>
<Item label="disabled (last level)" value="1"/> <Item label="disabled (last level)" value="1"/>
<Item label="disabled (full/max level)" value="2"/> <Item label="disabled (full/max level)" value="2"/>
</Value> </Value>
<Value type="list" genre="config" index="19" label="Enable/Disable Load Control for Dimmer" size="1" min="0" max="2" value="1"> <Value type="list" genre="config" index="19" label="Enable/Disable Load Control for Dimmer" size="1" min="0" max="2" value="1">
<Help>Enable/Disable Load Control for Dimmer (Smart Bulb Setting). Enable or disable direct manual and Z-Wave control of the connected light (works great for smart bulb control). If disabled, the dimmer will no longer control the connected bulb directly but will still send on/off and brightness reports to the hub so you cn use them to create automations for your smart bulbs or other switches. Scenes and other functionality will still be available through the paddles. Default: manual disabled</Help> <Help>Enable/Disable Load Control for Dimmer (Smart Bulb Setting). Enable or disable direct manual and Z-Wave control of the connected light (works great for smart bulb control). If disabled, the dimmer will no longer control the connected bulb directly but will still send on/off and brightness reports to the hub so you cn use them to create automations for your smart bulbs or other switches. Scenes and other functionality will still be available through the paddles. Default: manual disabled</Help>
<Item label="manual disabled" value="0"/> <Item label="manual disabled" value="0"/>
<Item label="manual enabled" value="1"/> <Item label="manual enabled" value="1"/>
<Item label="manual and z-wave disabled" value="2"/> <Item label="manual and z-wave disabled" value="2"/>
</Value> </Value>
<Value type="list" genre="config" index="20" label="Enable/Disable Load Control for Relay" size="1" min="0" max="2" value="1"> <Value type="list" genre="config" index="20" label="Enable/Disable Load Control for Relay" size="1" min="0" max="2" value="1">
<Help>Enable/Disable Load Control for Relay (Smart Bulb Setting). Enable or disable direct manual and Z-Wave control of the connected light (works great for smart bulb control). If disabled, the relay will no longer control the connected bulb directly but will still send on/off and brightness reports to the hub so you cn use them to create automations for your smart bulbs or other switches. Scenes and other functionality will still be available through the paddles. Default: manual disabled</Help> <Help>Enable/Disable Load Control for Relay (Smart Bulb Setting). Enable or disable direct manual and Z-Wave control of the connected light (works great for smart bulb control). If disabled, the relay will no longer control the connected bulb directly but will still send on/off and brightness reports to the hub so you cn use them to create automations for your smart bulbs or other switches. Scenes and other functionality will still be available through the paddles. Default: manual disabled</Help>
<Item label="manual disabled" value="0"/> <Item label="manual disabled" value="0"/>
<Item label="manual enabled" value="1"/> <Item label="manual enabled" value="1"/>
<Item label="manual and z-wave disabled" value="2"/> <Item label="manual and z-wave disabled" value="2"/>
</Value> </Value>
<Value type="byte" genre="config" index="21" label="Manual Dimming Speed" size="1" min="1" max="99" value="4" units="seconds"> <Value type="byte" genre="config" index="21" label="Manual Dimming Speed" size="1" min="1" max="99" value="4" units="seconds">
<Help>Choose how many seconds it takes for the dimmer to go from 0% to 100% brightness when pressing and holding the paddle. Default: 4.</Help> <Help>Choose how many seconds it takes for the dimmer to go from 0% to 100% brightness when pressing and holding the paddle. Default: 4.</Help>
</Value> </Value>
<Value type="byte" genre="config" index="23" label="Default Brightness Level On for Dimmer" size="1" min="0" max="99" value="0" units="%"> <Value type="byte" genre="config" index="23" label="Default Brightness Level On for Dimmer" size="1" min="0" max="99" value="0" units="%">
<Help>Default Brightness Level On for Dimmer. Set custom brightness level (in %) for the dimmer to come on to at single tap. Choose 0 for last brightness level. Default: 0.</Help> <Help>Default Brightness Level On for Dimmer. Set custom brightness level (in %) for the dimmer to come on to at single tap. Choose 0 for last brightness level. Default: 0.</Help>
</Value> </Value>
<Value type="list" genre="config" index="24" label="Behavior of the dimmer when physical control is disabled" size="1" min="0" max="1" value="0"> <Value type="list" genre="config" index="24" label="Behavior of the dimmer when physical control is disabled" size="1" min="0" max="1" value="0">
<Help>Sets behavior of the dimmer when physical control is disabled</Help> <Help>Sets behavior of the dimmer when physical control is disabled</Help>
<Item label="Reports on/off and multilevel values back to the hub when buttons are pressed, changes LED indicator to indicate status (default)" value="0"/> <Item label="Reports on/off and multilevel values back to the hub when buttons are pressed, changes LED indicator to indicate status (default)" value="0"/>
<Item label="Doesn't report on/off or multilevel status back to the hub and doesn't change LED indicator status when physical control for the dimmer is disabled" value="1"/> <Item label="Doesn't report on/off or multilevel status back to the hub and doesn't change LED indicator status when physical control for the dimmer is disabled" value="1"/>
</Value> </Value>
<Value type="list" genre="config" index="25" label="Behavior of the relay when physical control is disabled" size="1" min="0" max="1" value="0"> <Value type="list" genre="config" index="25" label="Behavior of the relay when physical control is disabled" size="1" min="0" max="1" value="0">
<Help>Sets behavior of the relay when physical control is disabled</Help> <Help>Sets behavior of the relay when physical control is disabled</Help>
<Item label="Reports on/off and multilevel values back to the hub when buttons are pressed, changes LED indicator to indicate status (default)" value="0"/> <Item label="Reports on/off and multilevel values back to the hub when buttons are pressed, changes LED indicator to indicate status (default)" value="0"/>
<Item label="Doesn't report on/off or multilevel status back to the hub and doesn't change LED indicator status when physical control for the dimmer is disabled" value="1"/> <Item label="Doesn't report on/off or multilevel status back to the hub and doesn't change LED indicator status when physical control for the dimmer is disabled" value="1"/>
</Value> </Value>
<Value type="byte" genre="config" index="26" label="Night Light Mode" units="" min="0" max="99" value="20"> <Value type="byte" genre="config" index="26" label="Night Light Mode" units="" min="0" max="99" value="20">
<Help>Set the brightness level the dimmer will turn on to when off and when lower paddle is held DOWN for a second. Default: 20</Help> <Help>Set the brightness level the dimmer will turn on to when off and when lower paddle is held DOWN for a second. Default: 20</Help>
</Value> </Value>
<Value type="list" genre="config" index="27" label="Paddle Control" size="1" min="0" max="2" value="0"> <Value type="list" genre="config" index="27" label="Paddle Control" size="1" min="0" max="2" value="0">
<Help>Normal mode: Upper paddle turns the light on, lower paddle turns the light off. Reverse mode: Upper paddle turns the light off, lower paddle turns the light on. Toggle mode: Either paddle toggles the light.</Help> <Help>Normal mode: Upper paddle turns the light on, lower paddle turns the light off. Reverse mode: Upper paddle turns the light off, lower paddle turns the light on. Toggle mode: Either paddle toggles the light.</Help>
<Item label="Normal" value="0"/> <Item label="Normal" value="0"/>
<Item label="Reverse" value="1"/> <Item label="Reverse" value="1"/>
<Item label="Toggle" value="2"/> <Item label="Toggle" value="2"/>
</Value> </Value>
</CommandClass> </CommandClass>
``` ```
For Zooz switches, you'll need to update (or possibly add) the `COMMAND_CLASS_CENTRAL_SCENE` for each node in your `zwcfg` file with the following: For Zooz switches, you'll need to update (or possibly add) the `COMMAND_CLASS_CENTRAL_SCENE` for each node in your `zwcfg` file with the following:
```xml ```xml
<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="0"> <CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="0">
<Instance index="1" /> <Instance index="1" />
<Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="2" /> <Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="2" />
<Value type="int" genre="user" instance="1" index="1" label="Bottom Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3" /> <Value type="int" genre="user" instance="1" index="1" label="Bottom Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3" />
<Value type="int" genre="user" instance="1" index="2" label="Top Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3" /> <Value type="int" genre="user" instance="1" index="2" label="Top Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3" />
</CommandClass> </CommandClass>
``` ```
For the Zooz Zen30 Double Switch, you'll need to add the `COMMAND_CLASS_CENTRAL_SCENE` for each node in your `zwcfg` file with the following: For the Zooz Zen30 Double Switch, you'll need to add the `COMMAND_CLASS_CENTRAL_SCENE` for each node in your `zwcfg` file with the following:
```xml ```xml
<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="0"> <CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="0">
<Instance index="1" /> <Instance index="1" />
<Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="2" /> <Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="2" />
<Value type="int" genre="user" instance="1" index="1" label="Bottom Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3" /> <Value type="int" genre="user" instance="1" index="1" label="Bottom Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3" />
<Value type="int" genre="user" instance="1" index="2" label="Top Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3" /> <Value type="int" genre="user" instance="1" index="2" label="Top Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3" />
<Value type="int" genre="user" instance="1" index="3" label="Relay Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3" /> <Value type="int" genre="user" instance="1" index="3" label="Relay Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3" />
</CommandClass> </CommandClass>
``` ```
@ -800,7 +807,6 @@ Hold Button|7740
4x Tap|7980 4x Tap|7980
5x Tap|8040 5x Tap|8040
### Fibaro Button FGPB-101-6 v3.2 ### Fibaro Button FGPB-101-6 v3.2
<!-- from https://hastebin.com/esodiweduq.cs --> <!-- from https://hastebin.com/esodiweduq.cs -->
@ -827,19 +833,18 @@ Tap and hold wakes up the Button.
### Fibaro Keyfob FGKF-601 ### Fibaro Keyfob FGKF-601
For the Fibaro Keyfob, you may need to update the `COMMAND_CLASS_CENTRAL_SCENE` for each node in your `zwcfg` file with the following: For the Fibaro Keyfob, you may need to update the `COMMAND_CLASS_CENTRAL_SCENE` for each node in your `zwcfg` file with the following:
```xml ```xml
<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="6"> <CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="6">
<Instance index="1" /> <Instance index="1" />
<Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="6" /> <Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="6" />
<Value type="int" genre="user" instance="1" index="1" label="Square" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="1" label="Square" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="2" label="Circle" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="2" label="Circle" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="3" label="X" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="3" label="X" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="4" label="Triangle" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="4" label="Triangle" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="5" label="Minus" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="5" label="Minus" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="6" label="Plus" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="6" label="Plus" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
</CommandClass> </CommandClass>
``` ```
@ -1099,6 +1104,7 @@ When a button turns off, the controller sends `basic_set` in a generic `node_eve
Here is an example configuration needed for the scene controller: Here is an example configuration needed for the scene controller:
{% raw %} {% raw %}
```yaml ```yaml
automation: automation:
- alias: Sync the indicator value on button events - alias: Sync the indicator value on button events
@ -1113,7 +1119,7 @@ automation:
entity_id: zwave.scene_contrl entity_id: zwave.scene_contrl
action: action:
- service: zwave.refresh_node_value - service: zwave.refresh_node_value
data_template: data_template:
node_id: 3 node_id: 3
value_id: "{{ state_attr('sensor.scene_contrl_indicator','value_id') }}" value_id: "{{ state_attr('sensor.scene_contrl_indicator','value_id') }}"
switch: switch:
@ -1204,9 +1210,9 @@ To get the Z-Push Button 2 or the Z-Push Button 8 working in Home Assistant, you
```xml ```xml
<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="0"> <Instance index="1" /> <CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="0"> <Instance index="1" />
<Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="1" label="Button 1" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="1" label="Button 1" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="2" label="Button 2" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="2" label="Button 2" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
</CommandClass> </CommandClass>
``` ```
@ -1214,15 +1220,15 @@ To get the Z-Push Button 2 or the Z-Push Button 8 working in Home Assistant, you
```xml ```xml
<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="0"> <Instance index="1" /> <CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" innif="true" scenecount="0"> <Instance index="1" />
<Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="1" label="Button 1" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="1" label="Button 1" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="2" label="Button 2" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="2" label="Button 2" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="3" label="Button 3" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="3" label="Button 3" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="4" label="Button 4" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="4" label="Button 4" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="5" label="Button 5" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="5" label="Button 5" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="6" label="Button 6" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="6" label="Button 6" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="7" label="Button 7" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="7" label="Button 7" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="user" instance="1" index="8" label="Button 8" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" /> <Value type="int" genre="user" instance="1" index="8" label="Button 8" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
</CommandClass> </CommandClass>
``` ```
@ -1300,114 +1306,114 @@ Once the firmware is updated, the the new configuration parameters will have to
```xml ```xml
<CommandClass id="112"> <CommandClass id="112">
<Value type="list" genre="config" index="1" label="On Off Status After Power Failure" size="1" min="0" max="4" value="1"> <Value type="list" genre="config" index="1" label="On Off Status After Power Failure" size="1" min="0" max="4" value="1">
<Help>On Off Status After Power Failure. Default: all relays restore to previous state</Help> <Help>On Off Status After Power Failure. Default: all relays restore to previous state</Help>
<Item label="all relays forced off" value="0"/> <Item label="all relays forced off" value="0"/>
<Item label="all relays restore to previous state" value="1"/> <Item label="all relays restore to previous state" value="1"/>
<Item label="all relays forced on" value="2"/> <Item label="all relays forced on" value="2"/>
<Item label="relays 1/2 restore, 3/4 forced off" value="3"/> <Item label="relays 1/2 restore, 3/4 forced off" value="3"/>
<Item label="relays 1/2 restore, 3/4 forced on" value="4"/> <Item label="relays 1/2 restore, 3/4 forced on" value="4"/>
</Value> </Value>
<Value type="list" genre="config" index="2" label="Switch Type for Relay 1 (Sw1)" size="1" min="0" max="3" value="2"> <Value type="list" genre="config" index="2" label="Switch Type for Relay 1 (Sw1)" size="1" min="0" max="3" value="2">
<Help>Switch Type for Relay 1 (Sw1). Choose the wall switch type you want to connect to the Sw1 terminal. Default: toggle switch (state changes whenever the switch is toggled)</Help> <Help>Switch Type for Relay 1 (Sw1). Choose the wall switch type you want to connect to the Sw1 terminal. Default: toggle switch (state changes whenever the switch is toggled)</Help>
<Item label="momentary switch" value="0"/> <Item label="momentary switch" value="0"/>
<Item label="toggle switch (light on when switch is up/off when down)" value="1"/> <Item label="toggle switch (light on when switch is up/off when down)" value="1"/>
<Item label="toggle switch (state changes whenever the switch is toggled)" value="2"/> <Item label="toggle switch (state changes whenever the switch is toggled)" value="2"/>
<Item label="garage door (momentary mode for Z-Wave control)" value="3"/> <Item label="garage door (momentary mode for Z-Wave control)" value="3"/>
</Value> </Value>
<Value type="list" genre="config" index="3" label="Switch Type for Relay 2 (Sw2)" size="1" min="0" max="3" value="2"> <Value type="list" genre="config" index="3" label="Switch Type for Relay 2 (Sw2)" size="1" min="0" max="3" value="2">
<Help>Switch Type for Relay 2 (Sw2). Choose the wall switch type you want to connect to the Sw2 terminal. Default: toggle switch (state changes whenever the switch is toggled)</Help> <Help>Switch Type for Relay 2 (Sw2). Choose the wall switch type you want to connect to the Sw2 terminal. Default: toggle switch (state changes whenever the switch is toggled)</Help>
<Item label="momentary switch" value="0"/> <Item label="momentary switch" value="0"/>
<Item label="toggle switch (light on when switch is up/off when down)" value="1"/> <Item label="toggle switch (light on when switch is up/off when down)" value="1"/>
<Item label="toggle switch (state changes whenever the switch is toggled)" value="2"/> <Item label="toggle switch (state changes whenever the switch is toggled)" value="2"/>
<Item label="garage door (momentary mode for Z-Wave control)" value="3"/> <Item label="garage door (momentary mode for Z-Wave control)" value="3"/>
</Value> </Value>
<Value type="list" genre="config" index="4" label="Switch Type for Relay 3 (Sw3)" size="1" min="0" max="3" value="2"> <Value type="list" genre="config" index="4" label="Switch Type for Relay 3 (Sw3)" size="1" min="0" max="3" value="2">
<Help>Switch Type for Relay 3 (Sw3). Choose the wall switch type you want to connect to the Sw3 terminal. Default: toggle switch (state changes whenever the switch is toggled)</Help> <Help>Switch Type for Relay 3 (Sw3). Choose the wall switch type you want to connect to the Sw3 terminal. Default: toggle switch (state changes whenever the switch is toggled)</Help>
<Item label="momentary switch" value="0"/> <Item label="momentary switch" value="0"/>
<Item label="toggle switch (light on when switch is up/off when down)" value="1"/> <Item label="toggle switch (light on when switch is up/off when down)" value="1"/>
<Item label="toggle switch (state changes whenever the switch is toggled)" value="2"/> <Item label="toggle switch (state changes whenever the switch is toggled)" value="2"/>
<Item label="garage door (momentary mode for Z-Wave control)" value="3"/> <Item label="garage door (momentary mode for Z-Wave control)" value="3"/>
</Value> </Value>
<Value type="list" genre="config" index="5" label="LED Indicator Control" size="1" min="0" max="3" value="0"> <Value type="list" genre="config" index="5" label="LED Indicator Control" size="1" min="0" max="3" value="0">
<Help>LED Indicator Control. Choose if you want the LED indicator to turn on when any of the relays are on or if all of them are off, or if you want it to remain on or off at all times. Default: On when all relays are off</Help> <Help>LED Indicator Control. Choose if you want the LED indicator to turn on when any of the relays are on or if all of them are off, or if you want it to remain on or off at all times. Default: On when all relays are off</Help>
<Item label="On when all relays are off" value="0"/> <Item label="On when all relays are off" value="0"/>
<Item label="On when any relays are on" value="1"/> <Item label="On when any relays are on" value="1"/>
<Item label="Always Off" value="2"/> <Item label="Always Off" value="2"/>
<Item label="Always On" value="3"/> <Item label="Always On" value="3"/>
</Value> </Value>
<Value type="int" genre="config" index="6" label="Auto Turn-Off Timer for Relay 1" size="4" min="0" max="65535" value="0" units="minutes"> <Value type="int" genre="config" index="6" label="Auto Turn-Off Timer for Relay 1" size="4" min="0" max="65535" value="0" units="minutes">
<Help>Auto Turn-Off Timer for Relay 1. Sets the time (in minutes) after which you want relay 1 to automatically turn off once it has been turned on. Range: 1-65535. Default: 0 (disabled)</Help> <Help>Auto Turn-Off Timer for Relay 1. Sets the time (in minutes) after which you want relay 1 to automatically turn off once it has been turned on. Range: 1-65535. Default: 0 (disabled)</Help>
</Value> </Value>
<Value type="int" genre="config" index="7" label="Auto Turn-On Timer for Relay 1" size="4" min="0" max="65535" value="0" units="minutes"> <Value type="int" genre="config" index="7" label="Auto Turn-On Timer for Relay 1" size="4" min="0" max="65535" value="0" units="minutes">
<Help>Auto Turn-On Timer for Relay 1. Sets the time (in minutes) after which you want relay 1 to automatically turn on once it has been turned off. Range: 1-65535. Default: 0 (disabled)</Help> <Help>Auto Turn-On Timer for Relay 1. Sets the time (in minutes) after which you want relay 1 to automatically turn on once it has been turned off. Range: 1-65535. Default: 0 (disabled)</Help>
</Value> </Value>
<Value type="int" genre="config" index="8" label="Auto Turn-Off Timer for Relay 2" size="4" min="0" max="65535" value="0" units="minutes"> <Value type="int" genre="config" index="8" label="Auto Turn-Off Timer for Relay 2" size="4" min="0" max="65535" value="0" units="minutes">
<Help>Auto Turn-Off Timer for Relay 2. Sets the time (in minutes) after which you want relay 2 to automatically turn off once it has been turned on. Range: 1-65535. Default: 0 (disabled)</Help> <Help>Auto Turn-Off Timer for Relay 2. Sets the time (in minutes) after which you want relay 2 to automatically turn off once it has been turned on. Range: 1-65535. Default: 0 (disabled)</Help>
</Value> </Value>
<Value type="int" genre="config" index="9" label="Auto Turn-On Timer for Relay 2" size="4" min="0" max="65535" value="0" units="minutes"> <Value type="int" genre="config" index="9" label="Auto Turn-On Timer for Relay 2" size="4" min="0" max="65535" value="0" units="minutes">
<Help>Auto Turn-On Timer for Relay 2. Sets the time (in minutes) after which you want relay 2 to automatically turn on once it has been turned off. Range: 1-65535. Default: 0 (disabled)</Help> <Help>Auto Turn-On Timer for Relay 2. Sets the time (in minutes) after which you want relay 2 to automatically turn on once it has been turned off. Range: 1-65535. Default: 0 (disabled)</Help>
</Value> </Value>
<Value type="int" genre="config" index="10" label="Auto Turn-Off Timer for Relay 3" size="4" min="0" max="65535" value="0" units="minutes"> <Value type="int" genre="config" index="10" label="Auto Turn-Off Timer for Relay 3" size="4" min="0" max="65535" value="0" units="minutes">
<Help>Auto Turn-Off Timer for Relay 3. Sets the time (in minutes) after which you want relay 3 to automatically turn off once it has been turned on. Range: 1-65535. Default: 0 (disabled)</Help> <Help>Auto Turn-Off Timer for Relay 3. Sets the time (in minutes) after which you want relay 3 to automatically turn off once it has been turned on. Range: 1-65535. Default: 0 (disabled)</Help>
</Value> </Value>
<Value type="int" genre="config" index="11" label="Auto Turn-On Timer for Relay 3" size="4" min="0" max="65535" value="0" units="minutes"> <Value type="int" genre="config" index="11" label="Auto Turn-On Timer for Relay 3" size="4" min="0" max="65535" value="0" units="minutes">
<Help>Auto Turn-On Timer for Relay 3. Sets the time (in minutes) after which you want relay 3 to automatically turn on once it has been turned off. Range: 1-65535. Default: 0 (disabled)</Help> <Help>Auto Turn-On Timer for Relay 3. Sets the time (in minutes) after which you want relay 3 to automatically turn on once it has been turned off. Range: 1-65535. Default: 0 (disabled)</Help>
</Value> </Value>
<Value type="list" genre="config" index="12" label="Enable/Disable Manual Control for SW1" size="1" min="0" max="2" value="1"> <Value type="list" genre="config" index="12" label="Enable/Disable Manual Control for SW1" size="1" min="0" max="2" value="1">
<Help>Enable/Disable Manual Control for SW1. Default: enabled</Help> <Help>Enable/Disable Manual Control for SW1. Default: enabled</Help>
<Item label="disabled" value="0"/> <Item label="disabled" value="0"/>
<Item label="enabled" value="1"/> <Item label="enabled" value="1"/>
<Item label="local control disabled with enable on/off reports" value="2"/> <Item label="local control disabled with enable on/off reports" value="2"/>
</Value> </Value>
<Value type="list" genre="config" index="13" label="Enable/Disable Manual Control for SW2" size="1" min="0" max="2" value="1"> <Value type="list" genre="config" index="13" label="Enable/Disable Manual Control for SW2" size="1" min="0" max="2" value="1">
<Help>Enable/Disable Manual Control for SW2. Default: enabled</Help> <Help>Enable/Disable Manual Control for SW2. Default: enabled</Help>
<Item label="disabled" value="0"/> <Item label="disabled" value="0"/>
<Item label="enabled" value="1"/> <Item label="enabled" value="1"/>
<Item label="local control disabled with enable on/off reports" value="2"/> <Item label="local control disabled with enable on/off reports" value="2"/>
</Value> </Value>
<Value type="list" genre="config" index="14" label="Enable/Disable Manual Control for SW3" size="1" min="0" max="2" value="1"> <Value type="list" genre="config" index="14" label="Enable/Disable Manual Control for SW3" size="1" min="0" max="2" value="1">
<Help>Enable/Disable Manual Control for SW3. Default: enabled</Help> <Help>Enable/Disable Manual Control for SW3. Default: enabled</Help>
<Item label="disabled" value="0"/> <Item label="disabled" value="0"/>
<Item label="enabled" value="1"/> <Item label="enabled" value="1"/>
<Item label="local control disabled with enable on/off reports" value="2"/> <Item label="local control disabled with enable on/off reports" value="2"/>
</Value> </Value>
<Value type="list" genre="config" index="15" label="Auto Turn-Off Timer Unit for Relay 1" size="1" min="0" max="2" value="0"> <Value type="list" genre="config" index="15" label="Auto Turn-Off Timer Unit for Relay 1" size="1" min="0" max="2" value="0">
<Help>Choose between second, minutes, and hours as the unit for Auto Turn-Off time for Relay 1. Default: minutes</Help> <Help>Choose between second, minutes, and hours as the unit for Auto Turn-Off time for Relay 1. Default: minutes</Help>
<Item label="minutes" value="0"/> <Item label="minutes" value="0"/>
<Item label="seconds" value="1"/> <Item label="seconds" value="1"/>
<Item label="hours" value="2"/> <Item label="hours" value="2"/>
</Value> </Value>
<Value type="list" genre="config" index="16" label="Auto Turn-On Timer Unit for Relay 1" size="1" min="0" max="2" value="0"> <Value type="list" genre="config" index="16" label="Auto Turn-On Timer Unit for Relay 1" size="1" min="0" max="2" value="0">
<Help>Choose between second, minutes, and hours as the unit for Auto Turn-On time for Relay 1. Default: minutes</Help> <Help>Choose between second, minutes, and hours as the unit for Auto Turn-On time for Relay 1. Default: minutes</Help>
<Item label="minutes" value="0"/> <Item label="minutes" value="0"/>
<Item label="seconds" value="1"/> <Item label="seconds" value="1"/>
<Item label="hours" value="2"/> <Item label="hours" value="2"/>
</Value> </Value>
<Value type="list" genre="config" index="17" label="Auto Turn-Off Timer Unit for Relay 2" size="1" min="0" max="2" value="0"> <Value type="list" genre="config" index="17" label="Auto Turn-Off Timer Unit for Relay 2" size="1" min="0" max="2" value="0">
<Help>Choose between second, minutes, and hours as the unit for Auto Turn-Off time for Relay 2. Default: minutes</Help> <Help>Choose between second, minutes, and hours as the unit for Auto Turn-Off time for Relay 2. Default: minutes</Help>
<Item label="minutes" value="0"/> <Item label="minutes" value="0"/>
<Item label="seconds" value="1"/> <Item label="seconds" value="1"/>
<Item label="hours" value="2"/> <Item label="hours" value="2"/>
</Value> </Value>
<Value type="list" genre="config" index="18" label="Auto Turn-On Timer Unit for Relay 2" size="1" min="0" max="2" value="0"> <Value type="list" genre="config" index="18" label="Auto Turn-On Timer Unit for Relay 2" size="1" min="0" max="2" value="0">
<Help>Choose between second, minutes, and hours as the unit for Auto Turn-On time for Relay 2. Default: minutes</Help> <Help>Choose between second, minutes, and hours as the unit for Auto Turn-On time for Relay 2. Default: minutes</Help>
<Item label="minutes" value="0"/> <Item label="minutes" value="0"/>
<Item label="seconds" value="1"/> <Item label="seconds" value="1"/>
<Item label="hours" value="2"/> <Item label="hours" value="2"/>
</Value> </Value>
<Value type="list" genre="config" index="19" label="Auto Turn-Off Timer Unit for Relay 3" size="1" min="0" max="2" value="0"> <Value type="list" genre="config" index="19" label="Auto Turn-Off Timer Unit for Relay 3" size="1" min="0" max="2" value="0">
<Help>Choose between second, minutes, and hours as the unit for Auto Turn-Off time for Relay 3. Default: minutes</Help> <Help>Choose between second, minutes, and hours as the unit for Auto Turn-Off time for Relay 3. Default: minutes</Help>
<Item label="minutes" value="0"/> <Item label="minutes" value="0"/>
<Item label="seconds" value="1"/> <Item label="seconds" value="1"/>
<Item label="hours" value="2"/> <Item label="hours" value="2"/>
</Value> </Value>
<Value type="list" genre="config" index="20" label="Auto Turn-On Timer Unit for Relay 3" size="1" min="0" max="2" value="0"> <Value type="list" genre="config" index="20" label="Auto Turn-On Timer Unit for Relay 3" size="1" min="0" max="2" value="0">
<Help>Choose between second, minutes, and hours as the unit for Auto Turn-On time for Relay 3. Default: minutes</Help> <Help>Choose between second, minutes, and hours as the unit for Auto Turn-On time for Relay 3. Default: minutes</Help>
<Item label="minutes" value="0"/> <Item label="minutes" value="0"/>
<Item label="seconds" value="1"/> <Item label="seconds" value="1"/>
<Item label="hours" value="2"/> <Item label="hours" value="2"/>
</Value> </Value>
</CommandClass> </CommandClass>
``` ```
@ -1426,7 +1432,7 @@ The configuration parameters will have to be added to the `zwcfg` file. Replace
<Help>Enable or disable motion reports completely. If motion sensor is disabled, the device will not report motion at all to your hub.</Help> <Help>Enable or disable motion reports completely. If motion sensor is disabled, the device will not report motion at all to your hub.</Help>
<Item label="Disabled" value="0"/> <Item label="Disabled" value="0"/>
<Item label="Enabled (default)" value="1"/> <Item label="Enabled (default)" value="1"/>
</Value> </Value>
<Value type="byte" genre="config" index="3" label="Motion Sensativity" size="1" min="1" max="10" value="10"> <Value type="byte" genre="config" index="3" label="Motion Sensativity" size="1" min="1" max="10" value="10">
<Help>Adjust motion sensitivity where 10 is the most sensative setting. <Help>Adjust motion sensitivity where 10 is the most sensative setting.
default: 10 default: 10
@ -1450,4 +1456,4 @@ The configuration parameters will have to be added to the `zwcfg` file. Replace
</Help> </Help>
</Value> </Value>
</CommandClass> </CommandClass>
``` ```

View File

@ -8,5 +8,5 @@ ha_category: Installation
[Pip](https://pip.pypa.io/en/stable/) should come bundled with the latest Python 3 but is omitted by some distributions. If you are unable to run `python3 -m pip --version` you can install `pip` by [downloading the installer](https://bootstrap.pypa.io/get-pip.py) and running it with Python 3: [Pip](https://pip.pypa.io/en/stable/) should come bundled with the latest Python 3 but is omitted by some distributions. If you are unable to run `python3 -m pip --version` you can install `pip` by [downloading the installer](https://bootstrap.pypa.io/get-pip.py) and running it with Python 3:
```bash ```bash
$ python3 get-pip.py python3 get-pip.py
``` ```

View File

@ -10,7 +10,7 @@ This utility should have been installed as part of the Python 3 installation. Ch
If you are able to successfully run `python3 --version` but not `pip3`, install Home Assistant by running the following command instead: If you are able to successfully run `python3 --version` but not `pip3`, install Home Assistant by running the following command instead:
```bash ```bash
$ python3 -m pip install homeassistant python3 -m pip install homeassistant
``` ```
On a Debian system, you can also install python3 by `sudo apt-get install python3` and pip3 by `sudo apt-get install python3-pip`. On a Debian system, you can also install python3 by `sudo apt-get install python3` and pip3 by `sudo apt-get install python3-pip`.
@ -18,5 +18,5 @@ On a Debian system, you can also install python3 by `sudo apt-get install python
If you run into errors during installation, check that you've installed all the necessary prerequisite packages, which include `python3-dev`, `libffi-dev`, and `libssl-dev`. On a Debian-based system, you can install these via `apt-get`: If you run into errors during installation, check that you've installed all the necessary prerequisite packages, which include `python3-dev`, `libffi-dev`, and `libssl-dev`. On a Debian-based system, you can install these via `apt-get`:
```bash ```bash
$ sudo apt-get install python3-dev libffi-dev libssl-dev sudo apt-get install python3-dev libffi-dev libssl-dev
``` ```

View File

@ -46,7 +46,7 @@ port:
The exact number can be determined with the command shown below. The exact number can be determined with the command shown below.
```bash ```bash
$ ls /dev/ttyACM* ls /dev/ttyACM*
``` ```
If that's not working, check your `dmesg` or `journalctl -f` output. Keep in mind that Arduino clones are often using a different name for the port (e.g., `/dev/ttyUSB*`). If that's not working, check your `dmesg` or `journalctl -f` output. Keep in mind that Arduino clones are often using a different name for the port (e.g., `/dev/ttyUSB*`).
@ -58,7 +58,7 @@ A word of caution: The Arduino boards are not storing states. This means that wi
Add the user who is used to run Home Assistant to the groups to allow access to the serial port. Add the user who is used to run Home Assistant to the groups to allow access to the serial port.
```bash ```bash
$ sudo usermod -a -G dialout,lock $USER sudo usermod -a -G dialout,lock $USER
``` ```
## Sensor ## Sensor

View File

@ -86,7 +86,7 @@ Enable I2c interface with the Raspberry Pi configuration utility:
```bash ```bash
# pi user environment: Enable i2c interface # pi user environment: Enable i2c interface
$ sudo raspi-config sudo raspi-config
``` ```
Select `Interfacing options->I2C` choose `<Yes>` and hit `Enter`, then go to `Finish` and you'll be prompted to reboot. Select `Interfacing options->I2C` choose `<Yes>` and hit `Enter`, then go to `Finish` and you'll be prompted to reboot.
@ -95,13 +95,13 @@ Install dependencies for use the `smbus-cffi` module and enable your `homeassist
```bash ```bash
# pi user environment: Install i2c dependencies and utilities # pi user environment: Install i2c dependencies and utilities
$ sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev
# pi user environment: Add homeassistant user to the i2c group # pi user environment: Add homeassistant user to the i2c group
$ sudo addgroup homeassistant i2c sudo addgroup homeassistant i2c
# pi user environment: Reboot Raspberry Pi to apply changes # pi user environment: Reboot Raspberry Pi to apply changes
$ sudo reboot sudo reboot
``` ```
### Check the i2c address of the sensor ### Check the i2c address of the sensor
@ -109,7 +109,7 @@ $ sudo reboot
After installing `i2c-tools`, a new utility is available to scan the addresses of the connected sensors: After installing `i2c-tools`, a new utility is available to scan the addresses of the connected sensors:
```bash ```bash
$ /usr/sbin/i2cdetect -y 1 /usr/sbin/i2cdetect -y 1
``` ```
It will output a table like this: It will output a table like this:

View File

@ -149,12 +149,13 @@ To test, you can use the command line tool `mosquitto_pub` shipped with `mosquit
To set the state of the binary sensor manually: To set the state of the binary sensor manually:
```bash ```bash
$ mosquitto_pub -h 127.0.0.1 -t home-assistant/window/contact -m "OFF" mosquitto_pub -h 127.0.0.1 -t home-assistant/window/contact -m "OFF"
``` ```
The example below shows a full configuration for a binary sensor: The example below shows a full configuration for a binary sensor:
{% raw %} {% raw %}
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
binary_sensor: binary_sensor:
@ -170,10 +171,13 @@ binary_sensor:
device_class: opening device_class: opening
value_template: '{{ value.x }}' value_template: '{{ value.x }}'
``` ```
{% endraw %} {% endraw %}
### Toggle the binary sensor each time a message is received on state_topic ### Toggle the binary sensor each time a message is received on state_topic
{% raw %} {% raw %}
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
binary_sensor: binary_sensor:
@ -181,6 +185,7 @@ binary_sensor:
state_topic: "lab_button/cmnd/POWER" state_topic: "lab_button/cmnd/POWER"
value_template: "{%if is_state(entity_id,\"on\")-%}OFF{%-else-%}ON{%-endif%}" value_template: "{%if is_state(entity_id,\"on\")-%}OFF{%-else-%}ON{%-endif%}"
``` ```
{% endraw %} {% endraw %}
### Get the state of a device with ESPEasy ### Get the state of a device with ESPEasy

View File

@ -15,7 +15,7 @@ The `blinkstick` platform lets you control your [Blinkstick](https://www.blinkst
To use your Blinkstick, you need to allow the access to the device for [non-root users](https://github.com/arvydas/blinkstick-python#permission-problems-in-linux-and-mac-os-x). To use your Blinkstick, you need to allow the access to the device for [non-root users](https://github.com/arvydas/blinkstick-python#permission-problems-in-linux-and-mac-os-x).
```bash ```bash
$ sudo blinkstick --add-udev-rule sudo blinkstick --add-udev-rule
``` ```
## Configuration ## Configuration

View File

@ -144,7 +144,7 @@ Enable I2c interface with the Raspberry Pi configuration utility:
```bash ```bash
# pi user environment: Enable i2c interface # pi user environment: Enable i2c interface
$ sudo raspi-config sudo raspi-config
``` ```
Select `Interfacing options->I2C` choose `<Yes>` and hit `Enter`, then go to `Finish` and you'll be prompted to reboot. Select `Interfacing options->I2C` choose `<Yes>` and hit `Enter`, then go to `Finish` and you'll be prompted to reboot.
@ -153,13 +153,13 @@ Install dependencies for use the `smbus-cffi` module and enable your `homeassist
```bash ```bash
# pi user environment: Install i2c dependencies and utilities # pi user environment: Install i2c dependencies and utilities
$ sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev
# pi user environment: Add homeassistant user to the i2c group # pi user environment: Add homeassistant user to the i2c group
$ sudo addgroup homeassistant i2c sudo addgroup homeassistant i2c
# pi user environment: Reboot Raspberry Pi to apply changes # pi user environment: Reboot Raspberry Pi to apply changes
$ sudo reboot sudo reboot
``` ```
### Check the i2c address of the sensor ### Check the i2c address of the sensor
@ -167,10 +167,11 @@ $ sudo reboot
After installing `i2c-tools`, a new utility is available to scan the addresses of the connected sensors: After installing `i2c-tools`, a new utility is available to scan the addresses of the connected sensors:
```bash ```bash
$ /usr/sbin/i2cdetect -y 1 /usr/sbin/i2cdetect -y 1
``` ```
It will output a table like this: It will output a table like this:
```text ```text
0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- 00: -- -- -- -- -- -- -- -- -- -- -- -- --

View File

@ -10,17 +10,17 @@ ha_domain: caldav
The `caldav` platform allows you to connect to your WebDAV calendar and generate binary sensors. A different sensor will be created for each individual calendar, or you can specify custom calendars which match a criteria you define (more on that below). These sensors will be `on` if you have an on going event in that calendar or `off` if the event is later in time, or if there is no event at all. The WebDAV calendar get updated roughly every 15 minutes. The `caldav` platform allows you to connect to your WebDAV calendar and generate binary sensors. A different sensor will be created for each individual calendar, or you can specify custom calendars which match a criteria you define (more on that below). These sensors will be `on` if you have an on going event in that calendar or `off` if the event is later in time, or if there is no event at all. The WebDAV calendar get updated roughly every 15 minutes.
### Prerequisites ## Prerequisites
You need to have a CalDAV server and credentials for it. This integration was tested against [Baikal](http://sabre.io/baikal/) but any integration complying with the RFC4791 should work. [Nextcloud](https://nextcloud.com/) and [Owncloud](https://owncloud.org/) work fine. You need to have a CalDAV server and credentials for it. This integration was tested against [Baikal](http://sabre.io/baikal/) but any integration complying with the RFC4791 should work. [Nextcloud](https://nextcloud.com/) and [Owncloud](https://owncloud.org/) work fine.
You might need some additional system packages to compile the Python CalDAV library. On a Debian based system, install them by: You might need some additional system packages to compile the Python CalDAV library. On a Debian based system, install them by:
```bash ```bash
$ sudo apt-get install libxml2-dev libxslt1-dev zlib1g-dev sudo apt-get install libxml2-dev libxslt1-dev zlib1g-dev
``` ```
### Basic Setup ## Basic Setup
To integrate a WebDAV calendar in Home Assistant, add the following section to your `configuration.yaml` file: To integrate a WebDAV calendar in Home Assistant, add the following section to your `configuration.yaml` file:
@ -44,7 +44,7 @@ calendar:
This example will generate default binary sensors for each calendar you have in your account. Those calendars will be `on` when there is an ongoing event and `off` if not. Events that last a whole day are ignored in those calendars. You have to setup custom calendars in order to take them into account or for advanced event filtering. This example will generate default binary sensors for each calendar you have in your account. Those calendars will be `on` when there is an ongoing event and `off` if not. Events that last a whole day are ignored in those calendars. You have to setup custom calendars in order to take them into account or for advanced event filtering.
### Custom calendars ## Custom calendars
You have the possibility to create multiple binary sensors for events that match certain conditions. You have the possibility to create multiple binary sensors for events that match certain conditions.
@ -104,17 +104,17 @@ custom_calendars:
type: string type: string
{% endconfiguration %} {% endconfiguration %}
### Sensor attributes ## Sensor attributes
- **offset_reached**: If set in the event title and parsed out will be on/off once the offset in the title in minutes is reached. So the title Very important meeting !!-10 would trigger this attribute to be on 10 minutes before the event starts. This should be in the format of `HH:MM` or `MM`. - **offset_reached**: If set in the event title and parsed out will be on/off once the offset in the title in minutes is reached. So the title Very important meeting !!-10 would trigger this attribute to be on 10 minutes before the event starts. This should be in the format of `HH:MM` or `MM`.
- **all_day**: `True/False` if this is an all day event. Will be `False` if there is no event found. - **all_day**: `True/False` if this is an all day event. Will be `False` if there is no event found.
- **message**: The event title with the `search` values extracted. So in the above example for `offset_reached` the message would be set to Very important meeting - **message**: The event title with the `search` values extracted. So in the above example for `offset_reached` the message would be set to Very important meeting
- **description**: The event description. - **description**: The event description.
- **location**: The event Location. - **location**: The event Location.
- **start_time**: Start time of event. - **start_time**: Start time of event.
- **end_time**: End time of event. - **end_time**: End time of event.
### Examples ## Examples
All events of the calendars "private" and "holidays". Note that all day events are not included. All events of the calendars "private" and "holidays". Note that all day events are not included.

View File

@ -242,6 +242,7 @@ In this section you will find some real-life examples of how to use this platfor
The example below shows a full configuration for a cover without tilt with state topic only. The example below shows a full configuration for a cover without tilt with state topic only.
{% raw %} {% raw %}
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
cover: cover:
@ -264,6 +265,7 @@ cover:
optimistic: false optimistic: false
value_template: '{{ value.x }}' value_template: '{{ value.x }}'
``` ```
{% endraw %} {% endraw %}
### Full configuration position topic without tilt ### Full configuration position topic without tilt
@ -271,6 +273,7 @@ cover:
The example below shows a full configuration for a cover without tilt with position topic. The example below shows a full configuration for a cover without tilt with position topic.
{% raw %} {% raw %}
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
cover: cover:
@ -292,6 +295,7 @@ cover:
optimistic: false optimistic: false
value_template: '{{ value.x }}' value_template: '{{ value.x }}'
``` ```
{% endraw %} {% endraw %}
### Full configuration ### Full configuration
@ -299,6 +303,7 @@ cover:
The example below shows a full configuration for a cover. The example below shows a full configuration for a cover.
{% raw %} {% raw %}
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
cover: cover:
@ -328,10 +333,11 @@ cover:
tilt_closed_value: 70 tilt_closed_value: 70
tilt_opened_value: 180 tilt_opened_value: 180
``` ```
{% endraw %} {% endraw %}
To test, you can use the command line tool `mosquitto_pub` shipped with `mosquitto` or the `mosquitto-clients` package to send MQTT messages. This allows you to operate your cover manually: To test, you can use the command line tool `mosquitto_pub` shipped with `mosquitto` or the `mosquitto-clients` package to send MQTT messages. This allows you to operate your cover manually:
```bash ```bash
$ mosquitto_pub -h 127.0.0.1 -t home-assistant/cover/set -m "CLOSE" mosquitto_pub -h 127.0.0.1 -t home-assistant/cover/set -m "CLOSE"
``` ```

View File

@ -60,6 +60,7 @@ The `dweet` sensor platform allows you to get details from your devices which ar
To use Dweet.io sensors in your installation, add the following to your `configuration.yaml` file: To use Dweet.io sensors in your installation, add the following to your `configuration.yaml` file:
{% raw %} {% raw %}
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
sensor: sensor:
@ -67,6 +68,7 @@ sensor:
device: THING_NAME device: THING_NAME
value_template: '{{ value_json.VARIABLE }}' value_template: '{{ value_json.VARIABLE }}'
``` ```
{% endraw %} {% endraw %}
{% configuration %} {% configuration %}
@ -110,7 +112,7 @@ sensor:
You can easily send dweets from the command-line to test your sensor with `curl`. You can easily send dweets from the command-line to test your sensor with `curl`.
```bash ```bash
$ curl -H 'Content-Type: application/json' -d '{"temperature": 40, "humidity": 65}' https://dweet.io/dweet/for/ha-sensor curl -H 'Content-Type: application/json' -d '{"temperature": 40, "humidity": 65}' https://dweet.io/dweet/for/ha-sensor
``` ```
will give you a response like the one below: will give you a response like the one below:

View File

@ -80,7 +80,7 @@ Discovery is not yet supported for any robot vacuum models (Dyson 360 Eye). For
To find a devices IP address, you can use your router or `nmap`: To find a devices IP address, you can use your router or `nmap`:
```bash ```bash
$ nmap -p 1883 XXX.XXX.XXX.XXX/YY --open nmap -p 1883 XXX.XXX.XXX.XXX/YY --open
``` ```
Where: Where:
@ -91,7 +91,7 @@ Where:
For example: For example:
```bash ```bash
$ nmap -p 1883 192.168.0.0/24 --open nmap -p 1883 192.168.0.0/24 --open
``` ```
## Vacuum ## Vacuum

View File

@ -73,12 +73,12 @@ extra_arguments:
To experiment with values (changes/100 is the scene value in `ffmpeg`): To experiment with values (changes/100 is the scene value in `ffmpeg`):
```bash ```bash
$ ffmpeg -i YOUR_INPUT -an -filter:v select=gt(scene\,0.1) -f framemd5 - ffmpeg -i YOUR_INPUT -an -filter:v select=gt(scene\,0.1) -f framemd5 -
``` ```
If you are running into trouble with this sensor, please refer to the [troubleshooting section](/integrations/ffmpeg/#troubleshooting). If you are running into trouble with this sensor, please refer to the [troubleshooting section](/integrations/ffmpeg/#troubleshooting).
#### Tips ### Tips
- Use motion only in a custom area with [crop filter](https://ffmpeg.org/ffmpeg-filters.html#crop): - Use motion only in a custom area with [crop filter](https://ffmpeg.org/ffmpeg-filters.html#crop):

View File

@ -68,5 +68,5 @@ output:
To experiment with values: To experiment with values:
```bash ```bash
$ ffmpeg -i YOUR_INPUT -vn -filter:a silencedetect=n=-30dB:d=1 -f null - ffmpeg -i YOUR_INPUT -vn -filter:a silencedetect=n=-30dB:d=1 -f null -
``` ```

View File

@ -13,7 +13,7 @@ The `hddtemp` sensor platform is using the data provided by [HDDTemp](https://sa
It required that `hddtemp` is started or running in daemon mode on a local or remote system. It required that `hddtemp` is started or running in daemon mode on a local or remote system.
```bash ```bash
$ hddtemp -dF hddtemp -dF
``` ```
To setup a HDDTemp to your installation, add the following to your `configuration.yaml` file: To setup a HDDTemp to your installation, add the following to your `configuration.yaml` file:

View File

@ -93,10 +93,11 @@ $ sudo reboot
After installing `i2c-tools`, a new utility is available to scan the addresses of the connected sensors: After installing `i2c-tools`, a new utility is available to scan the addresses of the connected sensors:
```bash ```bash
$ /usr/sbin/i2cdetect -y 1 /usr/sbin/i2cdetect -y 1
``` ```
It will output a table like this: It will output a table like this:
```text ```text
0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- 00: -- -- -- -- -- -- -- -- -- -- -- -- --

View File

@ -90,7 +90,7 @@ Example:
To create a `LightGroup` named `Ceiling lights` that contains the lights 1, 2, and 3, execute the following command: To create a `LightGroup` named `Ceiling lights` that contains the lights 1, 2, and 3, execute the following command:
```bash ```bash
$ curl -XPOST -d '{"name": "Ceiling lights", "lights": ["1", "2", "3"]}' http://<bridge>/api/<username>/groups curl -XPOST -d '{"name": "Ceiling lights", "lights": ["1", "2", "3"]}' http://<bridge>/api/<username>/groups
``` ```
The `<username>` is the string that is used to register Home Assistant with the bridge. You can find it in the `core.config_entries` file in `/PATH-TO-YOUR-CONFIGURATION/.storage/`. `<bridge>` is the IP address or hostname of your Hue bridge. The `<username>` is the string that is used to register Home Assistant with the bridge. You can find it in the `core.config_entries` file in `/PATH-TO-YOUR-CONFIGURATION/.storage/`. `<bridge>` is the IP address or hostname of your Hue bridge.
@ -98,7 +98,7 @@ The `<username>` is the string that is used to register Home Assistant with the
You can find the IDs of your lights by executing the following command: You can find the IDs of your lights by executing the following command:
```bash ```bash
$ curl http://<bridge>/api/<username>/lights curl http://<bridge>/api/<username>/lights
``` ```
Home Assistant will automatically detect your new `LightGroup` and add it to the interface. Home Assistant will automatically detect your new `LightGroup` and add it to the interface.

View File

@ -13,7 +13,7 @@ ha_domain: lirc
Sending IR commands is not supported in this integration (yet), but can be accomplished using the [shell_command component](/integrations/shell_command/) in conjunction with the `irsend` command. Sending IR commands is not supported in this integration (yet), but can be accomplished using the [shell_command component](/integrations/shell_command/) in conjunction with the `irsend` command.
### Installation ## Installation
To allow Home Assistant to talk to your IR receiver, you need to first make sure you have the correct dependencies installed: To allow Home Assistant to talk to your IR receiver, you need to first make sure you have the correct dependencies installed:
@ -26,15 +26,15 @@ sudo apt-get install lirc liblircclient-dev
If you are configuring on a Raspberry Pi, there are excellent instructions with GPIO schematics and driver configurations [here](http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/). Take notice, the instructions in this blog are valid for Raspian Jesse where lirc 0.9.0 was included in the Debian package. In Raspian Stretch lirc 0.9.4 is included in the Debian package. If you are configuring on a Raspberry Pi, there are excellent instructions with GPIO schematics and driver configurations [here](http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/). Take notice, the instructions in this blog are valid for Raspian Jesse where lirc 0.9.0 was included in the Debian package. In Raspian Stretch lirc 0.9.4 is included in the Debian package.
The configuration is slightly different : The configuration is slightly different :
- The `hardware.conf` file is not supported, obsoleted by a new `lirc_options.conf` file and systemd unit definitions. - The `hardware.conf` file is not supported, obsoleted by a new `lirc_options.conf` file and systemd unit definitions.
- The former single `lirc` service is replaced with the three systemd services `lircd.service`, `lircmd.service` and `irexec.service`. There is no counterpart to the 0.9.0 `lirc` service which covered all of these. Using a separate transmitter device requires yet another service. - The former single `lirc` service is replaced with the three systemd services `lircd.service`, `lircmd.service` and `irexec.service`. There is no counterpart to the 0.9.0 `lirc` service which covered all of these. Using a separate transmitter device requires yet another service.
- 0.9.4 defaults to using systemd for controlling the services. This is not just start/stop functionality, systemd is used to implement new features and to address shortcomings in 0.9.0. However, traditional systemV scripts are also installed and could be used although this is less tested and not really documented. - 0.9.4 defaults to using systemd for controlling the services. This is not just start/stop functionality, systemd is used to implement new features and to address shortcomings in 0.9.0. However, traditional systemV scripts are also installed and could be used although this is less tested and not really documented.
For more information have a look at `/usr/share/doc/lirc/README.Debian.gz` where the update process is explained when you have updated from jessie to stretch. For more information have a look at `/usr/share/doc/lirc/README.Debian.gz` where the update process is explained when you have updated from jessie to stretch.
</div> </div>
### Configuring LIRC ## Configuring LIRC
Now teach LIRC about your particular remote control by preparing a lircd configuration file (`/etc/lirc/lircd.conf`). Search the [LIRC remote database](http://lirc.sourceforge.net/remotes/) for your model. If you can't find it, then you can always use the `irrecord` program to learn your remote. This will create a valid configuration file. Add as many remotes as you want by pasting them into the file. If `irrecord` doesn't work (e.g., for some air conditioner remotes), then the `mode2` program is capable of reading the codes in raw mode, followed by `irrecord -a` to extract hex codes. Now teach LIRC about your particular remote control by preparing a lircd configuration file (`/etc/lirc/lircd.conf`). Search the [LIRC remote database](http://lirc.sourceforge.net/remotes/) for your model. If you can't find it, then you can always use the `irrecord` program to learn your remote. This will create a valid configuration file. Add as many remotes as you want by pasting them into the file. If `irrecord` doesn't work (e.g., for some air conditioner remotes), then the `mode2` program is capable of reading the codes in raw mode, followed by `irrecord -a` to extract hex codes.
@ -64,20 +64,19 @@ end
Test your LIRC installation before proceeding by running: Test your LIRC installation before proceeding by running:
```bash ```bash
$ ircat home-assistant ircat home-assistant
``` ```
and pressing some buttons on the remote. You should see them register on the screen if LIRC is properly configured. and pressing some buttons on the remote. You should see them register on the screen if LIRC is properly configured.
## Configuration Home Assistant
### Configuration Home Assistant
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
lirc: lirc:
``` ```
#### Events ### Events
The LIRC integration fires `ir_command_received` events on the bus. You can capture the events and respond to them in automation scripts like this: The LIRC integration fires `ir_command_received` events on the bus. You can capture the events and respond to them in automation scripts like this:

View File

@ -156,6 +156,7 @@ In this section you will find some real-life examples of how to use this lock.
The example below shows a full configuration for a MQTT lock. The example below shows a full configuration for a MQTT lock.
{% raw %} {% raw %}
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
lock: lock:
@ -172,6 +173,7 @@ lock:
retain: true retain: true
value_template: '{{ value.x }}' value_template: '{{ value.x }}'
``` ```
{% endraw %} {% endraw %}
Keep an eye on retaining messages to keep the state as you don't want to unlock your door by accident when you restart something. Keep an eye on retaining messages to keep the state as you don't want to unlock your door by accident when you restart something.
@ -179,6 +181,5 @@ Keep an eye on retaining messages to keep the state as you don't want to unlock
For a check you can use the command line tools `mosquitto_pub` shipped with `mosquitto` to send MQTT messages. This allows you to operate your lock manually: For a check you can use the command line tools `mosquitto_pub` shipped with `mosquitto` to send MQTT messages. This allows you to operate your lock manually:
```bash ```bash
$ mosquitto_pub -h 127.0.0.1 -t home-assistant/frontdoor/set -m "LOCK" mosquitto_pub -h 127.0.0.1 -t home-assistant/frontdoor/set -m "LOCK"
``` ```

View File

@ -84,7 +84,7 @@ If you set `show_on_map` to `true` then the location attributes are named `latit
Not all sensors provide all conditions. Also, it's possible that the sensor values are not available all the time. To check what a sensor is publishing use `curl`: Not all sensors provide all conditions. Also, it's possible that the sensor values are not available all the time. To check what a sensor is publishing use `curl`:
```bash ```bash
$ curl https://api.luftdaten.info/v1/sensor/[sensorid]/ curl https://api.luftdaten.info/v1/sensor/[sensorid]/
``` ```
## Full example ## Full example

View File

@ -109,7 +109,7 @@ The endpoint that is receiving the data is `http://[IP address Home Assistant]:8
With `api_password:` With `api_password:`
```bash ```bash
$ curl -d "[action]=get://[IP address Home Assistant]:8123/api/mystrom?api_password%3D[api_password]%26[action]%3D[ID of the button]" \ curl -d "[action]=get://[IP address Home Assistant]:8123/api/mystrom?api_password%3D[api_password]%26[action]%3D[ID of the button]" \
http://[IP address of the button]/api/v1/device/[MAC address of the button] http://[IP address of the button]/api/v1/device/[MAC address of the button]
``` ```
@ -138,7 +138,7 @@ $ curl -d "[action]=get://[IP address Home Assistant]:8123/api/mystrom?[action]%
A complete command to set the URL for a double click could look like the example below: A complete command to set the URL for a double click could look like the example below:
```bash ```bash
$ curl -d "double=get://192.168.1.3:8123/api/mystrom?double%3DButton1" http://192.168.1.12/api/v1/device/4D5F5D5CD553 curl -d "double=get://192.168.1.3:8123/api/mystrom?double%3DButton1" http://192.168.1.12/api/v1/device/4D5F5D5CD553
``` ```
With an `api_password`: With an `api_password`:
@ -205,6 +205,7 @@ curl -G -X GET http://IP_ADDRESS/relay -d 'state=1'
The switch is measuring the current power consumption. To expose this as a sensor use a [`template` sensor](/integrations/template). The switch is measuring the current power consumption. To expose this as a sensor use a [`template` sensor](/integrations/template).
{% raw %} {% raw %}
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
sensor: sensor:
@ -215,4 +216,5 @@ sensor:
unit_of_measurement: "W" unit_of_measurement: "W"
value_template: "{{ state_attr('switch.office', 'current_power_w') }}" value_template: "{{ state_attr('switch.office', 'current_power_w') }}"
``` ```
{% endraw %} {% endraw %}

View File

@ -14,7 +14,7 @@ or trigger any other [automation](/integrations/automation/).
For using the result inside an automation rule, take a look at the For using the result inside an automation rule, take a look at the
[component](/integrations/image_processing) page. [component](/integrations/image_processing) page.
### Local installation ## Local installation
If you want process all data locally, you need version 2.3.1 or higher of the If you want process all data locally, you need version 2.3.1 or higher of the
`alpr` commandline tool. `alpr` commandline tool.
@ -27,7 +27,7 @@ On a Debian system you can use this `cmake` command to build only the command
line tool: line tool:
```bash ```bash
$ cmake -DWITH_TEST=FALSE -DWITH_BINDING_JAVA=FALSE --DWITH_BINDING_PYTHON=FALSE \ cmake -DWITH_TEST=FALSE -DWITH_BINDING_JAVA=FALSE --DWITH_BINDING_PYTHON=FALSE \
--DWITH_BINDING_GO=FALSE -DWITH_DAEMON=FALSE -DCMAKE_INSTALL_PREFIX:PATH=/usr .. --DWITH_BINDING_GO=FALSE -DWITH_DAEMON=FALSE -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
``` ```
@ -37,7 +37,7 @@ For other operating system please refer to the
Verify your `alpr` installation with: Verify your `alpr` installation with:
```bash ```bash
$ wget -O- -q http://plates.openalpr.com/h786poj.jpg | alpr - wget -O- -q http://plates.openalpr.com/h786poj.jpg | alpr -
``` ```
### Configuration ### Configuration

View File

@ -16,7 +16,7 @@ The `raspihats` integration is the base for all related Raspihats platforms in H
The `raspihats` binary sensor platform allows you to read sensor values using the digital inputs of the [raspihats](https://www.raspihats.com/) boards. The `raspihats` binary sensor platform allows you to read sensor values using the digital inputs of the [raspihats](https://www.raspihats.com/) boards.
## Configuration ### Configuration
To use your `raspihats` boards in your installation, add the following to your `configuration.yaml` file: To use your `raspihats` boards in your installation, add the following to your `configuration.yaml` file:
@ -75,7 +75,7 @@ i2c_hats:
type: string type: string
{% endconfiguration %} {% endconfiguration %}
## Directions for installing smbus support on Raspberry Pi ### Directions for installing smbus support on Raspberry Pi
Enable I2c interface with the Raspberry Pi configuration utility: Enable I2c interface with the Raspberry Pi configuration utility:
@ -101,7 +101,7 @@ $ sudo usermod -a -G i2c homeassistant
After installing `i2c-tools`, a new utility is available to scan the addresses of the connected sensors, so you can see the sensor address: After installing `i2c-tools`, a new utility is available to scan the addresses of the connected sensors, so you can see the sensor address:
```bash ```bash
$ /usr/sbin/i2cdetect -y 1 /usr/sbin/i2cdetect -y 1
``` ```
It will output a table like this: It will output a table like this:
@ -124,7 +124,7 @@ For more details about the `raspihats` add-on boards for Raspberry Pi, visit [ra
The `raspihats` switch platform allows you to control the digital outputs of your [Raspihats](https://www.raspihats.com/) boards. The `raspihats` switch platform allows you to control the digital outputs of your [Raspihats](https://www.raspihats.com/) boards.
## Configuration ### Configuration
To use your Raspihats boards in your installation, add the following to your `configuration.yaml` file: To use your Raspihats boards in your installation, add the following to your `configuration.yaml` file:
@ -183,13 +183,13 @@ i2c_hats:
type: boolean type: boolean
{% endconfiguration %} {% endconfiguration %}
## Directions for installing smbus support on Raspberry Pi ### Directions for installing smbus support on Raspberry Pi
Enable I2c interface with the Raspberry Pi configuration utility: Enable I2c interface with the Raspberry Pi configuration utility:
```bash ```bash
# pi user environment: Enable i2c interface # pi user environment: Enable i2c interface
$ sudo raspi-config sudo raspi-config
``` ```
Select `Interfacing options->I2C` choose `<Yes>` and hit `Enter`, then go to `Finish`. Select `Interfacing options->I2C` choose `<Yes>` and hit `Enter`, then go to `Finish`.
@ -198,10 +198,10 @@ Install dependencies for use the `smbus-cffi` module and enable your `homeassist
```bash ```bash
# pi user environment: Install i2c dependencies and utilities # pi user environment: Install i2c dependencies and utilities
$ sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev
# pi user environment: Add homeassistant user to the i2c group # pi user environment: Add homeassistant user to the i2c group
$ sudo usermod -a -G i2c homeassistant sudo usermod -a -G i2c homeassistant
``` ```
## Check the i2c address of the sensor ## Check the i2c address of the sensor

View File

@ -60,6 +60,7 @@ reconnect_interval:
{% endconfiguration %} {% endconfiguration %}
### Full example ### Full example
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
rflink: rflink:
@ -77,7 +78,7 @@ TCP mode allows you to connect to an RFLink device over a TCP/IP network. This i
To expose the USB/serial interface over TCP on a different host (Linux) the following command can be used: To expose the USB/serial interface over TCP on a different host (Linux) the following command can be used:
```bash ```bash
$ socat /dev/ttyACM0,b57600 TCP-LISTEN:1234,reuseaddr socat /dev/ttyACM0,b57600 TCP-LISTEN:1234,reuseaddr
``` ```
Other methods of exposing the serial interface over TCP are possible (eg: ESP8266 or using Arduino Wifi shield). Essentially the serial stream should be directly mapped to the TCP stream. Other methods of exposing the serial interface over TCP are possible (eg: ESP8266 or using Arduino Wifi shield). Essentially the serial stream should be directly mapped to the TCP stream.

View File

@ -64,7 +64,7 @@ In this section you find some real-life examples of how to use this sensor.
There are several ways to get the temperature of your hard drive. A simple solution is to use [hddtemp](https://savannah.nongnu.org/projects/hddtemp/). There are several ways to get the temperature of your hard drive. A simple solution is to use [hddtemp](https://savannah.nongnu.org/projects/hddtemp/).
```bash ```bash
$ hddtemp -n /dev/sda hddtemp -n /dev/sda
``` ```
To use this 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.
@ -84,6 +84,7 @@ sensor:
Thanks to the [`proc`](https://en.wikipedia.org/wiki/Procfs) file system, various details about a system can be retrieved. Here the CPU temperature is of interest. Add something similar to your `configuration.yaml` file: Thanks to the [`proc`](https://en.wikipedia.org/wiki/Procfs) file system, various details about a system can be retrieved. Here the CPU temperature is of interest. Add something similar to your `configuration.yaml` file:
{% raw %} {% raw %}
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
sensor: sensor:
@ -94,6 +95,7 @@ sensor:
unit_of_measurement: "°C" unit_of_measurement: "°C"
value_template: '{{ value | multiply(0.001) | round(1) }}' value_template: '{{ value | multiply(0.001) | round(1) }}'
``` ```
{% endraw %} {% endraw %}
### Monitoring failed login attempts on Home Assistant ### Monitoring failed login attempts on Home Assistant
@ -147,7 +149,7 @@ The example is doing the same as the [aREST sensor](/integrations/arest#sensor)
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. 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.
```bash ```bash
$ python3 -c "import requests; print(requests.get('http://10.0.0.48/analog/2').json()['return_value'])" python3 -c "import requests; print(requests.get('http://10.0.0.48/analog/2').json()['return_value'])"
``` ```
The script (saved as `arest-value.py`) that is used looks like the example below. The script (saved as `arest-value.py`) that is used looks like the example below.
@ -175,6 +177,7 @@ sensor:
[Templates](/docs/configuration/templating/) are supported in the `command:` configuration variable. This could be used if you want to include the state of a specific sensor as an argument to your external script. [Templates](/docs/configuration/templating/) are supported in the `command:` configuration variable. This could be used if you want to include the state of a specific sensor as an argument to your external script.
{% raw %} {% raw %}
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
sensor: sensor:
@ -183,14 +186,15 @@ sensor:
command: 'sh /home/pi/.homeassistant/scripts/wind_direction.sh {{ states('sensor.wind_direction') }}' command: 'sh /home/pi/.homeassistant/scripts/wind_direction.sh {{ states('sensor.wind_direction') }}'
unit_of_measurement: "Direction" unit_of_measurement: "Direction"
``` ```
{% endraw %}
{% endraw %}
### Usage of JSON attributes in command output ### Usage of JSON attributes in command output
The example shows how you can retrieve multiple values with one sensor (where the additional are attributes) by using `value_json` and `json_attributes`. The example shows how you can retrieve multiple values with one sensor (where the additional are attributes) by using `value_json` and `json_attributes`.
{% raw %} {% raw %}
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
sensor: sensor:
@ -202,4 +206,5 @@ sensor:
command: 'python3 /home/pi/.homeassistant/scripts/datetime.py' command: 'python3 /home/pi/.homeassistant/scripts/datetime.py'
value_template: '{{ value_json.time }}' value_template: '{{ value_json.time }}'
``` ```
{% endraw %} {% endraw %}

View File

@ -20,7 +20,7 @@ notify:
``` ```
{% configuration %} {% configuration %}
name: name:
description: Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`. description: Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`.
required: false required: false
type: string type: string
@ -45,7 +45,7 @@ notify:
To test if the service works, just send a message with `curl` from the command-line. To test if the service works, just send a message with `curl` from the command-line.
```bash ```bash
$ curl 'https://api.simplepush.io/send/device_key/title/message' curl 'https://api.simplepush.io/send/device_key/title/message'
``` ```
To use notifications, please see the [getting started with automation page](/getting-started/automation/). To use notifications, please see the [getting started with automation page](/getting-started/automation/).

View File

@ -71,7 +71,7 @@ Enable the I2c interface with the Raspberry Pi configuration utility:
```bash ```bash
# pi user environment: Enable i2c interface # pi user environment: Enable i2c interface
$ sudo raspi-config sudo raspi-config
``` ```
Select `Interfacing options->I2C` choose `<Yes>` and hit `Enter`, then go to `Finish` and you'll be prompted to reboot. Select `Interfacing options->I2C` choose `<Yes>` and hit `Enter`, then go to `Finish` and you'll be prompted to reboot.
@ -80,13 +80,13 @@ Install dependencies for use the `smbus-cffi` module and enable your `homeassist
```bash ```bash
# pi user environment: Install i2c dependencies and utilities # pi user environment: Install i2c dependencies and utilities
$ sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev
# pi user environment: Add homeassistant user to the i2c group # pi user environment: Add homeassistant user to the i2c group
$ sudo addgroup homeassistant i2c sudo addgroup homeassistant i2c
# pi user environment: Reboot Raspberry Pi to apply changes # pi user environment: Reboot Raspberry Pi to apply changes
$ sudo reboot sudo reboot
``` ```
### Check the i2c address of the sensor ### Check the i2c address of the sensor
@ -94,7 +94,7 @@ $ sudo reboot
After installing `i2c-tools`, a new utility is available to scan the addresses of the connected sensors: After installing `i2c-tools`, a new utility is available to scan the addresses of the connected sensors:
```bash ```bash
$ /usr/sbin/i2cdetect -y 1 /usr/sbin/i2cdetect -y 1
``` ```
It will output a table like this: It will output a table like this:

View File

@ -38,7 +38,7 @@ And create on your OpenWrt device a read-only user to be used by setting up the
} }
``` ```
Restart the services. This ACL file needs to be recreated after updating/upgrading your OpenWrt firmware. Restart the services. This ACL file needs to be recreated after updating/upgrading your OpenWrt firmware.
```bash ```bash
# /etc/init.d/rpcd restart && /etc/init.d/uhttpd restart # /etc/init.d/rpcd restart && /etc/init.d/uhttpd restart
@ -92,89 +92,104 @@ If you find that this never creates `known_devices.yaml`, or if you need more in
1. On your Home Assistant device, stop Home Assistant 1. On your Home Assistant device, stop Home Assistant
2. Adjust `configuration.yaml` to log more detail for the `device_tracker` component 2. Adjust `configuration.yaml` to log more detail for the `device_tracker` component
```yaml
logger: ```yaml
default: warn logger:
logs: default: warn
homeassistant.components.device_tracker: debug logs:
``` homeassistant.components.device_tracker: debug
```
3. In another window, tail the logfile in the configuration directory: 3. In another window, tail the logfile in the configuration directory:
```bash
$ tail -f home-assistant.log | grep device_tracker ```bash
``` tail -f home-assistant.log | grep device_tracker
```
4. If you see a Python stack trace like the following, check your configuration for correct username/password. 4. If you see a Python stack trace like the following, check your configuration for correct username/password.
```txt
17-04-28 10:43:30 INFO (MainThread) [homeassistant.loader] Loaded device_tracker from homeassistant.components.device_tracker ```txt
17-04-28 10:43:30 INFO (MainThread) [homeassistant.loader] Loaded device_tracker.ubus from homeassistant.components.device_tracker.ubus 17-04-28 10:43:30 INFO (MainThread) [homeassistant.loader] Loaded device_tracker from homeassistant.components.device_tracker
17-04-28 10:43:30 INFO (MainThread) [homeassistant.setup] Setting up device_tracker 17-04-28 10:43:30 INFO (MainThread) [homeassistant.loader] Loaded device_tracker.ubus from homeassistant.components.device_tracker.ubus
17-04-28 10:43:31 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.ubus 17-04-28 10:43:30 INFO (MainThread) [homeassistant.setup] Setting up device_tracker
17-04-28 10:43:31 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform ubus 17-04-28 10:43:31 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.ubus
File "/opt/homeassistant/venv/lib/python3.4/site-packages/homeassistant/integrations/device_tracker/__init__.py", line 152, in async_setup_platform 17-04-28 10:43:31 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform ubus
File "/opt/homeassistant/venv/lib/python3.4/site-packages/homeassistant/integrations/device_tracker/ubus.py", line 36, in get_scanner File "/opt/homeassistant/venv/lib/python3.4/site-packages/homeassistant/integrations/device_tracker/__init__.py", line 152, in async_setup_platform
File "/opt/homeassistant/venv/lib/python3.4/site-packages/homeassistant/integrations/device_tracker/ubus.py", line 58, in __init__ File "/opt/homeassistant/venv/lib/python3.4/site-packages/homeassistant/integrations/device_tracker/ubus.py", line 36, in get_scanner
File "/opt/homeassistant/venv/lib/python3.4/site-packages/homeassistant/integrations/device_tracker/ubus.py", line 156, in _get_session_id File "/opt/homeassistant/venv/lib/python3.4/site-packages/homeassistant/integrations/device_tracker/ubus.py", line 58, in __init__
File "/opt/homeassistant/venv/lib/python3.4/site-packages/homeassistant/integrations/device_tracker/ubus.py", line 147, in _req_json_rpc File "/opt/homeassistant/venv/lib/python3.4/site-packages/homeassistant/integrations/device_tracker/ubus.py", line 156, in _get_session_id
17-04-28 10:43:31 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=device_tracker, service=see> File "/opt/homeassistant/venv/lib/python3.4/site-packages/homeassistant/integrations/device_tracker/ubus.py", line 147, in _req_json_rpc
17-04-28 10:43:31 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=device_tracker> 17-04-28 10:43:31 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=device_tracker, service=see>
``` 17-04-28 10:43:31 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=device_tracker>
```
5. If you see lines like the following repeated at intervals that correspond to the check interval from the configuration (12 seconds by default), then Home Assistant is correctly polling the router, and you'll need to look at what the router is sending back. 5. If you see lines like the following repeated at intervals that correspond to the check interval from the configuration (12 seconds by default), then Home Assistant is correctly polling the router, and you'll need to look at what the router is sending back.
```txt
17-04-28 10:50:34 INFO (Thread-7) [homeassistant.components.device_tracker.ubus] Checking ARP ```txt
``` 17-04-28 10:50:34 INFO (Thread-7) [homeassistant.components.device_tracker.ubus] Checking ARP
```
### Inspect Packets With TCPDump ### Inspect Packets With TCPDump
_These steps require that `tcpdump` is installed on your Home Assistant device, and that you have a utility such as [Wireshark](https://www.wireshark.org) for viewing the packets. It also assumes that Home Assistant is communicating with your router over HTTP and not HTTPS._ _These steps require that `tcpdump` is installed on your Home Assistant device, and that you have a utility such as [Wireshark](https://www.wireshark.org) for viewing the packets. It also assumes that Home Assistant is communicating with your router over HTTP and not HTTPS._
1. On your Home Assistant device, stop Home Assistant 1. On your Home Assistant device, stop Home Assistant
2. In another shell on your Home Assistant device, start tcpdump 2. In another shell on your Home Assistant device, start tcpdump
```bash
$ sudo tcpdump -nnvXSs 0 -w /var/tmp/dt.out 'host <router_ip> and port 80' ```bash
``` sudo tcpdump -nnvXSs 0 -w /var/tmp/dt.out 'host <router_ip> and port 80'
* In this example we are only looking for traffic to or from port 80, and we are writing the packet stream out to `/var/tmp/dt.out` ```
- In this example we are only looking for traffic to or from port 80, and we are writing the packet stream out to `/var/tmp/dt.out`
3. Start Home Assistant 3. Start Home Assistant
4. After a few seconds you should see a line like `Got xx` where `xx` is an incrementing number. This indicates that it has captured packets that match our filter. After you see this number increment a few times (>20), you can hit `Ctrl-C` to cancel the capture. 4. After a few seconds you should see a line like `Got xx` where `xx` is an incrementing number. This indicates that it has captured packets that match our filter. After you see this number increment a few times (>20), you can hit `Ctrl-C` to cancel the capture.
6. Transfer `/var/tmp/dt.out` to the machine where you're running Wireshark and either drag/drop it onto the Wireshark window or use File/Open to open the capture file. 5. Transfer `/var/tmp/dt.out` to the machine where you're running Wireshark and either drag/drop it onto the Wireshark window or use File/Open to open the capture file.
7. In the window that opens, look for the first line that reads `POST /ubus`. Right click on this line, choose Follow and then HTTP Stream to view just the HTTP stream for this connection. 6. In the window that opens, look for the first line that reads `POST /ubus`. Right click on this line, choose Follow and then HTTP Stream to view just the HTTP stream for this connection.
8. The first `POST` will show Home Assistant logging into ubus and receiving a session identifier back. It will look something like this: 7. The first `POST` will show Home Assistant logging into ubus and receiving a session identifier back. It will look something like this:
```txt
POST /ubus HTTP/1.1
Host: 10.68.0.1
Accept: */*
User-Agent: python-requests/2.13.0
Connection: keep-alive
Accept-Encoding: gzip, deflate
Content-Length: 161
{"jsonrpc": "2.0", "params": ["00000000000000000000000000000000", "session", "login", {"password": "<password>", "username": "root"}], "method": "call", "id": 1} ```txt
POST /ubus HTTP/1.1
Host: 10.68.0.1
Accept: */*
User-Agent: python-requests/2.13.0
Connection: keep-alive
Accept-Encoding: gzip, deflate
Content-Length: 161
HTTP/1.1 200 OK {"jsonrpc": "2.0", "params": ["00000000000000000000000000000000", "session", "login", {"password": "<password>", "username": "root"}], "method": "call", "id": 1}
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
{"jsonrpc":"2.0","id":1,"result":[0,{"ubus_rpc_session":"8b4e1632389fcfd09e96a792e01c332c","timeout":300,"expires":300,"acls":{"access-group":{"unauthenticated":["read"],"user":["read"]},"ubus":{"*":["*"],"session":["access","login"]},"uci":{"*":["read"]}},"data":{"username":"root"}}]} HTTP/1.1 200 OK
``` Content-Type: application/json
9. In the response above, the portion that reads `"result":[0,` indicates that ubus accepted the login without issue. If this is not `0`, search online for what ubus status corresponds to the number you're receiving and address any issues that it brings to light. Transfer-Encoding: chunked
10. Otherwise, back in the main Wireshark window click the `x` in the right side of the filter bar where it reads `tcp.stream eq 0`. Scroll down until you find the next `POST /ubus` line and view the HTTP stream again. This request is Home Assistant actually requesting information and will look something like the following: Connection: keep-alive
```txt
POST /ubus HTTP/1.1
Host: 10.68.0.1
Accept: */*
User-Agent: python-requests/2.13.0
Connection: keep-alive
Accept-Encoding: gzip, deflate
Content-Length: 114
{"jsonrpc": "2.0", "params": ["8b4e1632389fcfd09e96a792e01c332c", "hostapd.*", "", {}], "method": "list", "id": 1} {"jsonrpc":"2.0","id":1,"result":[0,{"ubus_rpc_session":"8b4e1632389fcfd09e96a792e01c332c","timeout":300,"expires":300,"acls":{"access-group":{"unauthenticated":["read"],"user":["read"]},"ubus":{"*":["*"],"session":["access","login"]},"uci":{"*":["read"]}},"data":{"username":"root"}}]}
```
HTTP/1.1 200 OK 8. In the response above, the portion that reads `"result":[0,` indicates that ubus accepted the login without issue. If this is not `0`, search online for what ubus status corresponds to the number you're receiving and address any issues that it brings to light.
Content-Type: application/json 9. Otherwise, back in the main Wireshark window click the `x` in the right side of the filter bar where it reads `tcp.stream eq 0`. Scroll down until you find the next `POST /ubus` line and view the HTTP stream again. This request is Home Assistant actually requesting information and will look something like the following:
Transfer-Encoding: chunked
Connection: keep-alive
{"jsonrpc":"2.0","id":1,"result":{}} ```txt
``` POST /ubus HTTP/1.1
11. In this case we are actually receiving a valid response with no data. The request says that we are looking for ARP information from `hostapd.*`, which is the access point on the router. In my environment I don't use the AP on the router, and so it was correctly returning no data. Armed with this information, I know that I cannot use this integration for device tracking or presence. Host: 10.68.0.1
Accept: */*
User-Agent: python-requests/2.13.0
Connection: keep-alive
Accept-Encoding: gzip, deflate
Content-Length: 114
{"jsonrpc": "2.0", "params": ["8b4e1632389fcfd09e96a792e01c332c", "hostapd.*", "", {}], "method": "list", "id": 1}
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
{"jsonrpc":"2.0","id":1,"result":{}}
```
10. In this case we are actually receiving a valid response with no data. The request says that we are looking for ARP information from `hostapd.*`, which is the access point on the router. In my environment I don't use the AP on the router, and so it was correctly returning no data. Armed with this information, I know that I cannot use this integration for device tracking or presence.
### Cleanup ### Cleanup

View File

@ -11,11 +11,11 @@ og_image: /images/screenshots/ui2015.png
As Home Assistant is gaining more and more users we started to feel the pain from not having a proper release mechanism. We had no version numbering and required users to checkout the source using Git to get started. On top of that, as the number of devices that we support keeps raising, so did the number of dependencies that are used. That's why we decided to change the way we roll. From now on: As Home Assistant is gaining more and more users we started to feel the pain from not having a proper release mechanism. We had no version numbering and required users to checkout the source using Git to get started. On top of that, as the number of devices that we support keeps raising, so did the number of dependencies that are used. That's why we decided to change the way we roll. From now on:
- Each release will have a version number, starting with version 0.7. This was chosen because it shows that we have been around for some time but are not considering ourselves to be fully stable. - Each release will have a version number, starting with version 0.7. This was chosen because it shows that we have been around for some time but are not considering ourselves to be fully stable.
- Each release will be pushed to PyPi. This will be the only supported method of distribution. - Each release will be pushed to PyPi. This will be the only supported method of distribution.
- Home Assistant is available after installation as a command-line utility `hass`. - Home Assistant is available after installation as a command-line utility `hass`.
- The default configuration location has been moved from `config` in the current working directory to `~/.homeassistant` (`%APPDATA%/.homeassistant` on Windows). - The default configuration location has been moved from `config` in the current working directory to `~/.homeassistant` (`%APPDATA%/.homeassistant` on Windows).
- Requirements for components and platforms are no longer installed into the current Python environment (being virtual or not) but will be installed in `<config-dir>/lib`. - Requirements for components and platforms are no longer installed into the current Python environment (being virtual or not) but will be installed in `<config-dir>/lib`.
A huge shout out to [Ryan Kraus](https://github.com/rmkraus) for making this all possible. Please make sure you read [the full blog post][self] for details on how to migrate your existing setup. A huge shout out to [Ryan Kraus](https://github.com/rmkraus) for making this all possible. Please make sure you read [the full blog post][self] for details on how to migrate your existing setup.
@ -32,23 +32,23 @@ And while Ryan was fixing distribution, I have been hard at work in giving Home
<!--more--> <!--more-->
### Migration to version 0.7 ## Migration to version 0.7
For this example, let's say we have an old Home Assistant installation in `/home/paulus/home-assistant`. For this example, let's say we have an old Home Assistant installation in `/home/paulus/home-assistant`.
If you want to migrate your existing configuration to be used as the default configuration: If you want to migrate your existing configuration to be used as the default configuration:
```bash ```bash
$ cp -r /home/paulus/home-assistant ~/.homeassistant cp -r /home/paulus/home-assistant ~/.homeassistant
``` ```
It If you want to have the configuration in a different location, for example `/home/paulus/home-assistant-config`, you will have to point Home Assistant at this configuration folder when launching: It If you want to have the configuration in a different location, for example `/home/paulus/home-assistant-config`, you will have to point Home Assistant at this configuration folder when launching:
```bash ```bash
$ hass --config /home/paulus/home-assistant-config hass --config /home/paulus/home-assistant-config
``` ```
### New platforms ## New platforms
And last, but not least: new platforms! And last, but not least: new platforms!

View File

@ -18,7 +18,7 @@ This post will give you a small overview of some other possibilities on how to u
<!--more--> <!--more-->
### Manual usage ## Manual usage
The simplest but not the coolest way as a human to interact with a Home Assistant sensor is launching a command manually. Let's create a "Mood" sensor. For simplicity Home Assistant and the MQTT broker are both running on the same host. The needed configuration snipplets to add to the `configuration.yaml` file consists of two parts: one for the broker and one for the sensor. The simplest but not the coolest way as a human to interact with a Home Assistant sensor is launching a command manually. Let's create a "Mood" sensor. For simplicity Home Assistant and the MQTT broker are both running on the same host. The needed configuration snipplets to add to the `configuration.yaml` file consists of two parts: one for the broker and one for the sensor.
@ -37,7 +37,7 @@ After a restart of Home Assistant the "Mood" sensor will show up in the frontend
Now we can set the mood. The commandline tool (`mosquitto_pub`) which is shipped with `mosquitto` is used to send an MQTT message. Now we can set the mood. The commandline tool (`mosquitto_pub`) which is shipped with `mosquitto` is used to send an MQTT message.
```bash ```bash
$ mosquitto_pub -h 127.0.0.1 -t "home-assistant/fabian/mood" -m "bad" mosquitto_pub -h 127.0.0.1 -t "home-assistant/fabian/mood" -m "bad"
``` ```
<p class='img'> <p class='img'>
@ -47,7 +47,7 @@ $ mosquitto_pub -h 127.0.0.1 -t "home-assistant/fabian/mood" -m "bad"
This is a really bad example. Don't do this in the real world because you won't be able to create diagrams of historical data. Better use a numerical value. This is a really bad example. Don't do this in the real world because you won't be able to create diagrams of historical data. Better use a numerical value.
### Python MQTT bindings ## Python MQTT bindings
The last section was pretty boring, I know. Nobody wants to send MQTT messages by hand if there is a computer on the desk. If you are playing the lottery this section is for you. If not, read it anyway because the lottery is just an example :-). The last section was pretty boring, I know. Nobody wants to send MQTT messages by hand if there is a computer on the desk. If you are playing the lottery this section is for you. If not, read it anyway because the lottery is just an example :-).
@ -100,7 +100,7 @@ Every 5 seconds a message with a new number is sent to the broker and picked up
With only a few lines of Python and an MQTT broker you can create your own "smartdevice" or send information to Home Assistant which you haven't think of. Of course this is not limited to Python. If there is an MQTT library available, the device can be used with Home Assistant now. With only a few lines of Python and an MQTT broker you can create your own "smartdevice" or send information to Home Assistant which you haven't think of. Of course this is not limited to Python. If there is an MQTT library available, the device can be used with Home Assistant now.
### Arduino ## Arduino
To get started with real hardware that is capable to send MQTT messages, the Arduino platform is an inexpensive way to do it. In this section an Arduino UNO with an Ethernet shield and a photo resistor is used. The photo resistor is connected to analog pin 0 (A0) and has an output from 0 to 1024. To get started with real hardware that is capable to send MQTT messages, the Arduino platform is an inexpensive way to do it. In this section an Arduino UNO with an Ethernet shield and a photo resistor is used. The photo resistor is connected to analog pin 0 (A0) and has an output from 0 to 1024.

View File

@ -27,8 +27,8 @@ That's where we came in. We wanted a solution that can bridge the awesomeness of
This is going to be a pretty detailed tutorial on setting up our SmartThings bridge. However, there are a couple key terms that _might_ be new to you: This is going to be a pretty detailed tutorial on setting up our SmartThings bridge. However, there are a couple key terms that _might_ be new to you:
- [MQTT][mqtt]: A lightweight message protocol for listening and publishing events that happen. Many home automation platforms have built in support for this [(especially Home Assistant)][mqtt-ha]. - [MQTT][mqtt]: A lightweight message protocol for listening and publishing events that happen. Many home automation platforms have built in support for this [(especially Home Assistant)][mqtt-ha].
- [Docker][docker]: A tool for running applications that are self-contained. No need for installing any dependencies or worrying about conflicts. Installs easily on Linux and OSX. - [Docker][docker]: A tool for running applications that are self-contained. No need for installing any dependencies or worrying about conflicts. Installs easily on Linux and macOS.
## Setting up the Bridge ## Setting up the Bridge
@ -47,7 +47,7 @@ $ docker run \
matteocollina/mosca matteocollina/mosca
``` ```
This will start Mosca up inside of a docker container, while keeping persistent storage for Mosca in `/opt/mosca`. The default configuration is the only thing we need to get things up and running. This will start Mosca up inside of a Docker container, while keeping persistent storage for Mosca in `/opt/mosca`. The default configuration is the only thing we need to get things up and running.
If you don't want to mess with Docker and can get node.js installed without trouble, the [standalone][mosca-standalone] instructions are all you need. If you don't want to mess with Docker and can get node.js installed without trouble, the [standalone][mosca-standalone] instructions are all you need.
@ -66,7 +66,7 @@ $ docker run \
The code for this bridge is [on Github][mqtt-bridge] if you want to start it up independently. The code for this bridge is [on Github][mqtt-bridge] if you want to start it up independently.
The MQTT Bridge only needs to know where your MQTT broker lives. If you are using these docker commands as-is, edit `/opt/mqtt-bridge/config.yml` to look like this: The MQTT Bridge only needs to know where your MQTT broker lives. If you are using these Docker commands as-is, edit `/opt/mqtt-bridge/config.yml` to look like this:
```yaml ```yaml
--- ---
@ -77,7 +77,7 @@ mqtt:
Restart the bridge, and you are ready to go: Restart the bridge, and you are ready to go:
```bash ```bash
$ docker restart mqtt-bridge docker restart mqtt-bridge
``` ```
### SmartThings Device ### SmartThings Device
@ -88,9 +88,9 @@ Now to install your new Device Handler. Go back to `My Devices` in the IDE, and
Go back to `My Devices`, and click on your new device in the list. This will bring up a page that allows you to edit your device's Preferences. Click `edit` and fill in the 3 pieces of information it asks for. Go back to `My Devices`, and click on your new device in the list. This will bring up a page that allows you to edit your device's Preferences. Click `edit` and fill in the 3 pieces of information it asks for.
- MQTT Bridge IP Address: \<IP address of the MQTT Bridge from the previous step> - MQTT Bridge IP Address: \<IP address of the MQTT Bridge from the previous step>
- MQTT Bridge Port: \<8080 if you have changed nothing in the previous commands> - MQTT Bridge Port: \<8080 if you have changed nothing in the previous commands>
- MQTT Bridge MAC Address: \<Mac address of machine running the Bridge code> - MQTT Bridge MAC Address: \<Mac address of machine running the Bridge code>
This will create the link between SmartThings and the MQTT Bridge. This will create the link between SmartThings and the MQTT Bridge.
@ -167,7 +167,7 @@ homeassistant:
- mqtt - mqtt
``` ```
This will start home-assistant, MQTT, and the Bridge, in dependency order. All config can reference the name of the docker container instead of using IP addresses (e.g., mqtt for the broker host in Home Assistant). This will start home-assistant, MQTT, and the Bridge, in dependency order. All configuration can reference the name of the Docker container instead of using IP addresses (e.g., MQTT for the broker host in Home Assistant).
### How it works ### How it works
@ -192,15 +192,14 @@ Here is the final sequence of events:
SmartThings Bridge Sequence SmartThings Bridge Sequence
</p> </p>
There are a lot of stops along the way for these events, but each piece is a simple translation layer to shuttle the events between systems. There are a lot of stops along the way for these events, but each piece is a simple translation layer to shuttle the events between systems.
### Future Improvements ### Future Improvements
- **Raspberry Pi**: There is a lot of interest in getting this running on the Raspberry Pi. It only requires binaries compiled for ARM, so we plan to get ARM-compatible versions of the containers going at some point. - **Raspberry Pi**: There is a lot of interest in getting this running on the Raspberry Pi. It only requires binaries compiled for ARM, so we plan to get ARM-compatible versions of the containers going at some point.
- **Authentication for MQTT**: At the moment, the MQTT bridge doesn't understand how to authenticate to MQTT, so only unauthenticated MQTT is supported. This is mitigated to some degree if you use our Docker Compose config, because MQTT's port is not actually shared publicly. - **Authentication for MQTT**: At the moment, the MQTT bridge doesn't understand how to authenticate to MQTT, so only unauthenticated MQTT is supported. This is mitigated to some degree if you use our Docker Compose config, because MQTT's port is not actually shared publicly.
- **Authentication for MQTT Bridge**: Right now the bridge expects that anyone subscribing is the SmartThings hub. This could use proper authentication. - **Authentication for MQTT Bridge**: Right now the bridge expects that anyone subscribing is the SmartThings hub. This could use proper authentication.
[mosquitto]: http://mosquitto.org/ [mosquitto]: http://mosquitto.org/
[emqttd]: https://github.com/emqtt/emqttd [emqttd]: https://github.com/emqtt/emqttd
[mosca]: http://www.mosca.io/ [mosca]: http://www.mosca.io/

View File

@ -32,8 +32,8 @@ Home Assistant will provide device status, and volume control for each room. If
Mopidy can be run with multiple configuration files, each extending the previous file. This is helpful when we're running multiple instances with varying functionality. Mopidy can be run with multiple configuration files, each extending the previous file. This is helpful when we're running multiple instances with varying functionality.
### core.conf ### core.conf
The core configuration is shared between all instances: The core configuration is shared between all instances:
```conf ```conf
@ -52,6 +52,7 @@ password = <redacted>
``` ```
### local.conf ### local.conf
Add the local configuration on computers that have local media files: Add the local configuration on computers that have local media files:
```conf ```conf
@ -60,6 +61,7 @@ media_dir = <your/music/here>
``` ```
### snapcast.conf ### snapcast.conf
Finally, the Mopidy instance that connects with Snapcast needs special configuration. Run on a different port to avoid conflicts if you have a second Mopidy instance running on your computer. The audio output is sent to a named pipe - Snapcast will read from there. Note that you may have to adjust the audio output attribute depending on your system and audio sources. Finally, the Mopidy instance that connects with Snapcast needs special configuration. Run on a different port to avoid conflicts if you have a second Mopidy instance running on your computer. The audio output is sent to a named pipe - Snapcast will read from there. Note that you may have to adjust the audio output attribute depending on your system and audio sources.
```conf ```conf
@ -80,19 +82,19 @@ output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioc
To run a room-specific instance: To run a room-specific instance:
```bash ```bash
$ mopidy --config $CONF_DIR/core.conf mopidy --config $CONF_DIR/core.conf
``` ```
To run a room-specific instance with local media: To run a room-specific instance with local media:
```bash ```bash
$ mopidy --config $CONF_DIR/core.conf:$CONF_DIR/local.conf mopidy --config $CONF_DIR/core.conf:$CONF_DIR/local.conf
``` ```
To run the special Snapcast-connected instance (with local media): To run the special Snapcast-connected instance (with local media):
```bash ```bash
$ mopidy --config $CONF_DIR/core.conf:$CONF_DIR/local.conf:$CONF_DIR/snapcast.conf mopidy --config $CONF_DIR/core.conf:$CONF_DIR/local.conf:$CONF_DIR/snapcast.conf
``` ```
## Run Snapcast ## Run Snapcast
@ -100,13 +102,13 @@ $ mopidy --config $CONF_DIR/core.conf:$CONF_DIR/local.conf:$CONF_DIR/snapcast.co
Start the `snapserver` on the same server running Mopidy with the snapcast configuration. Start the `snapserver` on the same server running Mopidy with the snapcast configuration.
```bash ```bash
$ snapserver # or use systemd snapserver # or use systemd
``` ```
Start the `snapclient` on computers that will be playing audio. Start the `snapclient` on computers that will be playing audio.
```bash ```bash
$ snapclient # or use systemd, add -h <server host> if necessary snapclient # or use systemd, add -h <server host> if necessary
``` ```
## Configure Snapcast ## Configure Snapcast

View File

@ -36,7 +36,7 @@ crw-rw----+ 1 root video 81, 1 Jun 23 08:36 /dev/video1
We need an additional software part to handle the cameras. [motion](http://lavrsen.dk/foswiki/bin/view/Motion/WebHome) is capable of monitoring the video signal from USB and network cameras, do motion detection, and other nifty stuff like saving images, add text, or basic image manipulations. Make sure that you have the [RPM Fusion repository](http://rpmfusion.org/) enabled. We need an additional software part to handle the cameras. [motion](http://lavrsen.dk/foswiki/bin/view/Motion/WebHome) is capable of monitoring the video signal from USB and network cameras, do motion detection, and other nifty stuff like saving images, add text, or basic image manipulations. Make sure that you have the [RPM Fusion repository](http://rpmfusion.org/) enabled.
```bash ```bash
$ sudo dnf -y install motion sudo dnf -y install motion
``` ```
For our setup we need to modify the file `/etc/motion/motion.conf`. For now the most important parameters are `videodevice`, `snapshot_interval`, and `target_dir`. The other settings can be left to their defaults. We are going to use the device `/dev/video1`, use a 30 seconds interval, and set the path to `/tmp`. For our setup we need to modify the file `/etc/motion/motion.conf`. For now the most important parameters are `videodevice`, `snapshot_interval`, and `target_dir`. The other settings can be left to their defaults. We are going to use the device `/dev/video1`, use a 30 seconds interval, and set the path to `/tmp`.
@ -105,9 +105,9 @@ camera:
The "Cranberry cam" in action The "Cranberry cam" in action
</p> </p>
The machine with the attached USB camera will become a webcam server as well because `motion`'s built-in HTTP server is enabled by default. This means that you could connect your USB webcams to a different machine in your network, run `motion` there, adjust your firewall rules, and use Home Assistant to display the videos. Just check http://[IP of your webcam host]:8081/ to see the stream. This required more powerful hardware than using snapshots, of course. The machine with the attached USB camera will become a webcam server as well because `motion`'s built-in HTTP server is enabled by default. This means that you could connect your USB webcams to a different machine in your network, run `motion` there, adjust your firewall rules, and use Home Assistant to display the videos. Just check `http://[IP of your webcam host]:8081/` to see the stream. This required more powerful hardware than using snapshots, of course.
In a scenario like this needs a [Generic MJPEG IP Camera ](/integrations/mjpeg) in your `configuration.yaml` file. In a scenario like this needs a [Generic MJPEG IP Camera](/integrations/mjpeg) in your `configuration.yaml` file.
```yaml ```yaml
camera: camera:
@ -117,4 +117,3 @@ camera:
``` ```
[motion](http://lavrsen.dk/foswiki/bin/view/Motion/WebHome) is a powerful tool and this blog post only showed two very simple use cases. Take a look at the [documentation](http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionGuide) of `motion` to unleash its potential. [motion](http://lavrsen.dk/foswiki/bin/view/Motion/WebHome) is a powerful tool and this blog post only showed two very simple use cases. Take a look at the [documentation](http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionGuide) of `motion` to unleash its potential.

View File

@ -26,7 +26,7 @@ If you are just curious what's stored in your database then you can use the `sql
The table that is holding the states is called `states`. The `events` tables is responsible for storing the events which occurred. So, we will first check how many entries there are in the `states` table. `sqlite3` needs to know where the databases is located. To work with your database make sure that Home Assistant is not running or create a copy of the existing database. It's recommended to work with a copy. The table that is holding the states is called `states`. The `events` tables is responsible for storing the events which occurred. So, we will first check how many entries there are in the `states` table. `sqlite3` needs to know where the databases is located. To work with your database make sure that Home Assistant is not running or create a copy of the existing database. It's recommended to work with a copy.
```bash ```bash
$ sqlite3 /home/ha/.homeassistant/home-assistant_v2.db $ sqlite3 /home/ha/.homeassistant/home-assistant_v2.db
SQLite version 3.11.0 2016-02-15 17:29:24 SQLite version 3.11.0 2016-02-15 17:29:24
sqlite> SELECT count(*) FROM states; sqlite> SELECT count(*) FROM states;
24659 24659
@ -55,14 +55,14 @@ If the above query is executed in DB Browser for SQLite you would be able to sav
You may ask: Why not do this with LibreOffice Calc or another spreadsheet application? As most spreadsheet applications are not able to work directly with SQLite database we are going to export the data from the database to [CSV](https://en.wikipedia.org/wiki/Comma-separated_values). You may ask: Why not do this with LibreOffice Calc or another spreadsheet application? As most spreadsheet applications are not able to work directly with SQLite database we are going to export the data from the database to [CSV](https://en.wikipedia.org/wiki/Comma-separated_values).
```bash ```bash
$ sqlite3 -header -csv /home/ha/.homeassistant/home-assistant_v2.db "SELECT last_changed, state FROM states WHERE entity_id = 'sensor.aare' AND last_changed BETWEEN '2016-07-05 00:00:00.000000' AND '2016-07-07 00:00:00.000000';" > sensor.csv sqlite3 -header -csv /home/ha/.homeassistant/home-assistant_v2.db "SELECT last_changed, state FROM states WHERE entity_id = 'sensor.aare' AND last_changed BETWEEN '2016-07-05 00:00:00.000000' AND '2016-07-07 00:00:00.000000';" > sensor.csv
``` ```
The ordering for the `SELECT` was changed to get the time stamps first and then the state. Now we can import the CSV file into the application of your choice, here it's LibreOffice Calc. The ordering for the `SELECT` was changed to get the time stamps first and then the state. Now we can import the CSV file into the application of your choice, here it's LibreOffice Calc.
<p class='img'> <p class='img'>
<img src='/images/blog/2016-07-reporting/libreoffice-import.png' /> <img src='/images/blog/2016-07-reporting/libreoffice-import.png' />
Import of the CSV file Import of the CSV file
</p> </p>
After the import a graph can be created over the existing data. After the import a graph can be created over the existing data.
@ -72,7 +72,7 @@ After the import a graph can be created over the existing data.
Graph in LibreOffice Graph in LibreOffice
</p> </p>
You can also use [matplotlib](http://matplotlib.org/) to generate graphs as an alternative to a spreadsheet application. This is a powerful Python 2D plotting library. With the built-in support for SQLite in Python it will only take a couple lines of code to visualize your data. You can also use [matplotlib](http://matplotlib.org/) to generate graphs as an alternative to a spreadsheet application. This is a powerful Python 2D plotting library. With the built-in support for SQLite in Python it will only take a couple lines of code to visualize your data.
```python ```python
import sqlite3 import sqlite3
@ -101,12 +101,11 @@ plt.xlabel('Time line')
plt.savefig('sensor.png') plt.savefig('sensor.png')
``` ```
Creating a connection to the database and executing a query is similar to the ways already seen. The return values from the query are split into two lists. The time stamps must be converted in an value which is accepted by matplotlib and then the graph is generated and saved as image. Creating a connection to the database and executing a query is similar to the ways already seen. The return values from the query are split into two lists. The time stamps must be converted in an value which is accepted by matplotlib and then the graph is generated and saved as image.
<p class='img'> <p class='img'>
<img src='/images/blog/2016-07-reporting/mpl-sensor.png' /> <img src='/images/blog/2016-07-reporting/mpl-sensor.png' />
Sensor graph generated by matplotlib Sensor graph generated by matplotlib
</p> </p>
Most of the graphs are pretty ugly. So, further beautification will be needed. If you have created a nice report including some amazing graphs then the Home Assistant community would be grateful for sharing them in our [forum](https://community.home-assistant.io/). Most of the graphs are pretty ugly. So, further beautification will be needed. If you have created a nice report including some amazing graphs then the Home Assistant community would be grateful for sharing them in our [forum](https://community.home-assistant.io/).

View File

@ -24,7 +24,7 @@ Connecting...
Erasing flash (this may take a while)... Erasing flash (this may take a while)...
``` ```
and then load the firmware. You may adjust the file name of the firmware binary. and then load the firmware. You may adjust the file name of the firmware binary.
```bash ```bash
$ sudo python esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=8m 0 esp8266-2016-07-10-v1.8.2.bin $ sudo python esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=8m 0 esp8266-2016-07-10-v1.8.2.bin
@ -43,7 +43,7 @@ The [WebREPL](http://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/rep
```bash ```bash
$ sudo minicom -D /dev/ttyUSB0 $ sudo minicom -D /dev/ttyUSB0
#4 ets_task(4020e374, 29, 3fff70e8, 10) #4 ets_task(4020e374, 29, 3fff70e8, 10)
WebREPL daemon started on ws://192.168.4.1:8266 WebREPL daemon started on ws://192.168.4.1:8266
Started webrepl in setup mode Started webrepl in setup mode
could not open file 'main.py' for reading could not open file 'main.py' for reading
@ -51,7 +51,7 @@ could not open file 'main.py' for reading
#5 ets_task(4010035c, 3, 3fff6360, 4) #5 ets_task(4010035c, 3, 3fff6360, 4)
MicroPython v1.8.2-9-g805c2b9 on 2016-07-10; ESP module with ESP8266 MicroPython v1.8.2-9-g805c2b9 on 2016-07-10; ESP module with ESP8266
Type "help()" for more information. Type "help()" for more information.
>>> >>>
``` ```
<div class='note'> <div class='note'>
@ -60,7 +60,7 @@ The public build of the firmware may be different than the firmware distributed
</div> </div>
Connect a LED to pin 5 (or another pin of your choosing) to check if the ESP8266 is working as expected. Connect a LED to pin 5 (or another pin of your choosing) to check if the ESP8266 is working as expected.
```python ```python
>>> import machine >>> import machine
@ -105,7 +105,7 @@ def do_connect():
Upload this file with `webrepl_cli.py` or the WebREPL: Upload this file with `webrepl_cli.py` or the WebREPL:
```bash ```bash
$ python webrepl_cli.py boot.py 192.168.4.1:/boot.py python webrepl_cli.py boot.py 192.168.4.1:/boot.py
``` ```
If you reboot, you should see your current IP address in the terminal. If you reboot, you should see your current IP address in the terminal.
@ -162,4 +162,3 @@ if __name__ == '__main__':
Upload `main.py` the same way as `boot.py`. After a reboot (`>>> import machine` and `>>> machine.reboot()`) or power-cycling your physical notifier is ready. Upload `main.py` the same way as `boot.py`. After a reboot (`>>> import machine` and `>>> machine.reboot()`) or power-cycling your physical notifier is ready.
If you run into trouble, press "Ctrl+c" in the REPL to stop the execution of the code, enter `>>> import webrepl` and `>>> webrepl.start()`, and upload your fixed file. If you run into trouble, press "Ctrl+c" in the REPL to stop the execution of the code, enter `>>> import webrepl` and `>>> webrepl.start()`, and upload your fixed file.

View File

@ -10,7 +10,7 @@ categories: Release-Notes
This week's blog post could only be possibly described by exactly one hashtag: This week's blog post could only be possibly described by exactly one hashtag:
# #Amazing ## #Amazing
<sup>or <sup>maybe<sup>#supersized</sup></sup></sup> <sup>or <sup>maybe<sup>#supersized</sup></sup></sup>
@ -47,12 +47,15 @@ Now that we have that great news out of the way, onto this week's release which
While this release is **#Amazing**, we had to break a few eggs (now you understand the title reference!) to make a beautiful omelette (using home automation obviously) so some platforms and components have needed to introduce breaking changes. Please make sure to read the [Breaking Changes](#breaking-changes) section below. While this release is **#Amazing**, we had to break a few eggs (now you understand the title reference!) to make a beautiful omelette (using home automation obviously) so some platforms and components have needed to introduce breaking changes. Please make sure to read the [Breaking Changes](#breaking-changes) section below.
### Hue Bridge Emulation ### Hue Bridge Emulation
Thanks to [@mgbowen] we now have the functionality previously provided by [@blocke]'s [ha-local-echo](https://github.com/blocke/ha-local-echo) [built right into Home Assistant](/integrations/emulated_hue/)! This means that for those of you with devices that either lack or have a subpar integration with Home Assistant (looking at you Amazon Echo) you can now have a better experience by having your Home Assistant pretend to be a Hue Bridge. Personally, I have used [@auchter]'s [Haaska](https://github.com/auchter/haaska) previously but found that it was slow to respond and sometimes failed entirely. With the new [`emulated_hue`](/integrations/emulated_hue/) component, you can have local control of entities through Amazon Echo. Thanks to [@mgbowen] we now have the functionality previously provided by [@blocke]'s [ha-local-echo](https://github.com/blocke/ha-local-echo) [built right into Home Assistant](/integrations/emulated_hue/)! This means that for those of you with devices that either lack or have a subpar integration with Home Assistant (looking at you Amazon Echo) you can now have a better experience by having your Home Assistant pretend to be a Hue Bridge. Personally, I have used [@auchter]'s [Haaska](https://github.com/auchter/haaska) previously but found that it was slow to respond and sometimes failed entirely. With the new [`emulated_hue`](/integrations/emulated_hue/) component, you can have local control of entities through Amazon Echo.
### Notification improvements ### Notification improvements
We have some excellent upgrades to the notification system coming to you in 0.27, courtesy of me, [@robbiet480]. We have some excellent upgrades to the notification system coming to you in 0.27, courtesy of me, [@robbiet480].
#### HTML5 Push Notifications #### HTML5 Push Notifications
This release adds support for [HTML5] push notifications on Chrome/Firefox/Opera on both desktop and Android devices. This means that you can send a notification to your phone even when your Home Assistant is not open in your mobile browser. When using Chrome you can even include 2 action buttons so that you can control your Home Assistant from your phone's lock screen, allowing you to do things like sound alarms or unlock your front door, all without leaving the notification. Thanks again to me ([@robbiet480]) and Paulus ([@balloob]) for all the hard work on this! This release adds support for [HTML5] push notifications on Chrome/Firefox/Opera on both desktop and Android devices. This means that you can send a notification to your phone even when your Home Assistant is not open in your mobile browser. When using Chrome you can even include 2 action buttons so that you can control your Home Assistant from your phone's lock screen, allowing you to do things like sound alarms or unlock your front door, all without leaving the notification. Thanks again to me ([@robbiet480]) and Paulus ([@balloob]) for all the hard work on this!
<p class='img'> <p class='img'>
@ -60,19 +63,23 @@ This release adds support for [HTML5] push notifications on Chrome/Firefox/Opera
</p> </p>
#### Notification Groups #### Notification Groups
Using the new notify `group` platform allows you to cut down a lot of duplicate automation logic by combining multiple notification platforms and `target`s into a single notify service. Check out the [docs](/integrations/notify.group/) for more info.
#### `target` is no longer needed! Using the new notify `group` platform allows you to cut down a lot of duplicate automation logic by combining multiple notification platforms and `target`s into a single notify service. Check out the [documentation](/integrations/notify.group/) for more info.
#### `target` is no longer needed
For platforms that support it, starting with the new HTML5 platform, any `target`s that are available will be exposed as individual services, so no more having to remember which `target`s to use. Please note that the existing services also still exist so you can keep using `target` if you wish. For platforms that support it, starting with the new HTML5 platform, any `target`s that are available will be exposed as individual services, so no more having to remember which `target`s to use. Please note that the existing services also still exist so you can keep using `target` if you wish.
### Validate configuration before restarting Home Assistant ### Validate configuration before restarting Home Assistant
Ever restarted Home Assistant to test a configuration change just to find out there is a validation error? Well, not anymore! [@kellerza] has added a command line script that will validate your configuration as if you started Home Assistant. Ever restarted Home Assistant to test a configuration change just to find out there is a validation error? Well, not anymore! [@kellerza] has added a command line script that will validate your configuration as if you started Home Assistant.
```bash ```bash
$ hass --script check_config hass --script check_config
``` ```
### Configuration validation ### Configuration validation
This release includes a big push on making sure all platforms contain proper configuration validation. This should help in getting your configuration right. Thanks to [@fabaff], [@pavoni], [@pvizeli], [@nkgilley] for all the hard work on this, you all rock! This release includes a big push on making sure all platforms contain proper configuration validation. This should help in getting your configuration right. Thanks to [@fabaff], [@pavoni], [@pvizeli], [@nkgilley] for all the hard work on this, you all rock!
<p class='img'> <p class='img'>
@ -80,12 +87,15 @@ This release includes a big push on making sure all platforms contain proper con
</p> </p>
### FFMpeg motion/noise sensing ### FFMpeg motion/noise sensing
It's now possible to use [FFMpeg] to monitor a video stream and detect motion thanks to a new binary sensor platform by [@pvizeli]. It's now possible to use [FFMpeg] to monitor a video stream and detect motion thanks to a new binary sensor platform by [@pvizeli].
### Component clean up - Thermostat & HVAC -> Climate. Rollershutter & Garage Door -> Cover. ### Component clean up - Thermostat & HVAC -> Climate. Rollershutter & Garage Door -> Cover
Due to our wild growth we ended up with a few components that had a lot of overlapping functionality. [@turbokongen] took on the hard job on merging them. Thermostat and HVAC platforms are now combined under the new Climate component. Rollershutter and Garage Door platforms are now combined under the new Cover component. You can easily upgrade by just swapping out the name. For example replace `thermostat` with `climate`. The old components have been deprecated and will be removed in the near future. Due to our wild growth we ended up with a few components that had a lot of overlapping functionality. [@turbokongen] took on the hard job on merging them. Thermostat and HVAC platforms are now combined under the new Climate component. Rollershutter and Garage Door platforms are now combined under the new Cover component. You can easily upgrade by just swapping out the name. For example replace `thermostat` with `climate`. The old components have been deprecated and will be removed in the near future.
### A new `fan` component ### A new `fan` component
Along with the new `climate` component, [@Teagan42] and I ([@robbiet480]) decided we needed something simpler to just control a fan. Currently it has support for controlling Insteon fans. MQTT support will appear in 0.28.0. I tried to get it implemented before 0.27.0 but spent too long writing this blog post 😢. Along with the new `climate` component, [@Teagan42] and I ([@robbiet480]) decided we needed something simpler to just control a fan. Currently it has support for controlling Insteon fans. MQTT support will appear in 0.28.0. I tried to get it implemented before 0.27.0 but spent too long writing this blog post 😢.
### All changes ### All changes

View File

@ -13,19 +13,18 @@ So, part 1 of [ESP8266 and MicroPython](/blog/2016/07/28/esp8266-and-micropython
<!--more--> <!--more-->
Beside [HTTP POST](https://en.wikipedia.org/wiki/POST_(HTTP)) requests, MQTT is the quickest way (from the author's point of view) to publish information with DIY devices. Beside [HTTP POST](https://en.wikipedia.org/wiki/POST_(HTTP)) requests, MQTT is the quickest way (from the author's point of view) to publish information with DIY devices.
You have to make a decision: Do you want to pull or to [poll](https://en.wikipedia.org/wiki/Polling_(computer_science)) the information for the sensor? For slowly changing values like temperature it's perfectly fine to wait a couple of seconds to retrieve the value. If it's a motion detector the state change should be available instantly in Home Assistant or it could be missed. This means the sensor must take initiative and send the data to Home Assistant. You have to make a decision: Do you want to pull or to [poll](https://en.wikipedia.org/wiki/Polling_(computer_science)) the information for the sensor? For slowly changing values like temperature it's perfectly fine to wait a couple of seconds to retrieve the value. If it's a motion detector the state change should be available instantly in Home Assistant or it could be missed. This means the sensor must take initiative and send the data to Home Assistant.
An example for pulling is [aREST](/integrations/arest#sensor). This is a great way to work with the ESP8266 based units and the Ardunio IDE. An example for pulling is [aREST](/integrations/arest#sensor). This is a great way to work with the ESP8266 based units and the Ardunio IDE.
### MQTT ## MQTT
You can find a simple examples for publishing and subscribing with MQTT in the [MicroPython](https://github.com/micropython/micropython-lib) library overview in the section for [umqtt](https://github.com/micropython/micropython-lib/tree/master/umqtt.simple). You can find a simple examples for publishing and subscribing with MQTT in the [MicroPython](https://github.com/micropython/micropython-lib) library overview in the section for [umqtt](https://github.com/micropython/micropython-lib/tree/master/umqtt.simple).
The example below is adopted from the work of [@davea](https://github.com/davea) as we don't want to re-invent the wheel. The configuration feature is crafty and simplyfies the code with the usage of a file called `/config.json` which stores the configuration details. The ESP8266 device will send the value of a pin every 5 seconds. The example below is adopted from the work of [@davea](https://github.com/davea) as we don't want to re-invent the wheel. The configuration feature is crafty and simplyfies the code with the usage of a file called `/config.json` which stores the configuration details. The ESP8266 device will send the value of a pin every 5 seconds.
```python ```python
import machine import machine
import time import time
@ -37,7 +36,7 @@ from umqtt.simple import MQTTClient
# These defaults are overwritten with the contents of /config.json by load_config() # These defaults are overwritten with the contents of /config.json by load_config()
CONFIG = { CONFIG = {
"broker": "192.168.1.19", "broker": "192.168.1.19",
"sensor_pin": 0, "sensor_pin": 0,
"client_id": b"esp8266_" + ubinascii.hexlify(machine.unique_id()), "client_id": b"esp8266_" + ubinascii.hexlify(machine.unique_id()),
"topic": b"home", "topic": b"home",
} }
@ -90,7 +89,7 @@ if __name__ == '__main__':
Subscribe to the topic `home/#` or create a [MQTT sensor](/integrations/sensor.mqtt/) to check if the sensor values are published. Subscribe to the topic `home/#` or create a [MQTT sensor](/integrations/sensor.mqtt/) to check if the sensor values are published.
```bash ```bash
$ mosquitto_sub -h 192.168.1.19 -v -t "home/#" mosquitto_sub -h 192.168.1.19 -v -t "home/#"
``` ```
```yaml ```yaml
@ -101,4 +100,3 @@ sensor:
``` ```
[@davea](https://github.com/davea) created [sonoff-mqtt](https://github.com/davea/sonoff-mqtt). This code will work on ESP8622 based devices too and shows how to use a button to control a relay. [@davea](https://github.com/davea) created [sonoff-mqtt](https://github.com/davea/sonoff-mqtt). This code will work on ESP8622 based devices too and shows how to use a button to control a relay.

View File

@ -21,10 +21,11 @@ The simplest way to show Home Assistant to others is the online demo at [/demo/]
<!--more--> <!--more-->
## `--demo-mode` and Demo platform ## `--demo-mode` and Demo platform
To be safe for your talk, you don't want to depend on an internet connection. The demo mode [`--demo-mode`](/docs/tools/hass/) allows you to run a demo locally including the latest features. Make sure that you have a backup of your configuration. To be safe for your talk, you don't want to depend on an internet connection. The demo mode [`--demo-mode`](/docs/tools/hass/) allows you to run a demo locally including the latest features. Make sure that you have a backup of your configuration.
```bash ```bash
$ hass --demo-mode hass --demo-mode
``` ```
If you already have a `configuration.yaml` file in place then you will get a combination of your setup with all available [`demo`](/integrations/demo/) platforms. This can be overwhelming for the audience. The suggestion is that you tailor the demo to your needs by only showing a few selected platforms. For example: If you already have a `configuration.yaml` file in place then you will get a combination of your setup with all available [`demo`](/integrations/demo/) platforms. This can be overwhelming for the audience. The suggestion is that you tailor the demo to your needs by only showing a few selected platforms. For example:
@ -44,6 +45,7 @@ switch:
</p> </p>
## `random` platforms ## `random` platforms
Till now the frontend is static. Nothing is changing over time. Starting with 0.57 we ship a [`random` binary sensor](/integrations/random/#binary-sensor) platform in addition to the already available [`random` sensor](/integrations/random#sensor). Till now the frontend is static. Nothing is changing over time. Starting with 0.57 we ship a [`random` binary sensor](/integrations/random/#binary-sensor) platform in addition to the already available [`random` sensor](/integrations/random#sensor).
By adding those platform to your `configuration.yaml` file, your demo will become more interactive. By adding those platform to your `configuration.yaml` file, your demo will become more interactive.
@ -69,6 +71,7 @@ binary_sensor:
The `random` and the `demo` platforms can, of course, be used together. With a little work and some of the [`template`](/integrations/#search/template) platforms or the [`input_*`](/integrations/#search/input) components it would even be possible to simulate a complete apartment or a house. For a hint check the sample below: The `random` and the `demo` platforms can, of course, be used together. With a little work and some of the [`template`](/integrations/#search/template) platforms or the [`input_*`](/integrations/#search/input) components it would even be possible to simulate a complete apartment or a house. For a hint check the sample below:
{% raw %} {% raw %}
```yaml ```yaml
input_boolean: input_boolean:
on_off: on_off:
@ -81,9 +84,11 @@ binary_sensor:
friendly_name: 'Movement' friendly_name: 'Movement'
device_class: motion device_class: motion
``` ```
{% endraw %} {% endraw %}
## MQTT Discovery ## MQTT Discovery
This is a section for advanced users as it will require to run a separate script. Instead of adding `demo` platforms to the configuration this setup make use of [MQTT discovery](/docs/mqtt/discovery/) and the [embedded MQTT broker](/docs/mqtt/broker/#embedded-broker). Simply add MQTT to your `configuration.yaml` file with `discovery:` This is a section for advanced users as it will require to run a separate script. Instead of adding `demo` platforms to the configuration this setup make use of [MQTT discovery](/docs/mqtt/discovery/) and the [embedded MQTT broker](/docs/mqtt/broker/#embedded-broker). Simply add MQTT to your `configuration.yaml` file with `discovery:`
```yaml ```yaml
@ -101,4 +106,3 @@ Demo is running... -> CTRL + C to shutdown
It will create sensors, a light, and a switch and update the states as long the script is running. It possible to stop and restart script without losing the entities. It will create sensors, a light, and a switch and update the states as long the script is running. It possible to stop and restart script without losing the entities.
Some users share their slides and other documents in [our assets repository](https://github.com/home-assistant/home-assistant-assets). Also, take a look at that repository if you need a logo for your slides. Some users share their slides and other documents in [our assets repository](https://github.com/home-assistant/home-assistant-assets). Also, take a look at that repository if you need a logo for your slides.

View File

@ -39,7 +39,7 @@ $ ssh -L 8000:localhost:8123 user@[IP_ADDRESS_REMOTE]
A possible example could look like the command below. A possible example could look like the command below.
```bash ```bash
$ ssh -L 8000:localhost:8123 ha@192.168.0.11 ssh -L 8000:localhost:8123 ha@192.168.0.11
``` ```
The first time you establish the connection you need to accept the fingerprint. The first time you establish the connection you need to accept the fingerprint.
@ -64,4 +64,3 @@ Things to keep in mind:
- Don't allow `root` to use SSH. Set `PermitRootLogin no` on the remote system. - Don't allow `root` to use SSH. Set `PermitRootLogin no` on the remote system.
- Your local port must be above 1024. Only `root` is allowed to forward privileged ports which are below 1024. - Your local port must be above 1024. Only `root` is allowed to forward privileged ports which are below 1024.
- Use [SSH keys for authentication](http://docs.fedoraproject.org//en-US/Fedora/14/html/Deployment_Guide/s2-ssh-configuration-keypairs.html) instead of passwords to avoid bruteforce attacks. - Use [SSH keys for authentication](http://docs.fedoraproject.org//en-US/Fedora/14/html/Deployment_Guide/s2-ssh-configuration-keypairs.html) instead of passwords to avoid bruteforce attacks.

View File

@ -22,14 +22,14 @@ To check what your devices are sending, subscribe to the topic `+/devices/+/up`
```bash ```bash
$ mosquitto_sub -v -h <Region>.thethings.network -t '+/devices/+/up' -u '<AppID>' -P '<AppKey>' $ mosquitto_sub -v -h <Region>.thethings.network -t '+/devices/+/up' -u '<AppID>' -P '<AppKey>'
{ {
"app_id": "ha-demo", "app_id": "ha-demo",
"dev_id": "device01", "dev_id": "device01",
"hardware_serial": "AJDJENDNHRBFBBT", "hardware_serial": "AJDJENDNHRBFBBT",
"port": 1, "port": 1,
[...] [...]
``` ```
The payload contains details about the device itself and the sensor data. The sensor data is stored in `payload_fields`. Depending on the device configuration it may contain a single value or multiple values. The payload contains details about the device itself and the sensor data. The sensor data is stored in `payload_fields`. Depending on the device configuration it may contain a single value or multiple values.
## The relay ## The relay
@ -77,7 +77,7 @@ client.loop_forever()
Save it and run it. As soon as a MQTT message is received from your device you should see it on your local broker (here 192.168.0.2) if you subscribe to `#` or the topic given in the script above `home/ttn/garden_temp`. Save it and run it. As soon as a MQTT message is received from your device you should see it on your local broker (here 192.168.0.2) if you subscribe to `#` or the topic given in the script above `home/ttn/garden_temp`.
```bash ```bash
$ mosquitto_sub -h 192.168.0.2 -t "#" -d mosquitto_sub -h 192.168.0.2 -t "#" -d
``` ```
## The sensor ## The sensor

View File

@ -17,7 +17,7 @@ The images for the Raspberry Pi family and the Intel NUC are an easy way to get
Assuming that you already have setup `libvirtd`. You might need to install `virt-builder` and `virt-viewer` additionally. Assuming that you already have setup `libvirtd`. You might need to install `virt-builder` and `virt-viewer` additionally.
```bash ```bash
$ sudo dnf -y install libguestfs-tools-c virt-install virt-viewer sudo dnf -y install libguestfs-tools-c virt-install virt-viewer
``` ```
We will create a virtual machine with Debian 9 and a 10 GB disk image in the QCOW format. Use `$ virt-builder --list` to get an overview about what's operating systems are available if you prefer to use a different system. We will create a virtual machine with Debian 9 and a 10 GB disk image in the QCOW format. Use `$ virt-builder --list` to get an overview about what's operating systems are available if you prefer to use a different system.