-
If you are using the Python Keyring, automatic starting of Home Assistant Core will no longer work.
-
diff --git a/source/_docs/z-wave/adding.markdown b/source/_docs/z-wave/adding.markdown
index ce23ab920ea..6347e5051e8 100644
--- a/source/_docs/z-wave/adding.markdown
+++ b/source/_docs/z-wave/adding.markdown
@@ -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:
```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:
```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`:
```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/, $//'
```
@@ -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
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
-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
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**
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
-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
diff --git a/source/_docs/z-wave/device-specific.markdown b/source/_docs/z-wave/device-specific.markdown
index 9b81fd900d2..ed5884b3d01 100644
--- a/source/_docs/z-wave/device-specific.markdown
+++ b/source/_docs/z-wave/device-specific.markdown
@@ -32,13 +32,13 @@ Use the following example commands from a terminal session on your Pi where your
Turn off "Disco lights":
```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":
```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).
@@ -60,13 +60,13 @@ dtoverlay=pi3-disable-bt
Then disable the Bluetooth modem service:
```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:
```bash
-$ sudo systemctl mask serial-getty@ttyAMA0.service
+sudo systemctl mask serial-getty@ttyAMA0.service
```
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:
```bash
-$ sudo usermod -a -G dialout homeassistant
+sudo usermod -a -G dialout homeassistant
```
@@ -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:
```xml
-
-
-
-
-
-
+
+
+
+
+
+
```
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):
Zen21v2 (On/Off Switch):
+
```xml
@@ -278,6 +279,7 @@ Zen21v2 (On/Off Switch):
```
Zen22v2 (Dimmer):
+
```xml
@@ -399,6 +401,7 @@ Zen22v2 (Dimmer):
```
Zen26 (On/Off Switch):
+
```xml
@@ -474,6 +477,7 @@ Zen26 (On/Off Switch):
```
Zen27 (Dimmer):
+
```xml
@@ -588,155 +592,158 @@ Zen27 (Dimmer):
```
Zen30 (Double Switch):
+
```xml
-
- 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
-
-
-
-
-
-
- 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
-
-
-
-
-
-
- LED Indicater color for Dimmer. White, Blue, Green or Red. Default: White
-
-
-
-
-
-
- LED Indicater color for Relay. White, Blue, Green or Red. Default: White
-
-
-
-
-
-
- LED Indicater Brightness for Dimmer. Bright (100%), Medium (60%) or Low (30%). Default: Medium
-
-
-
-
-
- LED Indicater Brightness for Relay. Bright (100%), Medium (60%) or Low (30%). Default: Medium
-
-
-
-
-
- LED Indicator Mode for Scene Control. Enable/Disable LED indicators next to the dimmer lighting up when a scene is selected. Default: disabled
-
-
-
-
- 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)
-
-
- 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)
-
-
- 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)
-
-
- 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)
-
-
- On Off Status After Power Failure. Default: Restore both to prior state
-
-
-
-
-
-
-
-
-
-
-
- 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
-
-
- 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
-
-
- 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
-
-
- 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
-
-
-
-
- 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
-
-
-
-
-
- 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
-
-
-
-
-
- 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
-
-
-
-
-
- Choose how many seconds it takes for the dimmer to go from 0% to 100% brightness when pressing and holding the paddle. Default: 4.
-
-
- 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.
-
-
- Sets behavior of the dimmer when physical control is disabled
-
-
-
-
- Sets behavior of the relay when physical control is disabled
-
-
-
-
- Set the brightness level the dimmer will turn on to when off and when lower paddle is held DOWN for a second. Default: 20
-
-
- 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.
-
-
-
-
+
+ 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
+
+
+
+
+
+
+ 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
+
+
+
+
+
+
+ LED Indicater color for Dimmer. White, Blue, Green or Red. Default: White
+
+
+
+
+
+
+ LED Indicater color for Relay. White, Blue, Green or Red. Default: White
+
+
+
+
+
+
+ LED Indicater Brightness for Dimmer. Bright (100%), Medium (60%) or Low (30%). Default: Medium
+
+
+
+
+
+ LED Indicater Brightness for Relay. Bright (100%), Medium (60%) or Low (30%). Default: Medium
+
+
+
+
+
+ LED Indicator Mode for Scene Control. Enable/Disable LED indicators next to the dimmer lighting up when a scene is selected. Default: disabled
+
+
+
+
+ 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)
+
+
+ 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)
+
+
+ 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)
+
+
+ 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)
+
+
+ On Off Status After Power Failure. Default: Restore both to prior state
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+ 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
+
+
+ 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
+
+
+ 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
+
+
+
+
+ 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
+
+
+
+
+
+ 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
+
+
+
+
+
+ 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
+
+
+
+
+
+ Choose how many seconds it takes for the dimmer to go from 0% to 100% brightness when pressing and holding the paddle. Default: 4.
+
+
+ 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.
+
+
+ Sets behavior of the dimmer when physical control is disabled
+
+
+
+
+ Sets behavior of the relay when physical control is disabled
+
+
+
+
+ Set the brightness level the dimmer will turn on to when off and when lower paddle is held DOWN for a second. Default: 20
+
+
+ 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.
+
+
+
+
```
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
-
-
-
-
+
+
+
+
```
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
-
-
-
-
-
+
+
+
+
+
```
@@ -800,7 +807,6 @@ Hold Button|7740
4x Tap|7980
5x Tap|8040
-
### Fibaro Button FGPB-101-6 v3.2
@@ -827,19 +833,18 @@ Tap and hold wakes up the Button.
### 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:
```xml
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
```
@@ -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:
{% raw %}
+
```yaml
automation:
- alias: Sync the indicator value on button events
@@ -1113,7 +1119,7 @@ automation:
entity_id: zwave.scene_contrl
action:
- service: zwave.refresh_node_value
- data_template:
+ data_template:
node_id: 3
value_id: "{{ state_attr('sensor.scene_contrl_indicator','value_id') }}"
switch:
@@ -1204,9 +1210,9 @@ To get the Z-Push Button 2 or the Z-Push Button 8 working in Home Assistant, you
```xml
-
-
-
+
+
+
```
@@ -1214,15 +1220,15 @@ To get the Z-Push Button 2 or the Z-Push Button 8 working in Home Assistant, you
```xml
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
```
@@ -1300,114 +1306,114 @@ Once the firmware is updated, the the new configuration parameters will have to
```xml
-
- On Off Status After Power Failure. Default: all relays restore to previous state
-
-
-
-
-
-
-
- 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)
-
-
-
-
-
-
- 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)
-
-
-
-
-
-
- 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)
-
-
-
-
-
-
- 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
-
-
-
-
-
-
- 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)
-
-
- 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)
-
-
- 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)
-
-
- 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)
-
-
- 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)
-
-
- 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)
-
-
- Enable/Disable Manual Control for SW1. Default: enabled
-
-
-
-
-
- Enable/Disable Manual Control for SW2. Default: enabled
-
-
-
-
-
- Enable/Disable Manual Control for SW3. Default: enabled
-
-
-
-
-
- Choose between second, minutes, and hours as the unit for Auto Turn-Off time for Relay 1. Default: minutes
-
-
-
-
-
- Choose between second, minutes, and hours as the unit for Auto Turn-On time for Relay 1. Default: minutes
-
-
-
-
-
- Choose between second, minutes, and hours as the unit for Auto Turn-Off time for Relay 2. Default: minutes
-
-
-
-
-
- Choose between second, minutes, and hours as the unit for Auto Turn-On time for Relay 2. Default: minutes
-
-
-
-
-
- Choose between second, minutes, and hours as the unit for Auto Turn-Off time for Relay 3. Default: minutes
-
-
-
-
-
- Choose between second, minutes, and hours as the unit for Auto Turn-On time for Relay 3. Default: minutes
-
-
-
-
+
+ On Off Status After Power Failure. Default: all relays restore to previous state
+
+
+
+
+
+
+
+ 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)
+
+
+
+
+
+
+ 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)
+
+
+
+
+
+
+ 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)
+
+
+
+
+
+
+ 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
+
+
+
+
+
+
+ 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)
+
+
+ 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)
+
+
+ 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)
+
+
+ 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)
+
+
+ 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)
+
+
+ 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)
+
+
+ Enable/Disable Manual Control for SW1. Default: enabled
+
+
+
+
+
+ Enable/Disable Manual Control for SW2. Default: enabled
+
+
+
+
+
+ Enable/Disable Manual Control for SW3. Default: enabled
+
+
+
+
+
+ Choose between second, minutes, and hours as the unit for Auto Turn-Off time for Relay 1. Default: minutes
+
+
+
+
+
+ Choose between second, minutes, and hours as the unit for Auto Turn-On time for Relay 1. Default: minutes
+
+
+
+
+
+ Choose between second, minutes, and hours as the unit for Auto Turn-Off time for Relay 2. Default: minutes
+
+
+
+
+
+ Choose between second, minutes, and hours as the unit for Auto Turn-On time for Relay 2. Default: minutes
+
+
+
+
+
+ Choose between second, minutes, and hours as the unit for Auto Turn-Off time for Relay 3. Default: minutes
+
+
+
+
+
+ Choose between second, minutes, and hours as the unit for Auto Turn-On time for Relay 3. Default: minutes
+
+
+
+
```
@@ -1426,7 +1432,7 @@ The configuration parameters will have to be added to the `zwcfg` file. Replace
Enable or disable motion reports completely. If motion sensor is disabled, the device will not report motion at all to your hub.
-
+
Adjust motion sensitivity where 10 is the most sensative setting.
default: 10
@@ -1450,4 +1456,4 @@ The configuration parameters will have to be added to the `zwcfg` file. Replace
-```
\ No newline at end of file
+```
diff --git a/source/_faq/pip.markdown b/source/_faq/pip.markdown
index 2f865fbf6dc..d4b30d47cf7 100644
--- a/source/_faq/pip.markdown
+++ b/source/_faq/pip.markdown
@@ -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:
```bash
-$ python3 get-pip.py
+python3 get-pip.py
```
diff --git a/source/_faq/pip3.markdown b/source/_faq/pip3.markdown
index ad7503ec18c..e59c22c9a4b 100644
--- a/source/_faq/pip3.markdown
+++ b/source/_faq/pip3.markdown
@@ -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:
```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`.
@@ -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`:
```bash
-$ sudo apt-get install python3-dev libffi-dev libssl-dev
+sudo apt-get install python3-dev libffi-dev libssl-dev
```
diff --git a/source/_integrations/arduino.markdown b/source/_integrations/arduino.markdown
index a72b1042527..791055b8f18 100644
--- a/source/_integrations/arduino.markdown
+++ b/source/_integrations/arduino.markdown
@@ -46,7 +46,7 @@ port:
The exact number can be determined with the command shown below.
```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*`).
@@ -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.
```bash
-$ sudo usermod -a -G dialout,lock $USER
+sudo usermod -a -G dialout,lock $USER
```
## Sensor
diff --git a/source/_integrations/bh1750.markdown b/source/_integrations/bh1750.markdown
index bd8b56e819c..6c9e5e14c90 100644
--- a/source/_integrations/bh1750.markdown
+++ b/source/_integrations/bh1750.markdown
@@ -86,7 +86,7 @@ Enable I2c interface with the Raspberry Pi configuration utility:
```bash
# pi user environment: Enable i2c interface
-$ sudo raspi-config
+sudo raspi-config
```
Select `Interfacing options->I2C` choose `` 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
# 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
-$ sudo addgroup homeassistant i2c
+sudo addgroup homeassistant i2c
# pi user environment: Reboot Raspberry Pi to apply changes
-$ sudo reboot
+sudo reboot
```
### 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:
```bash
-$ /usr/sbin/i2cdetect -y 1
+/usr/sbin/i2cdetect -y 1
```
It will output a table like this:
diff --git a/source/_integrations/binary_sensor.mqtt.markdown b/source/_integrations/binary_sensor.mqtt.markdown
index 32adba9baaa..ce2d70e59b4 100644
--- a/source/_integrations/binary_sensor.mqtt.markdown
+++ b/source/_integrations/binary_sensor.mqtt.markdown
@@ -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:
```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:
{% raw %}
+
```yaml
# Example configuration.yaml entry
binary_sensor:
@@ -170,10 +171,13 @@ binary_sensor:
device_class: opening
value_template: '{{ value.x }}'
```
+
{% endraw %}
### Toggle the binary sensor each time a message is received on state_topic
+
{% raw %}
+
```yaml
# Example configuration.yaml entry
binary_sensor:
@@ -181,6 +185,7 @@ binary_sensor:
state_topic: "lab_button/cmnd/POWER"
value_template: "{%if is_state(entity_id,\"on\")-%}OFF{%-else-%}ON{%-endif%}"
```
+
{% endraw %}
### Get the state of a device with ESPEasy
diff --git a/source/_integrations/blinksticklight.markdown b/source/_integrations/blinksticklight.markdown
index 4066d6022ed..149e5c8fd0a 100644
--- a/source/_integrations/blinksticklight.markdown
+++ b/source/_integrations/blinksticklight.markdown
@@ -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).
```bash
-$ sudo blinkstick --add-udev-rule
+sudo blinkstick --add-udev-rule
```
## Configuration
diff --git a/source/_integrations/bme280.markdown b/source/_integrations/bme280.markdown
index bb4fb69dd6b..95f2759f111 100644
--- a/source/_integrations/bme280.markdown
+++ b/source/_integrations/bme280.markdown
@@ -144,7 +144,7 @@ Enable I2c interface with the Raspberry Pi configuration utility:
```bash
# pi user environment: Enable i2c interface
-$ sudo raspi-config
+sudo raspi-config
```
Select `Interfacing options->I2C` choose `` 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
# 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
-$ sudo addgroup homeassistant i2c
+sudo addgroup homeassistant i2c
# pi user environment: Reboot Raspberry Pi to apply changes
-$ sudo reboot
+sudo reboot
```
### 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:
```bash
-$ /usr/sbin/i2cdetect -y 1
+/usr/sbin/i2cdetect -y 1
```
It will output a table like this:
+
```text
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
diff --git a/source/_integrations/caldav.markdown b/source/_integrations/caldav.markdown
index e5d2bdc6009..8e32afb0738 100644
--- a/source/_integrations/caldav.markdown
+++ b/source/_integrations/caldav.markdown
@@ -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.
-### 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 might need some additional system packages to compile the Python CalDAV library. On a Debian based system, install them by:
```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:
@@ -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.
-### Custom calendars
+## Custom calendars
You have the possibility to create multiple binary sensors for events that match certain conditions.
@@ -104,17 +104,17 @@ custom_calendars:
type: string
{% 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`.
- - **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
- - **description**: The event description.
- - **location**: The event Location.
- - **start_time**: Start time of event.
- - **end_time**: End time of event.
+- **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.
+- **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.
+- **location**: The event Location.
+- **start_time**: Start 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.
diff --git a/source/_integrations/cover.mqtt.markdown b/source/_integrations/cover.mqtt.markdown
index 5edc481f7b8..a2efc5ab237 100644
--- a/source/_integrations/cover.mqtt.markdown
+++ b/source/_integrations/cover.mqtt.markdown
@@ -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.
{% raw %}
+
```yaml
# Example configuration.yaml entry
cover:
@@ -264,6 +265,7 @@ cover:
optimistic: false
value_template: '{{ value.x }}'
```
+
{% endraw %}
### 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.
{% raw %}
+
```yaml
# Example configuration.yaml entry
cover:
@@ -292,6 +295,7 @@ cover:
optimistic: false
value_template: '{{ value.x }}'
```
+
{% endraw %}
### Full configuration
@@ -299,6 +303,7 @@ cover:
The example below shows a full configuration for a cover.
{% raw %}
+
```yaml
# Example configuration.yaml entry
cover:
@@ -328,10 +333,11 @@ cover:
tilt_closed_value: 70
tilt_opened_value: 180
```
+
{% 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:
```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"
```
diff --git a/source/_integrations/dweet.markdown b/source/_integrations/dweet.markdown
index 3a1729fad78..377126fce0a 100644
--- a/source/_integrations/dweet.markdown
+++ b/source/_integrations/dweet.markdown
@@ -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:
{% raw %}
+
```yaml
# Example configuration.yaml entry
sensor:
@@ -67,6 +68,7 @@ sensor:
device: THING_NAME
value_template: '{{ value_json.VARIABLE }}'
```
+
{% endraw %}
{% configuration %}
@@ -110,7 +112,7 @@ sensor:
You can easily send dweets from the command-line to test your sensor with `curl`.
```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:
diff --git a/source/_integrations/dyson.markdown b/source/_integrations/dyson.markdown
index f420429dfd8..76519f59942 100644
--- a/source/_integrations/dyson.markdown
+++ b/source/_integrations/dyson.markdown
@@ -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`:
```bash
-$ nmap -p 1883 XXX.XXX.XXX.XXX/YY --open
+nmap -p 1883 XXX.XXX.XXX.XXX/YY --open
```
Where:
@@ -91,7 +91,7 @@ Where:
For example:
```bash
-$ nmap -p 1883 192.168.0.0/24 --open
+nmap -p 1883 192.168.0.0/24 --open
```
## Vacuum
diff --git a/source/_integrations/ffmpeg_motion.markdown b/source/_integrations/ffmpeg_motion.markdown
index 7f0b73b699f..3d4ccdabcc7 100644
--- a/source/_integrations/ffmpeg_motion.markdown
+++ b/source/_integrations/ffmpeg_motion.markdown
@@ -73,12 +73,12 @@ extra_arguments:
To experiment with values (changes/100 is the scene value in `ffmpeg`):
```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).
-#### Tips
+### Tips
- Use motion only in a custom area with [crop filter](https://ffmpeg.org/ffmpeg-filters.html#crop):
diff --git a/source/_integrations/ffmpeg_noise.markdown b/source/_integrations/ffmpeg_noise.markdown
index 1d147dd09d6..4a0166f4cf8 100644
--- a/source/_integrations/ffmpeg_noise.markdown
+++ b/source/_integrations/ffmpeg_noise.markdown
@@ -68,5 +68,5 @@ output:
To experiment with values:
```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 -
```
diff --git a/source/_integrations/hddtemp.markdown b/source/_integrations/hddtemp.markdown
index 822dda182d6..df975636bb1 100644
--- a/source/_integrations/hddtemp.markdown
+++ b/source/_integrations/hddtemp.markdown
@@ -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.
```bash
-$ hddtemp -dF
+hddtemp -dF
```
To setup a HDDTemp to your installation, add the following to your `configuration.yaml` file:
diff --git a/source/_integrations/htu21d.markdown b/source/_integrations/htu21d.markdown
index 083bcd5a95f..0a34418458c 100644
--- a/source/_integrations/htu21d.markdown
+++ b/source/_integrations/htu21d.markdown
@@ -93,10 +93,11 @@ $ sudo reboot
After installing `i2c-tools`, a new utility is available to scan the addresses of the connected sensors:
```bash
-$ /usr/sbin/i2cdetect -y 1
+/usr/sbin/i2cdetect -y 1
```
It will output a table like this:
+
```text
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
diff --git a/source/_integrations/hue.markdown b/source/_integrations/hue.markdown
index 33931425e6e..4e7c9c5297f 100644
--- a/source/_integrations/hue.markdown
+++ b/source/_integrations/hue.markdown
@@ -90,7 +90,7 @@ Example:
To create a `LightGroup` named `Ceiling lights` that contains the lights 1, 2, and 3, execute the following command:
```bash
-$ curl -XPOST -d '{"name": "Ceiling lights", "lights": ["1", "2", "3"]}' http:///api//groups
+curl -XPOST -d '{"name": "Ceiling lights", "lights": ["1", "2", "3"]}' http:///api//groups
```
The `` 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/`. `` is the IP address or hostname of your Hue bridge.
@@ -98,7 +98,7 @@ The `` 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:
```bash
-$ curl http:///api//lights
+curl http:///api//lights
```
Home Assistant will automatically detect your new `LightGroup` and add it to the interface.
diff --git a/source/_integrations/lirc.markdown b/source/_integrations/lirc.markdown
index 16352ee4862..a099ccd5b1c 100644
--- a/source/_integrations/lirc.markdown
+++ b/source/_integrations/lirc.markdown
@@ -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.
-### Installation
+## Installation
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.
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 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.
+- 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.
+- 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.
-### 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.
@@ -64,20 +64,19 @@ end
Test your LIRC installation before proceeding by running:
```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.
-
-### Configuration Home Assistant
+## Configuration Home Assistant
```yaml
# Example configuration.yaml entry
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:
diff --git a/source/_integrations/lock.mqtt.markdown b/source/_integrations/lock.mqtt.markdown
index 312714b401d..dc0145c3698 100644
--- a/source/_integrations/lock.mqtt.markdown
+++ b/source/_integrations/lock.mqtt.markdown
@@ -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.
{% raw %}
+
```yaml
# Example configuration.yaml entry
lock:
@@ -172,6 +173,7 @@ lock:
retain: true
value_template: '{{ value.x }}'
```
+
{% 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.
@@ -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:
```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"
```
-
diff --git a/source/_integrations/luftdaten.markdown b/source/_integrations/luftdaten.markdown
index 442b57fd1b6..8a1944b12b1 100644
--- a/source/_integrations/luftdaten.markdown
+++ b/source/_integrations/luftdaten.markdown
@@ -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`:
```bash
-$ curl https://api.luftdaten.info/v1/sensor/[sensorid]/
+curl https://api.luftdaten.info/v1/sensor/[sensorid]/
```
## Full example
diff --git a/source/_integrations/mystrom.markdown b/source/_integrations/mystrom.markdown
index 09c5d3cd284..b21b5db3d45 100644
--- a/source/_integrations/mystrom.markdown
+++ b/source/_integrations/mystrom.markdown
@@ -109,7 +109,7 @@ The endpoint that is receiving the data is `http://[IP address Home Assistant]:8
With `api_password:`
```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]
```
@@ -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:
```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`:
@@ -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).
{% raw %}
+
```yaml
# Example configuration.yaml entry
sensor:
@@ -215,4 +216,5 @@ sensor:
unit_of_measurement: "W"
value_template: "{{ state_attr('switch.office', 'current_power_w') }}"
```
+
{% endraw %}
diff --git a/source/_integrations/openalpr_local.markdown b/source/_integrations/openalpr_local.markdown
index 1c136d8e017..97785dda34d 100644
--- a/source/_integrations/openalpr_local.markdown
+++ b/source/_integrations/openalpr_local.markdown
@@ -14,7 +14,7 @@ or trigger any other [automation](/integrations/automation/).
For using the result inside an automation rule, take a look at the
[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
`alpr` commandline tool.
@@ -27,7 +27,7 @@ On a Debian system you can use this `cmake` command to build only the command
line tool:
```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 ..
```
@@ -37,7 +37,7 @@ For other operating system please refer to the
Verify your `alpr` installation with:
```bash
-$ wget -O- -q http://plates.openalpr.com/h786poj.jpg | alpr -
+wget -O- -q http://plates.openalpr.com/h786poj.jpg | alpr -
```
### Configuration
diff --git a/source/_integrations/raspihats.markdown b/source/_integrations/raspihats.markdown
index e5962769610..d25f8f12389 100644
--- a/source/_integrations/raspihats.markdown
+++ b/source/_integrations/raspihats.markdown
@@ -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.
-## Configuration
+### Configuration
To use your `raspihats` boards in your installation, add the following to your `configuration.yaml` file:
@@ -75,7 +75,7 @@ i2c_hats:
type: string
{% 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:
@@ -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:
```bash
-$ /usr/sbin/i2cdetect -y 1
+/usr/sbin/i2cdetect -y 1
```
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.
-## Configuration
+### Configuration
To use your Raspihats boards in your installation, add the following to your `configuration.yaml` file:
@@ -183,13 +183,13 @@ i2c_hats:
type: boolean
{% 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:
```bash
# pi user environment: Enable i2c interface
-$ sudo raspi-config
+sudo raspi-config
```
Select `Interfacing options->I2C` choose `
` and hit `Enter`, then go to `Finish`.
@@ -198,10 +198,10 @@ Install dependencies for use the `smbus-cffi` module and enable your `homeassist
```bash
# 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
-$ sudo usermod -a -G i2c homeassistant
+sudo usermod -a -G i2c homeassistant
```
## Check the i2c address of the sensor
diff --git a/source/_integrations/rflink.markdown b/source/_integrations/rflink.markdown
index f8233270643..beae0a5ccab 100644
--- a/source/_integrations/rflink.markdown
+++ b/source/_integrations/rflink.markdown
@@ -60,6 +60,7 @@ reconnect_interval:
{% endconfiguration %}
### Full example
+
```yaml
# Example configuration.yaml entry
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:
```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.
diff --git a/source/_integrations/sensor.command_line.markdown b/source/_integrations/sensor.command_line.markdown
index 90e908941e8..b6289a991b8 100644
--- a/source/_integrations/sensor.command_line.markdown
+++ b/source/_integrations/sensor.command_line.markdown
@@ -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/).
```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.
@@ -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:
{% raw %}
+
```yaml
# Example configuration.yaml entry
sensor:
@@ -94,6 +95,7 @@ sensor:
unit_of_measurement: "°C"
value_template: '{{ value | multiply(0.001) | round(1) }}'
```
+
{% endraw %}
### 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.
```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.
@@ -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.
{% raw %}
+
```yaml
# Example configuration.yaml entry
sensor:
@@ -183,14 +186,15 @@ sensor:
command: 'sh /home/pi/.homeassistant/scripts/wind_direction.sh {{ states('sensor.wind_direction') }}'
unit_of_measurement: "Direction"
```
-{% endraw %}
+{% endraw %}
### 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`.
{% raw %}
+
```yaml
# Example configuration.yaml entry
sensor:
@@ -202,4 +206,5 @@ sensor:
command: 'python3 /home/pi/.homeassistant/scripts/datetime.py'
value_template: '{{ value_json.time }}'
```
+
{% endraw %}
diff --git a/source/_integrations/simplepush.markdown b/source/_integrations/simplepush.markdown
index 8c5d2ed259e..bc00dccb2c3 100644
--- a/source/_integrations/simplepush.markdown
+++ b/source/_integrations/simplepush.markdown
@@ -20,7 +20,7 @@ notify:
```
{% 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`.
required: false
type: string
@@ -45,7 +45,7 @@ notify:
To test if the service works, just send a message with `curl` from the command-line.
```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/).
diff --git a/source/_integrations/tof.markdown b/source/_integrations/tof.markdown
index f56eec6bd4f..74fa43b3283 100644
--- a/source/_integrations/tof.markdown
+++ b/source/_integrations/tof.markdown
@@ -71,7 +71,7 @@ Enable the I2c interface with the Raspberry Pi configuration utility:
```bash
# pi user environment: Enable i2c interface
-$ sudo raspi-config
+sudo raspi-config
```
Select `Interfacing options->I2C` choose `` 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
# 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
-$ sudo addgroup homeassistant i2c
+sudo addgroup homeassistant i2c
# pi user environment: Reboot Raspberry Pi to apply changes
-$ sudo reboot
+sudo reboot
```
### 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:
```bash
-$ /usr/sbin/i2cdetect -y 1
+/usr/sbin/i2cdetect -y 1
```
It will output a table like this:
diff --git a/source/_integrations/ubus.markdown b/source/_integrations/ubus.markdown
index 1ce33137cd7..7533e2d83f8 100644
--- a/source/_integrations/ubus.markdown
+++ b/source/_integrations/ubus.markdown
@@ -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
# /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
2. Adjust `configuration.yaml` to log more detail for the `device_tracker` component
-```yaml
-logger:
- default: warn
- logs:
- homeassistant.components.device_tracker: debug
-```
+
+ ```yaml
+ logger:
+ default: warn
+ logs:
+ homeassistant.components.device_tracker: debug
+ ```
+
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.
-```txt
-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.loader] Loaded device_tracker.ubus from homeassistant.components.device_tracker.ubus
-17-04-28 10:43:30 INFO (MainThread) [homeassistant.setup] Setting up device_tracker
-17-04-28 10:43:31 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.ubus
-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/__init__.py", line 152, in async_setup_platform
- 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 58, in __init__
- 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 147, in _req_json_rpc
-17-04-28 10:43:31 INFO (MainThread) [homeassistant.core] Bus:Handling
-17-04-28 10:43:31 INFO (MainThread) [homeassistant.core] Bus:Handling
-```
+
+ ```txt
+ 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.loader] Loaded device_tracker.ubus from homeassistant.components.device_tracker.ubus
+ 17-04-28 10:43:30 INFO (MainThread) [homeassistant.setup] Setting up device_tracker
+ 17-04-28 10:43:31 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.ubus
+ 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/__init__.py", line 152, in async_setup_platform
+ 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 58, in __init__
+ 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 147, in _req_json_rpc
+ 17-04-28 10:43:31 INFO (MainThread) [homeassistant.core] Bus:Handling
+ 17-04-28 10:43:31 INFO (MainThread) [homeassistant.core] Bus:Handling
+ ```
+
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
+
_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
2. In another shell on your Home Assistant device, start tcpdump
-```bash
-$ sudo tcpdump -nnvXSs 0 -w /var/tmp/dt.out 'host 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`
+
+ ```bash
+ sudo tcpdump -nnvXSs 0 -w /var/tmp/dt.out 'host 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`
+
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.
-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.
-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.
-8. 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
+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.
+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.
+7. The first `POST` will show Home Assistant logging into ubus and receiving a session identifier back. It will look something like this:
-{"jsonrpc": "2.0", "params": ["00000000000000000000000000000000", "session", "login", {"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
-Content-Type: application/json
-Transfer-Encoding: chunked
-Connection: keep-alive
+ {"jsonrpc": "2.0", "params": ["00000000000000000000000000000000", "session", "login", {"password": "", "username": "root"}], "method": "call", "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"}}]}
-```
-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.
-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:
-```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
+ HTTP/1.1 200 OK
+ Content-Type: application/json
+ Transfer-Encoding: chunked
+ Connection: keep-alive
-{"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
-Content-Type: application/json
-Transfer-Encoding: chunked
-Connection: keep-alive
+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.
+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:
-{"jsonrpc":"2.0","id":1,"result":{}}
-```
-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.
+ ```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}
+
+ 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
diff --git a/source/_posts/2015-08-31-version-7-revamped-ui-and-improved-distribution.markdown b/source/_posts/2015-08-31-version-7-revamped-ui-and-improved-distribution.markdown
index 527cc53d669..1834e282fc0 100644
--- a/source/_posts/2015-08-31-version-7-revamped-ui-and-improved-distribution.markdown
+++ b/source/_posts/2015-08-31-version-7-revamped-ui-and-improved-distribution.markdown
@@ -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:
- - 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.
- - 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).
- - Requirements for components and platforms are no longer installed into the current Python environment (being virtual or not) but will be installed in `/lib`.
+- 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.
+- 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).
+- Requirements for components and platforms are no longer installed into the current Python environment (being virtual or not) but will be installed in `/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.
@@ -32,23 +32,23 @@ And while Ryan was fixing distribution, I have been hard at work in giving Home
-### 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`.
If you want to migrate your existing configuration to be used as the default configuration:
```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:
```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!
diff --git a/source/_posts/2015-09-11-different-ways-to-use-mqtt-with-home-assistant.markdown b/source/_posts/2015-09-11-different-ways-to-use-mqtt-with-home-assistant.markdown
index e8910eb69fe..d3e86ee1b71 100644
--- a/source/_posts/2015-09-11-different-ways-to-use-mqtt-with-home-assistant.markdown
+++ b/source/_posts/2015-09-11-different-ways-to-use-mqtt-with-home-assistant.markdown
@@ -18,7 +18,7 @@ This post will give you a small overview of some other possibilities on how to u
-### 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.
@@ -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.
```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"
```
@@ -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.
-### 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 :-).
@@ -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.
-### 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.
diff --git a/source/_posts/2016-02-09-Smarter-Smart-Things-with-MQTT-and-Home-Assistant.markdown b/source/_posts/2016-02-09-Smarter-Smart-Things-with-MQTT-and-Home-Assistant.markdown
index 789daa99b99..9c7be14c496 100644
--- a/source/_posts/2016-02-09-Smarter-Smart-Things-with-MQTT-and-Home-Assistant.markdown
+++ b/source/_posts/2016-02-09-Smarter-Smart-Things-with-MQTT-and-Home-Assistant.markdown
@@ -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:
- - [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.
+- [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 macOS.
## Setting up the Bridge
@@ -47,7 +47,7 @@ $ docker run \
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.
@@ -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 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
---
@@ -77,7 +77,7 @@ mqtt:
Restart the bridge, and you are ready to go:
```bash
-$ docker restart mqtt-bridge
+docker restart mqtt-bridge
```
### 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.
- - MQTT Bridge IP Address: \
- - MQTT Bridge Port: \<8080 if you have changed nothing in the previous commands>
- - MQTT Bridge MAC Address: \
+- MQTT Bridge IP Address: \
+- MQTT Bridge Port: \<8080 if you have changed nothing in the previous commands>
+- MQTT Bridge MAC Address: \
This will create the link between SmartThings and the MQTT Bridge.
@@ -167,7 +167,7 @@ homeassistant:
- 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
@@ -192,15 +192,14 @@ Here is the final sequence of events:
SmartThings Bridge Sequence
-
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
+
- **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 Bridge**: Right now the bridge expects that anyone subscribing is the SmartThings hub. This could use proper authentication.
-
[mosquitto]: http://mosquitto.org/
[emqttd]: https://github.com/emqtt/emqttd
[mosca]: http://www.mosca.io/
diff --git a/source/_posts/2016-02-18-multi-room-audio-with-snapcast.markdown b/source/_posts/2016-02-18-multi-room-audio-with-snapcast.markdown
index fce1cd41c3f..a8b12922405 100644
--- a/source/_posts/2016-02-18-multi-room-audio-with-snapcast.markdown
+++ b/source/_posts/2016-02-18-multi-room-audio-with-snapcast.markdown
@@ -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.
-
### core.conf
+
The core configuration is shared between all instances:
```conf
@@ -52,6 +52,7 @@ password =
```
### local.conf
+
Add the local configuration on computers that have local media files:
```conf
@@ -60,6 +61,7 @@ media_dir =
```
### 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.
```conf
@@ -80,19 +82,19 @@ output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioc
To run a room-specific instance:
```bash
-$ mopidy --config $CONF_DIR/core.conf
+mopidy --config $CONF_DIR/core.conf
```
To run a room-specific instance with local media:
```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):
```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
@@ -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.
```bash
-$ snapserver # or use systemd
+snapserver # or use systemd
```
Start the `snapclient` on computers that will be playing audio.
```bash
-$ snapclient # or use systemd, add -h if necessary
+snapclient # or use systemd, add -h if necessary
```
## Configure Snapcast
diff --git a/source/_posts/2016-06-23-usb-webcams-and-home-assistant.markdown b/source/_posts/2016-06-23-usb-webcams-and-home-assistant.markdown
index a1ac6b64e87..d4ed1d8a88b 100644
--- a/source/_posts/2016-06-23-usb-webcams-and-home-assistant.markdown
+++ b/source/_posts/2016-06-23-usb-webcams-and-home-assistant.markdown
@@ -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.
```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`.
@@ -105,9 +105,9 @@ camera:
The "Cranberry cam" in action
-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
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.
-
diff --git a/source/_posts/2016-07-19-visualizing-your-iot-data.markdown b/source/_posts/2016-07-19-visualizing-your-iot-data.markdown
index cffcf5989af..b2d1512dd36 100644
--- a/source/_posts/2016-07-19-visualizing-your-iot-data.markdown
+++ b/source/_posts/2016-07-19-visualizing-your-iot-data.markdown
@@ -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.
```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> SELECT count(*) FROM states;
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).
```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.
- Import of the CSV file
+ Import of the CSV file
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
-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
import sqlite3
@@ -101,12 +101,11 @@ plt.xlabel('Time line')
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.
Sensor graph generated by matplotlib
-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/).
diff --git a/source/_posts/2016-07-28-esp8266-and-micropython-part1.markdown b/source/_posts/2016-07-28-esp8266-and-micropython-part1.markdown
index 04289b0005a..267e53bc16d 100644
--- a/source/_posts/2016-07-28-esp8266-and-micropython-part1.markdown
+++ b/source/_posts/2016-07-28-esp8266-and-micropython-part1.markdown
@@ -24,7 +24,7 @@ Connecting...
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
$ 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
$ 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
Started webrepl in setup mode
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)
MicroPython v1.8.2-9-g805c2b9 on 2016-07-10; ESP module with ESP8266
Type "help()" for more information.
->>>
+>>>
```
@@ -60,7 +60,7 @@ The public build of the firmware may be different than the firmware distributed
-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
>>> import machine
@@ -105,7 +105,7 @@ def do_connect():
Upload this file with `webrepl_cli.py` or the WebREPL:
```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.
@@ -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.
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.
-
diff --git a/source/_posts/2016-08-27-notifications-hue-fake-unification.markdown b/source/_posts/2016-08-27-notifications-hue-fake-unification.markdown
index 09472ee18ac..fb66486a0df 100644
--- a/source/_posts/2016-08-27-notifications-hue-fake-unification.markdown
+++ b/source/_posts/2016-08-27-notifications-hue-fake-unification.markdown
@@ -10,7 +10,7 @@ categories: Release-Notes
This week's blog post could only be possibly described by exactly one hashtag:
-# #Amazing
+## #Amazing
or maybe#supersized
@@ -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.
### 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.
### Notification improvements
+
We have some excellent upgrades to the notification system coming to you in 0.27, courtesy of me, [@robbiet480].
#### 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!
@@ -60,19 +63,23 @@ This release adds support for [HTML5] push notifications on Chrome/Firefox/Opera
#### 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.
### 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.
```bash
-$ hass --script check_config
+hass --script check_config
```
### 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!
@@ -80,12 +87,15 @@ This release includes a big push on making sure all platforms contain proper con
### 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].
-### 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.
### 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 😢.
### All changes
diff --git a/source/_posts/2016-08-31-esp8266-and-micropython-part2.markdown b/source/_posts/2016-08-31-esp8266-and-micropython-part2.markdown
index c35c2737ccc..2b8f96501b9 100644
--- a/source/_posts/2016-08-31-esp8266-and-micropython-part2.markdown
+++ b/source/_posts/2016-08-31-esp8266-and-micropython-part2.markdown
@@ -13,19 +13,18 @@ So, part 1 of [ESP8266 and MicroPython](/blog/2016/07/28/esp8266-and-micropython
-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.
-
```python
import machine
import time
@@ -37,7 +36,7 @@ from umqtt.simple import MQTTClient
# These defaults are overwritten with the contents of /config.json by load_config()
CONFIG = {
"broker": "192.168.1.19",
- "sensor_pin": 0,
+ "sensor_pin": 0,
"client_id": b"esp8266_" + ubinascii.hexlify(machine.unique_id()),
"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.
```bash
-$ mosquitto_sub -h 192.168.1.19 -v -t "home/#"
+mosquitto_sub -h 192.168.1.19 -v -t "home/#"
```
```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.
-
diff --git a/source/_posts/2017-10-28-demo.markdown b/source/_posts/2017-10-28-demo.markdown
index 9e48293e334..c361170d3da 100644
--- a/source/_posts/2017-10-28-demo.markdown
+++ b/source/_posts/2017-10-28-demo.markdown
@@ -21,10 +21,11 @@ The simplest way to show Home Assistant to others is the online demo at [/demo/]
## `--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.
```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:
@@ -44,6 +45,7 @@ switch:
## `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).
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:
{% raw %}
+
```yaml
input_boolean:
on_off:
@@ -81,9 +84,11 @@ binary_sensor:
friendly_name: 'Movement'
device_class: motion
```
+
{% endraw %}
## 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:`
```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.
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.
-
diff --git a/source/_posts/2017-11-02-secure-shell-tunnel.markdown b/source/_posts/2017-11-02-secure-shell-tunnel.markdown
index 75a09c626b7..ce4cd064224 100644
--- a/source/_posts/2017-11-02-secure-shell-tunnel.markdown
+++ b/source/_posts/2017-11-02-secure-shell-tunnel.markdown
@@ -39,7 +39,7 @@ $ ssh -L 8000:localhost:8123 user@[IP_ADDRESS_REMOTE]
A possible example could look like the command below.
```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.
@@ -64,4 +64,3 @@ Things to keep in mind:
- 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.
- 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.
-
diff --git a/source/_posts/2017-11-10-ttn-with-mqtt.markdown b/source/_posts/2017-11-10-ttn-with-mqtt.markdown
index 331646a98ca..0d38705583c 100644
--- a/source/_posts/2017-11-10-ttn-with-mqtt.markdown
+++ b/source/_posts/2017-11-10-ttn-with-mqtt.markdown
@@ -22,14 +22,14 @@ To check what your devices are sending, subscribe to the topic `+/devices/+/up`
```bash
$ mosquitto_sub -v -h .thethings.network -t '+/devices/+/up' -u '' -P ''
{
- "app_id": "ha-demo",
- "dev_id": "device01",
- "hardware_serial": "AJDJENDNHRBFBBT",
- "port": 1,
+ "app_id": "ha-demo",
+ "dev_id": "device01",
+ "hardware_serial": "AJDJENDNHRBFBBT",
+ "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
@@ -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`.
```bash
-$ mosquitto_sub -h 192.168.0.2 -t "#" -d
+mosquitto_sub -h 192.168.0.2 -t "#" -d
```
## The sensor
diff --git a/source/_posts/2017-11-29-hassio-virtual-machine.markdown b/source/_posts/2017-11-29-hassio-virtual-machine.markdown
index 57f69a2faf8..bf9f1938734 100644
--- a/source/_posts/2017-11-29-hassio-virtual-machine.markdown
+++ b/source/_posts/2017-11-29-hassio-virtual-machine.markdown
@@ -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.
```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.