From 5146a3febcdbcf29727916dea58648a5d8327893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 26 Mar 2018 00:57:33 +0300 Subject: [PATCH 1/5] nginx_proxy: Document hsts config variable (#5000) * nginx_proxy: Document hsts config variable * :rocket: Trigger rebuild --- source/_addons/nginx_proxy.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/_addons/nginx_proxy.markdown b/source/_addons/nginx_proxy.markdown index f306fccbe5e..bc3be8cc44d 100644 --- a/source/_addons/nginx_proxy.markdown +++ b/source/_addons/nginx_proxy.markdown @@ -18,6 +18,7 @@ In the `http` section of the `configuration.yaml` file remove `ssl_certificate` "domain": "home.example.com", "certfile": "fullchain.pem", "keyfile": "privkey.pem", + "hsts": "max-age=31536000; includeSubDomains", "customize": { "active": false, "default": "nginx_proxy_default*.conf", @@ -31,6 +32,7 @@ Configuration variables: - **domain** (*Required*): Domain they will proxy run with it. - **certfile** (*Required*): Certificate file to use in the /ssl dir. - **keyfile** (*Required*): Private key file to use in the /ssl dir. +- **hsts** (*Optional*): Value for the [`Strict-Transport-Security`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security) HTTP header to send. If empty or `null`, the header is not sent. - **customize** (*Optional*): If true, additional NGINX configuration files for the default server and additional servers are read from files in the /share dir specified by the `default` and `servers` variables.

From 0687a6a3ea26406fa6daac21e428b65699d77fac Mon Sep 17 00:00:00 2001 From: DubhAd Date: Mon, 26 Mar 2018 07:15:52 +0100 Subject: [PATCH 2/5] Clarity updates (#5017) Added that you can reload some pieces without a restart. Added reference to ensuring you run the check config as the user you run Home Assistant as (so that the right configuration is found) --- source/_docs/configuration.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/_docs/configuration.markdown b/source/_docs/configuration.markdown index ae5349fe90d..2d0dc0f0274 100644 --- a/source/_docs/configuration.markdown +++ b/source/_docs/configuration.markdown @@ -26,12 +26,12 @@ If you want to use a different folder for configuration, use the config command Inside your configuration folder is the file `configuration.yaml`. This is the main file that contains components to be loaded with their configurations. Throughout the documentation you will find snippets that you can add to your configuration file to enable functionality.

- You will have to restart Home Assistant for changes to `configuration.yaml` to take effect. + You will have to restart Home Assistant for most changes to `configuration.yaml` to take effect. You can load changes to [automations](/docs/automation/), [customize](/docs/configuration/customizing-devices/), [groups](/components/group/), and [scripts](/components/script/) without restarting.

If you run into trouble while configuring Home Assistant, have a look at the [configuration troubleshooting page](/getting-started/troubleshooting-configuration/) and at the [configuration.yaml examples](/cookbook/#example-configurationyaml).

- Test any changes to your configuration files from the command line with `hass --script check_config`. This script allows you to test changes without the need to restart Home Assistant. + Test any changes to your configuration files from the command line with `hass --script check_config`. This script allows you to test changes without the need to restart Home Assistant. Remember to run this as the user you run Home Assistant as.

From 0f78e11a86b6351c10ef7f123ab59adb317dda4f Mon Sep 17 00:00:00 2001 From: DubhAd Date: Mon, 26 Mar 2018 07:16:45 +0100 Subject: [PATCH 3/5] Highlighting the hosting of files (#5015) The use of `www/` is hidden in the middle of the page, it's impossible to direct people to it, and trivial to overlook. It's also wrong for Hass.io ;) Updating to make it possible to link to it, and adding details on where to find it on Hass.io. Also adding a note about needing to restart after creating the folder (there's been lots and lots of feedback about needing to do so) --- source/_components/http.markdown | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/_components/http.markdown b/source/_components/http.markdown index 88da4c67386..458e10794e5 100644 --- a/source/_components/http.markdown +++ b/source/_components/http.markdown @@ -75,8 +75,6 @@ To use those kind of [sensors](/components/sensor.http/) or [binary sensors](com All [requests](/developers/rest_api/#post-apistatesltentity_id) need to be sent to the endpoint of the device and must be **POST**. -If you want to use Home Assistant to host or serve static files then create a directory called `www` under the `.homeassistant` configuration path. The static files in `.homeassistant/www/` can be accessed by the following URL `http://your.domain:8123/local/`. - If you want to apply additional IP filtering, and automatically ban brute force attempts, set `ip_ban_enabled` to `True` and the maximum number of attempts. After the first ban, an `ip_bans.yaml` file will be created in the root configuration folder. It will have the banned IP address and time in UTC when it was added: ```yaml @@ -89,3 +87,11 @@ After a ban is added a Persistent Notification is populated to the Home Assistan

Please note, that sources from `trusted_networks` won't be banned automatically.

+ +## {% linkable_title Hosting files %} + +If you want to use Home Assistant to host or serve static files then create a directory called `www` under the configuration path (`/config` on Hass.io, `.homeassistant` elswhere). The static files in `www/` can be accessed by the following URL `http://your.domain:8123/local/`, for example `audio.mp3` would be accessed as `http://your.domain:8123/local/audio.mp3`. + +

+ If you've had to create the `www/` folder for the first time, you'll need to restart Home Assistant. +

From da03b58a3aad56355aa588a9001d75730eb59a78 Mon Sep 17 00:00:00 2001 From: Diogo Gomes Date: Mon, 26 Mar 2018 16:50:12 +0100 Subject: [PATCH 4/5] Improve documentation about Mediaroom (#5022) * Improve documentation * Add raw --- source/_components/media_player.mediaroom.markdown | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/_components/media_player.mediaroom.markdown b/source/_components/media_player.mediaroom.markdown index 47e79b74ba4..39a417a5f31 100644 --- a/source/_components/media_player.mediaroom.markdown +++ b/source/_components/media_player.mediaroom.markdown @@ -47,7 +47,7 @@ Notice that all parameters are optional, and discovery should configure everythi The component has been developed for Portuguese TV operators currently using the Mediaroom platform, but should also work in other deployments in which the STB can be controlled remotely through a socket on port 8082. -In most cases (single STB) you just need to setup the *platform* and discovery will do the rest. In case you have more than one STB you are required to set the *host* in each one of the entries. +In most cases (single STB) you just need to setup the *platform* and discovery will do the rest. If the STB is on the same network segment as Home Assistant, it can determine whether the device is turned on or off. Without this, the component will fail to determine the Set-top box status, and you are required to add the *optimistic* configuration variable. @@ -55,8 +55,9 @@ If the STB is on the same network segment as Home Assistant, it can determine wh ### {% linkable_title Example `press_button` script %} -The `play_media` function can be used in scripts to change channels. +The `play_media` function can be used in scripts to change channels and emulate button pressing from a remote control. +{% raw %} ```yaml # Example play_media script # @@ -67,6 +68,8 @@ press_button: entity_id: media_player.mediaroom_stb media_content_id: "{{ value }}" media_content_type: "channel" +``` +{% endraw %} ### {% linkable_title Example configuration with 2 STB %} From 2707746624c1513f704de5c08373ee830692dd88 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Mar 2018 11:28:55 +0200 Subject: [PATCH 5/5] Add details for values if the user should replace it (fixes #4999) --- source/developers/documentation/standards.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/developers/documentation/standards.markdown b/source/developers/documentation/standards.markdown index 0a6d2fa7ad5..adcc3bd5214 100644 --- a/source/developers/documentation/standards.markdown +++ b/source/developers/documentation/standards.markdown @@ -28,6 +28,8 @@ To ensure that the documentation for Home Assistant is consistent and easy to fo * Use `[string, int]` for configuration variables that accept multiple types. * Use YAML sequence syntax in the sample code if it is supported. * All examples should be formatted to be included in `configuration.yaml` unless explicitly stated. + * Use capital letters and `_` to indicate that the value needs to be replaced. E.g., `api_key: YOUR_API_KEY` or `api_key: REPLACE_ME`. + * If you know that the API key or value contains [control characters](https://en.wikipedia.org/wiki/YAML#Syntax), e.g., `#`, `[`, `?`, etc., wrap it in quotes and add a note. * Component and platform names should be a link to their respective documentation pages. ## {% linkable_title Templates %}