Merge branch 'master' into next
Conflicts: source/getting-started/troubleshooting-configuration.markdown
This commit is contained in:
commit
a4a1edf5bd
34 changed files with 241 additions and 90 deletions
|
@ -21,7 +21,7 @@ Actions will call services within Home Assistant. For example, turn a light on,
|
|||
|
||||
Conditions are used to prevent actions from firing unless certain conditions are met. For example, it is possible to only turn on the light if someone comes home and it is after a certain point in time.
|
||||
|
||||
The difference between a condition and a trigger can be confusing. The difference is that the trigger looks at the event that is happening, ie a car engine turning on. Conditions looks at the current state of the system, ie is the car engine on.
|
||||
The difference between a condition and a trigger can be confusing. The difference is that the trigger looks at the event that is happening, i.e. a car engine turning on. Conditions looks at the current state of the system, i.e. is the car engine on.
|
||||
|
||||
### {% linkable_title Exploring the internal state %}
|
||||
|
||||
|
@ -76,7 +76,7 @@ Now you're happy and all is good. You start to like this automation business and
|
|||
|
||||
The first thing you do is to look at the entities in the developer tools (second icon) in the app. You see the names of your lights and you write them down: `light.table_lamp`, `light.bedroom`, `light.ceiling`.
|
||||
|
||||
Instead of hard coding the entity ids of the lights in the automation rule, we will set up a group. This will allow us to see the living room separate in the app and be able to address it from automation rules.
|
||||
Instead of hard coding the entity IDs of the lights in the automation rule, we will set up a group. This will allow us to see the living room separate in the app and be able to address it from automation rules.
|
||||
|
||||
So we tweak the config to add the group and have the automation rule only turn on the group.
|
||||
|
||||
|
@ -102,9 +102,9 @@ automation:
|
|||
entity_id: group.living_room
|
||||
```
|
||||
|
||||
Christmas is coming along and you decide to buy a remote switch to control the christmas lights from Home Assistant. You can't claim to live in the house of the future if you're still manually turn on your christmas lights!
|
||||
Christmas is coming along and you decide to buy a remote switch to control the Christmas lights from Home Assistant. You can't claim to live in the house of the future if you're still manually turning on your Christmas lights!
|
||||
|
||||
We hook the switch up to Home Assistant and grab the entity id from the developer tools: `switch.christmas_lights`. We will update the group to include the switch and will change our action. We are no longer able to call `light.turn_on` because we also want to turn on a switch. This is where `homeassistant.turn_on` comes to the rescue. This service is capable of turning any entity on.
|
||||
We hook the switch up to Home Assistant and grab the entity ID0 from the developer tools: `switch.christmas_lights`. We will update the group to include the switch and will change our action. We are no longer able to call `light.turn_on` because we also want to turn on a switch. This is where `homeassistant.turn_on` comes to the rescue. This service is capable of turning any entity on.
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
|
@ -131,7 +131,7 @@ automation:
|
|||
|
||||
### {% linkable_title Further reading %}
|
||||
|
||||
We went over the basics of creating a home automation rule. From here no longer any hand holding, go automate!
|
||||
We went over the basics of creating a home automation rule. Now, go automate!
|
||||
|
||||
- Learn about the available [automation triggers](/components/automation/#triggers)
|
||||
- Learn about the available [automation conditions](/components/automation/#conditions)
|
||||
|
|
|
@ -9,7 +9,7 @@ sharing: true
|
|||
footer: true
|
||||
---
|
||||
|
||||
Home Assistant will create a configuration folder when it is run for the first time. The location of the folder depends on operating system: on OS X/Linux it's `~/.homeassistant` and on Windows it's `%APPDATA%/.homeassistant`. If you want to use a different folder for configuration, run `hass --config path/to/config`.
|
||||
Home Assistant will create a configuration folder when it is run for the first time. The location of the folder differs between operating systems: on OS X/Linux it's `~/.homeassistant` and on Windows it's `%APPDATA%/.homeassistant`. If you want to use a different folder for configuration, run `hass --config path/to/config`.
|
||||
|
||||
Inside your configuration folder is the file `configuration.yaml`. This is the main file that contains which components will be loaded and what their configuration is. An example configuration file is located [here](https://github.com/balloob/home-assistant/blob/master/config/configuration.yaml.example).
|
||||
|
||||
|
@ -53,6 +53,10 @@ http:
|
|||
api_password: YOUR_PASSWORD
|
||||
```
|
||||
|
||||
_See the [HTTP component documentation][http] for more options like HTTPS encryption._
|
||||
|
||||
[http]: /components/http/
|
||||
|
||||
### {% linkable_title Setting up your phone or tablet %}
|
||||
|
||||
Home Assistant runs as a self hosted web application and contains support to be added to your homescreen. If you're on Android you can follow [the visual guide]({{site_root}}/getting-started/android/). For other devices, open Home Assistant on your mobile browser and tap on the add to homescreen option.
|
||||
|
@ -61,6 +65,6 @@ Home Assistant runs as a self hosted web application and contains support to be
|
|||
|
||||
To make Home Assistant accessible while away from home, you will have to setup port forwarding from your router to port 8123 on the computer that is hosting Home Assistant. Instructions on how to do this can be found by searching `<Router model> port forwarding instructions`.
|
||||
|
||||
Some internet service providers will only offer dynamic IPs. This can cause you to be unable to access Home Assistant while being remote. You can solve this by using a free Dynamic DNS service like [DuckDNS](https://www.duckdns.org/).
|
||||
Some internet service providers will only offer dynamic IPs. This can cause you to be unable to access Home Assistant while away. You can solve this by using a free Dynamic DNS service like [DuckDNS](https://www.duckdns.org/).
|
||||
|
||||
### [Next step: Setting up devices »](/getting-started/devices/)
|
||||
|
|
|
@ -9,11 +9,11 @@ sharing: true
|
|||
footer: true
|
||||
---
|
||||
|
||||
Home Assistant will be able to automatically discover and configure any Google Chromecasts, Netgear routers, Belkin WeMo switches, Philips Hue bridges and Sonos speakers in your network if you have [the discovery component]({{site_root}}/components/discovery/) enabled (which is by default).
|
||||
Home Assistant will be able to automatically discover and configure any Google Chromecasts, Netgear routers, Belkin WeMo switches, Philips Hue bridges and Sonos speakers on your network if you have [the discovery component]({{site_root}}/components/discovery/) enabled (which is by default).
|
||||
|
||||
See the [components overview page](/components/) to find installation instructions for your devices and services. If you can't find support for your favorite device or service, [consider adding support](/developers/add_new_platform/).
|
||||
|
||||
Usually every entity needs its own entry in the `configuration.yaml` file. There are two kind of styles for multiple entries:
|
||||
Usually every entity needs its own entry in the `configuration.yaml` file. There are two kinds of style for multiple entries:
|
||||
|
||||
#### {% linkable_title Style 1 %}
|
||||
|
||||
|
@ -59,7 +59,7 @@ If your devices are not showing up in the frontend then check the entries in you
|
|||
|
||||
### {% linkable_title Grouping devices %}
|
||||
|
||||
Once you get a bunch of devices set up, it is time to organize them. This can be done using groups. Each group exists of a name and a list of entity IDs. Entity IDs can be retrieved from the web interface by using the Set State page in the Developer Tools (icon in the middle).
|
||||
Once you have a bunch of devices set up, it is time to organize them. This can be done using groups. Each group exists of a name and a list of entity IDs. Entity IDs can be retrieved from the web interface by using the Set State page in the Developer Tools (icon in the middle).
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
|
@ -70,11 +70,13 @@ group:
|
|||
- media_player.nexus_player
|
||||
```
|
||||
|
||||
For more details please check the [Group](https://home-assistant.io/components/group/) page.
|
||||
|
||||
### {% linkable_title Customizing devices and services %}
|
||||
|
||||
By default, all of your devices will be visible and have a default icon determined by their domain. You may find it desireable to customize the look and feel of your front page by altering some of these parameters. This can be done by adding the following config to the `homeassistant:` section.
|
||||
By default, all of your devices will be visible and have a default icon determined by their domain. You may find it desireable to customize the look and feel of your front page by altering some of these parameters. This can be done by adding the following configuration to the `homeassistant:` section.
|
||||
|
||||
Entity_pictures, badges, device_tracker pictures, etc can either be a URL or `/local/file.jpg`, which points to directory `www` in the HASS configuration directory.
|
||||
`entity_pictures`, badges, `device_tracker` pictures, etc. can either be a URL or `/local/file.jpg`, which points to directory `www` in the HASS configuration directory.
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
|
|
|
@ -28,7 +28,7 @@ $ hass --open-ui
|
|||
Running these commands will:
|
||||
|
||||
- Install Home Assistant
|
||||
- Launch Home Assistant and serve web interface on [http://localhost:8123](http://localhost:8123)
|
||||
- Launch Home Assistant and serve the web interface on [http://localhost:8123](http://localhost:8123)
|
||||
|
||||
</div> <!-- INSTALL-INSTRUCTIONS NORMAL -->
|
||||
|
||||
|
@ -41,7 +41,7 @@ Installation with Docker is straightforward. Adjust the following command so tha
|
|||
$ docker run -d --name="home-assistant" -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro --net=host balloob/home-assistant
|
||||
```
|
||||
|
||||
This will launch Home Assistant and serve its web interface from port 8123 on your Docker host.
|
||||
This will launch Home Assistant and serve the web interface from port 8123 on your Docker host.
|
||||
|
||||
<p class='note'>
|
||||
When using boot2docker on OS X you are unable to map the local time to your Docker container. Replace `-v /etc/localtime:/etc/localtime:ro` with `-e "TZ=America/Los_Angeles"` (replacing America/Los_Angeles with [your timezone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones))
|
||||
|
@ -64,7 +64,7 @@ $ hass
|
|||
Running these commands will:
|
||||
|
||||
- Install Home Assistant
|
||||
- Launch Home Assistant and serve web interface on [http://localhost:8123](http://localhost:8123)
|
||||
- Launch Home Assistant and serve the web interface on [http://localhost:8123](http://localhost:8123)
|
||||
|
||||
</div> <!-- INSTALL-INSTRUCTIONS RASPBERRY -->
|
||||
</div>
|
||||
|
|
|
@ -16,7 +16,7 @@ We care about privacy. Collected data is <b>only</b> stored in your instance of
|
|||
Presence detection detects if people are home, an important input for automation. The most important piece of information is to know if anyone is home. But knowing who is home or where they are will open a whole range of other automation options:
|
||||
|
||||
- Send me a notification when my child arrives at school
|
||||
- Turn on AC when I leave work
|
||||
- Turn on the AC when I leave work
|
||||
|
||||
<p class='img'>
|
||||
<img src='/images/screenshots/map.png' />
|
||||
|
@ -27,7 +27,7 @@ Screenshot of Home Assistant showing a school, work and home zone and two people
|
|||
|
||||
The device tracker component offers presence detection for Home Assistant. It supports two different methods for presence detection: scan for connected devices on the local network and connect to third party service.
|
||||
|
||||
Scanning for connected devices is easy to setup. See the instructions for our [supported routers][routers] or [scan the network using nmap][nmap]. This approach does have its limitations. It will only be able to detect if a device is home. It also struggles with iPhones because they disconnect from the WiFi if idle, marking them as not home while they are not.
|
||||
Scanning for connected devices is easy to setup. See the instructions for our [supported routers][routers] or [scan the network using nmap][nmap]. This approach does have its limitations however, it will only be able to detect if a device is home. It also struggles with iPhones because they disconnect from WiFi if idle, marking them as not home when they actually are.
|
||||
|
||||
Home Assistant currently supports two third party services for presence detection: [OwnTracks][ha-owntracks] and [Locative][ha-locative]. OwnTracks is an app that you install on your iPhone or Android phone that allows you to push the location of your device to Home Assistant using an MQTT broker. An MQTT broker is an Internet of Things communication platform that you can [freely host yourself][mqtt-self] or get [a private instance for free in the cloud](/components/mqtt/#run-your-own).
|
||||
|
||||
|
@ -39,7 +39,7 @@ OwnTracks communicates directly with your MQTT broker, no data will pass through
|
|||
|
||||
<img src='/images/screenshots/badges-zone.png' style='float: right; margin-left: 8px; height: 100px;'>
|
||||
|
||||
Home Assistant will know about the location for your device if you are using OwnTracks. By [setting up zones][zone] you will be able to add names to locations of your devices. This way you can easily spot on the state page where the people in your house are and use it as [triggers][trigger] and [conditions][condition] for automation.
|
||||
Home Assistant will know the location of your device if you are using OwnTracks. By [setting up zones][zone] you will be able to add names to the locations of your devices. This way you can easily spot on the state page where the people in your house are and use it as [triggers][trigger] and [conditions][condition] for automation.
|
||||
|
||||
### [Next step: Setting up automation »](/getting-started/automation/)
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ footer: true
|
|||
---
|
||||
|
||||
<p class='note'>
|
||||
This is an advanced feature of Home Assistant. You need a basic understanding of the [Home Assistant architecture], especially states.
|
||||
This is an advanced feature of Home Assistant. You'll need a basic understanding of the [Home Assistant architecture], especially states.
|
||||
</p>
|
||||
|
||||
[Home Assistant architecture]: /developers/architecture/
|
||||
|
@ -36,7 +36,7 @@ Templating in Home Assistant is powered by the Jinja2 templating engine. This me
|
|||
The frontend has a template editor developer tool to help develop and debug templates.
|
||||
</p>
|
||||
|
||||
Templates can get pretty big pretty fast. To keep a clear overview, consider using YAML multiline strings to define your templates:
|
||||
Templates can get big pretty fast. To keep a clear overview, consider using YAML multiline strings to define your templates:
|
||||
|
||||
```yaml
|
||||
script:
|
||||
|
@ -56,14 +56,14 @@ script:
|
|||
|
||||
Home Assistant adds extensions to allow templates to access all of the current states:
|
||||
|
||||
- Iterating `states` will yield each state sorted alphabetically by entity id
|
||||
- Iterating `states.domain` will yield each state of that domain sorted alphabetically by entity id
|
||||
- `states.sensor.temperature` returns state object for `sensor.temperature`
|
||||
- `states('device_tracker.paulus')` will return the state string (not the object) of given entity or `unknown` if it doesn't exist.
|
||||
- `is_state('device_tracker.paulus', 'home')` will test if given entity is specified state.
|
||||
- `is_state_attr('device_tracker.paulus', 'battery', 40)` will test if given entity is specified state.
|
||||
- Filter `multiply(x)` will convert input to number and multiply it with `x`
|
||||
- Filter `round(x)` will convert input to number and round it to `x` decimals.
|
||||
- Iterating `states` will yield each state sorted alphabetically by entity ID
|
||||
- Iterating `states.domain` will yield each state of that domain sorted alphabetically by entity ID
|
||||
- `states.sensor.temperature` returns the state object for `sensor.temperature`
|
||||
- `states('device_tracker.paulus')` will return the state string (not the object) of the given entity or `unknown` if it doesn't exist.
|
||||
- `is_state('device_tracker.paulus', 'home')` will test if the given entity is specified state.
|
||||
- `is_state_attr('device_tracker.paulus', 'battery', 40)` will test if the given entity is specified state.
|
||||
- Filter `multiply(x)` will convert the input to a number and multiply it with `x`
|
||||
- Filter `round(x)` will convert the input to a number and round it to `x` decimals.
|
||||
|
||||
#### {% linkable_title Examples %}
|
||||
|
||||
|
@ -101,7 +101,7 @@ Home Assistant adds extensions to allow templates to access all of the current s
|
|||
|
||||
## {% linkable_title Processing incoming data %}
|
||||
|
||||
The other part of templating is processing incoming data. It will allow you to modify incoming data and extract only the data that you care about. This will work only for platforms and components that mentioned support for this in their documentation.
|
||||
The other part of templating is processing incoming data. It will allow you to modify incoming data and extract only the data you care about. This will work only for platforms and components that mentioned support for this in their documentation.
|
||||
|
||||
It depends per component or platform but it is common to be able to define a template using the `value_template` configuration key. When a new value arrives, your template will be rendered while having access to the following values on top of the usual Home Assistant extensions:
|
||||
|
||||
|
|
|
@ -46,9 +46,10 @@ sensor:
|
|||
state_topic: sensor2/topic
|
||||
```
|
||||
|
||||
Indentation is used to specify which objects are nested under one anohter. Getting the right indentation can be tricky if you're not using an editor with a fixed width font. You can test your configuration using [online YAML parser](http://yaml-online-parser.appspot.com/) or [YAML Lint](http://www.yamllint.com/).
|
||||
Indentation is used to specify which objects are nested under one anohter. Getting the right indentation can be tricky if you're not using an editor with a fixed width font. Tabs are not allowed to be used for indentation. You can test your configuration using [online YAML parser](http://yaml-online-parser.appspot.com/) or [YAML Lint](http://www.yamllint.com/).
|
||||
|
||||
To learn more about the quirks of YAML, read [YAML IDIOSYNCRASIES](https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html) by SaltStack.
|
||||
- To learn more about the quirks of YAML, read [YAML IDIOSYNCRASIES](https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html) by SaltStack.
|
||||
- You can test your configuration using [this online YAML parser](http://yaml-online-parser.appspot.com/).
|
||||
|
||||
### {% linkable_title My component does not show up %}
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ sharing: true
|
|||
footer: true
|
||||
---
|
||||
|
||||
It can happen that you run into trouble while installing Home Assistant. This page is here to help
|
||||
you figure out the most common problems.
|
||||
It can happen that you run into trouble while installing Home Assistant. This page is here to help you figure out the most common problems.
|
||||
|
||||
**pip3: command not found**
|
||||
|
||||
#### {% linkable_title pip3: command not found %}
|
||||
This utility should have been installed as part of the Python 3.4 installation. Check if Python 3.4 is installed by running `python3 --version`. If it is not installed, [download it here](https://www.python.org/getit/).
|
||||
|
||||
If you are able to successfully run `python3 --version` but not `pip3`, run the following command instead to install Home Assistant:
|
||||
|
@ -21,28 +21,28 @@ If you are able to successfully run `python3 --version` but not `pip3`, run the
|
|||
$ python3 -m pip install homeassistant
|
||||
```
|
||||
|
||||
**No module named pip**
|
||||
#### {% linkable_title No module named pip %}
|
||||
[Pip](https://pip.pypa.io/en/stable/) should come bundled with the latest Python 3 but is ommitted 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 run it with Python 3:
|
||||
|
||||
```bash
|
||||
$ python3 get-pip.py
|
||||
```
|
||||
|
||||
**distutils.errors.DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both**
|
||||
#### {% linkable_title distutils.errors.DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both %}
|
||||
This is a known issue if you're on a Mac using Homebrew to install Python. Please follow [these instructions](https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md#note-on-pip-install---user) to resolve it.
|
||||
|
||||
**CentOS and Python 3**
|
||||
#### {% linkable_title CentOS and Python 3 %}
|
||||
To run Python 3.x on [CentOS](https://www.centos.org/) or RHEL, [Software Collections](https://www.softwarecollections.org/en/scls/rhscl/rh-python34/) needs to be activated.
|
||||
|
||||
**No access to the frontend**
|
||||
In newer Linux distributions (at least Fedora 22/CentOS 7) the access to a host is very limited. This means that you can't access the Home Assistant Frontend that is running on a host outside of the host machine. Windows and OSX machines may also have issues with this.
|
||||
#### {% linkable_title No access to the frontend %}
|
||||
In newer Linux distributions (at least Fedora 22/CentOS 7) the access to a host is very limited. This means that you can't access the Home Assistant frontend that is running on a host outside of the host machine. Windows and OSX machines may also have issues with this.
|
||||
|
||||
To fix this you will need to open your machine's firewall for TCP traffic over port 8123. The method for doing this will vary depending on your operating system and the firewall you have installed. Below are some suggestions to try. Google is your friend here.
|
||||
|
||||
[Windows instructions](http://windows.microsoft.com/en-us/windows/open-port-windows-firewall#1TC=windows-7)
|
||||
[Mac OSX instructions](https://support.apple.com/en-us/HT201642)
|
||||
|
||||
For firewalld systems (Fedora, RHEL, etc.):
|
||||
For systems with **firewalld** (Fedora, CentOS/RHEL, etc.):
|
||||
|
||||
```bash
|
||||
$ sudo firewall-cmd --permanent --add-port=8123/tcp
|
||||
|
@ -55,15 +55,15 @@ For UFW systems (Ubuntu, Debian, Raspbian, etc.):
|
|||
$ sudo ufw allow 8123/tcp
|
||||
```
|
||||
|
||||
For iptables systems (usually the default):
|
||||
For `iptables` systems (was the default for older distributions):
|
||||
|
||||
```bash
|
||||
$ iptables -I INPUT -p tcp --dport 8123 -j ACCEPT
|
||||
$ iptables-save > /etc/network/iptables.rules # your rules may be saved elsewhere
|
||||
```
|
||||
|
||||
**Run the development version**
|
||||
If you want to stay on top of the development of Home Assistant then you can upgrade to the dev branch. This can result in an unstable system, loss of data etc etc.
|
||||
#### {% linkable_title Run the development version %}
|
||||
If you want to stay on top of the development of Home Assistant then you can upgrade to the `dev` branch. This can result in an unstable system, loss of data, etc, etc.
|
||||
|
||||
```bash
|
||||
$ pip3 install --upgrade git+git://github.com/balloob/home-assistant.git@dev
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue