Merge branch 'current' into next

This commit is contained in:
Fabian Affolter 2018-01-21 10:32:57 +01:00
commit 645ed26dc9
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336
26 changed files with 308 additions and 106 deletions

View File

@ -47,3 +47,5 @@ If you use a port other than `8123` or an SSL proxy, change the port number acco
## {% linkable_title Router configuration %} ## {% linkable_title Router configuration %}
You'll need to forward the port you listed in your configuration (8123 in the example above) on your router to your Home Assistant system. You can find guides on how to do this on [Port Forward](https://portforward.com/) - noting that you'll only need to forward the TCP port. You'll need to forward the port you listed in your configuration (8123 in the example above) on your router to your Home Assistant system. You can find guides on how to do this on [Port Forward](https://portforward.com/) - noting that you'll only need to forward the TCP port.
Ensure that you allocate the Home Assistant system a fixed IP on your network before you configure port forwarding. You can do this either on the computer itself (see the [install guide](/hassio/installation/) or via a static lease on your router.

View File

@ -16,13 +16,8 @@ You should not use this if you are also using the [DuckDNS add-on]. The DuckDNS
Setup and manage a [Let's Encrypt](https://letsencrypt.org/) certificate. This will create a certificate on the first run and will auto-renew if the certificate is within 30 days of expiration. Setup and manage a [Let's Encrypt](https://letsencrypt.org/) certificate. This will create a certificate on the first run and will auto-renew if the certificate is within 30 days of expiration.
<p class='note warning'>
This add-on uses ports 80/443 to verify the certificate request. You will need to stop all other add-ons that also use these ports. If you don't need a port (like with https you don't need port 80) you can remove this from network config.
</p>
```json ```json
{ {
"challenge": "https",
"email": "example@example.com", "email": "example@example.com",
"domains": ["example.com", "mqtt.example.com", "hass.example.com"] "domains": ["example.com", "mqtt.example.com", "hass.example.com"]
} }
@ -30,7 +25,6 @@ This add-on uses ports 80/443 to verify the certificate request. You will need t
Configuration variables: Configuration variables:
- **challenge** (*Optional*): Default it use 443 ('https') you can change it to 'http' for use port 80.
- **email** (*Required*): Your email address for registration on Let's Encrypt. - **email** (*Required*): Your email address for registration on Let's Encrypt.
- **domains** (*Required*): A list of domains to create/renew the certificate. - **domains** (*Required*): A list of domains to create/renew the certificate.
@ -45,6 +39,6 @@ http:
ssl_key: /ssl/privkey.pem ssl_key: /ssl/privkey.pem
``` ```
If you use a other port as `8123` or a SSL proxy, change the port number. If you use another port such as `8123` or a SSL proxy, change the port number.
[DuckDNS add-on]: /addons/duckdns/ [DuckDNS add-on]: /addons/duckdns/

View File

@ -22,7 +22,7 @@ Generate a Client ID and Client Secret on [Google Developers Console](https://co
1. Follow the wizard using the following information. 1. Follow the wizard using the following information.
1. When it gets to the point of asking _Which API are you using?_ just click cancel. 1. When it gets to the point of asking _Which API are you using?_ just click cancel.
1. Click on the tab 'OAuth consent screen'. 1. Under APIs & Services > Credentials, click on the tab 'OAuth consent screen'.
1. Set 'Product name shown to users' to anything you want. We suggest Home-Assistant. 1. Set 'Product name shown to users' to anything you want. We suggest Home-Assistant.
1. Save this page. You don't have to fill out anything else there. 1. Save this page. You don't have to fill out anything else there.
1. Click 'Create credentials' -> OAuth client ID. 1. Click 'Create credentials' -> OAuth client ID.

View File

@ -36,5 +36,5 @@ Configuration variables:
- **region** (*Optional*): Region identifier (either 'eu' or 'us'). Defaults to 'eu' if not provided. - **region** (*Optional*): Region identifier (either 'eu' or 'us'). Defaults to 'eu' if not provided.
- **scan_interval**(*Optional*): Scan interval is expressed in seconds. Recommended value of 600 seconds. Default value is 120 seconds. Omitting scan_interval may result in too-frequent polling and cause you to rate-limited by Honeywell. - **scan_interval**(*Optional*): Scan interval is expressed in seconds. Recommended value of 600 seconds. Default value is 120 seconds. Omitting scan_interval may result in too-frequent polling and cause you to rate-limited by Honeywell.
- **away_temperature** (*Optional*) (*only for eu region*): Heating setpoint when away mode is on. If omitted it defaults to 16.0 deg C. - **away_temperature** (*Optional*) (*only for eu region*): Heating setpoint when away mode is on. If omitted it defaults to 16.0 deg C.
- **cool_away_temperature** (*Optional*) (*only for us region*): Cooling setpoint when away mode is on. If omitted it defaults to 30.0 deg C. - **away_cool_temperature** (*Optional*) (*only for us region*): Cooling setpoint when away mode is on. If omitted it defaults to 30.0 deg C.
- **heat_away_temperature** (*Optional*) (*only for us region*): Heating setpoint when away mode is on. If omitted it defaults to 16.0 deg C. - **away_heat_temperature** (*Optional*) (*only for us region*): Heating setpoint when away mode is on. If omitted it defaults to 16.0 deg C.

View File

@ -31,14 +31,14 @@ deconz:
#### {% linkable_title Supported Device types %} #### {% linkable_title Supported Device types %}
- [Zigbee Lights](/components/light/deconz/) - [Zigbee Lights](/components/light.deconz/)
- [Humidity Sensors](/components/sensor/deconz/) - [Humidity Sensors](/components/sensor.deconz/)
- [Light Level Sensors](/components/sensor/deconz/) - [Light Level Sensors](/components/sensor.deconz/)
- [OpenClose Detectors](/components/binary_sensor/deconz/) - [OpenClose Detectors](/components/binary_sensor.deconz/)
- [Presence Detectors](/components/binary_sensor/deconz/) - [Presence Detectors](/components/binary_sensor.deconz/)
- [Pressure Sensors](/components/sensor/deconz/) - [Pressure Sensors](/components/sensor.deconz/)
- [Switches (Remote Controls)](/components/sensor/deconz/) - [Switches (Remote Controls)](/components/sensor.deconz/)
- [Temperature Sensors](/components/sensor/deconz/) - [Temperature Sensors](/components/sensor.deconz/)
{% configuration %} {% configuration %}
host: host:

View File

@ -67,7 +67,7 @@ Add the above URL after you modified it with your settings into the **URL** fiel
- It's HIGHLY recommended to use SSL/TLS. - It's HIGHLY recommended to use SSL/TLS.
- Use the domain that Home Assistant is available on the internet or the public IP address. Can be a local IP address if you are using a VPN setup. - Use the domain that Home Assistant is available on the internet or the public IP address. Can be a local IP address if you are using a VPN setup.
- Only remove `[Port]` if your Home Assistant instance is using port 80. Otherwise set it to 8123. - Only remove `[Port]` if your Home Assistant instance is using port 80. Otherwise set it to 8123.
- Click on **Parameters** in the app and you will see all available parameters for the URL. For Home Assistant only the above URL will work. - 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 pasword]` to the end of the URL. - Make sure to include your [API password](/components/http/) if you have configured a password. Add `&api_password=[Your pasword]` to the end of the URL.
- You can change the name of your device name by replacing `&device=%SER` with `&device=[Devicename]`. - You can change the name of your device name by replacing `&device=%SER` with `&device=[Devicename]`.

View File

@ -14,7 +14,11 @@ ha_release: 0.7.4
--- ---
This platform allows you to detect presence using [Owntracks](http://owntracks.org/). OwnTracks allows users to track their location on Android and iOS phones and publish it to an MQTT broker. This platform will connect to the broker and monitor for new locations. This platform allows you to detect presence using [Owntracks](http://owntracks.org/). OwnTracks allows users to track their location on iOS phones and publish it to an MQTT broker. This platform will connect to the broker and monitor for new locations.
<p class='note'>
The Android app for OwnTracks is no longer developed or supported, Zanzito is a drop in replacement for OwnTracks MQTT.
</p>
This component requires [the MQTT component](/components/mqtt/) to be set up and works very well together with [the zone component](/components/zone/). This component requires [the MQTT component](/components/mqtt/) to be set up and works very well together with [the zone component](/components/zone/).

View File

@ -15,6 +15,10 @@ ha_release: 0.55
OwnTracks is a free and open source application that allows you to track your location in Home Assistant. This is a platform that supports OwnTracks via their HTTP publishing method. OwnTracks is a free and open source application that allows you to track your location in Home Assistant. This is a platform that supports OwnTracks via their HTTP publishing method.
<p class='note'>
The Android app for OwnTracks is no longer developed or supported. Consider [GPS Logger](/components/device_tracker.gpslogger/) as an alternative.
</p>
To integrate Owntracks tracking via HTTP in Home Assistant, add the following section to your `configuration.yaml` file: To integrate Owntracks tracking via HTTP in Home Assistant, add the following section to your `configuration.yaml` file:
```yaml ```yaml

View File

@ -12,7 +12,6 @@ ha_category: Presence Detection
ha_release: 0.14 ha_release: 0.14
--- ---
This platform allows you to detect presence by looking at devices connected to a [Ubiquiti](http://ubnt.com/) [Unifi](https://www.ubnt.com/enterprise/#unifi) controller. This platform allows you to detect presence by looking at devices connected to a [Ubiquiti](http://ubnt.com/) [Unifi](https://www.ubnt.com/enterprise/#unifi) controller.
To use this device tracker in your installation, add the following to your `configuration.yaml` file: To use this device tracker in your installation, add the following to your `configuration.yaml` file:
@ -21,24 +20,63 @@ To use this device tracker in your installation, add the following to your `conf
# Example configuration.yaml entry # Example configuration.yaml entry
device_tracker: device_tracker:
- platform: unifi - platform: unifi
username: YOUR_ADMIN_USERNAME username: USERNAME
password: YOUR_ADMIN_PASSWORD password: PASSWORD
``` ```
Configuration variables: {% configuration %}
username:
- **host** (*Optional*): The hostname or IP address of your controller. Defaults to `localhost`. description: A user on the controller
- **port** (*Optional*): The port of your controller's web interface. Defaults to `8443`. type: string
- **username** (*Required*: The username of an user with administrative privileges, usually `admin`. required: true
- **password** (*Required*): The password for your given admin account. password:
- **site_id** (*Optional*): Allows you to specify a `site_id` for device tracking. Defaults to `default`. Found in the URL of the controller (i.e. https://CONTROLLER:PORT/manage/site/SITE_ID/dashboard). description: The password for the account
- **verify_ssl** (*Optional*): Controls if the SSL certificate running on your Unifi webserver must be trusted by a known Certificate Authority on the server running Home Assistant. Defaults to 'True' but can also be a value that points to your custom cert "path/to/custom_cert.pem". type: string
- **detection_time** (*Optional*): The Unifi component will only return devices that have been seen by the controller in the last 180 seconds. You can adjust this threshold with this variable and accepts seconds or `00:00:00` time formats. required: true
host:
description: The hostname or IP address of your controller
default: localhost
type: string
required: false
port:
description: The port of your controller's web interface
default: 8443
type: int
required: false
site_id:
description: For multisite installations, you can specify `site_id` to specify which is used
type: string
required: false
default: default
verify_ssl:
description: Whether to do strict validation on SSL certificates of the Unifi controller. This can be true/false or the path to a locally trusted certificate to use for verification (i.e. "/path/to/custom_cert.pm")
type: boolean or filename
required: false
default: true
detection_time:
description: How long since the last seen time before the device is marked away, specified in seconds.
type: int
required: optional
default: 300
{% endconfiguration %}
See the [device tracker component page](/components/device_tracker/) for instructions how to configure the people to be tracked. See the [device tracker component page](/components/device_tracker/) for instructions how to configure the people to be tracked.
<p class='note'> ### {% linkable_title Configuring Users %}
If you decide to install the Unifi Controller on the same system as your Home Assistant, be aware there may be overlap in ports if you have the MQTT component as well.
The Unifi controller allows you to create multiple users on it besides
the main administrator. It is recommended that you create a limited
user that has `read-only` permissions for the Unifi device tracker.
### {% linkable_title Conflicts with MQTT %}
The Unifi controller can either be a dedicated hardware device
(Unifi's cloud key), or as software any Linux system. If you run the
the Unifi controller on the same operating system as Home Assistant
there may be conflicts in ports if you have the MQTT component as
well.
It is recommended that you run the Unifi controller in a dedicate
virtual machine to avoid that situation.
[Related Issue](https://github.com/home-assistant/home-assistant/issues/10507) [Related Issue](https://github.com/home-assistant/home-assistant/issues/10507)
</p>

View File

@ -36,6 +36,7 @@ Home Assistant can discover and automatically configure [zeroconf](https://en.wi
* [Samsung TVs](https://home-assistant.io/components/media_player.samsungtv/) * [Samsung TVs](https://home-assistant.io/components/media_player.samsungtv/)
* [Sonos speakers](https://home-assistant.io/components/media_player.sonos/) * [Sonos speakers](https://home-assistant.io/components/media_player.sonos/)
* [Telldus Live](https://home-assistant.io/components/tellduslive/) * [Telldus Live](https://home-assistant.io/components/tellduslive/)
* [Wink](https://home-assistant.io/components/wink/)
* [Yamaha media player](https://home-assistant.io/components/media_player.yamaha/) * [Yamaha media player](https://home-assistant.io/components/media_player.yamaha/)
* [Yeelight Sunflower bulb](https://home-assistant.io/components/light.yeelightsunflower/) * [Yeelight Sunflower bulb](https://home-assistant.io/components/light.yeelightsunflower/)
@ -79,9 +80,10 @@ Valid values for ignore are:
* `samsung_tv`: Samsung TVs * `samsung_tv`: Samsung TVs
* `sonos`: Sonos speakers * `sonos`: Sonos speakers
* `tellduslive`: Telldus Live * `tellduslive`: Telldus Live
* `wink`: Wink Hub
* `yamaha`: Yamaha media player * `yamaha`: Yamaha media player
* `yeelight`: Yeelight Sunflower bulb * `yeelight`: Yeelight Sunflower bulb
<p class='note'> <p class='note'>
Home Assistant must be on the same network as the devices for uPnP discovery to work. Home Assistant must be on the same network as the devices for uPnP discovery to work.
If running Home Assistant in a [Docker container](/docs/installation/docker/) use switch `--net=host` to put it on the host's network. If running Home Assistant in a [Docker container](/docs/installation/docker/) use switch `--net=host` to put it on the host's network.

View File

@ -22,7 +22,7 @@ By default, every group appears in the HOME tab. If you create a group `default_
group: group:
default_view: default_view:
view: yes view: yes
icon: mdi:home icon: mdi:home
entities: entities:
- group.kitchen - group.kitchen
- group.awesome_people - group.awesome_people
@ -56,7 +56,7 @@ group:
Configuration variables: Configuration variables:
- **view** (*Optional*): If yes then the entry will be shown as a view (tab) at the top. - **view** (*Optional*): If yes then the entry will be shown as a view (tab) at the top. Groups that are set to `view: yes` cannot be used as entities in other views.
- **name** (*Optional*): Name of the group. - **name** (*Optional*): Name of the group.
- **icon** (*Optional*): If the group is a view, this icon will show at the top in the frontend instead of the name. If the group is a view and both name and icon have been specified, the icon will appear at the top of the frontend and the name will be displayed as the mouse-over text. If it's not a view, then the icon shows when this group is used in another group. - **icon** (*Optional*): If the group is a view, this icon will show at the top in the frontend instead of the name. If the group is a view and both name and icon have been specified, the icon will appear at the top of the frontend and the name will be displayed as the mouse-over text. If it's not a view, then the icon shows when this group is used in another group.
- **control** (*Optional*): Set value to `hidden`. If hidden then the group switch will be hidden. - **control** (*Optional*): Set value to `hidden`. If hidden then the group switch will be hidden.
@ -69,7 +69,7 @@ Example of groups shown as views in the frontend.
If all entities in a group are switches or lights then Home Assistant adds a switch at the top of the card that turns them all on/off at once. If you want to hide this switch, set `control` to `hidden`. If all entities in a group are switches or lights then Home Assistant adds a switch at the top of the card that turns them all on/off at once. If you want to hide this switch, set `control` to `hidden`.
You can create views (tabs) that contain other groups. You can create views (tabs) that contain other groups (but not other groups which are marked as `view: yes`).
Notice in the example below that in order to refer to the group "Living Room", you use `group.living_room` (lowercase and spaces replaced with underscores). Notice in the example below that in order to refer to the group "Living Room", you use `group.living_room` (lowercase and spaces replaced with underscores).
```yaml ```yaml
@ -86,7 +86,7 @@ Notice in the example below that in order to refer to the group "Living Room", y
entities: entities:
- group.living_room - group.living_room
- group.bedroom - group.bedroom
``` ```
## {% linkable_title Default groups %} ## {% linkable_title Default groups %}

View File

@ -93,6 +93,7 @@ image_processing:
With the help of a [template sensor](/components/sensor.template/), the value can be shown as badge. With the help of a [template sensor](/components/sensor.template/), the value can be shown as badge.
{% raw %}
```yaml ```yaml
sensor: sensor:
- platform: template - platform: template
@ -102,4 +103,4 @@ sensor:
friendly_name: 'Ampere' friendly_name: 'Ampere'
unit_of_measurement: 'A' unit_of_measurement: 'A'
``` ```
{% endraw %}

View File

@ -28,15 +28,6 @@ Configuration variables:
- **username** (*Required*): Username for the Neato account. - **username** (*Required*): Username for the Neato account.
- **password** (*Required*): Password for the Neato account. - **password** (*Required*): Password for the Neato account.
The Home Assistant Neato platform has not been tested with all models of Botvac.
| BotVac Model | Tested |
| --- | --- |
| Botvac Connected | SUCCESS |
| Botvac D3 Connected (firmware 4.0+) | PARTIALLY WORKING |
| Botvac D5 Connected (firmware 4.0+) | PARTIALLY WORKING |
| Botvac D7 Connected | SUCCESS |
<p class='note'> <p class='note'>
After the update to firmware 4.0 (which adds cleaning maps) there is also support for displaying the maps of the Botvac D3 Connected and Botvac D5 Connected robots. The start/stop functionality does not work. More information on how to update here: https://support.neatorobotics.com/hc/en-us/articles/115004320694-Software-Update-4-0-for-Neato-Botvac-Connected-D3-D5- After the update to firmware 4.0 (which adds cleaning maps) there is also support for displaying the maps of the Botvac D3 Connected and Botvac D5 Connected robots. The start/stop functionality does not work. More information on how to update here: https://support.neatorobotics.com/hc/en-us/articles/115004320694-Software-Update-4-0-for-Neato-Botvac-Connected-D3-D5-
</p> </p>

View File

@ -26,7 +26,7 @@ To use your BH1750 sensor in your installation, add the following to your `confi
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
sensor: sensor:
- platform: BH1750 - platform: bh1750
``` ```
Configuration variables: Configuration variables:

View File

@ -24,6 +24,7 @@ Here are some examples:
- [Metropolitan Transit Authority of New York City (MTA)](http://www.bart.gov/schedules/developers/gtfs) - Provides separate data feeds for subway, bus, LIRR and Metro-North of the greater New York City metropolitan region. - [Metropolitan Transit Authority of New York City (MTA)](http://www.bart.gov/schedules/developers/gtfs) - Provides separate data feeds for subway, bus, LIRR and Metro-North of the greater New York City metropolitan region.
- [GBRail.info](http://www.gbrail.info/) - Provides data feeds for most if not all rail companies in Britain. - [GBRail.info](http://www.gbrail.info/) - Provides data feeds for most if not all rail companies in Britain.
- [Official Timetable Switzerland](http://www.fahrplanfelder.ch/en/timetable-data.html) - The official timetable data for Switzerland. - [Official Timetable Switzerland](http://www.fahrplanfelder.ch/en/timetable-data.html) - The official timetable data for Switzerland.
- [Public Transport Victoria (Australia)](https://www.data.vic.gov.au/data/dataset/ptv-timetable-and-geographic-information-2015-gtfs) - Official PTV GTFS dataset.
You need to download a GTFS ZIP file and put it into a folder named `gtfs` in your configuration directory. For ease of use, it is suggested that you rename the file to just the agency/data source name (i.e. `bart.zip` instead of `google_transit_20160328_v1.zip`). You can also unzip and place a folder in the `gtfs` folder. You need to download a GTFS ZIP file and put it into a folder named `gtfs` in your configuration directory. For ease of use, it is suggested that you rename the file to just the agency/data source name (i.e. `bart.zip` instead of `google_transit_20160328_v1.zip`). You can also unzip and place a folder in the `gtfs` folder.

View File

@ -41,7 +41,7 @@ sensor:
{% configuration %} {% configuration %}
device: device:
description: The serial baudrate. description: The serial device.
required: true required: true
type: string type: string
default: /dev/ttyUSB0 default: /dev/ttyUSB0
@ -50,6 +50,26 @@ sensor:
required: true required: true
type: int type: int
default: 57600 default: 57600
led:
description: Activate or deactivate the Jeelink LED.
required: false
type: boolean
frequency:
description: Initial frequency in 5kHz steps.
required: false
type: int
datarate:
description: "Set the data rate in kbps. Special values for well-known settings are: `0`: 17.241 kbps, `1`: 9.579 kbps, `2`: 8.842 kbps."
required: false
type: int
toggle_mask:
description: "The following values can be combined bitwise: `1` = 17.241 kbps, `2` = 9.579 kbps, `4` = 8.842 kbps"
required: false
type: int
toggle_interval:
description: Enable the toggle mode and set the interval in seconds.
required: false
type: int
sensors: sensors:
description: A list of your sensors. description: A list of your sensors.
required: true required: true

View File

@ -25,7 +25,7 @@ To add a timer to your installation, add the following to your `configuration.ya
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
timer: timer:
timer: laundry:
duration: '00:01:00' duration: '00:01:00'
``` ```

View File

@ -222,6 +222,25 @@ This example plays the sound of a dog barking when the button is held down and s
gw_mac: xxxxxxxxxxxx gw_mac: xxxxxxxxxxxx
``` ```
### {% linkable_title Double Click on Smart Button %}
This example toggles the living room lamp on a double click of the button.
```yaml
- alias: Double Click to toggle living room lamp
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d000xxxxxc2
click_type: double
action:
service: light.toggle
data:
entity_id: light.living_room_lamp
```
## {% linkable_title Troubleshooting %} ## {% linkable_title Troubleshooting %}
### {% linkable_title Initial setup problem %} ### {% linkable_title Initial setup problem %}

View File

@ -0,0 +1,12 @@
---
layout: page
title: "Configuration.yaml by silvrr"
description: ""
date: 2018-1-18 13:08
sidebar: true
comments: false
sharing: true
footer: true
ha_category: Example configuration.yaml
ha_external_link: https://github.com/SilvrrGIT/HomeAssistant
---

View File

@ -14,7 +14,7 @@ Home Assistant can run as a daemon within init.d with the script below.
### {% linkable_title 1. Copy script %} ### {% linkable_title 1. Copy script %}
Copy the script at the end of this page to `/etc/init.d/hass-daemon`. Copy either the deamon script or the Python environment scrip at the end of this page to `/etc/init.d/hass-daemon` depending on your installation.
After that, set the script to be executable: After that, set the script to be executable:
@ -26,27 +26,41 @@ $ sudo chmod +x /etc/init.d/hass-daemon
Create or pick a user that the Home Assistant daemon will run under. Update script to set `RUN_AS` to the username that should be used to execute hass. Create or pick a user that the Home Assistant daemon will run under. Update script to set `RUN_AS` to the username that should be used to execute hass.
### {% linkable_title 3. Change hass executable if required. %} ### {% linkable_title 3. Change hass executable and other variables if required. %}
Some installation environments may require a change in the Home Assistant executable `hass`. Update script to set `HASS_BIN` to the appropriate `hass` executable path. Some installation environments may require a change in the Home Assistant executable `hass`. Update script to set `HASS_BIN` to the appropriate `hass` executable path. Please also check the other variables for the appropriate value. In general the defaults should work
### {% linkable_title 4. Register the daemon with Linux %} ### {% linkable_title 4. Install this service %}
```bash
$ sudo update-rc.d hass-daemon defaults
```
### {% linkable_title 5. Install this service %}
```bash ```bash
$ sudo service hass-daemon install $ sudo service hass-daemon install
``` ```
### {% linkable_title 5. Create logrotate rule %}
This logrotate script at `/etc/logrotate.d/homeassistant` will create an outage of a few seconds every week at night. If you do not want this add `--log-rotate-days 7` to the `FLAGS` variable in the init script.
```
/var/log/homeassistant/home-assistant.log
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
invoke-rc.d hass-daemon restart > /dev/null
endscript
}
```
### {% linkable_title 6. Restart Machine %} ### {% linkable_title 6. Restart Machine %}
That's it. Restart your machine and Home Assistant should start automatically. That's it. Restart your machine and Home Assistant should start automatically.
If HA does not start, check the log file output for errors at `/var/opt/homeassistant/home-assistant.log` If HA does not start, check the log file output for errors at `/var/log/homeassistant/home-assistant.log`
### {% linkable_title Extra: Running commands before hass executes %} ### {% linkable_title Extra: Running commands before hass executes %}
@ -73,54 +87,87 @@ HASS_BIN="hass"
RUN_AS="USER" RUN_AS="USER"
PID_FILE="/var/run/hass.pid" PID_FILE="/var/run/hass.pid"
CONFIG_DIR="/var/opt/homeassistant" CONFIG_DIR="/var/opt/homeassistant"
FLAGS="-v --config $CONFIG_DIR --pid-file $PID_FILE --daemon" LOG_DIR="/var/log/homeassistant"
REDIRECT="> $CONFIG_DIR/home-assistant.log 2>&1" LOG_FILE="$LOG_DIR/home-assistant.log"
FLAGS="-v --config $CONFIG_DIR --pid-file $PID_FILE --log-file $LOG_FILE --daemon"
start() { start() {
if [ ! -d "$PID_DIR" ]; then
echo "It seems you did not run"
echo -e "\tservice hass-daemon install"
return 1
fi
if [ -f $PID_FILE ] && kill -0 $(cat $PID_FILE) 2> /dev/null; then if [ -f $PID_FILE ] && kill -0 $(cat $PID_FILE) 2> /dev/null; then
echo 'Service already running' >&2 echo 'Service already running' >&2
return 1 return 1
fi fi
echo 'Starting service…' >&2 echo -n 'Starting service… ' >&2
local CMD="$PRE_EXEC $HASS_BIN $FLAGS $REDIRECT;" local CMD="$PRE_EXEC $HASS_BIN $FLAGS;"
su -c "$CMD" $RUN_AS su -s /bin/bash -c "$CMD" $RUN_AS
echo 'Service started' >&2 if [ $? -ne 0 ]; then
echo "Failed" >&2
else
echo 'Done' >&2
fi
} }
stop() { stop() {
if [ ! -f "$PID_FILE" ] || ! kill -0 $(cat "$PID_FILE") 2> /dev/null; then if [ ! -f "$PID_FILE" ] || ! kill -0 $(cat "$PID_FILE") 2> /dev/null; then
echo 'Service not running' >&2 echo 'Service not running' >&2
return 1 return 1
fi fi
echo 'Stopping service…' >&2 echo -n 'Stopping service… ' >&2
kill $(cat "$PID_FILE") kill $(cat "$PID_FILE")
while ps -p $(cat "$PID_FILE") > /dev/null 2>&1; do sleep 1;done; while ps -p $(cat "$PID_FILE") > /dev/null 2>&1; do sleep 1;done;
echo 'Service stopped' >&2 rm -f $PID_FILE
echo 'Done' >&2
} }
install() { install() {
echo "Installing Home Assistant Daemon (hass-daemon)" echo "Installing Home Assistant Daemon (hass-daemon)"
echo "999999" > $PID_FILE update-rc.d hass-daemon defaults
chown $RUN_AS $PID_FILE create_piddir
mkdir -p $CONFIG_DIR mkdir -p $CONFIG_DIR
chown $RUN_AS $CONFIG_DIR chown $RUN_AS $CONFIG_DIR
mkdir -p $LOG_DIR
chown $RUN_AS $LOG_DIR
} }
uninstall() { uninstall() {
echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] " echo "Are you really sure you want to uninstall this service? The INIT script will"
echo -n "also be deleted! That cannot be undone. [yes|No] "
local SURE local SURE
read SURE read SURE
if [ "$SURE" = "yes" ]; then if [ "$SURE" = "yes" ]; then
stop stop
rm -fv "$PID_FILE" remove_piddir
echo "Notice: The config directory has not been removed" echo "Notice: The config directory has not been removed"
echo $CONFIG_DIR echo $CONFIG_DIR
echo "Notice: The log directory has not been removed"
echo $LOG_DIR
update-rc.d -f hass-daemon remove update-rc.d -f hass-daemon remove
rm -fv "$0" rm -fv "$0"
echo "Home Assistant Daemon has been removed. Home Assistant is still installed." echo "Home Assistant Daemon has been removed. Home Assistant is still installed."
fi fi
} }
create_piddir() {
if [ ! -d "$PID_DIR" ]; then
mkdir -p $PID_DIR
chown $RUN_AS "$PID_DIR"
fi
}
remove_piddir() {
if [ -d "$PID_DIR" ]; then
if [ -e "$PID_FILE" ]; then
rm -fv "$PID_FILE"
fi
rmdir -fv "$PID_DIR"
fi
}
case "$1" in case "$1" in
start) start)
start start
@ -158,60 +205,93 @@ esac
# /etc/init.d Service Script for Home Assistant # /etc/init.d Service Script for Home Assistant
# Created with: https://gist.github.com/naholyr/4275302#file-new-service-sh # Created with: https://gist.github.com/naholyr/4275302#file-new-service-sh
PRE_EXEC="cd /srv/homeassistant && python3 -m venv . && source bin/activate &&" PRE_EXEC="cd /srv/homeassistant; python3 -m venv .; source bin/activate;"
# Typically /usr/bin/hass # Typically /usr/bin/hass
HASS_BIN="hass" HASS_BIN="hass"
RUN_AS="USER" RUN_AS="homeassistant"
PID_FILE="/var/run/hass.pid" PID_DIR="/var/run/hass"
CONFIG_DIR="/home/USER/.homeassistant" PID_FILE="$PID_DIR/hass.pid"
FLAGS="-v --config $CONFIG_DIR --pid-file $PID_FILE --daemon" CONFIG_DIR="/home/$RUN_AS/.homeassistant"
REDIRECT="> $CONFIG_DIR/home-assistant.log 2>&1" LOG_DIR="/var/log/homeassistant"
LOG_FILE="$LOG_DIR/home-assistant.log"
FLAGS="-v --config $CONFIG_DIR --pid-file $PID_FILE --log-file $LOG_FILE --daemon"
start() { start() {
if [ ! -d "$PID_DIR" ]; then
echo "It seems you did not run"
echo -e "\tservice hass-daemon install"
return 1
fi
if [ -f $PID_FILE ] && kill -0 $(cat $PID_FILE) 2> /dev/null; then if [ -f $PID_FILE ] && kill -0 $(cat $PID_FILE) 2> /dev/null; then
echo 'Service already running' >&2 echo 'Service already running' >&2
return 1 return 1
fi fi
echo 'Starting service…' >&2 echo -n 'Starting service… ' >&2
local CMD="$PRE_EXEC $HASS_BIN $FLAGS $REDIRECT;" local CMD="$PRE_EXEC $HASS_BIN $FLAGS;"
su -s /bin/bash -c "$CMD" $RUN_AS su -s /bin/bash -c "$CMD" $RUN_AS
echo 'Service started' >&2 if [ $? -ne 0 ]; then
echo "Failed" >&2
else
echo 'Done' >&2
fi
} }
stop() { stop() {
if [ ! -f "$PID_FILE" ] || ! kill -0 $(cat "$PID_FILE") 2> /dev/null; then if [ ! -f "$PID_FILE" ] || ! kill -0 $(cat "$PID_FILE") 2> /dev/null; then
echo 'Service not running' >&2 echo 'Service not running' >&2
return 1 return 1
fi fi
echo 'Stopping service…' >&2 echo -n 'Stopping service… ' >&2
kill $(cat "$PID_FILE") kill $(cat "$PID_FILE")
while ps -p $(cat "$PID_FILE") > /dev/null 2>&1; do sleep 1;done; while ps -p $(cat "$PID_FILE") > /dev/null 2>&1; do sleep 1;done;
echo 'Service stopped' >&2 rm -f $PID_FILE
echo 'Done' >&2
} }
install() { install() {
echo "Installing Home Assistant Daemon (hass-daemon)" echo "Installing Home Assistant Daemon (hass-daemon)"
echo "999999" > $PID_FILE update-rc.d hass-daemon defaults
chown $RUN_AS $PID_FILE create_piddir
mkdir -p $CONFIG_DIR mkdir -p $CONFIG_DIR
chown $RUN_AS $CONFIG_DIR chown $RUN_AS $CONFIG_DIR
mkdir -p $LOG_DIR
chown $RUN_AS $LOG_DIR
} }
uninstall() { uninstall() {
echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] " echo "Are you really sure you want to uninstall this service? The INIT script will"
echo -n "also be deleted! That cannot be undone. [yes|No] "
local SURE local SURE
read SURE read SURE
if [ "$SURE" = "yes" ]; then if [ "$SURE" = "yes" ]; then
stop stop
rm -fv "$PID_FILE" remove_piddir
echo "Notice: The config directory has not been removed" echo "Notice: The config directory has not been removed"
echo $CONFIG_DIR echo $CONFIG_DIR
echo "Notice: The log directory has not been removed"
echo $LOG_DIR
update-rc.d -f hass-daemon remove update-rc.d -f hass-daemon remove
rm -fv "$0" rm -fv "$0"
echo "Home Assistant Daemon has been removed. Home Assistant is still installed." echo "Home Assistant Daemon has been removed. Home Assistant is still installed."
fi fi
} }
create_piddir() {
if [ ! -d "$PID_DIR" ]; then
mkdir -p $PID_DIR
chown $RUN_AS "$PID_DIR"
fi
}
remove_piddir() {
if [ -d "$PID_DIR" ]; then
if [ -e "$PID_FILE" ]; then
rm -fv "$PID_FILE"
fi
rmdir -fv "$PID_DIR"
fi
}
case "$1" in case "$1" in
start) start)
start start

View File

@ -21,8 +21,8 @@ To view the available packages run `hassbian-config show` and `sudo hassbian-con
- Install Libcec. Adds local [HDMI CEC support][cec]. *This scipt is currently brooken upstream since it currently doesn't build properly for Python >3.4* - Install Libcec. Adds local [HDMI CEC support][cec]. *This scipt is currently brooken upstream since it currently doesn't build properly for Python >3.4*
- Install Samba. Allows anyone on your network to edit your configuration from any computer. This share is unsecured and it's usage is not recommended if you share your network with others. - Install Samba. Allows anyone on your network to edit your configuration from any computer. This share is unsecured and it's usage is not recommended if you share your network with others.
- Install Tradfri. Installs dependencies for using IKEA Trådfri. - Install Tradfri. Installs dependencies for using IKEA Trådfri.
- Install Duck DNS auto renewal. This script adds an cron job to auto update you the WAN IP address for the defined domain. Before running this script you should already have an Duck DNS account, during the installation you will be asked to supply your domain name and the token for your account. - Install Duck DNS auto renewal. This script adds a cron job to auto update the WAN IP address for the defined domain. Before running this script you should already have an Duck DNS account. During the installation you will be asked to supply your domain name and the token for your account.
- Install an web terminal for easy access to ssh in an web browser. This script installs an web terminal called 'shellinabox' to you system that give you SSH access in you web browser. - Install a web terminal for easy access to ssh in any web browser. This script installs a web terminal called 'shellinabox' on your system that gives you SSH access in your web browser.
#### Upgrade scripts #### Upgrade scripts
To view the available packages run `hassbian-config show` and `sudo hassbian-config upgrade PACKAGENAME`. To view the available packages run `hassbian-config show` and `sudo hassbian-config upgrade PACKAGENAME`.

View File

@ -35,7 +35,7 @@ A valid network key will be a 16 byte value, defined in the zwave section of you
``` ```
zwave: zwave:
usb_path: /dev/ttyACM0 usb_path: /dev/ttyACM0
network_key: "0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F 0x10" network_key: "0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10"
``` ```
Each individual value in the defined key can be anywhere from 0x00 to 0xFF. Define your own key by making changes to the above example key or for additional security try one of the two scripts mentioned below. Each individual value in the defined key can be anywhere from 0x00 to 0xFF. Define your own key by making changes to the above example key or for additional security try one of the two scripts mentioned below.

View File

@ -0,0 +1,34 @@
---
layout: post
title: "Clarification about Emulated Hue"
description: "The Emulated Hue component is not going to be removed nor will we ever remove any functionality from Home Assistant to push you to subscribe to the Community Support Package."
date: 2018-01-21 01:00:00
date_formatted: "January 21, 2018"
author: Paulus Schoutsen
author_twitter: balloob
comments: true
categories: Public Service Announcement
---
There are some misconceptions floating around about the future of the Emulated Hue component and I would like to set the record straight. **The Emulated Hue component is not going to be removed nor will we ever remove any functionality from Home Assistant to push you to support the Home Assistant project by subscribing to the Community Support Package.**
The reason people are concerned about the future of the Emulated Hue component is because of a poor choice of words in a deprecation message. This message was [introduced a year ago][pr2] when we deprecated the config option `type: alexa` for the Emulated Hue component:
> Alexa type is deprecated and will be removed in a future version
That config option should never have been called `type: alexa` but instead have been called `mode: legacy`. If you think about it, why would emulating something even have different modes it emulates based on the consumer? That means that one of the two emulation modes is incorrect.
The old implementation was not 100% correct. It was correct enough to work with Alexa (the original target) but not with Google Home. When fixing Emulated Hue we added `type: alexa` to re-enable the old implementation so that people did not have to go through the trouble to re-add their Alexa devices. The option was deprecated to indicate that we would remove the incorrect emulation in the future. However, we forgot about actually following through with that.
The mistake we made was calling the correct mode `google_home` although it had nothing to do with Google Home. It confused people and they kept adding `type: alexa` to their configuration, triggering the deprecation warning.
The warning will be updated starting Home Assistant 0.62 and will also include a link to this blog post.
More info:
- To read about what was incorrect in the first version of Emulated Hue, take a look at the PR fixing it: [Re-org emulated_hue and fix google home][pr1].
- Read the [documentation on how to configure Emulated Hue][eh-conf]
[pr1]: https://github.com/home-assistant/home-assistant/pull/4708
[pr2]: https://github.com/home-assistant/home-assistant/pull/5549
[eh-conf]: https://home-assistant.io/components/emulated_hue/#configuration

View File

@ -22,7 +22,7 @@ Use `hassio` to speak with the internal API.
An add-on can speak to the [Home Assistant API][hass-api] with our internal proxy. That makes it very easy to communicate with the API without knowing the password, port or any other information of the Home Assistant instance. Use this URL: `http://hassio/homeassistant/api` and internal communication is redirected to the right place. The next stept is to add `homeassistant_api: true` to `config.json` and read the environment variable `HASSIO_TOKEN` and use this as Home-Assistant password. An add-on can speak to the [Home Assistant API][hass-api] with our internal proxy. That makes it very easy to communicate with the API without knowing the password, port or any other information of the Home Assistant instance. Use this URL: `http://hassio/homeassistant/api` and internal communication is redirected to the right place. The next stept is to add `homeassistant_api: true` to `config.json` and read the environment variable `HASSIO_TOKEN` and use this as Home-Assistant password.
We have also a proxy for [Websocket Home Assistant API][hass-websocket]. It work like the API proxy above and use `API_TOKEN` as password. Use this URL: `http://hassio/homeassistant/websocket`. We have also a proxy for [Websocket Home Assistant API][hass-websocket]. It work like the API proxy above and use `HASSIO_TOKEN` as password. Use this URL: `http://hassio/homeassistant/websocket`.
It is also possible to speak direct to the Home Assistant instance which is named `homeassistant` over our internal network. But you need to know the configuration that is used by the running instance. It is also possible to speak direct to the Home Assistant instance which is named `homeassistant` over our internal network. But you need to know the configuration that is used by the running instance.
@ -30,7 +30,7 @@ We have severals services for Hass.io inside Home Assistant to execute tasks. To
## {% linkable_title Hass.io API %} ## {% linkable_title Hass.io API %}
To enables calls to the [Hass.io API][hassio-api], add `hassio_api: true` to `config.json` and read the environment variable `API_TOKEN`. Now you can use the API over the URL: `http://hassio/`. Use the `HASSIO_TOKEN` with header `X-HASSIO-KEY`. To enables calls to the [Hass.io API][hassio-api], add `hassio_api: true` to `config.json` and read the environment variable `HASSIO_TOKEN`. Now you can use the API over the URL: `http://hassio/`. Use the `HASSIO_TOKEN` with header `X-HASSIO-KEY`.
[hass-api]: https://home-assistant.io/developers/rest_api/ [hass-api]: https://home-assistant.io/developers/rest_api/
[hass-websocket]: https://home-assistant.io/developers/websocket_api/ [hass-websocket]: https://home-assistant.io/developers/websocket_api/

View File

@ -15,7 +15,7 @@ The URI that is generating the data is `/api/stream`.
A requirement on the client-side is existing support for the [EventSource](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) interface. A requirement on the client-side is existing support for the [EventSource](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) interface.
There are various ways to access the stream. One is `curl`: There are various ways to access the stream. If you have not set an `api_password` in the [`http`](/components/http/) section of your `configuration.yaml` file then you use your modern browser to read the messages. A command-line option is `curl`:
```bash ```bash
$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \ $ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \

View File

@ -9,7 +9,7 @@ sharing: true
footer: true footer: true
--- ---
The goal of this getting started guide is to install Hass.io on a Raspberry Pi 3. Hass.io is our own all in one solution that turns your Raspberry PI into the utlimate home automation hub. The goal of this getting started guide is to install Hass.io on a Raspberry Pi 3. Hass.io is our own all in one solution that turns your Raspberry PI into the ultimate home automation hub.
Follow this guide if you want to easily get started with Home Assistant, or if you have no or little Linux experience. For advanced users, check our [alternative installation methods](/docs/installation/). Follow this guide if you want to easily get started with Home Assistant, or if you have no or little Linux experience. For advanced users, check our [alternative installation methods](/docs/installation/).