Reorganize the getting started and component pages

This commit is contained in:
Paulus Schoutsen 2015-01-24 18:47:04 -08:00
parent e134f73933
commit 759d107680
23 changed files with 831 additions and 144 deletions

View file

@ -9,76 +9,80 @@ sharing: true
footer: true
---
Installing Home Assistant and running it is easy. Make sure you have [Python 3](https://www.python.org/downloads/) installed and execute the following code in your console:
Installing and running Home Assistant is easy. Make sure you have [Python 3.4](https://www.python.org/downloads/) and [git](http://git-scm.com/downloads) installed and execute the following code in a console:
```bash
git clone --recursive https://github.com/balloob/home-assistant.git
cd home-assistant
pip3 install -r requirements.txt
python3 -m homeassistant
python3 -m pip install -r requirements.txt
python3 -m homeassistant --open-ui
```
This will start the Home Assistant server and create an initial configuration file `config/home-assistant.conf` that is setup for demo mode. It will launch its web interface on [http://127.0.0.1:8123](http://127.0.0.1:8123). The default password is 'password'.
Running these commands will:
1. Download Home Assistant
2. Navigate to downloaded files
3. Install the dependencies
4. Launch Home Assistant and serve web interface on [http://localhost:8123](http://localhost:8123)
If you run into any issues, please see the [troubleshooting page]({{site_root}}/getting-started/troubleshooting.html).
<p class='note'>
You can run Home Assistant in demo mode by appending <code>--demo-mode</code> to line 4.
</p>
<p class='note'>
If you want to update to the latest version in the future, run: <code>scripts/update</code>.
</p>
If you're using Docker, you can use
```bash
docker run -d --name="home-assistant" -v /path/to/homeassistant/config:/config -v /etc/localtime:/etc/localtime:ro --net=host balloob/home-assistant
```
After you got the demo mode running it is time to customize your configuration and enable some [built-in components]({{site_root}}/components/). See [`/config/home-assistant.conf.example`](https://github.com/balloob/home-assistant/blob/master/config/home-assistant.conf.example) for an example configuration.
## Configuring Home Assistant
The configuration for Home Assistant lives by default in the `config` folder. The file `home-assistant.conf` is the main file that contains which components will be loaded and what their configuration is. An example configuration file is located at [`config/home-assistant.conf.example`](https://github.com/balloob/home-assistant/blob/master/config/home-assistant.conf.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.
<p class='note'>
You will have to restart Home Assistant for changes in <code>home-assistant.conf</code> to take effect.
</p>
### Password protecting the web interface
The first thing you want to add is a password for the web interface. Use your favourite text editor to open the file `/config/home-assistant.conf`. Look for the line that says `[http]` and add the line `api_password=YOUR_PASSWORD` below. Your configuration should now look like this:
```
[http]
api_password=YOUR_PASSWORD
[discovery]
```
<p class='note'>
You can append <code>?api_password=YOUR_PASSWORD</code> to any url to log in automatically.
</p>
<p class='note'>
For the light and switch component, you can specify multiple platforms by using sequential sections: [switch], [switch 2], [switch 3] etc
</p>
### Adding devices and services
### Philips Hue
To get Philips Hue working you will have to connect Home Assistant to the Hue bridge.
Home Assistant will be able to automatically discover and configure any Google Chromecasts, 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).
Run the following command from your config dir and follow the instructions:
Not all devices can be discovered, so if you hae any of the following devices or services, please see their respective pages for installation instructions:
```bash
python3 -m phue --host HUE_BRIDGE_IP_ADDRESS --config-file-path phue.conf
```
* [Nest thermostat]({{site_root}}/components/thermostat.html)
* [Wink hub]({{site_root}}/components/wink.html)
* [PushBullet]({{site_root}}/components/notify.html)
* [Device tracking]({{site_root}}/components/device_tracker.html)
* [Sun]({{site_root}}/components/sun.html)
* [Add support for your own device or service]({{site_root}}/developers/add_new_platform.html)
After that add the following lines to your `home-assistant.conf`:
### Setting up Home Automation
```
[light]
platform=hue
```
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:
### Wireless router
Your wireless router is used to track which devices are connected. Three different types of wireless routers are currently supported: tomato, netgear and luci (OpenWRT). To get started add the following lines to your `home-assistant.conf` (example for Netgear):
```
[device_tracker]
platform=netgear
host=192.168.1.1
username=admin
password=MY_PASSWORD
```
<p class='note' data-title='on Tomato'>
Tomato requires an extra config variable called `http_id`. The value can be obtained by logging in to the Tomato admin interface and search for `http_id` in the page source code.
</p>
<p class='note' data-title='on Luci'>
Before the Luci scanner can be used you have to install the luci RPC package on OpenWRT: <code>opkg install luci-mod-rpc</code>.
</p>
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.
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`).
```
[device_tracker]
platform=nmap_tracker
hosts=192.168.1.1/24
```
* [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)

View file

@ -0,0 +1,18 @@
---
layout: page
title: "Troubleshooting"
description: "Common problems and their solutions."
date: 2015-01-20 22:36
sidebar: false
comments: false
sharing: true
footer: true
---
It can happen that you run into trouble while installing Home Assistant. This page is here to help you figure out the most common problems.
Check if Python3 is installed by running `python3 --version`. If it is not installed, install it here.
Pip should come bundled with the latest Python3 but is ommitted by some distributions. If you are unable to run `python3 -m pip --version` you can install pip by [downloading the installer](https://bootstrap.pypa.io/get-pip.py) and run it with Python3: `python3 get-pip.py`.
Check if Git is installed by running `git --version`. If you are unable to run this command you can install it by following [these instructions](http://git-scm.com/downloads).