diff --git a/source/_addons/git_pull.markdown b/source/_addons/git_pull.markdown index bf8324628ca..a316149cae4 100644 --- a/source/_addons/git_pull.markdown +++ b/source/_addons/git_pull.markdown @@ -1,6 +1,6 @@ --- layout: page -title: "GIT pull" +title: "Git pull" description: "Load and update configuration files for Home Assistant from a GIT repository." date: 2017-09-25 14:00 sidebar: true @@ -15,6 +15,9 @@ Load and update configuration files for Home Assistant from a GIT repository. { "repository": "https://example.com/my_configs.git", "auto_restart": false, + "git_branch": "master", + "git_command": "pull", + "git_remote": "origin", "repeat": { "active": false, "interval": 300 @@ -32,9 +35,20 @@ Load and update configuration files for Home Assistant from a GIT repository. } ``` -- **repository** (*Required*): GIT url to your repository. You have to add .git to your GITHub-Repository-URL (see example Config) -- **auto_restart** (*Optional*): Make a restart of Home-Assistant if the config have change and is valid. -- **repeat/active** (*Optional*): Pull periodic for GIT updates. +- **repository** (*Required*): Git URL to your repository (make sure to use double quotes). You have to add .git to your GitHub repository URL (see example config) +- **git_branch** (*Required*): Branch name of the git repo, leave this as 'master' if you are unsure. +- **git_remote** (*Required*): Name of the tracked repository, leave this as 'origin' if you are unsure. +- **git_command** (*Required*): Must be either 'pull' or 'reset', leave this as 'pull' if you are unsure. + + * **pull**: Incorporates changes from a remote repository into the current branch. Will preserve any local changes to tracked files. + * **reset**: Will execute ```git reset --hard``` and overwrite any local changes to tracked files and update from the remote repository. + +

+ Using the reset option will overwrite changes to tracked files. Tracked files are those visible in the Github repository or those given by the output on this command: ```git ls-tree -r master --name-only``` +

+ +- **auto_restart** (*Optional*): Restart Home Assistant when the configuration has changed (and is valid). +- **repeat/active** (*Optional*): Pull periodic for git updates. - **repeat/interval** (*Optional*): Pull all x seconds and look for changes. - **deployment_user** (*Optional*): Username to use when authenticating to a repo with a username and password. - **deployment_password** (*Optional*): Password to use when authenticating to a repo. Ignored if deployment_user is not set. diff --git a/source/_components/alarm_control_panel.totalconnect.markdown b/source/_components/alarm_control_panel.totalconnect.markdown index 821d38075e4..203d53a5c04 100644 --- a/source/_components/alarm_control_panel.totalconnect.markdown +++ b/source/_components/alarm_control_panel.totalconnect.markdown @@ -34,3 +34,27 @@ Configuration variables: - **username** (*Required*): Username used to sign into the TotalConnect app/web client. - **password** (*Required*): Password used to sign into the TotalConnect app/web client. +Automation example: + +```yaml +automation: + - alias: "Alarm: Disarmed Daytime" + trigger: + platform: state + entity_id: alarm_control_panel.total_connect + to: 'disarmed' + condition: + condition: sun + before: sunset + action: + service: scene.turn_on + entity_id: scene.OnDisarmedDaytime + - alias: "Alarm: Armed Away" + trigger: + platform: state + entity_id: alarm_control_panel.total_connect + to: 'armed_away' + action: + service: scene.turn_on + entity_id: scene.OnArmedAway +``` diff --git a/source/_components/binary_sensor.command_line.markdown b/source/_components/binary_sensor.command_line.markdown index b37d6e40bbc..25fb0c03302 100644 --- a/source/_components/binary_sensor.command_line.markdown +++ b/source/_components/binary_sensor.command_line.markdown @@ -81,3 +81,27 @@ binary_sensor: ``` Consider to use the [`ping` sensor ](/components/binary_sensor.ping/) as an alternative to the samples above. + +### {% linkable_title Check if a system service is running %} + +The services running is listed in `/etc/systemd/system` and can be checked with the `systemctl` command: + +``` +$ systemctl is-active home-assistant@rock64.service +active +$ sudo service home-assistant@rock64.service stop +$ systemctl is-active home-assistant@rock64.service +inactive +``` + +A binary command line sensor can check this: + +```yaml +binary_sensor: + - platform: command_line + command: '/bin/systemctl is-active home-assistant@rock64.service' + payload_on: 'active' + payload_off: 'inactive' +``` + +Note: Use single quotes! diff --git a/source/_components/binary_sensor.enocean.markdown b/source/_components/binary_sensor.enocean.markdown index 32f3fc3340e..fe4ea3dd681 100644 --- a/source/_components/binary_sensor.enocean.markdown +++ b/source/_components/binary_sensor.enocean.markdown @@ -13,7 +13,13 @@ ha_release: 0.21 ha_iot_class: "Local Push" --- -This can typically be one of those batteryless wall switches. Currently only one type has been tested: Eltako FT55 which uses the EnOcean PTM 215 module. All switches using this module are expected to work. Other devices will most likely not work without changing the Home Assistant code. +This can typically be one of those batteryless wall switches. +Tested with: + +- Eltako FT55 which uses the EnOcean PTM 215 module +- [TRIO2SYS Wall switches](http://www.trio2sys.fr/index.php/fr/produits-enocean-sans-fil-sans-pile-interoperable/emetteur-sans-fils-sans-pile-interoperable-enocean) which uses the EnOcean PTM210 DB module + +All switches using theses modules are expected to work. Other devices will most likely not work without changing the Home Assistant code. To use your EnOcean device, you first have to set up your [EnOcean hub](/components/enocean/) and then add the following to your `configuration.yaml` file: diff --git a/source/_components/camera.nest.markdown b/source/_components/camera.nest.markdown index 82808e724cb..fb87dafaf6c 100644 --- a/source/_components/camera.nest.markdown +++ b/source/_components/camera.nest.markdown @@ -13,7 +13,7 @@ ha_release: 0.34 ha_iot_class: "Cloud Poll" --- -The `nest` platform allows you to watch the live stream of your [Nest](https://nest.com/camera/meet-nest-cam/) camera in Home Assistant. +The `nest` platform allows you to watch still frames from a video stream (not live stream) of your [Nest](https://nest.com/camera/meet-nest-cam/) camera in Home Assistant.

You must have the [Nest component](/components/nest/) configured to use this camera. The `nest` camera will automatically be setup when you do. diff --git a/source/_components/device_tracker.gpslogger.markdown b/source/_components/device_tracker.gpslogger.markdown index 4c2889a94bc..6d1b2d5446a 100644 --- a/source/_components/device_tracker.gpslogger.markdown +++ b/source/_components/device_tracker.gpslogger.markdown @@ -56,7 +56,7 @@ Right after enabling, the app will take you to the **Log to custom URL** setting The relevant endpoint is: `/api/gpslogger` ```text -https://[IP address Home Assistant]:[Port]/api/gpslogger? +https://YOUR.DNS.HOSTNAME:PORT/api/gpslogger? latitude=%LAT&longitude=%LON&device=%SER&accuracy=%ACC &battery=%BATT&speed=%SPD&direction=%DIR &altitude=%ALT&provider=%PROV&activity=%ACT @@ -65,11 +65,11 @@ https://[IP address Home Assistant]:[Port]/api/gpslogger? Add the above URL after you modified it with your settings into the **URL** field. Remove the line breaks as they are only there to make the URL readable here. - It's HIGHLY recommended to use SSL/TLS. -- Use the domain that Home Assistant is available on the internet or the public IP address. This can be a local IP address if you are using an always on VPN from your mobile device to your home network. -- Only remove `[Port]` if your Home Assistant instance is using port 443. Otherwise set it to the port you're using. -- For Home Assistant only the above URL, as written, will work - do not add or remove any parameters. -- Make sure to include your [API password](/components/http/) if you have configured a password. Add `&api_password=[Your password]` to the end of the URL. -- You can change the name of your device name by replacing `&device=%SER` with `&device=[Devicename]`. +- Use the domain that Home Assistant is available on the internet (or the public IP address if you have a static IP address). This can be a local IP address if you are using an always on VPN from your mobile device to your home network. +- Only remove `PORT` if your Home Assistant instance is using port 443. Otherwise set it to the port you're using. +- For Home Assistant only the above URL, as written, will work - do not add, remove, or change the order of any of the parameters. +- Make sure to include your [API password](/components/http/) if you have configured a password. Add `&api_password=YOUR_PASSWORD` to the end of the URL. +- You can change the name of your device name by replacing `&device=%SER` with `&device=DEVICE_NAME`. If your battery drains fast then you can tune the performance of GPSLogger under **Performance** -> **Location providers** diff --git a/source/_components/device_tracker.snmp.markdown b/source/_components/device_tracker.snmp.markdown index 9b3805e30ce..faea7253981 100644 --- a/source/_components/device_tracker.snmp.markdown +++ b/source/_components/device_tracker.snmp.markdown @@ -34,8 +34,7 @@ The following OID examples pull the current MAC Address table from a router. Thi | EdgeRouter | Lite v1.9.0 | `1.3.6.1.2.1.4.22.1.2` | | Ruckus | ZoneDirector 9.13.3 | `1.3.6.1.4.1.25053.1.2.2.1.1.3.1.1.1.6` | | DD-WRT | unknown RouterOS version/model | `1.3.6.1.2.1.4.22.1.2` | -| Apple Airport Express (2nd gen.) | 7.6.9 | `1.3.6.1.2.1.3.1.1.2` -`1.3.6.1.2.1.4.22.1.2.16`| +| Apple Airport Express (2nd gen.) | 7.6.9 | `1.3.6.1.2.1.3.1.1.2` or `1.3.6.1.2.1.4.22.1.2`| To use the SNMP version 1 platform in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/homematic.markdown b/source/_components/homematic.markdown index 8d51ce86304..4ef25974b99 100644 --- a/source/_components/homematic.markdown +++ b/source/_components/homematic.markdown @@ -254,3 +254,59 @@ action: service: lock.unlock entity_id: lock.leq1234567 ``` + +#### {% linkable_title Detecting lost connections %} + +When the connection to your HomeMatic CCU or Homegear is lost, Home Assistant will stop getting updates from devices. This may happen after rebooting the CCU for example. Due to the nature of the communication protocol this cannot be handled automatically, so you must call *homematic.reconnect* in this case. That's why it is usually a good idea to check if your HomeMatic components are still updated properly, in order to detect connection losses. This can be done in several ways through an automation: + +* If you have a sensor which you know will be updated frequently (e.g. an outdoor temperature sensor or light sensor) you could set up an automation like this: + + ```yaml + automation: + - alias: Homematic Reconnect + trigger: + platform: state + entity_id: sensor.outdoor_light_level + for: + hours: 3 + action: + # Reconnect, if sensor has not been updated for over 3 hours + service: homematic.reconnect + ``` +* If you have a CCU you can also create a system variable on the CCU, which stores it's last reboot time. Since Home Assistant can still refresh system variables from the CCU (even after a reboot), this is a pretty reliable way to detect situations where you need to call *homematic.reconnect*. This is how this can be done: + + 1. Create a string variable **V_Last_Reboot** on the CCU + + 2. Creata a new programm on the CCU **without any conditions**, which executes the following *HM-Script* with a delay of 30 seconds: + + ```javascript + var obj = dom.GetObject("V_Last_Reboot"); + string now = system.Date("%d.%m.%Y %H:%M:%S"); + obj.State(now); + ``` + + The HomeMatic CCU will execute all active programs which meet their conditions (none in this case) on every reboot. + + 3. Set up a template sensor in Home Assistant, which contains the value of the system variable: + + ```yaml + - platform: template + sensors: + v_last_reboot: + value_template: "{% raw %}{{ state_attr('homematic.ccu2', 'V_Last_Reboot') or '01.01.1970 00:00:00' }}{% endraw %}" + icon_template: "mdi:clock" + entity_id: homematic.ccu2 + ``` + + 4. Set up an automation which calls *homematic.reconnect* whenever the sensor variable changes: + + ```yaml + automation: + - alias: Homematic CCU Reboot + trigger: + platform: state + entity_id: sensor.v_last_reboot + action: + service: homematic.reconnect + ``` + diff --git a/source/_components/media_player.vizio.markdown b/source/_components/media_player.vizio.markdown index 1557b166492..12916a2ed3c 100644 --- a/source/_components/media_player.vizio.markdown +++ b/source/_components/media_player.vizio.markdown @@ -77,6 +77,7 @@ Configuration variables: - **host** (*Required*): IP address of your TV. - **access_token** (*Required*): Authentication token you received in the last step of the pairing process. +- **suppress_warning** (*Optional*): Set to `true` to disable self-signed certificate warnings. ## Notes and limitations @@ -91,13 +92,3 @@ Changing tracks works like channels switching. If you have source other than reg ### Sources Source list shows all external devices connected to the TV through HDMI plus list of internal devices (TV mode, Chrome Cast, etc.). - -

-Vizio SmartCast service is accessible through HTTPS with self-signed certificate. If you have low LOGLEVEL in your Home Assistant configuration, you'll see a lot of warnings like this: -`InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.` - -You can adjust the log level for `media_player` components with the [logger](/components/logger/) component, or if you need to keep a low log level for `media_player` you could proxy calls to your TV through an NGINX reverse proxy. - -If you want to only ignore only this specific [python urllib3 SSL warning](https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings), you will need to run Home Assistant with the python flag `-W` or the environment variable `PYTHONWARNINGS` set to: -`ignore:Unverified HTTPS request is being made` -

diff --git a/source/_components/notify.xmpp.markdown b/source/_components/notify.xmpp.markdown index 930aa496ac6..14105d9bb6d 100644 --- a/source/_components/notify.xmpp.markdown +++ b/source/_components/notify.xmpp.markdown @@ -37,6 +37,10 @@ Configuration variables: - **verify** (*Optional*): Allow disabling SSL certificate validity check (e.g., self-signed certificate). Defaults to `true`. - **room** (*Optional*): Room's name (e.g., example@conference.jabber.org). If set, send a message to chatroom instead of the sender. +

+ sleekxmpp, as of version 1.3.2, does not support >TLS1. If you are running your own XMPP server (e.g. Prosody, ejabberd) make sure to allow using TLS1. +

+ All Jabber IDs (JID) must include the domain. Make sure that the password matches the account provided as sender. To use notifications, please see the [getting started with automation page](/getting-started/automation/). diff --git a/source/_components/sensor.haveibeenpwned.markdown b/source/_components/sensor.haveibeenpwned.markdown index 7a6b7bc1b30..56cb497b2ad 100644 --- a/source/_components/sensor.haveibeenpwned.markdown +++ b/source/_components/sensor.haveibeenpwned.markdown @@ -14,18 +14,28 @@ ha_iot_class: "Cloud Polling" --- The `haveibeenpwned` sensor platform creates sensors that check for breached email accounts on [haveibeenpwned](https://haveibeenpwned.com). + +## {% linkable_title Configuration %} + To enable this sensor, add the following lines to your `configuration.yaml`, it will list every specified email address as a sensor showing -the number of breaches on that email account: +the number of breaches on that email account. ```yaml # Example configuration.yaml entry using cloud based emoncms sensor: - platform: haveibeenpwned - email: - - your_email1@domain.com - - your_email2@domain.com + - platform: haveibeenpwned + email: + - your_email1@domain.com + - your_email2@domain.com ``` +{% configuration %} +email: + description: List of email addresses. + required: true + type: list +{% endconfiguration %} + ## {% linkable_title Breach meta data %} If one of your email accounts is breached the sensor will display breach meta data. It will list the title of the site where your email @@ -36,10 +46,6 @@ account has been breached as well as the added date of the breach data. This dat

-## {% linkable_title Configuration variables %} - -- **email** (*Required*): List of email addresses. -

The sensor will scan all email addresses specified with a 5 second delay between all breach data requests on Home Assistant startup. After this initial startup scanning, the sensor will only scan one email account per 15 minutes to prevent abuse, and not hammer "the diff --git a/source/_components/sensor.template.markdown b/source/_components/sensor.template.markdown index 8ef5a5dc442..7d612f01607 100644 --- a/source/_components/sensor.template.markdown +++ b/source/_components/sensor.template.markdown @@ -13,11 +13,11 @@ ha_iot_class: "Local Push" logo: home-assistant.png --- -The `template` platform supports sensors which break out `state_attributes` -from other entities. +The `template` platform supports sensors which break out `state_attributes` from other entities. -To enable Template Sensors in your installation, add the following to your -`configuration.yaml` file: +## {% linkable_title Configuration %} + +To enable Template Sensors in your installation, add the following to your `configuration.yaml` file: {% raw %} ```yaml @@ -78,13 +78,7 @@ sensor: ## {% linkable_title Considerations %} -If you are using the state of a platform that takes extra time to load, the -Template Sensor may get an `unknown` state during startup. To avoid this (and the resulting -error messages in your log file), you can use `is_state()` function in your template. -For example, you would replace -{% raw %}`{{ states.switch.source.state == 'on' }}`{% endraw %} -with this equivalent that returns `true`/`false` and never gives an `unknown` -result: +If you are using the state of a platform that takes extra time to load, the Template Sensor may get an `unknown` state during startup. To avoid this (and the resulting error messages in your log file), you can use `is_state()` function in your template. For example, you would replace {% raw %}`{{ states.switch.source.state == 'on' }}`{% endraw %} with this equivalent that returns `true`/`false` and never gives an `unknown` result: {% raw %}`{{ is_state('switch.source', 'on') }}`{% endraw %} ## {% linkable_title Examples %} @@ -109,8 +103,7 @@ sensor: ### {% linkable_title Renaming Sensor Output %} -If you don't like the wording of a sensor output then the Template Sensor can -help too. Let's rename the output of the [Sun component](/components/sun/) as +If you don't like the wording of a sensor output then the Template Sensor can help too. Let's rename the output of the [Sun component](/components/sun/) as a simple example: {% raw %} @@ -129,9 +122,7 @@ sensor: ``` {% endraw %} -Processes monitored by the [System Monitor sensor](/components/sensor.systemmonitor/) -show `on` or `off` if they are running or not. This example shows how the -output of a monitored `glances` process can be renamed. +Processes monitored by the [System Monitor sensor](/components/sensor.systemmonitor/) show `on` or `off` if they are running or not. This example shows how the output of a monitored `glances` process can be renamed. {% raw %} ```yaml @@ -149,13 +140,11 @@ sensor: ``` {% endraw %} -The [Template Binary Sensor](/components/binary_sensor.template/) is the one in -similar cases if you prefer to see an icon instead of text. +The [Template Binary Sensor](/components/binary_sensor.template/) is the one in similar cases if you prefer to see an icon instead of text. ### {% linkable_title Multiline Example With an `if` Test %} -This example shows a multiple line template with an `if` test. It looks at a -sensing switch and shows `on`/`off` in the frontend. +This example shows a multiple line template with an `if` test. It looks at a sensing switch and shows `on`/`off` in the frontend. {% raw %} ```yaml @@ -182,8 +171,7 @@ sensor: ### {% linkable_title Change The Unit of Measurement %} -With a Template Sensor it's easy to convert given values into others if the -unit of measurement doesn't fit your needs. +With a Template Sensor it's easy to convert given values into others if the unit of measurement doesn't fit your needs. {% raw %} ```yaml @@ -257,7 +245,7 @@ sensor: ### {% linkable_title Change the Friendly Name Used in the Frontend %} This example shows how to change the `friendly_name` based on a date. -Explanation: we add a multiple of 86400 seconds (= 1 day) to the current unix timestamp to get a future date. +Explanation: We add a multiple of 86400 seconds (= 1 day) to the current unix timestamp to get a future date. {% raw %} ```yaml @@ -295,3 +283,19 @@ sensor: unit_of_measurement: 'kW' ``` {% endraw %} + +### {% linkable_title Working with dates %} + +The `template` sensors are not limited to use attributes from other entities but can also work with [Home Assistant's template extensions](/docs/configuration/templating/#home-assistant-template-extensions). + +{% raw %} +```yaml +sensor: +- platform: template + sensors: + nonsmoker: + value_template: '{{ (( as_timestamp(now()) - as_timestamp(strptime("06.07.2018", "%d.%m.%Y")) ) / 86400 ) | round(2) }}' + friendly_name: 'Not smoking' + unit_of_measurement: "Days" +``` +{% endraw %} diff --git a/source/_components/tradfri.markdown b/source/_components/tradfri.markdown index 0f85a2a644e..020475edc01 100644 --- a/source/_components/tradfri.markdown +++ b/source/_components/tradfri.markdown @@ -48,3 +48,6 @@ Do not use the `api_key` variable. The key is only needed once at initial setup. Please make sure you have `autoconf` installed (`apt-get install autoconf`) if you want to use this component. Also, installing some dependencies might take considerable time (>1h) on slow devices. You might have to use `sudo` when installing `autoconf`.

+ +## {% linkable_title Troubleshooting %} +- Firmware updates: After updating the firmware of your TrΓ₯dfri gateway it might be necessary to repeat the configuration process. If you encounter problems, delete `.tradfri_psk.conf`, restart Home Assistant, when prompted enter the security key and click configure, just like during initial setup. (Possible errors: ```Fatal DTLS error: code 115```) diff --git a/source/_docs/configuration/securing.markdown b/source/_docs/configuration/securing.markdown index f49d53509cb..4ed3e20243e 100644 --- a/source/_docs/configuration/securing.markdown +++ b/source/_docs/configuration/securing.markdown @@ -23,6 +23,7 @@ One major advantage of Home Assistant is that it's not dependent on cloud servic If you want to allow remote access, consider these additional points: - Protect your communication with [TLS/SSL](/docs/ecosystem/certificates/lets_encrypt/). +- Enable IP Filtering and configure a low [Login Attempts Threshold](/components/http/) - Protect your communication with [Tor](/cookbook/tor_configuration/). - Protect your communication with a [self-signed certificate](/cookbook/tls_self_signed_certificate/). - Use a [proxy](/cookbook/apache_configuration/). diff --git a/source/_docs/scripts/conditions.markdown b/source/_docs/scripts/conditions.markdown index 5ca5b9c756f..39398ca10f1 100644 --- a/source/_docs/scripts/conditions.markdown +++ b/source/_docs/scripts/conditions.markdown @@ -126,7 +126,7 @@ condition: condition: sun after: sunset # Optional offset value - in this case it must from -1 hours relative to sunset, or after - after_offset: "-1:00:00" + after_offset: "-01:00:00" ``` ```yaml diff --git a/source/_docs/z-wave/device-specific.markdown b/source/_docs/z-wave/device-specific.markdown index 8f03fe654ae..2d217d8c4a2 100644 --- a/source/_docs/z-wave/device-specific.markdown +++ b/source/_docs/z-wave/device-specific.markdown @@ -301,3 +301,56 @@ Button four release|4|1 ### {% linkable_title WallC-S Switch %} Use the same configuration as for the Aeotec Wallmote. + +### {% linkable_title HANK One-key Scene Controller HKZN-SCN01 %} + +For the HANK One-key Scene Controller, you may need to update the `COMMAND_CLASS_CENTRAL_SCENE` for each node in your `zwcfg` file with the following: + +```xml + + + + + +``` + +Below is a table of the action/scenes for the Button (as a reference for other similar devices): + +**Action**|**scene\_id**|**scene\_data** +:-----:|:-----:|:-----: +Button single tap|1|0 +Button hold|1|2 +Button release|1|1 + +### {% linkable_title HANK Four-key Scene Controller HKZN-SCN04 %} + +For the HANK Four-key Scene Controller, you may need to update the `COMMAND_CLASS_CENTRAL_SCENE` for each node in your `zwcfg` file with the following: + +```xml + + + + + + + + + +``` + +Below is a table of the action/scenes for the Buttons and associated Pictogram: + +**Action**|**Pictogram**|**scene\_id**|**scene\_data** +:-----:|:-----:|:-----:|:-----: +Button one tap|Moon and Star|1|0 +Button one hold|Moon and Star|1|2 +Button one release|Moon and Star|1|1 +Button two tap|People|2|0 +Button two hold|People|2|2 +Button two release|People|2|1 +Button three tap|Circle|3|0 +Button three hold|Circle|3|2 +Button three release|Circle|3|1 +Button four tap|Circle with Line|4|0 +Button four hold|Circle with Line|4|2 +Button four release|Circle with Line|4|1 \ No newline at end of file diff --git a/source/_includes/asides/categories.html b/source/_includes/asides/categories.html index 8d600335bfb..dbf5fd7ae74 100644 --- a/source/_includes/asides/categories.html +++ b/source/_includes/asides/categories.html @@ -1,7 +1,7 @@

Categories