Merge remote-tracking branch 'balloob/master'

This commit is contained in:
Carlo Costanzo 2015-09-22 11:33:36 -04:00
commit 848ebeeca4
115 changed files with 2586 additions and 771 deletions

@ -1 +1 @@
Subproject commit 5a20d28e54328a61b0719eccbffe13cebf59752c
Subproject commit cb366470d97306fd188ce184cbb81e2ea2292fcf

View File

@ -34,8 +34,9 @@
border: none !important;
box-shadow: none !important;
max-height: 50px;
max-width: 200px;
max-width: 140px;
margin: 10px;
vertical-align: middle;
}
}
@ -102,7 +103,7 @@ h6:hover a.title-link {
article.post, article.page, article.listing {
img, table {
border-radius: 3px;
box-shadow: rgba(0,0,0,0.06) 0 0 10px;
box-shadow: rgba(0,0,0,0.06) 0 0 10px;
}
img.no-shadow {
@ -120,7 +121,7 @@ article.post, article.page, article.listing {
text-align: center;
padding-bottom: 3px;
font-size: .9rem;
box-shadow: rgba(0,0,0,0.06) 0 0 10px;
box-shadow: rgba(0,0,0,0.06) 0 0 10px;
img {
display: block;
@ -171,7 +172,7 @@ p.note {
&.warning {
background-color: #F7F9E1;
&::before {
background-color: rgb(187, 185, 13);;
content: "\f071" " Warning " attr(data-title);
@ -217,17 +218,18 @@ p.note {
}
}
.prep-instructions-container {
#generic-prep, #fedora-prep, #centos-prep, .prep-instructions {
.advanced-installs-container {
#upstart-install, #systemd-install, #osx-install, .advanced-installs {
display: none;
}
label.menu-selector {
display: inline-block;
text-align: center;
padding: 10px;
padding: 20px;
white-space: nowrap;
border-bottom: 2px solid $grayLight;
border-bottom: 5px solid $grayLight;
transition: border-bottom-color .5s;
}
@ -235,60 +237,21 @@ p.note {
margin-left: 10px;
}
#generic-prep:checked ~ .menu-selector.generic,
#fedora-prep:checked ~ .menu-selector.fedora,
#centos-prep:checked ~ .menu-selector.centos
#upstart-install:checked ~ .menu-selector.upstart,
#systemd-install:checked ~ .menu-selector.systemd,
#osx-install:checked ~ .menu-selector.osx
{
border-bottom-color: $blue;
}
#generic-prep:checked ~ .prep-instructions.generic,
#fedora-prep:checked ~ .prep-instructions.fedora,
#centos-prep:checked ~ .prep-instructions.centos
#upstart-install:checked ~ .advanced-installs.upstart,
#systemd-install:checked ~ .advanced-installs.systemd,
#osx-install:checked ~ .advanced-installs.osx
{
display: block;
}
.prep-instructions {
margin-top: 20px;
.advanced-installs {
margin-top: 30px;
}
}
.post-instructions-container {
#generic-post, #fedora-post, #debian-post, .post-instructions {
display: none;
}
label.menu-selector {
display: inline-block;
text-align: center;
padding: 10px;
white-space: nowrap;
border-bottom: 2px solid $grayLight;
transition: border-bottom-color .5s;
}
label.menu-selector + label.menu-selector {
margin-left: 10px;
}
#generic-post:checked ~ .menu-selector.generic-post,
#fedora-post:checked ~ .menu-selector.fedora-post,
#debian-post:checked ~ .menu-selector.debian-post
{
border-bottom-color: $blue;
}
#generic-post:checked ~ .post-instructions.generic-post,
#fedora-post:checked ~ .post-instructions.fedora-post,
#debian-post:checked ~ .post-instructions.debian-post
{
display: block;
}
.post-instructions {
margin-top: 20px;
}
}

View File

@ -2,19 +2,48 @@
<hr>
<p>Home Assistant will track the state of all the devices in your home, so you don't have to.</p>
<div class='supported-brands clearfix'>
<img src='/images/supported_brands/philips_hue.png' />
<img src='/images/supported_brands/vera.png' />
<img src='/images/supported_brands/mqtt.png' />
<img src='/images/supported_brands/belkin_wemo.png' />
<img src='/images/supported_brands/nest_thermostat.png' />
<img src='/images/supported_brands/pushbullet.png' />
<img src='/images/supported_brands/wink.png' />
<img src='/images/supported_brands/pushover.png' />
<img src='/images/supported_brands/google_cast.png' />
<img src='/images/supported_brands/telldus_tellstick.png' />
<img src='/images/supported_brands/netgear.png' />
<img src='/images/supported_brands/openwrt.png' />
<img src='/images/supported_brands/z-wave.png' />
<a href='/components/thermostat.nest.html'>
<img src='/images/supported_brands/nest_thermostat.png' />
</a>
<a href='/components/light.hue.html'>
<img src='/images/supported_brands/philips_hue.png' />
</a>
<a href='/components/mqtt.html'>
<img src='/images/supported_brands/mqtt.png' />
</a>
<a href='/components/media_player.cast.html'>
<img src='/images/supported_brands/google_cast.png' />
</a>
<a href='/components/switch.wemo.html'>
<img src='/images/supported_brands/belkin_wemo.png' />
</a>
<a href='/components/notify.pushbullet.html'>
<img src='/images/supported_brands/pushbullet.png' />
</a>
<a href='/components/ifttt.html'>
<img src='/images/supported_brands/ifttt.png' />
</a>
<a href='/components/wink.html'>
<img src='/images/supported_brands/wink.png' />
</a>
<a href='/components/arduino.html'>
<img src='/images/supported_brands/arduino.png' />
</a>
<a href='/components/media_player.kodi.html'>
<img src='/images/supported_brands/kodi.png' />
</a>
<a href='/components/device_tracker.netgear.html'>
<img src='/images/supported_brands/netgear.png' />
</a>
<a href='/components/zwave.html'>
<img src='/images/supported_brands/z-wave.png' />
</a>
<a href='/components/device_tracker.luci.html'>
<img src='/images/supported_brands/openwrt.png' />
</a>
<a href='/components/vera.html'>
<img src='/images/supported_brands/vera.png' />
</a>
</div>
<p class='pull-right'><a href='/components/'>Browse all &raquo;</a></p>

View File

@ -3,9 +3,10 @@
<a href="{{ root_url }}/getting-started/">Getting started</a>
<ul>
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
<li><a href='/getting-started/configuration.html'>Initial configuration</a></li>
<li><a href='/getting-started/configuration.html'>Configuration basics</a></li>
<li><a href='/getting-started/devices.html'>Adding devices</a></li>
<li><a href='/getting-started/automation.html'>Automation</a></li>
<li><a href='/components/'>Component overview</a></li>
<li><a href='/getting-started/android.html'>Setting up Android</a></li>
</ul>
</li>
<li>

View File

@ -15,7 +15,7 @@
<meta name="description" content="{{ description | strip_html | condense_spaces | truncate:150 }}">
{% if page.keywords %}<meta name="keywords" content="{{ page.keywords }}">{% endif %}
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io">
<link rel="canonical" href="{{ canonical }}">
{% if site.social.facebook.app_id %}
<meta property="fb:app_id" content="{{ site.social.facebook.app_id }}">
<meta property="og:title" content="{% if post.title %}{{ post.title }}{% elsif page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">

View File

@ -0,0 +1,201 @@
---
layout: post
title: "Using MQTT with Home Assistant"
description: "This post describes three different ways to use MQTT with Home Assistant."
date: 2015-09-11 11:19:38 +0200
date_formatted: "September 11, 2015"
author: Fabian Affolter
comments: true
categories: how-to
og_image: /images/blog/2015-09-mqtt/arduino.png
---
<img src='/images/supported_brands/mqtt.png' style='border:none; box-shadow: none; float: right;' height='80' />
The [MQTT](https://en.wikipedia.org/wiki/MQTT) support was added to Home Assistant recently. The [MQTT component](https://home-assistant.io/components/mqtt.html) will enable you to do all sort of things. Most likely you will use it to communicate with your devices. But Home Assistant doesn't care where the data is coming from or is limited to real hardware as long as there is MQTT support. This means that it doesn't matter if the data is coming from a human, a web service, or a device.
A great example is shown in a [Laundry Automation](https://home-assistant.io/blog/2015/08/26/laundry-automation-with-moteino-mqtt-and-home-assistant/) post in this blog.
This post will give you a small overview of some other possibilities on how to use MQTT with Home Assistant.
<!--more-->
### {% linkable_title Manual usage %}
The simplest but not the coolest way as a human to interact with a Home Assistant sensor is launching a command manually. Let's create a "Mood" sensor. For simplicity Home Assistant and the MQTT broker are both running on the same host. The needed configuration snipplets to add to the `configuration.yaml` file consists of two parts: one for the broker and one for the sensor.
```yaml
mqtt:
broker: 127.0.0.1
sensor:
- platform: mqtt
name: "Fabian's Mood"
state_topic: "home-assistant/fabian/mood"
```
After a restart of Home Assistant the "Mood" sensor will show up in the frontend. For more details about the configuration of MQTT itself and the sensor, please refer to the [MQTT component](https://home-assistant.io/components/mqtt.html) or the [MQTT sensor](https://home-assistant.io/components/sensor.mqtt.html) documentation.
Now we can set the mood. The commandline tool (`mosquitto_pub`) which is shipped with `mosquitto` is used to send an MQTT message.
```bash
mosquitto_pub -h 127.0.0.1 -t "home-assistant/fabian/mood" -m "bad"
```
<p class='img'>
<img src='/images/blog/2015-09-mqtt/mood.png' />
The Mood sensor
</p>
This is a really bad example. Don't do this in the real world because you won't be able to create diagrams of historical data. Better use a numerical value.
### {% linkable_title Python MQTT bindings %}
The last section was pretty boring, I know. Nobody wants to send MQTT messages by hand if there is a computer on the desk. If you are playing the lottery this section is for you. If not, read it anyway because the lottery is just an example :-).
This example is using the [Paho MQTT Python binding](https://eclipse.org/paho/clients/python/) because those binding should be available on the host where Home Assistant is running. If you want to use this example on another machine, please make sure that the bindings are installed (`pip3 install paho-mqtt`).
The first step is to add an additional MQTT sensor to the `configuration.yaml` file. The sensor will be called "Lottery" and the unit of measurement will be "No.".
```yaml
- platform: mqtt
name: "Lottery"
state_topic: "home-assistant/lottery/number"
unit_of_measurement: "No."
```
Don't forget to restart Home Assistant to make the configuration active.
To play, we need numbers from 1 to 49 which can be marked on the ticket. Those numbers should be random and displayed in the Home Assistant frontend. The Python script below is another simple example on how to send MQTT messages from the commandline; this time in a loop. For further information and examples please check the [Paho MQTT](https://eclipse.org/paho/clients/python/docs/) documentation.
```python
#!/usr/bin/python3
#
import time
import random
import paho.mqtt.client as mqtt
import paho.mqtt.publish as publish
broker = '127.0.0.1'
state_topic = 'home-assistant/lottery/number'
delay = 5
# Send a single message to set the mood
publish.single('home-assistant/fabian/mood', 'good', hostname=broker)
# Send messages in a loop
client = mqtt.Client("ha-client")
client.connect(broker)
client.loop_start()
while True:
client.publish(state_topic, random.randrange(0, 50, 1))
time.sleep(delay)
```
Every 5 seconds a message with a new number is sent to the broker and picked up by Home Assistant. By the way, my mood is much better now.
<p class='img'>
<img src='/images/blog/2015-09-mqtt/lottery.png' />
The Lottery sensor
</p>
With only a few lines of Python and an MQTT broker you can create your own "smartdevice" or send information to Home Assistant which you haven't think of. Of course this is not limited to Python. If there is an MQTT library available, the device can be used with Home Assistant now.
### {% linkable_title Arduino %}
To get started with real hardware that is capable to send MQTT messages, the Arduino platform is an inexpensive way to do it. In this section an Arduino UNO with an Ethernet shield and a photo resistor is used. The photo resistor is connected to analog pin 0 (A0) and has an output from 0 to 1024.
<p class='img'>
<img src='/images/blog/2015-09-mqtt/arduino-shield.png' />
The Arduino UNO with Ethernet shield and photo resistor
</p>
The [MQTT client](http://knolleary.github.io/pubsubclient/) for the Arduino needs to be available in your Arduino IDE. Below you will find a sketch which could act as a starting point. Please modify the IP addresses, the MAC address, and the pin as needed and upload the sketch to your Arduino.
```c
/*
This sketch is based on the basic MQTT example by
http://knolleary.github.io/pubsubclient/
*/
#include <SPI.h>
#include <Ethernet.h>
#include <PubSubClient.h>
#define DEBUG 1 // Debug output to serial console
// Device settings
IPAddress deviceIp(192, 168, 0, 43);
byte deviceMac[] = { 0xAB, 0xCD, 0xFE, 0xFE, 0xFE, 0xFE };
char* deviceId = "sensor01"; // Name of the sensor
char* stateTopic = "home-assistant/sensor01/brightness"; // MQTT topic where values are published
int sensorPin = A0; // Pin to which the sensor is connected to
char buf[4]; // Buffer to store the sensor value
int updateInterval = 1000; // Interval in miliseconds
// MQTT server settings
IPAddress mqttServer(192, 168, 0, 12);
int mqttPort = 1883;
EthernetClient ethClient;
PubSubClient client(ethClient);
void reconnect() {
while (!client.connected()) {
#if DEBUG
Serial.print("Attempting MQTT connection...");
#endif
if (client.connect(deviceId)) {
#if DEBUG
Serial.println("connected");
#endif
} else {
#if DEBUG
Serial.print("failed, rc=");
Serial.print(client.state());
Serial.println(" try again in 5 seconds");
#endif
delay(5000);
}
}
}
void setup() {
Serial.begin(57600);
client.setServer(mqttServer, mqttPort);
Ethernet.begin(deviceMac, deviceIp);
delay(1500);
}
void loop() {
if (!client.connected()) {
reconnect();
}
client.loop();
int sensorValue = analogRead(sensorPin);
#if DEBUG
Serial.print("Sensor value: ");
Serial.println(sensorValue);
#endif
client.publish(stateTopic, itoa(sensorValue, buf, 10));
delay(updateInterval);
}
```
The Arduino will send the value of the sensor every second. To use the data in Home Assistant, add an additional MQTT sensor to the `configuration.yaml` file.
```yaml
- platform: mqtt
name: "Brightness"
state_topic: "home-assistant/sensor01/brightness"
unit_of_measurement: "cd"
```
After a restart of Home Assistant the values of your Arduino will be available.
<p class='img'>
<img src='/images/blog/2015-09-mqtt/arduino.png' />
The Brightness sensor
</p>
I hope that this post could give you some ideas about the usage Home Assistant and MQTT. If you are working on a cool project that includes Home Assistant, please let us now.

View File

@ -0,0 +1,116 @@
---
layout: post
title: "Home Assistant meets IFTTT"
description: "Announcing new integration with IFTTT and some samples to get started."
date: 2015-09-13 09:28 -0700
date_formatted: "September 13, 2015"
author: Paulus Schoutsen
comments: true
categories: how-to release-notes
og_image: /images/blog/2015-09-ifttt/og_facebook.png
---
Today we announce the release of Home Assistant v0.7.2 which includes brand new support by
[@sfam][github-sfam] to integrate with [IFTTT][ifttt]. IFTTT stands for If This, Then That and is a
webservice that integrates with almost every possible webservice out there. Adding Home
Assistant to this mix means Home Assistant can connect with all via IFTTT.
It is now possible to disable your irregation system if it is going to be cloudy tomorrow or tweet
if your smoke alarm goes off.
[github-sfam]: https://github.com/sfam
[ifttt]: https://ifttt.com
<p class='img'>
<img src='/images/blog/2015-09-ifttt/splash.png'>
</p>
Head over to the [setup instructions](/components/ifttt.html) to get started with IFTTT. Click the
read more button for some example recipes.
<!--more-->
In each of the following examples, make sure to replace the XXX in the url with your correct
host address and api password.
## {% linkable_title Turn off irregation system when not needed %}
<p class='img'>
<img src='/images/blog/2015-09-ifttt/recipe-weather.png' />
</p>
Maker channel setup:
| Field | Value |
| ----- | ----- |
| URL | http://xxx.xxx.xxx.xxx:8123/api/services/switch/turn_off?api_password=xxxxxxxx
| METHOD | POST
| CONTENT TYPE | application/json
| BODY | { "entity_id": "switch.irrigation" }
## {% linkable_title Tweet when important events happen %}
<p class='img'>
<img src='/images/blog/2015-09-ifttt/recipe-twitter.png' />
</p>
This will tweet a message when a MQTT message is received that the smoke alarm has been triggered.
Setup Maker channel with event name `HA_FIRE_ALARM` and Twitter channel to tweet the message in
`value1`.
```yaml
# Configuration.yaml entry
automation:
alias: Post a tweet when fire alarm is triggered
platform: mqtt
mqtt_topic: home/alarm/fire
mqtt_payload: 'on'
execute_service: ifttt.trigger
service_data: {"event":"HA_FIRE_ALARM", "value1":"The fire alarm just triggered!"}
```
## {% linkable_title Turn on lights when I get home %}
<p class='img'>
<img src='/images/blog/2015-09-ifttt/recipe-geo.png' />
</p>
Maker channel setup:
| Field | Value |
| ----- | ----- |
| URL | http://xxx.xxx.xxx.xxx:8123/api/services/light/turn_on?api_password=xxxxxxxx
| METHOD | POST
| CONTENT TYPE | application/json
| BODY | { "entity_id": "light.kitchen" }
## {% linkable_title Flash lights when a new PR comes in for Home Assistant %}
<p class='img'>
<img src='/images/blog/2015-09-ifttt/recipe-github.png' />
</p>
Maker channel setup:
| Field | Value |
| ----- | ----- |
| URL | http://xxx.xxx.xxx.xxx:8123/api/services/light/turn_on?api_password=xxxxxxxx
| METHOD | POST
| CONTENT TYPE | application/json
| BODY | { "entity_id": "group.all_lights", "flash":"yes" }
## {% linkable_title Fire events when pressing the DO button %}
<p class='img'>
<img src='/images/blog/2015-09-ifttt/recipe-do.png' />
</p>
Maker channel setup:
| Field | Value |
| ----- | ----- |
| URL | http://xxx.xxx.xxx.xxx:8123/api/events/do_button_pressed?api_password=xxxxxxxx
| METHOD | POST
| CONTENT TYPE | application/json

View File

@ -0,0 +1,78 @@
---
layout: post
title: "Remote Monitoring with Glances"
description: "This post describes the setup for monitoring remote hosts with Home Assistant."
date: 2015-09-18 11:00:00 +0200
date_formatted: "September 18, 2015"
author: Fabian Affolter
comments: true
categories: how-to
og_image: /images/supported_brands/glances.png
---
<img src='/images/supported_brands/glances.png' style='border:none; box-shadow: none; float: right;' height='80' />
Inspried by a [feature requests](https://github.com/balloob/home-assistant/issues/310) I started looking into the available options to do monitoring of remote hosts. The feature request is about displaying system information in a similar way than the [systemmonitor](/components/sensor.systemmonitor.html) sensor does it for the local system. After a while I started to think that it would be a nice addition for a small home network where no full-blown system monitoring setup is present.
<!--more-->
The basic problem is to get the data from the remote host. Starting with [psutil](https://pypi.python.org/pypi/psutil) that is used by the systemmonitor sensor, a possible solution is only a click away and named [Glances](https://github.com/nicolargo/glances). Glances has a nice curses-based interface and a [RESTful API](https://github.com/nicolargo/glances/wiki/The-Glances-RESTFULL-JSON-API).
The [Glances sensor](/components/sensor.glances.html) sensor uses that API to get all needed data.
In this post a default Fedora 22 Workstation installation is used on the host that should be monitored. In fact, it doesn't matter if the system is the local one or a remote one as long as Glances is available. With some adjustments it should work on your own systems too. The difference will be the package and the firewall management tools.
First some extra packages are needed beside Glances, especially the [bottle](http://bottlepy.org/docs/dev/index.html) webserver. I guess that Glances is available for your distribution as well. Otherwise follow those [instructions](https://github.com/nicolargo/glances#installation).
```
sudo dnf -y install glances python-bottle
```
On Fedora the Firewall settings are strict. Let's open port 61208 to allow other hosts to connect to that port. This is not needed if you just want to observe your local machine.
```bash
sudo firewall-cmd --permanent --add-port=61208/tcp
sudo firewall-cmd --reload
```
Launch `glances` and keep an eye on the output.
```bash
glances -w
Glances web server started on http://0.0.0.0:61208/
```
Now browse to http://IP_ADRRESS:61208/. You should see the webified view of Glances.
<p class='img'>
<img src='/images/blog/2015-09-glances/web-glances.png' />
Glances web interface
</p>
Another check is to access the API located at http://IP_ADRRESS:61208/api/2/mem/used and to confirm that a detail about your memory usage is provided as a JSON response. If so, you are good to proceed.
```bash
curl -X GET http://IP_ADDRESS:61208/api/2/mem/used
{"used": 203943936}
```
Add the [glances sensor](/components/sensor.glances.html) entry to your `configuration.yaml` file and restart Home Assistant then.
```yaml
# Example configuration.yaml entry
- platform: glances
name: NAS
host: IP_ADDRESS
resources:
- 'disk_use_percent'
- 'disk_use'
- 'disk_free'
```
If there are no error in the log file then you should see your new sensors.
<p class='img'>
<img src='/images/blog/2015-09-glances/sensors.png' />
The Glances sensors
</p>
[Glances](https://github.com/nicolargo/glances) has a couple of optional dependencies which are extenting the range of provided information. This means that it would be possible to get details about the RAID system, HDD temperature, IP addresses, sensors, etc., please create a [Pull request](https://github.com/balloob/home-assistant/pulls) with your additions or a [Feature request](https://github.com/balloob/home-assistant/issues/new) if you want see more details in your Home Assistant frontend.

View File

@ -0,0 +1,73 @@
---
layout: post
title: "Alarms, Sonos and iTunes now supported"
description: "Home Assistant 0.7.3 has been released with support for Sonos, iTunes and improved ."
date: 2015-09-19 21:47:00 +0700
date_formatted: "September 19, 2015"
author: Paulus Schoutsen
comments: true
categories: release-notes
---
It's like someone opened a can of rock solid developers and emptied it above our
[chat channel](https://gitter.im/balloob/home-assistant) because it exploded with
great conversations and solid contributions. Featured in release 0.7.3: Sonos, iTunes, Alarm component and Automation upgrade.
See [GitHub](https://github.com/balloob/home-assistant/releases/tag/0.7.3) for more detailed release notes.
_Migration note: the `scheduler` component has been removed in favor of the `automation` component._
__Sonos__<br>
<img src='/images/supported_brands/sonos.png' style='border:none; box-shadow: none; float: right;' height='50' />
Sonos support has been added by [@rhooper](https://github.com/rhooper) and [@SEJeff](https://github.com/SEJeff). Home Assistant is now able to automatically
detect Sonos devices in your network and set them up for you. It will allow you to control music
playing on your Sonos and change the volume.
__iTunes and airplay speakers__<br>
<img src='/images/supported_brands/itunes.png' style='border:none; box-shadow: none; float: right;' height='50' />
[@maddox](https://github.com/maddox) has contributed support for controlling iTunes and airplay speakers. For this to work you will
have to run [itunes-api](https://github.com/maddox/itunes-api) on your Mac as middleware.
```
# Example configuration.yaml entry
media_player:
platform: itunes
name: iTunes
host: http://192.168.1.50
port: 8181
```
<!--more-->
__Automation__<br>
Automation has gotten a lot of love. It now supports conditions, multiple triggers and new types of
triggers. The best to get started with it is to head over to the new
[getting started with automation](/getting-started/automation.html) page.
```yaml
# Example of entry in configuration.yaml
automation:
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
```
__Verisure Alarms__<br>
<img src='/images/supported_brands/verisure.png' style='border:none; box-shadow: none; float: right;' height='50' />
We now support arming and disarming your verisure alarm from within Home Assistant thanks to added
support by [@persandstrom](https://github.com/persandstrom).

View File

@ -28,8 +28,10 @@ To integrate an Arduino boards with Home Assistant, add the following section to
arduino:
port: /dev/ttyACM0
```
The port where is your board connected to your Home Assistant host. If you are using an original Arduino the port will be named `ttyACM*`. The exact
number can be determined with `ls /dev/ttyACM*`.
Configuration variables:
- **port** (*Required*): The port where your board is connected to your Home Assistant host. If you are using an original Arduino the port will be named `ttyACM*`. The exact number can be determined with `ls /dev/ttyACM*`.
```bash
ls /dev/ttyACM*
@ -41,49 +43,8 @@ If that is not working, check your `dmesg` or `journalctl -f` output. Keep in mi
A word of caution: The Arduino boards are not storing states. This means that with every initialization the pins are set to off/low.
</p>
## Switch Configuration
## Building on top of the Arduino component
Support for switching pins is limited to high/on and low/off of the digital pins. PWM (pin 3,5,6,9,10, and 11 on a Arduino Uno) is not supported yet.
To enable the Arduino switch pins with Home Assistant, add the following section to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
switch:
platform: arduino
pins:
11:
name: Fan Office
type: digital
12:
name: Light Desk
type: digital
```
The digital pins are numbered from 0 to 13. The available pins are 2 till 13. For testing purposes you can use pin 13 because with that pin you can control the internal LED.
The name field of the pins array will be used in the frontend.
## Sensor Configuration
The sensor platform allow you to get an numerical values from an analog input pin. Usually between 0 and 1024.
To enable an Arduino sensor with Home Assistant, add the following section to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
sensor:
platform: arduino
pins:
1:
name: Door switch
type: analog
0:
name: Brightness
type: analog
```
The 6 analog pins are numbered from A0 to A5.
The name field of the pins array will be used in the frontend.
- [Arduino Sensor](/components/sensor.arduino.html)
- [Arduino Switch](/components/switch.arduino.html)

View File

@ -9,143 +9,262 @@ 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 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"}
```
## {% linkable_title Setting up triggers %}
#### {% 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.
Here are some example values:
```
# Match at the start of every hour
platform: time
time_minutes: 0
time_seconds: 0
# Match at 4pm
platform: time
time_hours: 16
time_minutes: 0
time_seconds: 0
```
#### {% 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.
```
# 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'
# Match when a light turns on
platform: state
state_entity_id: light.Ceiling
state_from: 'off'
state_to: 'on'
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
```
<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.
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 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.
- [Jump to conditions](#conditions)
- [Jump to actions](#actions)
- [Jump to troubleshooting](#troubleshooting)
```
# Match any changes to bathroom light
platform: mqtt
mqtt_topic: home/bathroom/light
## {% linkable_title Triggers %}
# Match only if bathroom light is turned on
platform: mqtt
mqtt_topic: home/bathroom/light
mqtt_payload: 'on'
```
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.
## {% linkable_title Setting up the action %}
#### {% 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.
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"}
```
## {% 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:
```
```yaml
automation:
alias: Sunset notification
trigger:
platform: event
event_type: MY_CUSTOM_EVENT
# optional
event_data:
mood: happy
```
platform: state
state_entity_id: sun.sun
state_from: 'above_horizon'
state_to: 'below_horizon'
#### {% 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.
execute_service: notify.NOTIFIER_NAME
service_data: {"message":"The sun has set"}
```yaml
automation:
trigger:
platform: mqtt
topic: living_room/switch/ac
# Optional
payload: 'on'
```
automation 2:
alias: Turn lights off at 8am in the morning
#### {% 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.
platform: time
time_hours: 8
time_minutes: 0
time_seconds: 0
```yaml
automation:
trigger:
platform: numeric_state
entity_id: sensor.temperature
# At least one of the following required
above: 17
below: 25
```
execute_service: light.turn_off
#### {% linkable_title State trigger %}
Triggers when the state of an entity changes. If only entity_id given will match all state changes.
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
```yaml
automation:
trigger:
platform: state
entity_id: device_tracker.paulus
# Optional
from: "not_home"
to: "home"
```
<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.
Use quotes around your values for <code>from</code> and <code>to</code> to avoid the YAML parser
interpreting some values as booleans.
</p>
#### {% linkable_title Sun trigger %}
Triggers based on sunrise and sunset, both with an optional offset.
```yaml
automation:
trigger:
platform: sun
# Possible values: sunset, sunrise
event: sunset
# Optional time offset
offset: -00:45:00
```
#### {% 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 specific value. For example, by only setting minutes in the config to 5 it will trigger every
hour when it is 5 minutes past whole. You cannot use `after` together with hour, minute or second.
```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: 0
minutes: 5
seconds: 0
weekday:
- sat
- sun
```
You can use `weekday` to limit the trigger times to speific days as well (also available in conditions).
Valid values for `weekday` are (`sun`, `mon`, `tue`, `wed`, `thu`, `fri` & `sat`)
The above example will trigger on Saturday and Sunday every hour on the 5 (2:05, 3:05, 4:05, etc).
## {% 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
```
Valid values for `weekday` are (sun, mon, tue, wed, thu, fri & sat)
## {% 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).
```yaml
automation:
# 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]
```
```yaml
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).
## {% linkable_title Troubleshooting %}
You can verify that your automation rules are being initialized correctly by watching both the realtime
logs and also the logbook. The realtime logs will show the rules being initialized (once for each trigger):
```bash
INFO [homeassistant.components.automation] Initialized rule Rainy Day
INFO [homeassistant.components.automation] Initialized rule Rainy Day
INFO [homeassistant.components.automation] Initialized rule Rainy Day
INFO [homeassistant.components.automation] Initialized rule Rain is over
```
The Logbook component will show a line entry when an automation is triggered. You can look at the
previous entry to determine which trigger in the rule triggered the event.
![Logbook example](/images/components/automation/logbook.png)

View File

@ -0,0 +1,35 @@
---
layout: page
title: "Foscam IP camera support"
description: "Instructions how to integrate Foscam IP cameras within Home Assistant."
date: 2015-09-17 08:01
sidebar: false
comments: false
sharing: true
footer: true
---
<img src='/images/supported_brands/foscam.png' class='brand pull-right' />
The foscam platform allows you to watch the live stream of your [Foscam](http://www.foscam.com/) IP camera in Home Assistant.
To enable your Foscam IP camera in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
camera:
platform: foscam
ip: 192.168.0.123
name: Door Camera
port: 88
username: USERNAME
password: PASSWORD
```
Configuration variables:
- **ip** *Required*: The IP address your camera.
- **port** *Optional*: The port that the camera is running on. The default is 88.
- **name** *Optional*: This parameter allows you to override the name of your camera.
- **username** *Required*: The username for accessing your camera.
- **password** *Required*: The password for accessing your camera.

View File

@ -14,12 +14,21 @@ This component allows you to integrate any IP camera into Home Assistant. It sup
Home Assistant will serve the images via its server, making it possible to view your IP camera's while outside of your network.
To enable this sensor in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
camera:
platform: generic
name: my sample camera
username: MY_USERNAME
password: MY_PASSWORD
still_image_url: http://194.218.96.92/jpg/image.jpg
name: my sample camera
username: USERNAME
password: PASSWORD
```
Configuration variables:
- **still_image_url** *Required*: The URL your camera serves the image on, eg. http://192.168.1.21:2112/
- **name** *Optional*: This parameter allows you to override the name of your camera.
- **username** *Optional*: The username for accessing your camera.
- **password** *Optional*: The password for accessing your camera.

View File

@ -12,7 +12,8 @@ footer: true
<img src='/images/supported_brands/actiontec.png' class='brand pull-right' />
This platform allows you to detect presence by looking at connected devices to an [Actiontec](http://www.actiontec.com/) device.
Supported devices:
Supported devices (tested):
- MI424WR (Verizon FIOS)
<p class='note warning'>
@ -26,7 +27,15 @@ device_tracker:
host: YOUR_ROUTER_IP
username: YOUR_ADMIN_USERNAME
password: YOUR_ADMIN_PASSWORD
home_interval: MINUTES
```
Configuration variables:
- **host** (*Required*): The IP address of your router, e.g. 192.168.1.1.
- **username** (*Required*: The username of an user with administrative privileges, usually *admin*.
- **password** (*Required*): The password for your given admin account.
- **home_interval** (*Optional*): If the home_interval is set then the component will not let a device be AWAY if it has been HOME in the last home_interval minutes. This is in addition to the 3 minute wait built into the device_tracker component.
See the [device tracker component page](/components/device_tracker.html) for instructions how to configure the people to be tracked.

View File

@ -9,7 +9,12 @@ sharing: true
footer: true
---
This platform allows you to detect presence by looking at connected devices to an [Aruba Instant](http://www.arubanetworks.com/products/networking/aruba-instant/) device. This has been tested on an ARUBA AP-105.
<img src='/images/supported_brands/aruba.png' class='brand pull-right' />
This platform allows you to detect presence by looking at connected devices to an [Aruba Instant](http://www.arubanetworks.com/products/networking/aruba-instant/) device.
Supported devices (tested):
- ARUBA AP-105
<p class='note warning'>
This device tracker needs telnet to be enabled on the router.
@ -24,5 +29,11 @@ device_tracker:
password: YOUR_ADMIN_PASSWORD
```
Configuration variables:
- **host** *Required*: The IP address of your router, e.g. 192.168.1.1.
- **username** *Required*: The username of an user with administrative privileges, usually *admin*.
- **password** *Required*: The password for your given admin account.
See the [device tracker component page](/components/device_tracker.html) for instructions how to configure the people to be tracked.

View File

@ -12,6 +12,10 @@ footer: true
<img src='/images/supported_brands/asus.png' class='brand pull-right' />
This platform offers presence detection by looking at connected devices to a [ASUSWRT](http://event.asus.com/2013/nw/ASUSWRT/) based router.
<p class='note warning'>
This device tracker needs telnet to be enabled on the router.
</p>
To use an ASUSWRT router in your installation, add the following to your `configuration.yaml` file:
```yaml
@ -23,6 +27,10 @@ device_tracker:
password: YOUR_ADMIN_PASSWORD
```
This device tracker needs telnet to be enabled on the router.
Configuration variables:
- **host** (*Required*): The IP address of your router, e.g. 192.168.1.1.
- **username** (*Required*: The username of an user with administrative privileges, usually *admin*.
- **password** (*Required*): The password for your given admin account.
See the [device tracker component page](/components/device_tracker.html) for instructions how to configure the people to be tracked.

View File

@ -18,9 +18,15 @@ To use a DD-WRRT router in your installation, add the following to your `configu
# Example configuration.yaml entry
device_tracker:
platform: ddwrt
host: 192.168.1.1
username: admin
password: PASSWORD
host: ROUTER_IP_ADDRESS
username: YOUR_ADMIN_USERNAME
password: YOUR_ADMIN_PASSWORD
```
Configuration variables:
- **host** (*Required*): The IP address of your router, e.g. 192.168.1.1.
- **username** (*Required*: The username of an user with administrative privileges, usually *admin*.
- **password** (*Required*): The password for your given admin account.
See the [device tracker component page](/components/device_tracker.html) for instructions how to configure the people to be tracked.

View File

@ -16,9 +16,15 @@ Before this scanner can be used you have to install the luci RPC package on Open
# Example configuration.yaml entry
device_tracker:
platform: luci
host: 192.168.1.1
username: admin
password: PASSWORD
host: ROUTER_IP_ADDRESS
username: YOUR_ADMIN_USERNAME
password: YOUR_ADMIN_PASSWORD
```
Configuration variables:
- **host** (*Required*): The IP address of your router, e.g. 192.168.1.1.
- **username** (*Required*): The username of an user with administrative privileges, usually *admin*.
- **password** (*Required*): The password for your given admin account.
See the [device tracker component page](/components/device_tracker.html) for instructions how to configure the people to be tracked.

View File

@ -11,22 +11,41 @@ footer: true
Home Assistant can get information from your wireless router to track which devices are connected. There are three different types of supported wireless routers:
- [Actiontec](/components/device_tracker.actiontec.html)
- [Aruba](/components/device_tracker.aruba.html)
- [ASUSWRT](/components/device_tracker.asuswrt.html)
- [DD-WRT](/components/device_tracker.ddwrt.html)
- [tomato](/components/device_tracker.tomato.html)
- [netgear](/components/device_tracker.netgear.html)
- [luci (OpenWRT)](/components/device_tracker.luci.html)
- [netgear](/components/device_tracker.netgear.html)
- [Thomson](/components/device_tracker.thomson.html)
- [tomato](/components/device_tracker.tomato.html)
- [TP-Link](/components/device_tracker.tplink.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
- [Owntrack](/components/device_tracker.owntrack.html)
To get started add the following lines to your `configuration.yaml` (example for Netgear):
```
```yaml
# Example configuration.yaml entry for Netgear device
device_tracker:
platform: netgear
host: 192.168.1.1
username: admin
password: MY_PASSWORD
password: YOUR_PASSWORD
# Optional configuration
# If new discovered devices are tracked by default (default: yes)
track_new_devices: yes
# Seconds between each 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
```
Once tracking, the `device_tracker` component will maintain a file in your config dir called `known_devices.csv`. 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.
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.

View File

@ -0,0 +1,24 @@
---
layout: page
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
footer: true
---
<img src='/images/supported_brands/mqtt.png' class='brand pull-right' />
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
device_tracker:
platform: mqtt
qos: 1
devices:
paulus_oneplus: /location/paulus
annetherese_n4: /location/annetherese
```

View File

@ -16,9 +16,15 @@ This platform allows you to detect presence by looking at connected devices to a
# Example configuration.yaml entry
device_tracker:
platform: netgear
host: 192.168.1.1
username: admin
password: PASSWORD
host: YOUR_ROUTER_IP
username: YOUR_ADMIN_USERNAME
password: YOUR_ADMIN_PASSWORD
```
Configuration variables:
- **host** (*Required*): The IP address of your router, e.g. 192.168.1.1.
- **username** (*Required*: The username of an user with administrative privileges, usually *admin*.
- **password** (*Required*): The password for your given admin account.
See the [device tracker component page](/components/device_tracker.html) for instructions how to configure the people to be tracked.

View File

@ -10,15 +10,23 @@ footer: true
---
<img src='/images/supported_brands/network-workgroup.png' class='brand pull-right' />
As an alternative to the router-based device tracking, it is possible to directly scan the network for devices by using Nmap. The IP addresses to scan can be specified in any format that Nmap understands, including the network-prefix notation (`192.168.1.1/24`) and the range notation (`192.168.1.1-255`).
As an alternative to the router-based device tracking, it is possible to directly scan the network
for devices by using Nmap. The IP addresses to scan can be specified in any format that Nmap understands,
including the network-prefix notation (`192.168.1.1/24`) and the range notation (`192.168.1.1-255`).
If you're on Debian or Ubuntu, you might have to install the packages for arp and nmap. Do so by running `apt-get install net-tools nmap`.
If you're on Debian or Ubuntu, you might have to install the packages for arp and nmap. Do so by
running `apt-get install net-tools nmap`.
```
# Example configuration.yaml entry
device_tracker:
platform: nmap_tracker
hosts: 192.168.1.1/24
home_interval: 10
```
See the [device tracker component page](/components/device_tracker.html) for instructions how to configure the people to be tracked.
`home_interval` is an optional value set in minutes. This will be the number of minutes nmap will not
scan this device, assuming it is home, in order to preserve the device battery.
See the [device tracker component page](/components/device_tracker.html) for instructions how to
configure the people to be tracked.

View File

@ -0,0 +1,21 @@
---
layout: page
title: "Owntrack device tracker"
description: "Instructions how to use Owntrack to track devices in Home Assistant."
date: 2015-09-22 07:00
sidebar: false
comments: false
sharing: true
footer: true
---
<img src='/images/supported_brands/owntrack.png' class='brand pull-right' />
This platform allows you to detect presence by monitoring MQTT topics uses by [Owntrack](http://owntracks.org/) for new locations.
To integrate Owntrack in Home Assistant, add the following section to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
device_tracker:
platform: owntracks
```

View File

@ -16,10 +16,17 @@ Tomato requires an extra config variable called `http_id`. The value can be obta
# Example configuration.yaml entry
device_tracker:
platform: tomato
host: 192.168.1.1
username: admin
password: PASSWORD
http_id: ABCDEFG
host: YOUR_ROUTER_IP_ADDRESS
username: YOUR_ADMIN_USERNAME
password: YOUR_ADMIN_PASSWORD
http_id: YOUR_HTTP_ID
```
Configuration variables:
- **host** (*Required*): The IP address of your router, e.g. 192.168.1.1.
- **username** (*Required*: The username of an user with administrative privileges, usually *admin*.
- **password** (*Required*): The password for your given admin account.
- **http_id** (*Required*): The value can be obtained by logging in to the Tomato admin interface and search for `http_id` in the page source code.
See the [device tracker component page](/components/device_tracker.html) for instructions how to configure the people to be tracked.

View File

@ -21,4 +21,11 @@ device_tracker:
password: YOUR_ADMIN_PASSWORD
```
Configuration variables:
- **host** (*Required*): The IP address of your router, e.g. 192.168.1.1.
- **username** (*Required*: The username of an user with administrative privileges, usually *admin*.
- **password** (*Required*): The password for your given admin account.
See the [device tracker component page](/components/device_tracker.html) for instructions how to configure the people to be tracked.

View File

@ -26,3 +26,7 @@ discovery:
```
If you are developing a new platform, please read [how to make your platform discoverable]({{site_root}}/developers/add_new_platform.html#discovery).
<p class='note warning'>
There is currently a <a href='https://bitbucket.org/al45tair/netifaces/issues/17/dll-fails-to-load-windows-81-64bit'>known issue</a> with running this playform on a 64-bit version of Python.
</p>

View File

@ -0,0 +1,65 @@
---
layout: page
title: "IFTTT"
description: "Instructions how to setup IFTTT within Home Assistant."
date: 2015-09-07 18:00
sidebar: false
comments: false
sharing: true
footer: true
---
<img src='/images/supported_brands/ifttt.png' class='brand pull-right' />
[IFTTT](https://ifttt.com) is a web service that allows users to create chains of simple conditional
statements, so called "recipes". With the ifttt component you can trigger recipes through the "maker"
channel. See the [announcement blog post](/blog/2015/09/13/home-assistant-meets-ifttt/) for examples
how to use it.
```yaml
# Example configuration.yaml entry
ifttt:
key: xxxxx-x-xxxxxxxxxxxxx
```
Key is your API key which can be obtained by viewing the properties of the [Maker Channel](https://ifttt.com/maker).
<p class='img'>
<img src='/images/components/ifttt/finding_key.png' />
Property screen of the Maker Channel
</p>
Once you have added your key to `configuration.yaml`, restart your Home Assistant server. This will load up the IFTTT component and make a service available to trigger events in IFTTT.
<p class='note'>
After restarting the server, be sure to watch the console for any logging errors that show up in red, white or yellow.
</p>
### {% linkable_title Testing your trigger %}
You can use the developer tools to test your [Maker Channel](https://ifttt.com/maker) trigger. To do this, open the Home Assistant UI, open the sidebar, click on the first icon in the developer tools. This should get you to the 'Call Service' screen. Fill in the following values:
Field | Value
----- | -----
domain | `ifttt`
service | `trigger`
Service Data | `{"event": "EventName", "value1": "Hello World"}`
<p class='img'>
<img src='/images/components/ifttt/testing_service.png' />
When your screen looks like this, click the 'call service' button.
</p>
### {% linkable_title Setting up a recipe %}
<p class='img'>
<img src='/images/components/ifttt/setup_trigger.png' />
You need to setup a unique trigger for each event you sent to IFTTT.
</p>
### {% linkable_title Sending events from IFTTT to Home Assistant %}
To be able to receive events from IFTTT, your Home Assistant instance needs to be accessible from
the web. This can be achieved by forwarding port 8123 from your router to the device running Home
Assistant. If your ISP is giving you a new IP address from time to time, consider using
[DuckDNS][duck-dns].
[duck-dns]: https://duckdns.org

View File

@ -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>
@ -70,7 +70,7 @@ Entities are things that you want to observe within Home Assistant. Support for
</tr>
<tr>
<td></td>
<td><a href='/components/sensor.dht.html'><img src='/images/supported_brands/dht.png' class='brand overview' /></a></td>
<td><a href='/components/sensor.dht.html'>DHTxx</a> reads the temperature and humidity.</td>
</tr>
@ -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>
@ -114,12 +114,17 @@ Entities are things that you want to observe within Home Assistant. Support for
<tr>
<td></td>
<td><a href='/components/sensor.rfxtrx.html'>RFXtrx</a> sensors monitors values from RFXtrx sensors.</td>
<td><a href='/components/sensor.rfxtrx.html'>RFXtrx</a> sensors monitors values from RFXtrx devices.</td>
</tr>
<tr>
<td><a href='/components/mqtt.html'><img src='/images/supported_brands/mqtt.png' class='brand overview'/></a></td>
<td><a href='/components/mqtt.html'>MQTT</a> allows sending and recieving MQTT messages.</td>
<td><a href='/components/mqtt.html'>MQTT</a> allows sending and recieving MQTT messages, incl. <a href='/components/switch.mqtt.html'>switches</a> and <a href='/components/sensor.mqtt.html'>sensors</a>.</td>
</tr>
<tr>
<td><a href='/components/sensor.arest.html'><img src='/images/supported_brands/arest.png' class='brand overview' /></a></td>
<td>aREST <a href='/components/sensor.arest.html'>sensors</a> observe and <a href='/components/switch.arest.html'>switches</a> controls the pins of aREST enabled devices.</td>
</tr>
</table>
@ -138,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>
@ -147,7 +152,7 @@ Entities are things that you want to observe within Home Assistant. Support for
</tr>
<tr>
<td></td>
<td><a href='/components/device_tracker.aruba.html'><img src='/images/supported_brands/aruba.png' class='brand overview' /></a></td>
<td><a href='/components/device_tracker.aruba.html'>Aruba routers</a></td>
</tr>
@ -166,6 +171,16 @@ Entities are things that you want to observe within Home Assistant. Support for
<td><a href='/components/device_tracker.luci.html'>OpenWRT routers</a></td>
</tr>
<tr>
<td><a href='/components/device_tracker.owntrack.html'><img src='/images/supported_brands/oowntrack.png' class='brand overview' /></a></td>
<td><a href='/components/device_tracker.owntrack.html'>Owntrack devices</a></td>
</tr>
<tr>
<td><a href='/components/device_tracker.mqtt.html'><img src='/images/supported_brands/mqtt.png' class='brand overview' /></a></td>
<td><a href='/components/device_tracker.mqtt.html'>MQTT devices</a></td>
</tr>
<tr>
<td><a href='/components/device_tracker.netgear.html'><img src='/images/supported_brands/netgear.png' class='brand overview' /></a></td>
<td><a href='/components/device_tracker.netgear.html'>Netgear routers</a></td>
@ -201,14 +216,14 @@ 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>
<tr>
<td><a href='/components/media_player.cast.html'><img src='/images/supported_brands/google_cast.png' class='brand overview' /></a></td>
<td><a href='/components/media_player.cast.html'>Google Cast devices</a></td>
<td><a href='/components/media_player.cast.html'>Google Cast</a></td>
</tr>
<tr>
@ -216,6 +231,11 @@ Entities are things that you want to observe within Home Assistant. Support for
<td><a href='/components/media_player.kodi.html'>Kodi</a></td>
</tr>
<tr>
<td><a href='/components/media_player.itunes.html'><img src='/images/supported_brands/itunes.png' class='brand overview' /></a></td>
<td><a href='/components/media_player.itunes.html'>iTunes</a></td>
</tr>
<tr>
<td><a href='/components/media_player.mpd.html'><img src='/images/supported_brands/mpd.png' class='brand overview' /></a></td>
<td><a href='/components/media_player.mpd.html'>Music Player Daemon (MPD)</a></td>
@ -226,6 +246,16 @@ Entities are things that you want to observe within Home Assistant. Support for
<td><a href='/components/media_player.squeezebox.html'>Logitech Squeezebox</a></td>
</tr>
<tr>
<td><a href='/components/media_player.denon.html'><img src='/images/supported_brands/denon.png' class='brand overview' /></a></td>
<td><a href='/components/media_player.denon.html'>Denon Network Receivers</a></td>
</tr>
<tr>
<td><a href='/components/media_player.sonos.html'><img src='/images/supported_brands/sonos.png' class='brand overview' /></a></td>
<td><a href='/components/media_player.sonos.html'>Sonos devices</a></td>
</tr>
</table>
</div>
@ -235,7 +265,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>
@ -249,6 +279,10 @@ Entities are things that you want to observe within Home Assistant. Support for
<td><a href='/components/camera.generic.html'>IP camera</a> integrates a generic IP camera or image url.</td>
</tr>
<td><a href='/components/camera.foscam.html'><img src='/images/supported_brands/foscam.png' class='brand overview' /></a></td>
<td><a href='/components/switch.Foscam.html'>Foscam</a> let you see your live stream.</td>
</tr>
<tr>
<td><a href='/components/sensor.sabnzbd.html'><img src='/images/supported_brands/sabnzbd.png' class='brand overview' /></a></td>
<td><a href='/components/sensor.sabnzbd.html'>SABnzbd clients</a> monitors queue and download speeds.</td>
@ -268,7 +302,12 @@ Entities are things that you want to observe within Home Assistant. Support for
<tr>
<td><a href='/components/switch.command_switch.html'><img src='/images/supported_brands/utilities-terminal.png' class='brand overview' /></a></td>
<td><a href='/components/switch.command_switch.html'>Command line</a> issues command line commands.</td>
<td>Command line <a href='/components/switch.command_switch.html'>switches</a> and <a href='/components/sensor.command_sensor.html'>sensors</a> issues command line commands to do or the get something.</td>
</tr>
<tr>
<td><a href='/components/sensor.glances.html'><img src='/images/supported_brands/glances.png' class='brand overview' /></a></td>
<td><a href='/components/sensor.glances.html'>Glances</a> tracks system information on remote hosts.</td>
</tr>
</table>
@ -300,7 +339,7 @@ Home Assistant integrates with a variety of third party Home Automation hubs and
[<img src='/images/supported_brands/wink.png' class='brand' alt="Wink" />](/components/wink.html)
[<img src='/images/supported_brands/universal_devices.png' class='brand' alt="ISY994" />](/components/isy994.html)
[<img src='/images/supported_brands/modbus.png' class='brand' alt="Modbus" />](/components/modbus.html)
[<img src='/images/supported_brands/arduino.png' class='brand' alt="Arduino" />](/components/arduino.html)
[<img src='/images/supported_brands/verisure.png' class='brand' alt="Verisure" />](/components/verisure.html)
<p class='note'>
Support for these devices is provided by the Home Assistant community and not
@ -316,7 +355,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>
@ -370,7 +409,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>
@ -429,8 +468,8 @@ 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>
<p>The web services displays data grabbed from an external source.</p>
<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>
@ -451,7 +490,12 @@ the manufacturers of these devices.
<tr>
<td><a href='/components/sensor.swiss_public_transport.html'><img src='/images/supported_brands/appointment-new.png' class='brand overview' /></a></td>
<td><a href='/components/sensor.swiss_public_transport.html'>Swiss Public Transport</a> displays Swiss timetable data for traveling.</td>
<td><a href='/components/sensor.swiss_public_transport.html'>Swiss Public Transport</a> displays Swiss timetable data for traveling.</td>
</tr>
<tr>
<td><a href='/components/ifttt.html'><img src='/images/supported_brands/ifttt.png' class='brand overview' /></a></td>
<td><a href='/components/ifttt.html'>IFTTT</a> allows the triggering of recipes.</td>
</tr>
</table>
@ -473,7 +517,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.
@ -483,10 +526,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 %}

View File

@ -21,46 +21,33 @@ Home Assistant is capable of communicating with any switch, sensor, and light
that is configured on the controller. Using the programs on the controller,
custom switches and sensors can also be created.
To integrate your ISY994 controller with Home Assistant, add the following
section to your `configuration.yaml` file:
To integrate your ISY994 controller with Home Assistant, add the following section to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
isy994:
# requried
host: ISY_ADDRESS
username: ISY_USERNAME
password: ISY_PASSWORD
# optional
sensor_string: SENSOR_STRING
hidden_string: HIDDEN_STRING
tls: TLS_VERSION
host: ISY_ADDRESS
username: ISY_USERNAME
password: ISY_PASSWORD
sensor_string: SENSOR_STRING
hidden_string: HIDDEN_STRING
tls: TLS_VERSION
```
Configuration variables:
The ISY_ADDRESS should be in full URL format. For example:
http://192.168.10.100:80
- **host** (*Required*): The host entry should be in full URL format, eg. http://192.168.10.100:80
- **username** (*Required*): The username that used to access the ISY interface.
- **password** (*Required*): The password that used to access the ISY interface.
The ISY_USERNAME and ISY_PASSWORD are the configured username and password used
to access the ISY interface.
The SENSOR_STRING is a string that is used to identify which devices are to be
assumed to be sensors instead of lights of switches. By default, this string is
'Sensor'. If this string is found in the device name, Home Assistant will
- **sensor_string** (*Optional*): This is the string that is used to identify which devices are to be assumed to be sensors instead of lights of switches. By default, this string is 'Sensor'. If this string is found in the device name, Home Assistant will
assume it is as a sensor.
The HIDDEN_STRING is a string that is used to identify which devices are to be
- **hidden_string** (*Optional*): The HIDDEN_STRING is a string that is used to identify which devices are to be
hidden on Home Assistant's front page. This string will be stripped from the
device's name before being used. By default, this value is '{HIDE ME}'.
- **tls** (*Optional*): This entry should refelct the version of TLS that the ISY controller is using for HTTPS encryption. This value can be either 1.1 or 1.2. If this value is not set, it is assumed to be version 1.1. This is the default for most users.
ISY994 Pro users may likely be using 1.2. When using HTTPS in the host entry, it is best practice to set this value.
The TLS_VERSION value is the version of TLS that the ISY controller is using
for HTTPS encryption. This value can be either 1.1 or 1.2. If this value is not
set, it is assumed to be version 1.1. This is the default for most users.
ISY994 Pro users may likely be using 1.2. When using HTTPS in the ISY_ADDRESS
string, it is best practice to set this value.
Once the ISY controller is configured, it will automatically import any lights,
switches, and sensors it can locate.
Once the ISY controller is configured, it will automatically import any lights, switches, and sensors it can locate.
### Creating Custom Switches ###

View File

@ -24,3 +24,17 @@ To load this component, add the following lines to your `configuration.yaml`:
```
keyboard:
```
## {% linkable_title Dependencies %}
You may need to install platform-specific [dependencies for PyUserInput](https://github.com/SavinaRoja/PyUserInput#dependencies) in order to use the keyboard component. In most cases this can be done by running:
```
pip3 install [package name]
```
#### {% linkable_title Windows %}
x64 Windows users may have trouble installing pywin through pip. Using an [executable installer](http://sourceforge.net/projects/pywin32/files/pywin32/) should work around this issue.
[Similar installers](http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyhook) (unofficial) for pyhook have been ported to python 3.4 and should help with x64 pip issues with pyhook.

View File

@ -18,9 +18,14 @@ To add limitlessled to your installation, add the following to your `configurati
# Example configuration.yaml entry
light:
platform: limitlessled
host: 192.168.1.10
host: IP_ADDRESS
group_1_name: Living Room
group_2_name: Bedroom
group_3_name: Office
group_4_name: Kitchen
```
Configuration variables:
- **host** (*Required*): IP address of the device, eg. 192.168.1.32
- **group_X_name** (*Required*): Name of the group. Multiple entries with a consecutive number.

View File

@ -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
```

View File

@ -14,9 +14,14 @@ Google Cast devices will be automatically discovered if you enable [the discover
Chromecast platform can also be forced to load by adding the following lines to your `configuration.yaml`:
```
```yaml
# Example configuration.yaml entry
media_player:
platform: chromecast
# Optional. Will scan for devices if left out
host: 192.168.1.9
```
Configuration variables:
- **host** *Optional*: Use only if you don't want to scan for devices.

View File

@ -0,0 +1,38 @@
---
layout: page
title: "Denon Network Receivers support"
description: "Instructions how to integrate Denon Network Receivers into Home Assistant."
date: 2015-09-08 09:00
sidebar: false
comments: false
sharing: true
footer: true
---
<img src='/images/supported_brands/denon.png' class='brand pull-right' />
The denon platform allows you to control a [Denon Network Receivers](http://www.denon.co.uk/chg/product/compactsystems/networkmusicsystems/ceolpiccolo) from Home Assistant.
Supported devices:
- Denon DRA-N5
- Denon RCD-N8 (untested)
To add a Denon Network Receiver to your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
media_player:
platform: denon
host: IP_ADDRESS
name: Music station
```
Configuration variables:
- **host** (*Required*): IP address of the device. Example: 192.168.1.32
- **name** (*Optional*): Name of the device
A few notes:
- As long as this module is active and connected, the receiver does not seem to accept additional telnet connections.
- Be careful with the volume. 50 % or even 100 % are very loud.
- To be able to wake up the receiver, activate the "remote" setting in the receiver's settings.

View File

@ -0,0 +1,35 @@
---
layout: page
title: "iTunes support"
description: "Instructions how to integrate iTunes into Home Assistant."
date: 2015-06-22 11:00
sidebar: false
comments: false
sharing: true
footer: true
---
<img src='/images/supported_brands/itunes.png' class='brand pull-right' />
The iTunes platform allows you to control [iTunes](http://apple.com/itunes/) from Home Assistant.
It uses a 3rd party server that you run on your Mac called
[itunes-api](https://github.com/maddox/itunes-api). Play, pause, or skip songs remotely on iTunes
running on your Mac.
Your AirPlay speakers will also be exposed as simple media players inside Home
Assistant. They will be available to be turned on or off or set their volume.
To add iTunes to your installation, add the following to your `configuration.yaml` file:
```
# Example configuration.yaml entry
media_player:
platform: itunes
name: iTunes
host: http://192.168.1.50
port: 8181
```
Configuration variables:
- **host** *Required*: The URL of the itunes-api API, eg. http://192.168.1.50
- **port** *Optional*: The PORT that itunes-api is running on.

View File

@ -18,9 +18,15 @@ To add Kodi to your installation, add the following to your `configuration.yaml`
# Example configuration.yaml entry
media_player:
platform: kodi
name: Kodi
url: http://192.168.0.123/jsonrpc
user: kodi
password: my_secure_password
name: Kodi
user: USERNAME
password: PASSWORD
```
Configuration variables:
- **url** *Required*: The URL of the XBMC/Kodi JSON-RPC API, eg. http://192.168.0.123/jsonrpc
- **name** *Optional*: The name of the device used in the frontend.
- **username** *Optional*: The XBMC/Kodi HTTP username.
- **password** *Optional*: The XBMC/Kodi HTTP password.

View File

@ -14,8 +14,10 @@ Interacts with media players on your network.
Currently supported devices:
- [Chromecasts](/components/media_player.cast.html)
- [Music Player Daemon](/components/media_player.mpd.html)
- [Denon Network Receivers](/components/media_player.denon.html)
- [Kodi](/components/media_player.kodi.html)
- [Music Player Daemon](/components/media_player.mpd.html)
- [Squeezebox](/components/media_player.squeezebox.html)
## Services

View File

@ -18,8 +18,15 @@ To add MPD to your installation, add the following to your `configuration.yaml`
# Example configuration.yaml entry
media_player:
platform: mpd
server: 127.0.0.1
server: IP_ADDRESS
port: 6600
location: bedroom
password: PASSWORD
```
Configuration variables:
- **server** *Required*: IP address of the Music Player Daemon. Example: 192.168.1.32
- **port** *Optional*: Port of the Music Player Daemon, defaults to 6600. Example: 6600
- **location** *Optional*: Location of your Music Player Daemon.
- **password** *Optional*: Password for your Music Player Daemon.

View File

@ -0,0 +1,22 @@
---
layout: page
title: "Sonos support"
description: "Instructions how to integrateSonos devices into Home Assistant."
date: 2015-09-12 13:00
sidebar: false
comments: false
sharing: true
footer: true
---
<img src='/images/supported_brands/sonos.png' class='brand pull-right' />
The sonos platform allows you to control your [Sonos](http://www.sonos.com) HiFi wireless speakers and audio components from Home Assistant.
To add your Sonos components to your installation, add the following to your `configuration.yaml` file. It will perform auto-discovery of your connected speakers.
```yaml
# Example configuration.yaml entry
media_player:
platform: sonos
```

View File

@ -20,7 +20,13 @@ media_player:
platform: squeezebox
host: 192.168.1.21
port: 9090
username: user
password: password
username: USERNAME
password: PASSWORD
```
Configuration variables:
- **host** *Required*: The host name or address of the Logitech Media Server.
- **port** *Optional*: Telnet port to Logitech Media Server, default 9090.
- **username** *Optional*: The username, if password protection is enabled.
- **password** *Optional*: The password, if password protection is enabled.

View File

@ -19,14 +19,22 @@ To integrate MQTT into Home Assistant, add the following section to your `config
# Example configuration.yaml entry
mqtt:
broker: IP_ADDRESS_BROKER
# All the other options are optional:
port: 1883
client_id: home-assistant-1
keepalive: 60
qos: 0
username: your_username
password: your_secret_password
username: USERNAME
password: PASSWORD
```
Configuration variables:
- **broker** (*Required*): The IP address of your MQTT broker, e.g. 192.168.1.32.
- **port** (*Optional*): The network port to connect to. Default is 1883.
- **client_id** (*Optional*): Client ID that Home Assistant will use. Has to be unique on the server. Default is a random generated one.
- **keepalive** (*Optional*): The keep alive in seconds for this client. Default is 60.
- **username** (*Optional*): The username to use with your MQTT broker.
- **password** (*Optional*): The corresponding password for the username to use with your MQTT broker.
<p class='note'>
The MQTT component has no TLS support at the moment. This means that only plain-text communication is possible.
</p>
@ -35,7 +43,8 @@ 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-automation rule](/components/automation.html#mqtt-based-automation).
- [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.
## Testing

View File

@ -1,6 +1,6 @@
---
layout: page
title: "Notifications"
title: "PushBullet notification support"
description: "Instructions how to add user notifications to Home Assistant."
date: 2015-01-20 22:36
sidebar: false

View File

@ -21,4 +21,15 @@ scene:
state: on
color: [0.33, 0.66]
brightness: 200
- name: all_lights_on
entities:
group.all_lights:
state: on
- name: all_lights_off
entities:
group.all_lights:
state: off
```

View File

@ -1,53 +0,0 @@
---
layout: page
title: "Scheduler"
description: "Instructions how to setup the scheduler within Home Assistant."
date: 2015-03-23 19:59
sidebar: false
comments: false
sharing: true
footer: true
---
A component that will act as a scheduler and performe actions based
on the events in the schedule.
It will read a json object from `schedule.json` in the config dir and create a schedule based on it.
Each schedule is a JSON with the keys `id`, `name`, `description`, `entity_ids`, `events`.
- days is an array with the weekday number (monday=0) that the schdule
is active
- entity_ids an array with entity ids that the events in the schedule should
effect (can also be groups)
- events is an array of objects that describe the different events that is
supported. Read in the events descriptions for more information
Example `schedule.json`
```json
[
{
"id": "window_lamps",
"name": "Window lamps",
"description": "Turn on window lamps on sunset and turn off at 22:30",
"days": [0, 1, 2, 3, 4],
"entity_ids": [
"group.window_lamps"
],
"events": [
{
"type": "time",
"service": "switch.turn_off",
"time": "22:30:00"
},
{
"type": "sun",
"service": "switch.turn_on",
"event": "sunset",
"offset": "-00:45:00"
}
]
}
]
```

View File

@ -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:

View File

@ -0,0 +1,37 @@
---
layout: page
title: "Arduino sensor support"
description: "Instructions how to integrate Arduino boards within Home Assistant."
date: 2015-09-14 18:28
sidebar: false
comments: false
sharing: true
footer: true
---
<img src='/images/supported_brands/arduino.png' class='brand pull-right' />
The arduino sensor platform allows allow you to get an numerical values from an analog input pin of an [Arduino](https://www.arduino.cc/) board. Usually the value is between 0 and 1024.
To enable an Arduino sensor with Home Assistant, add the following section to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
sensor:
platform: arduino
pins:
1:
name: Door switch
type: analog
0:
name: Brightness
type: analog
```
Configuration variables:
- **pins** (*Required*): Array of pins to use. The number corresponds with the pin numbering schema of your board.
- **name**: Name that will be used in the frontend for the pin.
- **type**: The type of the pin. At the moment only 'analog' is supported.
The 6 analog pins of an Arduino UNO are numbered from A0 to A5.

View File

@ -0,0 +1,119 @@
---
layout: page
title: "aREST support"
description: "Instructions how to integrate aREST sensors within Home Assistant."
date: 2015-09-07 18:15
sidebar: false
comments: false
sharing: true
footer: true
---
<img src='/images/supported_brands/arest.png' class='brand pull-right' />
The arest sensor platform allows you to get all data from your devices (like Arduinos with a ethernet/wifi connection, the ESP8266, and the Raspberry Pi) running the [aREST](http://arest.io/) RESTful framework.
To use your aREST enabled device in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
sensor:
platform: arest
resource: http://IP_ADDRESS
monitored_variables:
- name: temperature
unit: '°C'
- name: humidity
unit: '%'
```
Configuration variables:
- **resource** (*Required*): IP address and schema of the device that is exposing an aREST API, e.g. http://192.168.1.10.
- **monitored_variables** array:
- **name** (*Required*): The name of the variable you wish to monitor.
- **unit** (*Optional*): Defines the units of measurement of the sensor, if any.
The variables in the `monitored_variables` array must be available in the response of the device. As a starting point you find below a sketch for the Arduino device family. There are two variables (`temperature` and `humidity`) which will act as endpoints.
```c
/*
This modified sketch is based on the Ethernet example of the aREST
(http://arest.io/) library.
*/
// Libraries
#include <SPI.h>
#include <Ethernet.h>
#include <aREST.h>
#include <avr/wdt.h>
// Device settings
char* deviceId = "sensor02";
char* deviceName = "livingroom";
byte deviceMac[] = { 0x20, 0xD5, 0xD3, 0x03, 0xFE, 0x31 };
IPAddress deviceIp(192, 168, 1, 12);
EthernetServer server(80);
aREST rest = aREST();
// Variables to be exposed to the API
int temperature;
int humidity;
void setup(void) {
Serial.begin(57600);
// Init variables and expose them to REST API
temperature = 0;
humidity = 0;
rest.variable("temperature", &temperature);
rest.variable("humidity", &humidity);
// Give name and ID to device
rest.set_id(deviceId);
rest.set_name(deviceName);
Ethernet.begin(deviceMac, deviceIp);
server.begin();
Serial.print("Sensor is ready...");
// Start watchdog
wdt_enable(WDTO_4S);
}
void loop() {
EthernetClient client = server.available();
rest.handle(client);
wdt_reset();
// Replace this with your actual sensor readings, like
// temperature = (((analogRead(A0) * 5.0) / 1024) - 0.5) * 10;
temperature = random(400);
humidity = random(600);
delay(500);
}
```
Accessing one of the endpoints (eg. http://192.168.1.10/temperature) will give you the value inside a JSON response.
```json
{"temperature": 23, "id": "sensor01", "name": "livingroom", "connected": true}
```
The root will give you a JSON response that contains all variables and their current values along with some device details.
```json
{
"variables" : {
"temperature" : 23,
"humidity" : 82
},
"id" : "sensor01",
"name" : "livingroom",
"connected" : true
}
```

View File

@ -14,6 +14,8 @@ The bitcoin platform displays various details about the [Bitcoin](https://bitcoi
If you have an online wallet from [Blockchain.info](https://blockchain.info/) the sensor is capable to show your current balance.
You need to enable the API access for your online wallet to get the balance. To do that log in and move to 'Account Setting', choose 'IP Restrictions', and check 'Enable Api Access'. You will get an email message from blockchain.info where you must authorize the API access.
To add the Bitcoin sensor to your installation, add a selection of the available display options to your `configuration.yaml` file:
```yaml
@ -47,4 +49,31 @@ sensor:
- market_price_usd
```
Configuration variables:
- **wallet** (*Optional*): This is your wallet identifier from https://blockchain.info to access the online wallet.
- **password** (*Optional*): Password for your online wallet.
- **currency** (*Optional*): The currency to exchange to, eg. CHF, USD, EUR, etc. Default is USD.
- **display_options** array (*Required*): Options to display in the frontend.
- **exchangerate**: Exchange rate of 1 BTC
- **trade_volume_btc**: Trade volume
- **miners_revenue_usd**: Miners revenue
- **btc_mined**: BTC mined
- **trade_volume_usd**: Trade volume in USD
- **difficulty**: Difficulty
- **minutes_between_blocks**: Time between blocks in minutes
- **number_of_transactions**: Number of transactions
- **hash_rate**: Hash rate in PH/s
- **timestamp**: Timestamp
- **mined_blocks**: Minded Blocks
- **blocks_size**: Block size
- **total_fees_btc**: Total fees in BTC
- **total_btc_sent**: Total sent in BTC
- **estimated_btc_sent**: Estimated sent in BTC
- **total_btc**: Total of BTC
- **total_blocks**: Total Blocks
- **next_retarget**: Next retarget
- **estimated_transaction_volume_usd**: Estimated transaction volume in BTC
- **miners_revenue_btc**: Miners revenue in BTC
- **market_price_usd**: Market price in USD

View File

@ -0,0 +1,103 @@
---
layout: page
title: "Command line sensors support"
description: "Instructions how to integrate commandline sensors into Home Assistant."
date: 2015-09-13 10:10
sidebar: false
comments: false
sharing: true
footer: true
---
<img src='/images/supported_brands/utilities-terminal.png' class='brand pull-right' />
A sensor platform that issues specific commands git get data. This might very well become our most platform as it allows anyone to integrate any type of switch into Home Assistant that can be controlled from the command line, including calling other scripts!
To enable it, add the following lines to your `configuration.yaml`:
```yaml
# Example configuration.yaml entry
sensor:
platform: command_sensor
command: SENSOR_COMMAND
name: "Command sensor"
unit_of_measurement: "°C"
correction_factor: 0.4921
```
Configuration variables:
- **command** (*Required*): The action to take to get the value.
- **name** (*Optional*): Name of the command sensor.
- **unit_of_measurement** (*Optional*): Defines the units of measurement of the sensor, if any.
- **correction_factor** (*Optional*): A float value to do some basic calculations.
## {% linkable_title Examples %}
In this section you find some real life examples of how to use this sensor.
### {% linkable_title Hard drive temperature %}
There are several days to get the temperature of your hard drive. A simple solution is to use [hddtemp](https://savannah.nongnu.org/projects/hddtemp/).
```bash
hddtemp -n /dev/sda
```
To use those information, the entry for a sensor in the `configuration.yaml` file will look like this.
```yaml
# Example configuration.yaml entry
sensor:
platform: command_sensor
name: HD Temperature
command: "hddtemp -n /dev/sda"
unit_of_measurement: "°C"
```
### {% linkable_title CPU temperature %}
Thanks to the [`proc`](https://en.wikipedia.org/wiki/Procfs) file system various details about a system can be retrieved. Here the CPU temperature
is of interest. Add something similar to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
- platform: command_sensor
name: CPU Temperature
command: "cat /sys/class/thermal/thermal_zone0/temp"
unit_of_measurement: "°C"
correction_factor: 0.001
```
The `correction_factor` will make sure that the value is shown in a useful format in the frontend.
### {% linkable_title Use an external script %}
The example is doing the same as the [aREST sensor](/components/sensor.arest.html) but with an external Python script. It should give you an idea about interacting with devices which are exposing a REST API.
The one-line script to retrieve a value is shown below. Of course would it be possible to use this directly in the `configuration.yaml` file but need extra care about the quotation marks.
```python
python3 -c "import requests; print(requests.get('http://10.0.0.48/analog/2').json()['return_value'])"
```
The script (saved as `arest-value.py`) that is used looks like the example below.
```python
#!/usr/bin/python3
#
from requests import get
response = get('http://10.0.0.48/analog/2')
print(response.json()['return_value'])
```
To use the script you need to add something like the following to your `configuration.yaml` file.
```yaml
# Example configuration.yaml entry
sensor:
platform: command_sensor
name: Brightness
command: "python3 /path/to/script/arest-value.py"
unit_of_measurement: "°C"
```

View File

@ -9,6 +9,7 @@ sharing: true
footer: true
---
<img src='/images/supported_brands/dht.png' class='brand pull-right' />
The dht sensor platform allows you to get the current temperature and humidity from a DHT11, DHT22, or AM2302 device.
To use your DHTxx sensor in your installation, add the following to your `configuration.yaml` file:
@ -24,6 +25,16 @@ sensor:
- humidity
```
Configuration variables:
- **sensor** (*Required*): The sensor type, supported devices are DHT11, DHT22, and AM2302
- **pin** (*Required*): The pin the sensor is connected to.
- **monitored_conditions** array: Conditions to monitor.
- **temperature**:
- **humidity**:
Available conditions are only *temperature* and *humidity*.
The name of the pin to which the sensor is connected has different names on different platforms. 'P8_11' for Beaglebone, '23' for Raspberry Pi.
<p class='note warning'>

View File

@ -25,3 +25,14 @@ sensor:
period: day
currency: $
```
Configuration variables:
- **app_token** (*Required*): The App Token for your account.
- **utc_offset** (*Required*): Some variables (currently only the daily_cost) require that the
negative number of minutes your timezone is ahead/behind UTC time.
- **monitored_variables** array (*Required*): Variables to monitor.
- **type** (*Required*): Name of the variable.
- **period** (*Optional*): Some variables take a period argument. Valid options are "day", "week", "month", and "year".
- **currency** (*Optional*): This is used to display the cost/period as the unit when monitoring the cost. It should correspond to the actual currency used in your dashboard.

View File

@ -12,7 +12,7 @@ footer: true
<img src='/images/supported_brands/weather-few-clouds.png' class='brand pull-right' />
The forecast platform uses the [Forecast.io](https://forecast.io/) web service as a source for meteorological data for your location.
You need an API key which is free but requires a [registration](https://developer.forecast.io/register).
You need an API key which is free but requires a [registration](https://developer.forecast.io/register). You can make 1000 requests per day. This means that you could create approximately every 1.4 minute one.
To add Forecast.io to your installation, add the following to your `configuration.yaml` file:
@ -35,4 +35,22 @@ sensor:
- visibility
- ozone
```
Details about the API are available in the (Forecast.io documentation)[https://developer.forecast.io/docs/v2].
Configuration variables:
- **api_key** (*Required*): Your API key for http://forecast.io/.
- **display_conditions** array (*Required*): Conditions to display in the frontend.
- **summary**: A human-readable text summary.
- **precip_type**: The type of precipitation occurring.
- **precip_intensity**: The average expected intensity of precipitation occurring.
- **temperature**: The current temperature.
- **dew_point**: The dew point.
- **wind_speed**: The wind speed.
- **wind_bearing**: Where the wind is coming from in degrees, with true north at 0° and progressing clockwise.
- **cloud_cover**: The percentage of sky occluded by clouds.
- **humidity**: The relative humidity.
- **pressure**: The sea-level air pressure in millibars.
- **visibility**: The average visibility.
- **ozone**: The columnar density of total atmospheric ozone in Dobson.
Details about the API are available in the [Forecast.io documentation](https://developer.forecast.io/docs/v2).

View File

@ -0,0 +1,68 @@
---
layout: page
title: "Glances sensor support"
description: "Instructions how to integrate Glances sensors into Home Assistant."
date: 2015-09-14 19:10
sidebar: false
comments: false
sharing: true
footer: true
---
<img src='/images/supported_brands/glances.png' class='brand pull-right' />
The glances sensor platform is consuming the system information provided by the [Glances](https://github.com/nicolargo/glances) API. This enables one to track remote host and display their stats in Home Assistant.
This sensors needs a running isntance of `glances` on the host:
```bash
glances -w
Glances web server started on http://0.0.0.0:61208/
```
To enable the glances sensor, add the following lines to your `configuration.yaml`:
```yaml
# Example configuration.yaml entry
sensor:
platform: glances
name: Glances sensor
host: IP_ADDRESS
port: 61208
resources:
- 'disk_use_percent'
- 'disk_use'
- 'disk_free'
- 'memory_use_percent'
- 'memory_use'
- 'memory_free'
- 'swap_use_percent'
- 'swap_use'
- 'swap_free'
- 'processor_load'
- 'process_running'
- 'process_total'
- 'process_thread'
- 'process_sleeping'
```
Configuration variables:
- **host** (*Required*): The IP address of your host, eg. 192.168.1.32.
- **port** (*Option*): The network port to connect to. Default is 61208.
- **name** (*Optional*): Name of the Glances sensor.
- **resources** (*Required*): Entries to monitor.
- **'disk_use_percent'**: Used disk space in percent
- **'disk_use'**: Used disk space
- **'disk_free'**: Free disk space
- **'memory_use_percent'**: Used memory in percent
- **'memory_use'**: Used memory
- **'memory_free'**: Free memory
- **'swap_use_percent'**: Used swap space in percent
- **'swap_use'**: Used swap space
- **'swap_free'**: Free swap space
- **'processor_load'**: Load
- **'process_running'**: Number of running processes
- **'process_total'**: Total number of processes
- **'process_thread'**: Number of threads
- **'process_sleeping'**: Number of sleeping processes

View File

@ -19,13 +19,15 @@ last known value. Otherwise, the initial state will be undefined.
# Example configuration.yml entry
sensor:
platform: mqtt
name: "MQTT Sensor"
state_topic: "home/bedroom/temperature"
unit_of_measurement: "ºC"
name: "MQTT Sensor"
qos: 0
unit_of_measurement: "°C"
```
state_topic: The MQTT topic subscribed to receive sensor values. *Required*
Configuration variables:
name: The name of the sensor. Default is 'MQTT Sensor'. *Optional*
unit_of_measurement: Defines the units of measurement of the sensor, if any. *Optional*
- **state_topic** (*Required*): The MQTT topic subscribed to receive sensor values.
- **name** (*Optional*): The name of the sensor. Default is 'MQTT Sensor'.
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0.
- **unit_of_measurement** (*Optional*): Defines the units of measurement of the sensor, if any.

View File

@ -10,7 +10,9 @@ footer: true
---
<img src='/images/supported_brands/mysensors.png' class='brand pull-right' />
Integrate your [MySensors sensors](https://www.mysensors.org) by adding the following to your `configuration.yaml`:
The [MySensors](https://www.mysensors.org) project combines Arduino boards with NRF24L01 radio boards to build sensor networks.
Integrate your Serial MYSensors Gateway by adding the following to your `configuration.yaml`:
```yaml
# Example configuration.yaml entry
@ -18,3 +20,11 @@ sensor:
platform: mysensors
port: /dev/ttyACM0
```
Configuration variables:
- **port** (*Required*): The port where your board is connected to your Home Assistant host. If you are using an original Arduino the port will be named `ttyACM*`. The exact number can be determined with `ls /dev/ttyACM*`.
```bash
ls /dev/ttyACM*
```

View File

@ -33,5 +33,19 @@ sensor:
- snow
```
Configuration variables:
- **api_key** (*Required*): Your API key for http://openweathermap.org/.
- **forecast** (*Optional*): Enables the forecast. The default is to display the current conditions.
- **display_conditions** array (*Required*): Conditions to display in the frontend.
- **weather**: A human-readable text summary.
- **temperature**: The current temperature.
- **wind_speed**: The wind speed.
- **humidity**: The relative humidity.
- **pressure**: The sea-level air pressure in millibars.
- **clouds**: Description about cloud coverage.
- **rain**: The rain volume.
- **snow**: The snow volume
Details about the API are available in the [OpenWeatherMap documentation](http://bugs.openweathermap.org/projects/api/wiki).

View File

@ -15,9 +15,14 @@ To enable the RFXtrx sensors in your installation, add the following to your `co
```yaml
# Example configuration.yaml entry
sensor:
- platform: rfxtrx
device: PATH_TO_DEVICE
platform: rfxtrx
device: PATH_TO_DEVICE
```
The path to your device, e.g. `/dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1Y0NJGR-if00-port0`
Configuration variables:
- **device** (*Required*): The path to your device, e.g. `/dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1Y0NJGR-if00-port0`

View File

@ -24,7 +24,11 @@ sensor:
platform: swiss_public_transport
from: STATION_ID
to: STATION_ID
```
Configuration variables:
- **from** (*Required*): The ID of the station of the start station.
- **to** (*Required*): The ID of the station of the end station.
The public timetables are coming from [Swiss public transport](http://transport.opendata.ch).

View File

@ -25,6 +25,13 @@ sensor:
- type: processor_use
```
Configuration variables:
- **resources** array (*Required*): Contains all entries to display.
- **type** (*Required*): The type of the information to display, please check the table below for details.
- **arg** (*Optional*): Argument to use, please check the table below for details.
The table contains types and their argument to use in your `configuration.yaml` file.
| Type (- type:) | Argument (arg:) |

View File

@ -16,21 +16,34 @@ The [Transmission](http://www.transmissionbt.com/) platform allows you to monito
# Example configuration.yaml entry
sensor:
platform: transmission
name: Transmission
host: 192.168.1.26
port: 9091
name: Transmission
username: YOUR_USERNAME
password: YOUR_PASSWORD
monitored_variables:
- type: 'current_status'
- type: 'download_speed'
- type: 'upload_speed'
- 'current_status'
- 'download_speed'
- 'upload_speed'
```
Configuration variables:
- **host** (*Required*): This is the IP address of your Transmission daemon, e.g. 192.168.1.32.
- **port** (*Optional*): The port your Transmission daemon uses, defaults to 9091.
- **name** (*Optional*): The name to use when displaying this Transmission instance.
- **username** (*Optional*): Your Transmission username, if you use authentication.
- **password** (*Optional*): Your Transmission password, if you use authentication.
- **display_variables** array: Conditions to display in the frontend.
- **current_status**: The status of your Transmission daemon.
- **download_speed**: The current download speed.
- **upload_speed**: The current upload speed.
To use the monitoring, your transmission client needs to allow remote access. If you are running the graphical transmission client (transmission-gtk) go to **Edit** -> **Perferences** and choose the tab **Remote**. Check **Allow remote access**, enter your username and your password, and uncheck the network restriction as needed.
<p class='img'>
<img src='{{site_root}}/images/screenshots/transmission-perf.png' />
<img src='{{site_root}}/images/screenshots/transmission_perf.png' />
</p>
If everthing is setup correctly, the details will show up in the frontend.

View File

@ -0,0 +1,37 @@
---
layout: page
title: "Arduino switch support"
description: "Instructions how to integrate Arduino boards within Home Assistant."
date: 2015-09-14 18:28
sidebar: false
comments: false
sharing: true
footer: true
---
<img src='/images/supported_brands/arduino.png' class='brand pull-right' />
The arduino switch platform allows you to control the digital pins of your [Arduino](https://www.arduino.cc/) board. Support for switching pins is limited to high/on and low/off of the digital pins. PWM (pin 3,5,6,9,10, and 11 on an Arduino Uno) is not supported yet.
To enable the Arduino pins with Home Assistant, add the following section to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
switch:
platform: arduino
pins:
11:
name: Fan Office
type: digital
12:
name: Light Desk
type: digital
```
Configuration variables:
- **pins** (*Required*): Array of pins to use. The number corresponds with the pin numbering schema of your board.
- **name**: Name that will be used in the frontend for the pin.
- **type**: The type of the pin. At the moment only 'digital' is supported.
The digital pins are numbered from 0 to 13. The available pins are 2 till 13. For testing purposes you can use pin 13 because with that pin you can control the internal LED.

View File

@ -0,0 +1,40 @@
---
layout: page
title: "aREST switch support"
description: "Instructions how to integrate aREST switches within Home Assistant."
date: 2015-09-11 23:15
sidebar: false
comments: false
sharing: true
footer: true
---
<img src='/images/supported_brands/arest.png' class='brand pull-right' />
The arest switch platform allows you to toggle pins of your devices (like Arduino boards with a ethernet/wifi connection, the ESP8266, and the Raspberry Pi) running the [aREST](http://arest.io/) RESTful framework.
To use your aREST enabled device in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
switch:
platform: arest
resource: http://IP_ADDRESS
pins:
11:
name: Fan Office
12:
name: Light Desk
```
Configuration variables:
- **resource** (*Required*): IP address and schema of the device that is exposing an aREST API, e.g. http://192.168.1.10.
- **pins** (*Required*): An array with all used pins of your board.
- **name** (*Required*): The name of the pin you wish to toggle.
Accessing one of the endpoints (eg. http://192.168.1.10/analog/2/) will give you a JSON response. The interesting part is `return_value` which represents the sensor's data.
```json
{"return_value": 34, "id": "sensor02", "name": "livingroom", "connected": true}
```

View File

@ -14,7 +14,7 @@ A switch platform that issues specific commands when it is turned on and off. Th
To enable it, add the following lines to your `configuration.yaml`:
```
```yaml
# Example configuration.yaml entry
switch:
platform: command_switch
@ -23,3 +23,24 @@ switch:
oncmd: switch_command on kitchen
offcmd: switch_command off kitchen
```
Configuration variables:
- **switches** (*Required*): The array that contains all command switches.
- **entry** (*Required*): Name of the command switch. Multiple entries are possible.
- **oncmd** (*Required*): The action to take for on.
- **offcmd** (*Required*): The action to take for off.
The example below is doing the same as the [aREST switch](/components/switch.arest.html). The commandline tool `[curl](http://curl.haxx.se/)` is used to toogle a pin which is controllable through REST.
```yaml
# Example configuration.yaml entry
switch:
platform: command_switch
switches:
arest_pin4:
oncmd: "/usr/bin/curl -X GET http://192.168.1.10/digital/4/1"
offcmd: "/usr/bin/curl -X GET http://192.168.1.10/digital/4/0"
```

View File

@ -23,3 +23,11 @@ switch:
password: YOUR_PASSWORD
name: Edimax Smart Plug
```
Configuration variables:
- **host** (*Required*): The IP address of your Edimax switch, eg. 192.168.1.32
- **username** (*Required*): Your username for the Edimax switch.
- **password** (*Required*): Your password for the Edimax switch.
- **name** (*Optional*): The name to use when displaying this switch.

View File

@ -18,8 +18,15 @@ To use your Hikvision cam in your installation, add the following to your `confi
# Example configuration.yaml entry
switch:
platform: hikvisioncam
host: 192.168.1.32
name: Hikvision Cam 1 Motion Detection
host: 192.168.1.26
username: YOUR_USERNAME
password: YOUR_PASSWORD
username: USERNAME
password: PASSWORD
```
Configuration variables:
- **host** *Required*: The IP address of your Hikvision camera, eg. 192.168.1.32
- **name** *Optional*: This parameter allows you to override the name of your camera.
- **username** *Required*: The username for accessing your Hikvision camera.
- **password** *Required*: The password to access your Hikvision camera.

View File

@ -25,25 +25,28 @@ Optimistic mode can be forced, even if state topic is available.
Try to enable it, if experiencing incorrect switch operation.
```yaml
# Example configuration.yml entr
# Example configuration.yml entry
switch:
platform: mqtt
name: "Bedroom Switch"
state_topic: "home/bedroom/switch1"
command_topic: "home/bedroom/switch1/set"
qos: 0
payload_on: "ON"
payload_off: "OFF"
optimistic: false
```
command_topic: The MQTT topic to publish commands to change the switch state. *Required*
Configuration variables:
name: The name of the switch. Default is 'MQTT Switch'. *Optional*
- **name** (*Optional*): The name of the switch. Default is 'MQTT Switch'.
- **state_topic** (*Optional*): The MQTT topic subscribed to receive state updates.
- **command_topic** (*Required*): The MQTT topic to publish commands to change the switch state.
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.
- **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON".
- **payload_off** (*Optional*): The payload that represents disabled state. Default is "OFF".
- **optimistic** (*Optional*): Flag that defines if switch works in optimistic mode. Default is true if no state topic defined, else false.
state_topic: The MQTT topic subscribed to receive state updates. *Optional*
payload_on: The payload that represents enabled state. Default is "ON". *Optional*
payload_off: The payload that represents disabled state. Default is "OFF". *Optional*
optimistic: Flag that defines if switch works in optimistic mode. Default is true if no state topic defined, else false. *Optional*
<p class='note warning'>
Make sure that your topics match exact. <code>some-topic/</code> and <code>some-topic</code> are different topics.
</p>

View File

@ -18,11 +18,18 @@ To add Transmission to your installation, add the following to your `configurati
# Example configuration.yaml entry
switch:
platform: transmission
name: Transmission
host: 192.168.1.26
port: 9091
username: YOUR_USERNAME
password: YOUR_PASSWORD
name: Transmission
username: USERNAME
password: PASSWORD
```
[Finbarr Brady](https://github.com/fbradyirl) has contributed the transmission switch platform.
Configuration variables:
- **host** (*Required*): This is the IP address of your Transmission daemon, e.g. 192.168.1.32.
- **port** (*Optional*): The port your Transmission daemon uses, defaults to 9091.
- **name** (*Optional*): The name to use when displaying this Transmission instance.
- **username** (*Optional*): Your Transmission username, if you use authentication.
- **password** (*Optional*): Your Transmission password, if you use authentication.

View File

@ -17,5 +17,5 @@ They will be automatically discovered if the discovery component is enabled.
```yaml
# Example configuration.yaml entry
switch:
- platform: wemo
platform: wemo
```

View File

@ -9,11 +9,13 @@ sharing: true
footer: true
---
<img src='/images/supported_brands/telldus_tellstick.png' class='brand pull-right' />
The TellStick Home Assistant integration allows users to add switches and sensors.
To get started, add the following information to your `configuration.yaml`:
```YAML
```yaml
# Example configuration.yaml entry
switch:
platform: tellstick
@ -32,3 +34,5 @@ light:
platform: tellstick
```

View File

@ -17,10 +17,15 @@ To set it up, add the following information to your `configuration.yaml` file:
```
thermostat:
platform: nest
username: myemail@mydomain.com
password: mypassword
username: USERNAME
password: PASSWORD
```
Configuration variables:
- **username** (*Required*): Your Nest username.
- **password** (*Required*): Your Nest password.
<p class='img'>
<img src='{{site_root}}/images/screenshots/nest-thermostat-card.png' />
</p>

View File

@ -19,15 +19,25 @@ We support:
* Reading from thermometers and hygrometers integrated in various devices
* Reading alarm status
Username and password are required. Other variables are optional and allow you to disable certain devices.
To integrate Verisure with Home Assistant, add the following section to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
verisure:
username: user@example.com
password: password
username: USERNAME
password: PASSWORD
alarm: 1
hygrometers: 0
smartplugs: 1
thermometers: 0
```
Configuration variables:
- **username** (*Required*): The username to Verisure mypages.
- **password** (*Required*): The password to Verisure mypages.
- **alarm** (*Optional*): Set to 1 to show alarm, 0 to disable. Default 1.
- **hygrometers** (*Optional*): Set to 1 to show hygrometers, 0 to disable. Default 1.
- **smartplugs** (*Optional*): Set to 1 to show smartplugs, 0 to disable. Default 1.
- **thermometers** (*Optional*): Set to 1 to show thermometers, 0 to disable. Default 1.

View File

@ -28,6 +28,10 @@ wink:
access_token: YOUR_ACCESS_TOKEN
```
Configuration variables:
- **access_token** (*Required*): The retrieved access token.
This will connect to the Wink hub and automatically set up any lights, switches and sensors that it finds.
<p class='note'>

View File

@ -31,3 +31,11 @@ As an alternative, the Home Assistant docker image has support for Z-Wave built-
zwave:
usb_path: /dev/ttyUSB0
```
Configuration variables:
- **usb_path** (*Required*): The port where your device is connected to your Home Assistant host.
```bash
ls /dev/ttyUSB*
```

File diff suppressed because one or more lines are too long

BIN
source/demo/webcam.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View File

@ -22,6 +22,7 @@ This page contains a list of people who have contributed in one way or another t
- [andythigpen](https://github.com/andythigpen)
- [Austin](https://github.com/trainman419)
- [Azelphur](https://github.com/Azelphur)
- [Carlo Costanzo](https://github.com/CCOSTAN)
- [Chris Mulder](https://github.com/chrisvis)
- [Daniel Iversen](https://github.com/danielhiversen)
- [Edwin Smulders](https://github.com/Dutchy-)
@ -30,24 +31,34 @@ This page contains a list of people who have contributed in one way or another t
- [Finbarr Brady](https://github.com/fbradyirl)
- [Geoff Norton](https://github.com/kangaroo)
- [gottsman](https://github.com/gottsman)
- [Greg Dowling](https://github.com/pavoni)
- [Guillem Barba](https://github.com/gbarba)
- [Gustav Ahlberg](https://github.com/Gyran)
- [Heathbar](https://github.com/heathbar)
- [Issac Kelly](https://github.com/issackelly)
- [James Cole](https://github.com/jamespcole)
- [Jeffrey Tang](https://github.com/Qrtn)
- [Jeff Schroeder](https://github.com/SEJeff)
- [John McLaughlin](https://github.com/loghound)
- [John Williams](https://github.com/Jaidan)
- [Jon Maddox](https://github.com/maddox)
- [Joseph Piron](https://github.com/eagleamon)
- [Julien Danjou](https://github.com/jd)
- [kixam](https://github.com/kixam)
- [MakeMeASandwich](https://github.com/MakeMeASandwich)
- [Markus Stenberg](https://github.com/fingon)
- [Michael Arnauts](https://github.com/michaelarnauts)
- [Michael Gilbert](https://github.com/Zyell)
- [Nolan Gilley](https://github.com/nkgilley)
- [miniconfig](https://github.com/miniconfig)
- [Per Sandström](https://github.com/persandstrom)
- [Piratonym](https://github.com/Piratonym)
- [Rev Michael Greb](https://github.com/mikegrb)
- [rhooper](https://github.com/rhooper)
- [rkabadi](https://github.com/rkabadi)
- [Ryan Kraus](https://github.com/rmkraus)
- [sfam](https://github.com/sfam)
- [Stefan Jonasson](https://github.com/stefan-jonasson)
- [Theodor Lindquist](https://github.com/theolind)
- [vitorespindola](https://github.com/vitorespindola)
- [wind-rider](https://github.com/wind-rider)

View File

@ -28,13 +28,25 @@ http:
development: 1
```
After turning on development mode, you will have to install the web components that the frontend depends on. Firing off a build of the frontend by running `scripts/build_frontend` will ensure all dependencies are installed.
Next step is to get the frontend code. When you clone the Home Assistant repository, the frontend
repository is not cloned by default. You will have to trigger this manually by running from the
command line:
Once this is done, you can start editting the webcomponents in the folder `homeassistant/components/frontend/www_static/home-assistant-polymer/src`. To see the changes you've made, simply refresh your browser.
```bash
git submodule update --init
```
After checking out the frontend code, you will have to install the frontend dependencies. Firing off
a build of the frontend by running `scripts/build_frontend` will ensure they get installed.
Once this is done, you can start editting the webcomponents in the folder
`homeassistant/components/frontend/www_static/home-assistant-polymer/src`. To see the changes you've
made, simply refresh your browser.
## {% linkable_title Enabling JavaScript backend development %}
Polymer is only providing a UI toolkit for Home Assistant. All data management and interaction with the server is done by `home-assistant-js` leveraging NuclearJS. To enable JavaScript development:
Polymer is only providing a UI toolkit for Home Assistant. All data management and interaction with
the server is done by `home-assistant-js` leveraging NuclearJS. To enable JavaScript development:
```bash
cd homeassistant/components/frontend/www_static/home-assistant-polymer/
@ -42,9 +54,13 @@ npm run setup_js_dev
npm run js_dev
```
`npm run js_dev` will start the process that will ensure that your latest changes to the JavaScript files will be loaded when you refresh the page. This command has to be always running while working on home-assistant-js.
`npm run js_dev` will start the process that will ensure that your latest changes to the JavaScript
files will be loaded when you refresh the page. This command has to be always running while working
on home-assistant-js.
After your changes have been accepted into the `home-assistant-js` repository, we'll have to update Home Assistant Polymer to use the latest version. This can be done by updating `package.json`. Look for the line that contains `home-assistant-js` and update the SHA to the SHA of your commit.
After your changes have been accepted into the `home-assistant-js` repository, we'll have to update
Home Assistant Polymer to use the latest version. This can be done by updating `package.json`. Look
for the line that contains `home-assistant-js` and update the SHA to the SHA of your commit.
# {% linkable_title Building the Polymer frontend %}
@ -72,15 +88,16 @@ The main interface of Home Assistant is a list of the current entities and their
Some domains will be filtered out of the main view and are available through separate menu options. Examples are `group`, `script`, `scene`.
The different card types can be found [here](https://github.com/balloob/home-assistant-polymer/tree/master/src/cards).
The different card types can be found [here](https://github.com/balloob/home-assistant-polymer/tree/master/src/state-summary).
Adding a custom card type can be done with a few simple steps. For this example we will add a new state card for the domain `camera`:
Adding a custom card type can be done with a few simple steps. For this example we will add a new
state card for the domain `camera`:
_(All files in this example link to their source-code)_
1. Add `'camera'` to the array `DOMAINS_WITH_CARD` in the file [`/util/state-card-type.js`](https://github.com/balloob/home-assistant-polymer/blob/master/src/util/state-card-type.js#L3-L4).
2. Create the files `state-card-camera.html` and `state-card-camera.js` in the folder [`/cards/`](https://github.com/balloob/home-assistant-polymer/tree/master/src/cards).
3. Add `require('./state-card-camera')` to [`state-card-content.js`](https://github.com/balloob/home-assistant-polymer/blob/master/src/cards/state-card-content.js).
4. Add `<link rel="import" href="state-card-camera.html">` to [`state-card-content.html`](https://github.com/balloob/home-assistant-polymer/blob/master/src/cards/state-card-content.html).
2. Create the files `state-card-camera.html` and `state-card-camera.js` in the folder [`/state-summary/`](https://github.com/balloob/home-assistant-polymer/tree/master/src/state-summary).
3. Add `require('./state-card-camera')` to [`state-card-content.js`](https://github.com/balloob/home-assistant-polymer/blob/master/src/state-summary/state-card-content.js).
4. Add `<link rel="import" href="state-card-camera.html">` to [`state-card-content.html`](https://github.com/balloob/home-assistant-polymer/blob/master/src/state-summary/state-card-content.html).
# {% linkable_title More info screens for custom types %}

View File

@ -15,9 +15,9 @@ components. It uses [Python 3](https://www.python.org/) for the backend and
Home Assistant is open-source and MIT licensed. The source can be found here:
- [home-assistant](https://github.com/home-assistant) - Python server-backend
- [home-assistant-js](https://github.com/home-assistant-js) - javascript-backend powering the client
- [home-assistant-polymer](https://github.com/home-assistant-polymer) - Polymer UI
- [home-assistant](https://github.com/balloob/home-assistant) - Python server-backend
- [home-assistant-js](https://github.com/balloob/home-assistant-js) - javascript-backend powering the client
- [home-assistant-polymer](https://github.com/balloob/home-assistant-polymer) - Polymer UI
### {% linkable_title Starting development %}
@ -64,4 +64,5 @@ requests.
Adding support for a new platform
</a></li>
<li><a href="{{ root_url }}/developers/api.html">Rest API</a></li>
</ul>
<li><a href="{{ root_url }}/developers/website.html">Website </a></li>
</ul>

View File

@ -11,21 +11,127 @@ footer: true
In the package [`homeassistant.remote`](https://github.com/balloob/home-assistant/blob/master/homeassistant/remote.py) a Python API on top of the [HTTP API](/developers/api.html) can be found.
The two snippets below shows how to use the `homeassistant.remote` package:
This page is not a full documentation it's more a collection of some example. A simple way to get all current entities is to visit the "Set State" page in the "Developer Tools". For the examples below just choose one from the available entries. Here the sensor `sensor.office_temperature` and the switch `switch.livingroom_pin_2` are used.
First import the module and setup the basics.
```python
import homeassistant.remote as remote
api = remote.API("host", "password")
living_room = remote.get_state(api, 'group.living_room')
api = remote.API('host', 'password')
print(remote.validate_api(api))
```
This snippets shows how to use the `homeassistant.remote` package in another way.
```python
import homeassistant.remote as remote
api = remote.API("host", "password")
api = remote.API('host', 'password')
hass = remote.HomeAssistant(api)
hass.start()
living_room = hass.states.get('group.living_room')
```
### {% linkable_title Get details about servies and events %}
Similar to the output in the "Developer Tools" of the frontend
```python
import homeassistant.remote as remote
api = remote.API('host', 'password')
print('-- Available services:')
services = remote.get_services(api)
for service in services:
print(service['services'])
print('\n-- Available event')
events = remote.get_event_listeners(api)
for event in events:
print(event)
```
### {% linkable_title Get the state of an entity %}
To get the details of a single entity the `get_state` method is used.
```python
import homeassistant.remote as remote
api = remote.API('host', 'password')
office_temperature = remote.get_state(api, 'sensor.office_temperature')
print('{} is {} {}.'.format(office_temperature.attributes['friendly_name'],
office_temperature.state,
office_temperature.attributes['unit_of_measurement']
)
)
```
The output is composed out of the details which are stored for this entity.
```bash
Office Temperature is 19 °C.
```
The exact same thing is working for a switch. The difference is that both entities have different attributes.
```python
import homeassistant.remote as remote
api = remote.API('host', 'password')
switch_livingroom = remote.get_state(api, 'switch.livingroom_pin_2')
print('{} is {}.'.format(switch_livingroom.attributes['friendly_name'],
switch_livingroom.state
)
)
```
### {% linkable_title Set the state of an entity %}
Of course, it's possible to set the state.
```python
import homeassistant.remote as remote
from homeassistant.const import STATE_ON
remote.set_state(api, 'sensor.office_temperature', new_state=123)
remote.set_state(api, 'switch.livingroom_pin_2', new_state=STATE_ON)
```
The state will be set to those value until the next update occurs.
### {% linkable_title Blinking all entites of a domain %}
If you want to turn on all entities of a domain, just a service which was retrieved by `get_services`.
```python
import time
import homeassistant.remote as remote
domain = 'switch'
remote.call_service(api, domain, 'turn_on')
time.sleep(10)
remote.call_service(api, domain, 'turn_off')
```
### {% linkable_title Control a single entity %}
To turn on or off a single switch, the ID of the entity is needed as attribute.
```python
import time
import homeassistant.remote as remote
domain = 'switch'
switch_name = 'switch.livingroom_pin_2'
remote.call_service(api, domain, 'turn_on', {'entity_id': '{}'.format(switch_name)})
time.sleep(5)
remote.call_service(api, domain, 'turn_off', {'entity_id': '{}'.format(switch_name)})
```
For more details please check the source of [homeassistant.remote](https://github.com/balloob/home-assistant/blob/master/homeassistant/remote.py).

View File

@ -11,7 +11,7 @@ footer: true
Home Assistant runs a web server accessible on port 8123.
* http://127.0.0.1:8123/ is an interface to control Home Assistant.
* http://localhost:8123/ is an interface to control Home Assistant.
* http://localhost:8123/api/ is a Rest API.
The API accepts and returns only JSON encoded objects. All API calls have to be accompanied by the header `X-HA-Access: YOUR_PASSWORD` (YOUR_PASSWORD as specified in your `configuration.yaml` file).
@ -21,7 +21,7 @@ There are multiple ways to consume the Home Assistant Rest API. One is with `cur
```bash
curl -X GET \
-H "x-ha-access: YOUR_PASSWORD" \
http://localhost:8123/api
http://localhost:8123/api/
```
Another option is to use Python and the [Requests](http://docs.python-requests.org/en/latest/) module.

View File

@ -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/).

View File

@ -0,0 +1,171 @@
---
layout: page
title: "Automating Home Assistant"
description: "Steps to help you get automation setup in Home Assistant."
date: 2015-09-19 09:40
sidebar: false
comments: false
sharing: true
footer: true
---
When all your devices are set up it's time to put the cherry on the pie: automation. Home Assistant
offers [a few built-in automations](/components/#automation) but mainly you'll be using
[the automation component](/components/automation.html) to set up your own rules.
### {% linkable_title The basics of automation %}
Every automation rule consists of triggers, an action to be performed and optional conditions.
Triggers can be anything observed in Home Assistant. For example, it can be a certain point in time
or a person coming home, which can be observed by the state changing from `not_home` to `home`.
Actions will call services within Home Assistant. For example, turn a light on, set the temperature
on your thermostat or activate a scene.
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.
### {% linkable_title Exploring the internal state %}
Automation rules are based on the internal state of Home Assistant. This is available for exploring
in the app using the developer tools. The first icon will show you the available services and the
second icon will show you the current devices.
Each device is represented in Home Assistant as an entity consisting of the following parts:
| Name | Description | Example |
| ---- | ----- | ---- |
| Entity ID | Unique identifier for the entity. | `light.kitchen`
| State | The current state of the device. | `home`
| Attributes | Extra data related to the device and/or current state. | `brightness`
A service can be called to have Home Assistant perform an action. Turn on a light, run a script or
enable a scene. Each service has a domain and a name. For example the service `light.turn_on` is
capable of turning on any light device in your system. Services can be passed parameters to for
example tell which device to turn on or what color to use.
## {% linkable_title Creating your first automation rule %}
Before we dive deeper into what every piece of automation _can_ do, let's look at a simple automation
rule: **Turn on the lights when the sun sets**
In this example, we are defining a trigger to track the sunset and tell it to fire when the sun is
setting. When this event is triggered, the service `light.turn_on` is called without any
parameters. Because we specify no parameters, it will turn on all the lights.
```yaml
# Example configuration.yaml entry
automation:
alias: Turn on light when sun sets
trigger:
platform: sun
event: sunset
action:
service: light.turn_on
```
After a few days of running this automation rule you come to realize that this automation rule is not
good enough. It was already dark when the lights went on and the one day you weren't home, the lights
turned on anyway. Time for some tweaking. Let's add an offset to the sunset trigger and a condition
to only turn on the lights if anyone is home.
```yaml
# Example configuration.yaml entry
automation:
alias: Turn on light when sun sets
trigger:
platform: sun
event: sunset
offset: "-01:00:00"
condition:
platform: state
entity_id: group.all_devices
state: home
action:
service: light.turn_on
```
Now you're happy and all is good. You start to like this automation business and buy some more lights,
this time you put them in the bedroom. But what you now realize is that when the sun is setting, the
lights in the bedroom are also being turned on! Time to tweak the automation to only turn on the living
room lights.
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.
So we tweak the config to add the group and have the automation rule only turn on the group.
```yaml
# Example configuration.yaml entry
group:
living_room:
- light.table_lamp
- light.ceiling
automation:
alias: Turn on light when sun sets
trigger:
platform: sun
event: sunset
offset: "-01:00:00"
condition:
platform: state
entity_id: group.all_devices
state: home
action:
service: light.turn_on
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!
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.
```yaml
# Example configuration.yaml entry
group:
living_room:
- light.table_lamp
- light.ceiling
- switch.christmas_lights
automation:
alias: Turn on light when sun sets
trigger:
platform: sun
event: sunset
offset: "-01:00:00"
condition:
platform: state
entity_id: group.all_devices
state: home
action:
service: homeassistant.turn_on
entity_id: group.living_room
```
### {% linkable_title Further reading %}
We went over the basics of creating a home automation rule. From here no longer any hand holding,
go automate!
- Learn about the available [automation triggers](/components/automation.html#triggers)
- Learn about the available [automation conditions](/components/automation.html#conditions)
- Learn about [scripts](/components/script.html) to help you trigger multiple actions and delays
- Learn about [scenes](/components/scene.html) to help you set many entities at once to your liking

View File

@ -0,0 +1,125 @@
---
layout: page
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
sharing: true
footer: true
---
<div class='advanced-installs-container'>
<input name='advanced-installs' type='radio' id='upstart-install' checked>
<input name='advanced-installs' type='radio' id='systemd-install'>
<input name='advanced-installs' type='radio' id='osx-install'>
<label class='menu-selector upstart' for='upstart-install'>Upstart Daemon</label>
<label class='menu-selector systemd' for='systemd-install'>Systemd Daemon</label>
<label class='menu-selector osx' for='osx-install'>OS X</label>
<div class='advanced-installs upstart'>
Many linux distributions use the Upstart system (or similar) for managing daemons. Typically, systems based on Debian 7 or previous use Upstart. This includes Ubuntu releases before 15.04 and all current Raspian releases. If you are unsure if your system is using Upstart, you may check with the following command:
```bash
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/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
sudo service hass-daemon start
sudo service hass-daemon stop
```
When running Home Assistant with this script, the configuration directory will be located at <code>/var/opt/homeassistant</code>. This directory will contain a verbose log rather than simply an error log.
When running daemons, it is good practice to have the daemon run under its own user name rather than the default user's name. Instructions for setting this up are outside the scope of this document.
</div> <!-- UPSTART -->
<div class='advanced-installs systemd'>
Newer linux distributions are trending towards using systemd for managing daemons. Typically, systems based on Fedora or Debian 8 or later use systemd. This includes Ubuntu releases including and after 15.04, CentOS, and Red Hat. If you are unsure if your system is using systemd, you may check with the following command:
```bash
ps -p 1 -o comm=
```
If the preceding command returns the string `systemd`, you are likely using systemd.
If you want Home Assistant to be launched automatically, an extra step is needed to setup systemd. You need a service file to control Home Assistant with systemd.
```bash
su -c 'cat <<EOF >> /lib/systemd/system/home-assistant.service
[Unit]
Description=Home Assistant
After=network.target
[Service]
Type=simple
ExecStart=hass
[Install]
WantedBy=multi-user.target
EOF'
```
You need to reload systemd to make the daemon aware of the new configuration. Enable and launch Home Assistant after that.
```bash
sudo systemctl --system daemon-reload
sudo systemctl enable home-assistant
sudo systemctl start home-assistant
```
If everything went well, <code>sudo systemctl start home-assistant</code> should give you a positive feedback.
```bash
$ sudo systemctl status home-assistant -l
● home-assistant.service - Home Assistant
Loaded: loaded (/usr/lib/systemd/system/home-assistant.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2015-06-25 23:38:37 CEST; 3min 13s ago
Main PID: 8557 (python3.4)
CGroup: /system.slice/home-assistant.service
└─8557 /usr/bin/python3.4 -m homeassistant
[...]
```
To get Home Assistant's logging output, simple use <code>journalctl</code>.
```bash
sudo journalctl -f -u home-assistant
```
</div> <!-- SYSTEMD -->
<div class='advanced-installs osx'>
Setting up Home Assistant to run as a background service is simple. OS X will
start it on boot and make sure it's always running.
To get Home Assistant installed as a background service, run:
```bash
$ hass --install-osx
Home Assistant has been installed. Open it here: http://localhost:8123
```
Home Assistant will log to `~/Library/Logs/homeassistant.log`
To uninstall the service, run:
```bash
$ hass --uninstall-osx
Home Assistant has been uninstalled.
```
</div> <!-- OSX -->
###[&laquo; Back to Getting Started](/getting-started/index.html)

View File

@ -9,13 +9,20 @@ sharing: true
footer: true
---
By default, Home Assistant will create a configuration folder. 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 &raquo;](/getting-started/devices.html)

View File

@ -0,0 +1,62 @@
---
layout: page
title: "Adding devices to Home Assistant"
description: "Steps to help you get your devices in Home Assistant."
date: 2015-09-19 09:40
sidebar: false
comments: false
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.html) enabled (which is by default).
See the [components overview page](/components/) to find installation instructions for your devices
and services.
To get the most out of automation, it is useful to setup the following things:
* [Presence Detection](/components/#presence)
* [Notification service](/components/#notify-service)
If you can't find support for your favorite device or service,
[consider adding support](/developers/add_new_platform.html)
### {% 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).
```yaml
# Example configuration.yaml entry
group:
living_room: light.table_lamp, switch.ac
bedroom:
- light.bedroom
- media_player.nexus_player
```
### {% 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.
```yaml
# Example configuration.yaml entry
homeassistant:
# Add this to your existing configuration
customize:
some.entity_id:
hidden: true
entity_picture: http://placehold.it/200x200
friendly_name: My better name
```
###[Next step: Setting up automation &raquo;](/getting-started/automation.html)

View File

@ -16,277 +16,83 @@ footer: true
<label class='menu-selector normal' for='normal-install'>Install on local machine</label>
<label class='menu-selector raspberry' for='raspberry-install'>Install on a Raspberry Pi</label>
<label class='menu-selector docker' for='docker-install'>Install using Docker</label>
<div class='install-instructions normal'>
<h3>Preparation</h3>
<!-- ###### Preparation START ######################## -->
<div class='prep-instructions-container'>
<input name='prep-instructions' type='radio' id='generic-prep' checked>
<input name='prep-instructions' type='radio' id='fedora-prep'>
<input name='prep-instructions' type='radio' id='centos-prep'>
<label class='menu-selector generic' for='generic-prep'>Generic</label>
<label class='menu-selector fedora' for='fedora-prep'>Fedora</label>
<label class='menu-selector centos' for='centos-prep'>CentOS</label>
<!-- ###### Preparation instructions Generic ######################## -->
<div class='prep-instructions generic'>
Installing and running Home Assistant on your local machine is easy. Make sure you have <a href='https://www.python.org/downloads/'>Python 3.4</a> installed and execute the following code in a console:
</div>
<!-- ###### Preparation instructions Fedora ######################## -->
<div class='prep-instructions fedora'>
<p>The preparation of a <a href='https://fedoraproject.org'>Fedora</a> 22 host will only take a couple of minutes. First install Python 3.4 and the other needed packages out of the <a href='https://admin.fedoraproject.org/pkgdb'>Fedora Package Collection</a>. This ensure that you receive updates in the future.</p>
<p class='note'>
It's assumed that your user has an entry in the sudoers file. Otherwise, run the commands which needs more privileges as root.
</p>
```bash
sudo dnf -y install python3 python3-devel gcc
```
</div>
<!-- ##### Preparation instructions Centos ######################### -->
<div class='prep-instructions centos'>
<p><a href='https://www.centos.org/'>CentOS</a> is providing longtime support and often not shipping the latest release of a software component. To run, Python 3.x on CentOS <a href='https://www.softwarecollections.org/en/scls/rhscl/rh-python34/'>Software Collections</a> needs to be activated.</p>
<h5>Step 1. Install the tools for the Software Collection</h5>
```bash
sudo yum -y install scl-utils
```
<h5>Step 2. Make the repository available.</h5>
```bash
sudo yum -y install https://www.softwarecollections.org/en/scls/rhscl/rh-python34/epel-7-x86_64/download/rhscl-rh-python34-epel-7-x86_64.noarch.rpm
```
<h5>Step 3. Install Python 3.x</h5>
```bash
sudo yum -y install rh-python34
```
<h5>Step 4. Start using software collections:</h5>
```bash
scl enable rh-python34 bash
```
</div>
</div>
<br />
<!-- ###### Preparation END ######################## -->
<h3>Installation</h3>
<div class='install-instructions normal'>
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:
<p>
```bash
pip3 install homeassistant
hass --open-ui
hass \-\-open-ui
```
</p>
<p>Running these commands will:</p>
<ol>
<li>Install Home Assistant</li>
<li>Launch Home Assistant and serve web interface on <a href='http://localhost:8123'>http://localhost:8123</a></li>
<li>Launch Home Assistant and serve web interface on <a href='http://localhost:8123' target="_blank">http://localhost:8123</a></li>
</ol>
<br />
<!-- ###### Post-Installation START ######################## -->
<h3>Post-Installation</h3>
<div class='post-instructions-container'>
<input name='post-instructions' type='radio' id='generic-post' checked>
<input name='post-instructions' type='radio' id='fedora-post'>
<input name='post-instructions' type='radio' id='debian-post'>
<label class='menu-selector generic-post' for='generic-post'>Generic</label>
<label class='menu-selector fedora-post' for='fedora-post'>Fedora/CentOS</label>
<!-- <label class='menu-selector debian-post' for='debian-post'>Debian</label> -->
<!-- ###### Post-installation instructions Generic ######################## -->
<div class='post-instructions generic-post'>
<p>There is nothing else to do. If you run into any issues, please see the <a href='{{site_root}}/getting-started/troubleshooting.html'>troubleshooting page</a>.</p>
<p>If you want to see what Home Assistant can do, you can start the demo mode by running <code>hass --demo-mode</code>.</p>
<p>In the future, if you want to update to the latest version, run <code>pip3 install --upgrade home-assistant</code>.</p>
</div>
<!-- ###### Post-installation instructions Fedora/CentOS ######################## -->
<div class='post-instructions fedora-post'>
<p>By default, the access to port 8123 is not allowed. If you want to allow other hosts in your local network access, open port 8123.</p>
```bash
sudo firewall-cmd --permanent --add-port=8123/tcp
sudo firewall-cmd --reload
```
<p>Home Assistant will serve its web interface on <a href='http://[IP address of the host]:8123'>http://[IP address of the host]:8123</a>.</p>
<p>If you want that Home Assistant is lauched automatically, an extra step is needed to setup <code>systemd</code>. You need a service file to control Home Assistant with <code>systemd</code>. <!-- The <code>WorkingDirectory</code> and the <code>PYTHONPATH</code> must point to your clone git repository. --></p>
<!-- WorkingDirectory=/home/fab/home-assistant/
Environment="PYTHONPATH=/home/fab/home-assistant/" -->
</div> <!-- INSTALL-INSTRUCTIONS NORMAL -->
```bash
su -c 'cat <<EOF >> /lib/systemd/system/home-assistant.service
[Unit]
Description=Home Assistant
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/python3.4 -m homeassistant
[Install]
WantedBy=multi-user.target
EOF'
```
<p>You need to reload <code>systemd</code> to make the daemon aware of the new configuration. Enable and launch Home Assistant after that.</p>
```bash
sudo systemctl --system daemon-reload
sudo systemctl enable home-assistant
sudo systemctl start home-assistant
```
<p>If everything went well, <code>sudo systemctl start home-assistant</code> should give you a positive feedback.</p>
```bash
$ sudo systemctl status home-assistant -l
● home-assistant.service - Home Assistant
Loaded: loaded (/usr/lib/systemd/system/home-assistant.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2015-06-25 23:38:37 CEST; 3min 13s ago
Main PID: 8557 (python3.4)
CGroup: /system.slice/home-assistant.service
└─8557 /usr/bin/python3.4 -m homeassistant
[...]
```
<p>To get Home Assistant's logging output, simple use <code>journalctl</code>.</p>
```bash
sudo journalctl -f -u home-assistant
```
<p>In the future, if you want to update to the latest version, run <code>pip3 install --upgrade home-assistant</code>.</p>
<p class='note'>
Those instructions were written for Fedora 22 Server and Workstation. They may work for Cloud flavor as well but this was not tested.
</p>
</div>
<!-- ##### Post-installation instructions Debian ######################### -->
<div class='post-instructions debian-post'>
<p>Coming soon...</p>
</div>
</div>
<br />
<!-- ###### Post-installation END ######################## -->
</div>
<!-- ###### Docker START ######################## -->
<div class='install-instructions docker'>
<p>Installation with Docker is straightforward. Adjust the following command so that <code>/path/to/your/config/</code> points at the folder where you want to store your config and run it:</p>
```bash
docker run -d --name="home-assistant" -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro --net=host balloob/home-assistant
docker run -d \-\-name="home-assistant" -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro \-\-net=host balloob/home-assistant
```
<p>This will launch Home Assistant and serve its web interface from port 8123 on your Docker host.</p>
<p class='note'>
When using boot2docker on OS X you are unable to map the local time to your Docker container. Replace <code>-v /etc/localtime:/etc/localtime:ro</code> with <code>-e "TZ=America/Los_Angeles"</code> (replacing America/Los_Angeles with <a href='http://en.wikipedia.org/wiki/List_of_tz_database_time_zones'>your timezone</a>)
When using boot2docker on OS X you are unable to map the local time to your Docker container. Replace <code>-v /etc/localtime:/etc/localtime:ro</code> with <code>-e "TZ=America/Los_Angeles"</code> (replacing America/Los_Angeles with <a href='http://en.wikipedia.org/wiki/List_of_tz_database_time_zones' target="_blank">your timezone</a>)
</p>
</div> <!-- INSTALL-INSTRUCTIONS DOCKER -->
</div>
<!-- ###### Paspberry Pi START ######################## -->
<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="https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=113961#p779265" target="_blank">install Python 3.4</a>.
<p>Home Assistant uses Python 3.4. This makes installation on a Raspberry Pi a bit more difficult as it is not available in the package repository. Please follow the following instructions to get it up and running.</p>
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:
<p><b>Step 1. Install pyenv</b></p>
```bash
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
```
<p>After the installation is done, run:</p>
```bash
nano ~/.bashrc
```
<p>Then add these lines to the end of the file and save:</p>
```
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
```
<h5>Step 2. Install requirements</h5>
```bash
sudo apt-get install python3-dev
sudo apt-get install libsqlite3-dev libreadline-dev libbz2-dev
```
<p>Log out and then back in so your bashrc is reloaded.</p>
<p class='note'>
NOTE: the rest of the commands are not being run as sudo and will install python etc under you user's home directory.
</p>
<p><b>Step 3. Install python 3.4.2 (this will take a few hours)</b></p>
```bash
pyenv install 3.4.2
```
<p><b>Step 4. Create Python Virtual Environment</b></p>
```bash
pyenv virtualenv 3.4.2 homeassistant
```
<p><b>Step 5. Set the virtual environment</b></p>
```bash
cd home-assistant
pyenv local homeassistant
```
<p><b>Step 6. Install Home Assistant</b></p>
<p>
```bash
pip3 install homeassistant
hass \-\-open-ui
```
</p>
<p>Running these commands will:</p>
<ol>
<li>Install Home Assistant</li>
<li>Launch Home Assistant and serve web interface on <a href='http://localhost:8123' target="_blank">http://localhost:8123</a></li>
</ol>
</div> <!-- INSTALL-INSTRUCTIONS RASPBERRY -->
<p><b>Step 7. Start it up</b></p>
### {% linkable_title Troubleshooting %}
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.
For additional help, in addition to this site, there are three sources:
- [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
hass \-\-demo-mode
```
<p>It will be up and running on port 8123</p>
<p>In the future, if you want to update to the latest version, run <code>pip3 install --upgrade home-assistant</code>.</p>
</div>
</div>
###[Next step: configuring Home Assistant &raquo;](/getting-started/configuration.html)
To update Home Assistant to the latest release:
```bash
pip3 install \-\-upgrade homeassistant
```
###[Next step: Configuring Home Assistant &raquo;](/getting-started/configuration.html)

View File

@ -17,7 +17,7 @@ This utility should have been installed as part of the Python 3.4 installation.
is installed by running `python3 --version`. If it is not installed,
[download it here](https://www.python.org/getit/).
If you are to succesfully run `python3 --version` but not `pip3`, run the following command instead
If you are able to successfully run `python3 --version` but not `pip3`, run the following command instead
to install Home Assistant: `python3 -m pip install homeassistant`.
**No module named pip**<br>
@ -27,8 +27,27 @@ by some distributions. If you are unable to run `python3 -m pip --version` you c
`python3 get-pip.py`.
**No access to the frontend**<br>
In newer Linux distributions (at least Fedora 22/CentOS 7) the access to a host are very limited.
This means that you can't access the Home Assistant Frontend that is running on a host in your
network. Check the Post-installation section on the [Getting started](/getting-started/) page and
follow the instruction that match your distribution to allow access to port 8123.
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](http://windows.microsoft.com/en-us/windows/open-port-windows-firewall#1TC=windows-7) and [Mac OSX](https://support.apple.com/en-us/HT201642) have good instructions posted.
For firewalld systems (Fedora, RHEL, etc.):
```bash
sudo firewall-cmd --permanent --add-port=8123/tcp
sudo firewall-cmd --reload
```
For UFW systems (Ubuntu, Debian, Raspbian, etc.):
```bash
sudo ufw allow 8123/tcp
```
For iptables systems (usually the default):
```bash
iptables -I INPUT -p tcp --dport 8123 -j ACCEPT
iptables-save > /etc/network/iptables.rules # your rules may be saved elsewhere
```
###[&laquo; Back to Getting Started](/getting-started/index.html)

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Some files were not shown because too many files have changed in this diff Show More