Merge branch 'current' into next

This commit is contained in:
Paulus Schoutsen 2016-09-28 20:34:05 -07:00
commit 8a8e6e9c1f
52 changed files with 304 additions and 108 deletions

View file

@ -23,6 +23,7 @@ automation:
event_data:
mood: happy
```
For example, to carry out actions when Home Assistant starts, you can use `event_type: homeassistant_start`. See other 'events' supported by Home Assistant [here](https://home-assistant.io/topics/events/).
### {% linkable_title MQTT trigger %}
Triggers when a specific message is received on given topic. Optionally can match on the payload being sent over the topic.
@ -97,7 +98,7 @@ Template triggers work by evaluating a [template] on each state change. The trig
automation:
trigger:
platform: template
value_template: '{% raw %}{% if is_state('device_tracker.paulus', 'home') %}true{% endif %}{% endraw %}'
value_template: "{% raw %}{% if is_state('device_tracker.paulus', 'home') %}true{% endif %}{% endraw %}"
```
### {% linkable_title Time trigger %}

View file

@ -19,7 +19,7 @@ homeassistant:
latitude: 32.87336
longitude: 117.22743
# Impacts weather/sunrise data (altitude above sea level)
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 430
# 'metric' for Metric, 'imperial' for Imperial

View file

@ -54,7 +54,7 @@ camera 2:
### {% linkable_title Grouping devices %}
Once you have a bunch of devices set up, it is time to organize them into groups.
Each group consists 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 (second icon).
Each group consists 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 (![<>](https://cdn.rawgit.com/Templarian/MaterialDesign/master/icons/svg/code-tags.svg)).
```yaml
# Example configuration.yaml entry showing two styles

View file

@ -56,6 +56,7 @@ To upgrade the All-In-One setup manually:
* Change to hass user `sudo su -s /bin/bash hass`
* Change to virtual enviroment `source /srv/hass/hass_venv/bin/activate`
* Update HA `pip3 install --upgrade homeassistant`
* Type `exit` to logout the hass user and return to the `pi` user.
To upgrade with fabric:
@ -68,7 +69,6 @@ After upgrading, you can restart Home Assistant a few different ways:
* Restarting the Raspberry Pi `sudo reboot`
* Restarting the Home-Assistant Service `sudo systemctl restart home-assistant.service`
### {% linkable_title Using the OZWCP web application %}
To launch the OZWCP web application:
@ -84,6 +84,10 @@ To launch the OZWCP web application:
Don't check the USB box regardless of using a USB based device.
</p>
### {% linkable_title Using the GPIOs %}
Please note that if you are using any components for Home Assistant that would use the GPIOs on the RPI, you will need to grant the default AiO user `hass` access to the GPIOs. Run the following command `sudo adduser hass gpio` while in a terminal session on your Pi. This is a one time configuration change to allow All In One Installer based Home Assistant access to the GPIOs.
### {% linkable_title WinSCP %}
If you are Windows users who is using [WinSCP](https://winscp.net/), please note that after running the installer, you will need to modify settings allowing you to "switch users" to edit your configuration files. The needed change within WinSCP is: **Environment** -> **SCP/Shell** -> **Shell** and set it to `sudo su -`.

View file

@ -23,6 +23,14 @@ Using the Synology webadmin:
SSH onto your synology & login as admin or root
- Log in with your own administrator account
- Switch to root using:
```bash
$ sudo -i
```
Check the path to python3 (assumed to be /volume1/@appstore/py3k/usr/local/bin)
```bash
@ -175,6 +183,19 @@ Make the daemon file executable:
$ chmod 777 /volume1/homeassistant/hass-daemon
```
Update your firewall (if it is turned on on the Synology device):
- Go to your Synology control panel
- Go to security
- Go to firewall
- Go to Edit Rules
- Click Create
- Select Custom: Destination port "TCP"
- Type "8123" in port
- Click on OK
- Click on OK again
Copy your configuration.yaml file into the config folder
That's it... you're all set to go

View file

@ -9,7 +9,7 @@ sharing: true
footer: true
---
There are several reasons why it makes sense to run Home Assistant in a virtual environment. A [virtualenv](https://virtualenv.pypa.io/en/latest/) encapsulates all aspect of a Python environment within a single directory tree. That means the Python packages you install for Home Assistant won't interact with the rest of your system and vice-versa. It means a random upgrade for some other program on your computer won't break Home Assitant, and it means you don't need to install Python packages as root.
There are several reasons why it makes sense to run Home Assistant in a virtual environment. A [virtualenv](https://virtualenv.pypa.io/en/latest/) encapsulates all aspect of a Python environment within a single directory tree. That means the Python packages you install for Home Assistant won't interact with the rest of your system and vice-versa. It means a random upgrade for some other program on your computer won't break Home Assistant, and it means you don't need to install Python packages as root.
Virtualenvs are pretty easy to setup. This example will walk through one method of setting one up (there are certainly others). We'll be using Debian in this example (as many Home Assistant users are running Raspbian on a Raspberry Pi), but all of the Python related steps should be the same on just about any platform.
@ -105,7 +105,7 @@ The [autostart instructions](/getting-started/autostart/) will work just fine, j
### {% linkable_title Installing python-openzwave %}
If you want to use Z-Wave devices, you will need to install `python-openzwave` in your virtualenv. This requires a small tweak to the instructions on home-assistant.io
If you want to use Z-Wave devices, you will need to install `python-openzwave` in your virtualenv. This requires a small tweak to the instructions in [the Z-Wave Getting Started documentation](/getting-started/z-wave/)
Install the dependencies as normal (Note: you will need to do this as your normal user, since `hass` isn't a sudoer).

View file

@ -16,14 +16,15 @@ Conditions can be used within a script or automation to prevent further executio
Test multiple conditions in 1 condition statement. Passes if all embedded conditions are valid.
```yaml
condition: and
conditions:
- condition: state
entity_id: 'device_tracker.paulus'
state: 'home'
- condition: numeric_state
entity_id: 'sensor.temperature'
below: '20'
condition:
condition: and
conditions:
- condition: state
entity_id: 'device_tracker.paulus'
state: 'home'
- condition: numeric_state
entity_id: 'sensor.temperature'
below: '20'
```
### {% linkable_title OR condition %}
@ -31,14 +32,15 @@ conditions:
Test multiple conditions in 1 condition statement. Passes if any embedded conditions is valid.
```yaml
condition: or
conditions:
- condition: state
entity_id: 'device_tracker.paulus'
state: 'home'
- condition: numeric_state
entity_id: 'sensor.temperature'
below: '20'
condition:
condition: or
conditions:
- condition: state
entity_id: 'device_tracker.paulus'
state: 'home'
- condition: numeric_state
entity_id: 'sensor.temperature'
below: '20'
```
### {% linkable_title MIXED AND and OR conditions %}
@ -47,19 +49,20 @@ Test multiple AND and OR conditions in 1 condition statement. Passes if any embe
This allows you to mix several AND and OR conditions together.
```yaml
condition: and
conditions:
- condition: state
entity_id: 'device_tracker.paulus'
state: 'home'
- condition: or
conditions:
condition:
condition: and
conditions:
- condition: state
entity_id: sensor.weather_precip
state: 'rain'
- condition: numeric_state
entity_id: 'sensor.temperature'
below: '20'
entity_id: 'device_tracker.paulus'
state: 'home'
- condition: or
conditions:
- condition: state
entity_id: sensor.weather_precip
state: 'rain'
- condition: numeric_state
entity_id: 'sensor.temperature'
below: '20'
```
### {% linkable_title Numeric state condition %}

View file

@ -50,7 +50,7 @@ state: 'home'
### {% linkable_title Delay %}
Delays are useful for temporarily suspending your script and start it at a later moment. We support different syntaxes for a delay as shown below.
Delays are useful for temporarily suspending your script and start it at a later moment. We support different syntaxes for a delay as shown below.
```yaml
# Waits 1 hour
@ -72,7 +72,7 @@ delay:
```yaml
# Waits however many minutes input_slider.minute_delay is set to
# Valid formats include HH:MM and HH:MM:SS
delay: {% raw %}'00:{{ input_slider.minute_delay | int }}:00'{% endraw %}
delay: {% raw %}'00:{{ states.input_slider.minute_delay.state | int }}:00'{% endraw %}
```
### {% linkable_title Fire an Event %}

View file

@ -41,6 +41,8 @@ sensor:
Another common problem is that a required configuration setting is missing. If this is the case, the component will report this to `home-assistant.log`. You can have a look at [the various component pages](/components/) for instructions on how to setup the components.
See the [logger](/components/logger/) component for instructions on how to define the level of logging you require for specific modules.
If you find any errors or want to expand the documentation, please [let us know](https://github.com/home-assistant/home-assistant.io/issues).
#### {% linkable_title Problems with dependencies %}