mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 13:26:54 +00:00
Big push for automation docs
This commit is contained in:
parent
ecf9f0d4a2
commit
278dd1a61f
@ -9,143 +9,232 @@ sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
This page will talk about automating Home Assistant using the `automation` component. For more advanced ways of automation, see the [create a component]({{site_root}}/developers/creating_components.html) page.
|
||||
This page will go into more detail about the various options the `automation` component offers. If
|
||||
you haven't yet, read the [getting started page on automation](/getting-started/automation.html).
|
||||
|
||||
Each part of automation consists of two parts: the trigger part and the action part. The final result will look something like this:
|
||||
A configuration section of an automation requires a `trigger` and an `action` section. `condition` and
|
||||
`condition_type` are optional. To keep this page compact, all following sections will not show the
|
||||
full configuration but only the relevant part.
|
||||
|
||||
```
|
||||
```yaml
|
||||
# Example of a full entry in configuration.yaml
|
||||
automation:
|
||||
# Optional alias that the logs will use to refer to the entry
|
||||
alias: Sunset notification
|
||||
|
||||
# Type of trigger and information for the trigger
|
||||
platform: state
|
||||
state_entity_id: sun.sun
|
||||
state_from: 'above_horizon'
|
||||
state_to: 'below_horizon'
|
||||
|
||||
# Action to be done when trigger activated
|
||||
execute_service: notify.NOTIFIER_NAME
|
||||
service_data: {"message":"The sun has set"}
|
||||
alias: Light on in the evening
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunset
|
||||
offset: "-01:00:00"
|
||||
- platform: state
|
||||
entity_id: group.all_devices
|
||||
state: home
|
||||
condition:
|
||||
- platform: state
|
||||
entity_id: group.all_devices
|
||||
state: home
|
||||
- platform: time
|
||||
after: 16:00:00
|
||||
before: 23:00:00
|
||||
action:
|
||||
service: homeassistant.turn_on
|
||||
entity_id: group.living_room
|
||||
```
|
||||
|
||||
## {% linkable_title Setting up triggers %}
|
||||
<p class='note'>
|
||||
All configuration entries have to be sequential. If you have <code>automation:</code>, <code>automation 2:</code> and <code>automation 4:</code> then the last one will not be processed.
|
||||
</p>
|
||||
|
||||
#### {% linkable_title Time-based automation %}
|
||||
This allows you to trigger actions whenever the time matches your filter. You can setup filters to match on hours, minutes and seconds. Any filter that you omit will match all values.
|
||||
- [Jump to conditions](#conditions)
|
||||
- [Jump to actions](#actions)
|
||||
|
||||
Here are some example values:
|
||||
### {% linkable_title Triggers %}
|
||||
|
||||
```
|
||||
# Match at the start of every hour
|
||||
platform: time
|
||||
time_minutes: 0
|
||||
time_seconds: 0
|
||||
Triggers are what starts the processing of an automation rule. It is possible to specify multiple
|
||||
triggers for the same rule. Once a trigger starts, Home Assistant will validate the conditions, if any,
|
||||
and call the action.
|
||||
|
||||
# Match at 4pm
|
||||
platform: time
|
||||
time_hours: 16
|
||||
time_minutes: 0
|
||||
time_seconds: 0
|
||||
#### {% linkable_title Event trigger %}
|
||||
Triggers when an event is being processed. Events are the raw building blocks of Home Assistant.
|
||||
You can match events on just the event name or also require specific event data to be present.
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: MY_CUSTOM_EVENT
|
||||
# optional
|
||||
event_data:
|
||||
mood: happy
|
||||
```
|
||||
|
||||
#### {% linkable_title State-based automation %}
|
||||
This allows you to trigger actions based on state changes of any entity within Home Assistant. You can omit the `state_from` and `state_to` to match all.
|
||||
#### {% 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.
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: living_room/switch/ac
|
||||
# Optional
|
||||
payload: 'on'
|
||||
```
|
||||
# Match when the sun sets
|
||||
platform: state
|
||||
state_entity_id: sun.sun
|
||||
state_from: 'above_horizon'
|
||||
state_to: 'below_horizon'
|
||||
|
||||
# Match when a person comes home
|
||||
platform: state
|
||||
state_entity_id: device_tracker.Paulus_OnePlus_One
|
||||
state_from: 'not_home'
|
||||
state_to: 'home'
|
||||
#### {% linkable_title Numeric state trigger %}
|
||||
On state change of a specified entity, attempts to parse the state as a number and triggers if value is above and/or below a threshold.
|
||||
|
||||
# Match when a light turns on
|
||||
platform: state
|
||||
state_entity_id: light.Ceiling
|
||||
state_from: 'off'
|
||||
state_to: 'on'
|
||||
```yaml
|
||||
automation:
|
||||
trigger:
|
||||
platform: numeric_state
|
||||
entity_id: sensor.temperature
|
||||
# At least one of the following required
|
||||
above: 17
|
||||
below: 25
|
||||
```
|
||||
|
||||
#### {% linkable_title State trigger %}
|
||||
Triggers when the state of an entity changes. If only entity_id given will match all state changes.
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: device_tracker.paulus
|
||||
# Optional
|
||||
from: not_home
|
||||
to: home
|
||||
```
|
||||
|
||||
<p class='note'>
|
||||
Use quotes around your values for <code>state_from</code> and <code>state_to</code> to avoid the YAML parser interpreting some values as booleans.
|
||||
</p>
|
||||
|
||||
#### {% linkable_title MQTT-based automation %}
|
||||
This allows you to trigger actions based on messages on an MQTT topic. You can specify an optional payload to match as well.
|
||||
#### {% linkable_title Sun trigger %}
|
||||
Triggers based on sunrise and sunset, both with an optional offset.
|
||||
|
||||
```
|
||||
# Match any changes to bathroom light
|
||||
platform: mqtt
|
||||
mqtt_topic: home/bathroom/light
|
||||
|
||||
# Match only if bathroom light is turned on
|
||||
platform: mqtt
|
||||
mqtt_topic: home/bathroom/light
|
||||
mqtt_payload: 'on'
|
||||
```yaml
|
||||
automation:
|
||||
trigger:
|
||||
platform: sun
|
||||
# Possible values: sunset, sunrise
|
||||
event: sunset
|
||||
# Optional time offset
|
||||
offset: -00:45:00
|
||||
```
|
||||
|
||||
## {% linkable_title Setting up the action %}
|
||||
#### {% linkable_title Time trigger %}
|
||||
Time can be triggered in many ways. The most common is to specify `after` and trigger at a specific
|
||||
point in time each day. Alternatively, you can also match if the hour, minute or second of the current
|
||||
time has a specifc value. For example, by only setting minutes in the config to 5 it will trigger every
|
||||
hour when it is 5 minutes past whole.
|
||||
|
||||
Currently the only supported action is calling a service. Services are what devices expose to be controlled, so this will allow us to control anything that Home Assistant can control.
|
||||
|
||||
```
|
||||
# Turn the lights Ceiling and Wall on.
|
||||
execute_service: light.turn_on
|
||||
service_entity_id: light.Ceiling,light.Wall
|
||||
|
||||
# Turn the lights Ceiling and Wall on and turn them red.
|
||||
execute_service: light.turn_on
|
||||
service_entity_id: light.Ceiling,light.Wall
|
||||
service_data: {"rgb_color": [255, 0, 0]}
|
||||
|
||||
# Notify the user
|
||||
execute_service: notify.NOTIFIER_NAME
|
||||
service_data: {"message":"YAY"}
|
||||
```yaml
|
||||
automation:
|
||||
trigger:
|
||||
platform: time
|
||||
# All following are optional.
|
||||
# When 'after' is used, you cannot also match on hour, minute, seconds.
|
||||
# Military time format.
|
||||
after: 15:32:00
|
||||
hours: 10
|
||||
minutes: 5
|
||||
seconds: 0
|
||||
```
|
||||
|
||||
## {% linkable_title Putting it all together %}
|
||||
For every combination of a trigger and an action we will have to combine the configuration lines and add it to an `automation` component entry in `configuration.yaml`. You can add an optional `alias` key to the configuration to make the logs more understandable. To setup multiple entries, append 2, 3 etc to the section name. An example of a `configuration.yaml` file:
|
||||
### {% linkable_title Conditions %}
|
||||
|
||||
Conditions are an optional part of an automation rule and be used to prevent an action from happening
|
||||
when triggered. Conditions look very familiar to triggers but are very different. A trigger will look
|
||||
at events happening at the system while a condition only looks at how the system looks right now.
|
||||
A trigger can observe that a switch is being turned on. A condition can only see if a switch is on
|
||||
or off.
|
||||
|
||||
An automation rule can have mulitiple triggers. By default the action will only fire if all conditions
|
||||
pass. An optional key `condition_type: 'or'` can be set on the automation rule to fire action if any
|
||||
condition matches.
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
condition_type: or
|
||||
```
|
||||
|
||||
If your triggers and conditions are exactly the same, you can use a shortcut to specify conditions.
|
||||
In this case, triggers that are not valid conditions will be ignored.
|
||||
```yaml
|
||||
automation:
|
||||
condition: use_trigger_values
|
||||
```
|
||||
|
||||
#### {% linkable_title Numeric state condition %}
|
||||
Attempts to parse the state of specified entity as a number and triggers if value is above and/or
|
||||
below a threshold.
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
condition:
|
||||
platform: numeric_state
|
||||
entity_id: sensor.temperature
|
||||
# At least one of the following required
|
||||
above: 17
|
||||
below: 25
|
||||
```
|
||||
|
||||
#### {% linkable_title State condition %}
|
||||
Tests if an entity is a specified state.
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
condition:
|
||||
platform: state
|
||||
entity_id: device_tracker.paulus
|
||||
state: not_home
|
||||
```
|
||||
|
||||
#### {% linkable_title Time condition %}
|
||||
The time condition can test if it is after a specified time, before a specified time or if it is a
|
||||
certain day of the week.
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
condition:
|
||||
platform: time
|
||||
# At least one of the following is required.
|
||||
after: 15:00:00
|
||||
before: 23:00:00
|
||||
weekday:
|
||||
- mon
|
||||
- wed
|
||||
- fri
|
||||
```
|
||||
|
||||
|
||||
### {% linkable_title Actions %}
|
||||
|
||||
When an automation rule fires, it calls a service. For this service you can specify an entity id it
|
||||
should apply to and optional service parameters (to specify for example the brightness).
|
||||
|
||||
```
|
||||
automation:
|
||||
alias: Sunset notification
|
||||
|
||||
platform: state
|
||||
state_entity_id: sun.sun
|
||||
state_from: 'above_horizon'
|
||||
state_to: 'below_horizon'
|
||||
|
||||
execute_service: notify.NOTIFIER_NAME
|
||||
service_data: {"message":"The sun has set"}
|
||||
|
||||
automation 2:
|
||||
alias: Turn lights off at 8am in the morning
|
||||
|
||||
platform: time
|
||||
time_hours: 8
|
||||
time_minutes: 0
|
||||
time_seconds: 0
|
||||
|
||||
execute_service: light.turn_off
|
||||
|
||||
automation 3:
|
||||
alias: Turn lights in study room on when Paulus comes home
|
||||
|
||||
platform: state
|
||||
state_entity_id: device_tracker.Paulus_OnePlus
|
||||
state_from: 'not_home'
|
||||
state_to: 'home'
|
||||
|
||||
execute_service: homeassistant.turn_on
|
||||
service_entity_id: group.Study_Room
|
||||
# Change the light in the kitchen and living room to 150 brightness and color red.
|
||||
action:
|
||||
service: homeassistant.turn_on
|
||||
entity_id:
|
||||
- light.kitchen
|
||||
- light.living_room
|
||||
data:
|
||||
brightness: 150
|
||||
rgb_color: [255, 0, 0]
|
||||
```
|
||||
|
||||
<p class='note'>
|
||||
All configuration entries have to be sequential. If you have <code>automation:</code>, <code>automation 2:</code> and <code>automation 4:</code> then the last one will not be processed.
|
||||
</p>
|
||||
```
|
||||
automation:
|
||||
# Notify me on my mobile phone of an event
|
||||
action:
|
||||
service: notify.notify
|
||||
data:
|
||||
message: Something just happened, better take a look!
|
||||
```
|
||||
|
||||
If you want to specify multiple services to be called or include a delay, have a look at the
|
||||
[script component](/components/script.html). If you want to describe how certain entities should look,
|
||||
check out the [scene component](/components/scene.html).
|
||||
|
@ -21,7 +21,10 @@ Home Assistant can get information from your wireless router to track which devi
|
||||
- [TP-Link](/components/device_tracker.tplink.html)
|
||||
- [Thomsom](/components/device_tracker.thomson.html)
|
||||
|
||||
You can also decide to directly scan the network for devices by using the [nmap scanner](/components/device_tracker.nmap_scanner.html).
|
||||
Alternative trackers:
|
||||
|
||||
- [MQTT](/components/device_tracker.mqtt.html)
|
||||
- [nmap scanner](/components/device_tracker.nmap_scanner.html) to scan the network for devices
|
||||
|
||||
To get started add the following lines to your `configuration.yaml` (example for Netgear):
|
||||
|
||||
@ -32,10 +35,15 @@ device_tracker:
|
||||
host: 192.168.1.1
|
||||
username: admin
|
||||
password: YOUR_PASSWORD
|
||||
|
||||
# Optional configuration
|
||||
|
||||
# If new devices have to be added to the UI and tracked by default (default: yes)
|
||||
track_new_devices: yes
|
||||
# How often to scan for new devices (default: 12)
|
||||
interval_seconds: 12
|
||||
# Seconds to wait till marking someone as not home after not being seen (default: 180)
|
||||
consider_home: 180
|
||||
```
|
||||
|
||||
By default, the device tracker will add all found devices into the `known_devices.yaml`. It will default to displaying them in the UI as well. To disable displaying new devices in the UI, change the value of `track_new_devices:` to `no`.
|
||||
|
||||
|
||||
Once tracking, the `device_tracker` component will maintain a file in your config dir called `known_devices.yaml`. Edit this file to adjust which devices have to be tracked. Here you can also setup a url for each device to be used as the entity picture and set whether the device will be show in the UI when in away state..
|
||||
Once tracking, a file will be created in your config dir called `known_devices.yaml`. Edit this file to adjust which devices have to be tracked. Here you can also setup a url for each device to be used as the entity picture and set whether the device will be show in the UI when in away state.
|
||||
|
@ -1,8 +1,8 @@
|
||||
---
|
||||
layout: page
|
||||
title: "MQTT device tracker support"
|
||||
description: "Instructions how to integrate MQTT based trackers into Home Assistant."
|
||||
date: 2015-09-17 09:00
|
||||
title: "MQTT device tracker"
|
||||
description: "Instructions how to use MQTT to track devices in Home Assistant."
|
||||
date: 2015-09-19 20:41
|
||||
sidebar: false
|
||||
comments: false
|
||||
sharing: true
|
||||
@ -10,7 +10,8 @@ footer: true
|
||||
---
|
||||
|
||||
<img src='/images/supported_brands/mqtt.png' class='brand pull-right' />
|
||||
Before this tracker allows the detection of devices which are able to send MQTT messages.
|
||||
This platform allows you to detect presence by monitoring a MQTT topic for new locations. To use this
|
||||
platform, you specify a unique topic for each device.
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
@ -21,11 +22,3 @@ device_tracker:
|
||||
paulus_oneplus: /location/paulus
|
||||
annetherese_n4: /location/annetherese
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **qos** (*Required*): Quality of service, default to 0.
|
||||
- **devices** (*Required*): Array of devices to track.
|
||||
- **'device_name'** (*Required*): Name to use followed by the topic.
|
||||
|
||||
See the [device tracker component page](/components/device_tracker.html) for instructions how to configure the people to be tracked.
|
||||
|
@ -24,7 +24,7 @@ Entities are things that you want to observe within Home Assistant. Support for
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item one-whole lap-two-half">
|
||||
<h2 class="title">Light and environment</h2>
|
||||
<h2 class="title" id='light'>Light and environment</h2>
|
||||
<p></p>
|
||||
|
||||
<table>
|
||||
@ -83,7 +83,7 @@ Entities are things that you want to observe within Home Assistant. Support for
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item one-whole lap-two-hald">
|
||||
<h2 class="title">Devices and protocols</h2>
|
||||
<h2 class="title" id='devices'>Devices and protocols</h2>
|
||||
<p></p>
|
||||
<table>
|
||||
|
||||
@ -143,7 +143,7 @@ Entities are things that you want to observe within Home Assistant. Support for
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item one-whole lap-two-thirds">
|
||||
<h2 class="title">Presence detection</h2>
|
||||
<h2 class="title" id='presence'>Presence detection</h2>
|
||||
<p>Offers presence detection by looking at connected devices or by scanning the network.</p>
|
||||
<table>
|
||||
<tr>
|
||||
@ -211,7 +211,7 @@ Entities are things that you want to observe within Home Assistant. Support for
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item one-whole lap-two-thirds">
|
||||
<h2 class="title">Media player</h2>
|
||||
<h2 class="title" id='media-player'>Media player</h2>
|
||||
<p>Controls your media player (Playback and Volume) and get details about the played track.</p>
|
||||
|
||||
<table>
|
||||
@ -260,7 +260,7 @@ Entities are things that you want to observe within Home Assistant. Support for
|
||||
<div class="grid__item one-third lap-one-whole palm-one-whole usp">
|
||||
<div class="grid">
|
||||
<div class="grid__item one-whole lap-two-thirds">
|
||||
<h2 class="title">Cameras and various other entities</h2>
|
||||
<h2 class="title" id='camera'>Cameras and various other entities</h2>
|
||||
<p>Camera allows you to see what going in real-time. Other entities report the current state and/or let you control it.</p>
|
||||
|
||||
<table>
|
||||
@ -350,7 +350,7 @@ the manufacturers of these devices.
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item one-whole lap-two-thirds">
|
||||
<h2 class="title">Internals</h2>
|
||||
<h2 class="title" id='internal'>Internals</h2>
|
||||
<p>Those services offers you a wide range of possibilities out-of-box.</p>
|
||||
<table>
|
||||
|
||||
@ -404,7 +404,7 @@ the manufacturers of these devices.
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item one-whole lap-two-thirds">
|
||||
<h2 class="title">Notifications</h2>
|
||||
<h2 class="title" id='notify-service'>Notifications</h2>
|
||||
<p>Allows you to send customized messages to the given service.</p>
|
||||
|
||||
<table>
|
||||
@ -463,7 +463,7 @@ the manufacturers of these devices.
|
||||
<div class="grid__item one-third lap-one-whole palm-one-whole usp">
|
||||
<div class="grid">
|
||||
<div class="grid__item one-whole lap-two-thirds">
|
||||
<h2 class="title">Web services</h2>
|
||||
<h2 class="title" id='web-service'>Web services</h2>
|
||||
<p>The web services displays data grabbed from an external source or interact with them.</p>
|
||||
|
||||
<table>
|
||||
@ -512,7 +512,6 @@ the service providers.
|
||||
| Type | Description
|
||||
| ---- | -----------
|
||||
| [Automation](/components/automation.html) | Allow for automating service calls when a specific state is met
|
||||
| [Scheduler](/components/scheduler.html) | Allows for scheduling service calls when sun sets or it is specific time
|
||||
| [Script](/components/script.html) | Allow user to define scripts to run from within Home Assistant
|
||||
| [Device sun light trigger](/components/device_sun_light_trigger.html) | Slowly fade in the lights to compensate the setting sun. Also turns on lights when you get home after dark.
|
||||
| [Simple alarm](/components/simple_alarm.html) | Let the lights blink red when the lights turn on while no one is home.
|
||||
@ -522,10 +521,3 @@ the service providers.
|
||||
| Type | Description
|
||||
| ---- | -----------
|
||||
| [Configurator](/components/configurator.html) | Component used by other components to get configuration from the user.
|
||||
|
||||
|
||||
{% comment %}
|
||||
{% directory path:components exclude:index %}
|
||||
* [{{ file.slug | replace: '_',' ' | capitalize }}]({{ file.slug | prepend: '/components/' | append: '.html' }})
|
||||
{% enddirectory %}
|
||||
{% endcomment %}
|
||||
|
@ -9,8 +9,10 @@ sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
<img src='/images/supported_brands/accessories-text-editor.png' class='brand pull-right' />
|
||||
The logbook component provides a different perspective on the history of your house by showing all the changes that happened to your house in chronological order. [See the demo for a live example](/demo/).
|
||||
<img src='/images/screenshots/logbook.png' style='margin-left:10px; float: right;' height="100" />
|
||||
The logbook component provides a different perspective on the history of your house by showing all
|
||||
the changes that happened to your house in reverse chronological order.
|
||||
[See the demo for a live example](/demo/).
|
||||
|
||||
To enable the logbook in your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
@ -19,4 +21,19 @@ To enable the logbook in your installation, add the following to your `configura
|
||||
logbook:
|
||||
```
|
||||
|
||||
<img src='/images/screenshots/logbook.png' style='margin-left:10px; float: right;' height="100" />
|
||||
It is possible to add custom entries to the logbook by using the script component to fire an event.
|
||||
|
||||
```
|
||||
# Example configuration.yaml entry
|
||||
script:
|
||||
add_logbook_entry:
|
||||
alias: Add Logbook
|
||||
sequence:
|
||||
- event: LOGBOOK_ENTRY
|
||||
event_data:
|
||||
name: Kitchen
|
||||
message: is being used
|
||||
# Optional
|
||||
entity_id: light.kitchen
|
||||
domain: light
|
||||
```
|
||||
|
@ -43,6 +43,7 @@ The MQTT component has no TLS support at the moment. This means that only plain-
|
||||
|
||||
- [MQTT Sensor](/components/sensor.mqtt.html)
|
||||
- [MQTT Switch](/components/switch.mqtt.html)
|
||||
- [MQTT Device Tracker](/components.device_tracker.mqtt.html)
|
||||
- [MQTT-automation rule](/components/automation.html#mqtt-based-automation)
|
||||
- Integrating it into a component. See the [MQTT example component](https://github.com/balloob/home-assistant/blob/dev/config/custom_components/mqtt_example.py) how to do this.
|
||||
|
||||
|
@ -9,7 +9,8 @@ sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
Andythigpen has contributed a script component. This allows users to create a sequence of service calls and delays. Scripts can be started using the service `script/turn_on` and interrupted using the service `script/turn_off`. A separate page has been added to the frontend to see the status of your scripts.
|
||||
The script component allows users to create a sequence of service calls and delays. Scripts can be
|
||||
started using the service `script/turn_on` and interrupted using the service `script/turn_off`.
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
@ -18,6 +19,13 @@ script:
|
||||
wakeup:
|
||||
alias: Wake Up
|
||||
sequence:
|
||||
- event: logbook_entry
|
||||
event_data:
|
||||
name: Paulus
|
||||
message: is waking up
|
||||
# Optional
|
||||
entity_id: device_tracker.paulus
|
||||
domain: light
|
||||
- alias: Bedroom lights on
|
||||
execute_service: light.turn_on
|
||||
service_data:
|
||||
|
@ -20,5 +20,3 @@ Home Assistant is not available on the Play Store. Instead, Home Assistant lever
|
||||
<p class='img' style='width:500px; margin-left: auto; margin-right: auto;'>
|
||||
<img src='/images/screenshots/android-homescreen-guide.gif' />
|
||||
</p>
|
||||
|
||||
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/).
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Advanced Installation"
|
||||
description: "Brief advanced installation tutorials."
|
||||
title: "Launch Home Assistant on boot"
|
||||
description: "Instructions how to setup Home Assistant to launch on boot on various platforms.."
|
||||
date: 2015-9-1 22:57
|
||||
sidebar: false
|
||||
comments: false
|
||||
@ -9,8 +9,6 @@ sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
Here are some general tutorials on how to setup some of the more advanced deployments that are frequently requested.
|
||||
|
||||
<div class='advanced-installs-container'>
|
||||
<input name='advanced-installs' type='radio' id='upstart-install' checked>
|
||||
<input name='advanced-installs' type='radio' id='systemd-install'>
|
||||
@ -29,7 +27,7 @@ ps -p 1 -o comm=
|
||||
|
||||
If the preceding command returns the string `init`, you are likely using Upstart.
|
||||
|
||||
Upstart will launch init scripts that are located in the directory <code>/etc/init.d/</code>. A sample init script for systems using Upstart is <a href="https://raw.githubusercontent.com/balloob/home-assistant/dev/scripts/hass-daemon">maintained by this project</a>.
|
||||
Upstart will launch init scripts that are located in the directory <code>/etc/init.d/</code>. A sample init script for systems using Upstart is <a href="https://raw.githubusercontent.com/balloob/home-assistant/dev/script/hass-daemon">maintained by this project</a>.
|
||||
|
||||
To install this script, download it, tweak it to you liking, and install it by following the directions in the header. This script will setup Home Assistant to run when the system boots. To start/stop Home Assistant manually, issue the following commands:
|
||||
```bash
|
||||
|
@ -9,13 +9,20 @@ sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
Home Assistant will create a configuration folder when it is run for the first time. Depending on your operating system this is `~/.homeassistant` (OS X/Linux) or `%APPDATA%/.homeassistant` (Windows). If you want to use a different folder for configuration, run `hass --config path/to/config`.</p>
|
||||
Home Assistant will create a configuration folder when it is run for the first time. Location depends
|
||||
on operating system: on OS X/Linux it is `~/.homeassistant` and on Windows it is `%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 at [`here`](https://github.com/balloob/home-assistant/blob/master/config/configuration.yaml.example).
|
||||
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).
|
||||
|
||||
When launched for the first time, Home Assistant will write a default configuration enabling the web interface and device discovery. It can take up to a minute for your devices to be discovered and show up in the interface.
|
||||
When launched for the first time, Home Assistant will write a default configuration enabling the web
|
||||
interface and device discovery. It can take up to a minute for your devices to be discovered and
|
||||
show up in the interface.
|
||||
|
||||
If you are running into troubles while configuring Home Assistant, have a look at [the configuration troubleshoot page](/getting-started/troubleshooting-configuration.html).
|
||||
If you are running into troubles while configuring Home Assistant, have a look at
|
||||
[the configuration troubleshoot page](/getting-started/troubleshooting-configuration.html).
|
||||
|
||||
<p class='note'>
|
||||
You will have to restart Home Assistant for changes in <code>configuration.yaml</code> to take effect.
|
||||
@ -23,7 +30,9 @@ If you are running into troubles while configuring Home Assistant, have a look a
|
||||
|
||||
### {% linkable_title Setting up the basic info %}
|
||||
|
||||
By default Home Assistant will try to detect your location and will automatically select a temperature unit and time zone based on your location. You can overwrite this by adding the following information to your `configuration.yaml`:
|
||||
By default Home Assistant will try to detect your location and will automatically select a
|
||||
temperature unit and time zone based on your location. You can overwrite this by adding the
|
||||
following information to your `configuration.yaml`:
|
||||
|
||||
```yaml
|
||||
homeassistant:
|
||||
@ -53,74 +62,18 @@ http:
|
||||
api_password: YOUR_PASSWORD
|
||||
```
|
||||
|
||||
### {% linkable_title Adding devices and services %}
|
||||
|
||||
Home Assistant will be able to automatically discover and configure any Google Chromecasts, Netgear routers,
|
||||
Belkin WeMo switches and Philips Hue bridges in your network if you have
|
||||
[the discovery component]({{site_root}}/components/discovery.html) enabled (which is by default).
|
||||
|
||||
Not all devices can be discovered, so if you have any of the following devices or services, please see their respective pages for installation instructions:
|
||||
|
||||
* [Device tracking]({{site_root}}/components/device_tracker.html)
|
||||
* [ISY994 controller]({{site_root}}/components/isy994.html)
|
||||
* [Nest thermostat]({{site_root}}/components/thermostat.html)
|
||||
* [Notifications]({{site_root}}/components/notify.html)
|
||||
* [SABnzbd](/blog/2015/03/22/release-notes/#sabnzbd)
|
||||
* [TellStick](/components/tellstick.html)
|
||||
* [Wink hub]({{site_root}}/components/wink.html)
|
||||
* [Add support for your own device or service]({{site_root}}/developers/add_new_platform.html)
|
||||
|
||||
See the [components overview page](/components/) for a complete list of supported devices.
|
||||
|
||||
### {% 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 (one in the middle).
|
||||
|
||||
|
||||
```yaml
|
||||
group:
|
||||
living_room: light.table_lamp, switch.ac
|
||||
bedroom:
|
||||
- light.bedroom
|
||||
- media_player.nexus_player
|
||||
```
|
||||
|
||||
### {% linkable_title Customizing devices and services %}
|
||||
|
||||
By default, most of your devices will be visible on the Home Assistant States
|
||||
page 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.
|
||||
|
||||
By adding the following parameters to the `homeassistant:` section of your
|
||||
`configuration.yaml`, you can customize the attributes of any state on
|
||||
your front page.
|
||||
|
||||
```yaml
|
||||
homeassistant:
|
||||
|
||||
# Add this to your existing configuration
|
||||
|
||||
customize:
|
||||
some.entity_id:
|
||||
hidden: true
|
||||
entity_picture: http://URL.TO/PICTURE
|
||||
friendly_name: SOME CUSTOM NAME
|
||||
```
|
||||
|
||||
<p class='note'>Customizations are currently unavailable for device tracker entities.</p>
|
||||
|
||||
### {% linkable_title Setting up Home Automation %}
|
||||
|
||||
When all your devices are set up it's time to put the cherry on the pie: automation. There are many ways to automate your home with Home Assistant so we have divided it into a couple of topics:
|
||||
|
||||
* [Automatic light control based on the sun and if people are home]({{site_root}}/components/device_sun_light_trigger.html) (built-in component)
|
||||
* [Intruder alerts]({{site_root}}/components/simple_alarm.html) (built-in component)
|
||||
* [Setup your own automation rules]({{site_root}}/components/automation.html) (using configuration file)
|
||||
* [Create your own automation component]({{site_root}}/developers/creating_components.html) (writing Python code)
|
||||
|
||||
### {% linkable_title Setting up your phone or tablet %}
|
||||
|
||||
Home Assistant runs as a self hosted web application. Home Assistant contains support to be added to your homescreen. If you're on Android you can follow [the visual guide]({{site_root}}/getting-started/android.html). For other devices, open Home Assistant on your mobile browser and click on the add to homescreen option.
|
||||
|
||||
### {% linkable_title Remote access %}
|
||||
|
||||
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 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/).
|
||||
|
||||
###[Next step: Setting up devices »](/getting-started/devices.html)
|
@ -54,7 +54,7 @@ When using boot2docker on OS X you are unable to map the local time to your Dock
|
||||
|
||||
|
||||
<div class='install-instructions raspberry'>
|
||||
<p>Home Assistant uses Python 3.4 which is not shipped with the current Raspbian distibution for the Raspberry Pi. Before installing Home Assistant, you will have to <a href="http://depado.markdownblog.com/2015-03-12-short-tutorial-raspbian-python3-4-rpi-gpio" target="_blank">install Python 3.4</a>.
|
||||
<p>Home Assistant uses Python 3.4 which is not shipped with the current Raspbian distibution for the Raspberry Pi. Before installing Home Assistant, you will have to <a href="https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=113961#p779265" target="_blank">install Python 3.4</a>.
|
||||
|
||||
Once that is complete, installing and running Home Assistant on your local machine is easy. Make sure you have <a href='https://www.python.org/downloads/' target="_blank">Python 3.4</a> installed and execute the following code in a console:
|
||||
|
||||
@ -72,31 +72,27 @@ hass \-\-open-ui
|
||||
</div> <!-- INSTALL-INSTRUCTIONS RASPBERRY -->
|
||||
|
||||
|
||||
<h3>Troubleshooting</h3>
|
||||
### {% linkable_title Troubleshooting %}
|
||||
|
||||
<p>If you run into any issues, please see the <a href='{{site_root}}/getting-started/troubleshooting.html'>troubleshooting page</a>. It contains solutions to many of the more commonly encountered issues.</p>
|
||||
If you run into any issues, please see [the troubleshooting page](/getting-started/troubleshooting.html). It contains solutions to many of the more commonly encountered issues.
|
||||
|
||||
<p>For additional help, in addition to this site, there are three sources:
|
||||
<ul>
|
||||
<li><a href="https://gitter.im/balloob/home-assistant" target="_blank">Gitter Chatroom</a> for general Home Assistant discussions and questions.</li>
|
||||
<li><a href="https://groups.google.com/forum/#!forum/home-assistant-dev" target="_blank">Development Mailing List</a> for development related questions and discussing new features.</li>
|
||||
<li><a href="https://github.com/balloob/home-assistant" target="_blank">GitHub Page</a> for issue reporting.</li>
|
||||
</ul>
|
||||
</p>
|
||||
For additional help, in addition to this site, there are three sources:
|
||||
|
||||
<h3>Staying Up to Date</h3>
|
||||
<p>In order to update Home Assistant to the latest stable release, simply type the following into a console:</p>
|
||||
- [Gitter Chatroom](https://gitter.im/balloob/home-assistant) for general Home Assistant discussions and questions.
|
||||
- [Development Mailing List](https://groups.google.com/forum/#!forum/home-assistant-dev) for development related questions and discussing new features.
|
||||
- [GitHub Page](https://github.com/balloob/home-assistant) for issue reporting.
|
||||
|
||||
### {% linkable_title What's next %}
|
||||
If you want to have Home Assistant start on boot, [autostart instructions](/getting-started/autostart.html) can be found here.
|
||||
|
||||
To see what Home Assistant can do, launch demo mode:
|
||||
```bash
|
||||
hass \-\-demo-mode
|
||||
```
|
||||
|
||||
To update Home Assistant to the latest release:
|
||||
```bash
|
||||
pip3 install \-\-upgrade homeassistant
|
||||
```
|
||||
<p>If you would like to stay up to date with the newest unstable builds (alphas, betas, and release candidates), use this command:</p>
|
||||
```bash
|
||||
pip3 install \-\-upgrade \-\-pre homeassistant
|
||||
```
|
||||
|
||||
<h3>What's Next</h3>
|
||||
<p>If you want to see what Home Assistant can do, you can start the demo mode by running <code>hass \-\-demo-mode</code>. Home Assistant has a few other command line flags that can be displayed by running <code>hass \-\-help</code>.</p>
|
||||
<p>From here you may now start configuring Home Assistant to your liking. For more advanced users, the <a href='{{site_root}}/getting-started/advanced.html'>advanced configuration page</a> contains brief tutorials on creating more advanced installations.</p>
|
||||
|
||||
|
||||
###[Next step: Configuring Home Assistant »](/getting-started/configuration.html)
|
||||
|
Loading…
x
Reference in New Issue
Block a user