mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Add Raspberry Pi instructions to getting started
This commit is contained in:
parent
ceaa89dfe6
commit
d263e0edc7
@ -19,8 +19,6 @@ h6:hover a.title-link {
|
||||
}
|
||||
}
|
||||
|
||||
f0c1
|
||||
|
||||
.ha-title {
|
||||
white-space: nowrap;
|
||||
|
||||
@ -124,3 +122,43 @@ p.note {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.install-instructions-container {
|
||||
#normal-install, #raspberry-install, #docker-install, .install-instructions {
|
||||
display: none;
|
||||
}
|
||||
|
||||
label.menu-selector {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
white-space: nowrap;
|
||||
border-bottom: 5px solid $grayLight;
|
||||
transition: border-bottom-color .5s;
|
||||
}
|
||||
|
||||
label.menu-selector + label.menu-selector {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#normal-install:checked ~ .menu-selector.normal,
|
||||
#raspberry-install:checked ~ .menu-selector.raspberry,
|
||||
#docker-install:checked ~ .menu-selector.docker
|
||||
{
|
||||
border-bottom-color: $blue;
|
||||
}
|
||||
|
||||
#normal-install:checked ~ .install-instructions.normal,
|
||||
#raspberry-install:checked ~ .install-instructions.raspberry,
|
||||
#docker-install:checked ~ .install-instructions.docker
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
|
||||
.install-instructions {
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -9,23 +9,33 @@ sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
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:
|
||||
<div class='install-instructions-container'>
|
||||
<input name='install-instructions' type='radio' id='normal-install' checked>
|
||||
<input name='install-instructions' type='radio' id='raspberry-install'>
|
||||
<input name='install-instructions' type='radio' id='docker-install'>
|
||||
<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'>
|
||||
|
||||
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> and <a href='http://git-scm.com/downloads'>git</a> installed and execute the following code in a console:
|
||||
|
||||
<p>
|
||||
```bash
|
||||
git clone --recursive https://github.com/balloob/home-assistant.git
|
||||
cd home-assistant
|
||||
python3 -m pip install -r requirements.txt
|
||||
python3 -m homeassistant --open-ui
|
||||
```
|
||||
|
||||
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>
|
||||
<p>Running these commands will:</p>
|
||||
<ol>
|
||||
<li>Download Home Assistant</li>
|
||||
<li>Navigate to downloaded files</li>
|
||||
<li>Install the dependencies</li>
|
||||
<li>Launch Home Assistant and serve web interface on <a href='http://localhost:8123'>http://localhost:8123</a></li>
|
||||
</ol>
|
||||
<p>If you run into any issues, please see the <a href='{{site_root}}/getting-started/troubleshooting.html'>troubleshooting page</a>.</p>
|
||||
|
||||
<p class='note'>
|
||||
You can run Home Assistant in demo mode by appending <code>--demo-mode</code> to line 4.
|
||||
@ -35,11 +45,104 @@ If you run into any issues, please see the [troubleshooting page]({{site_root}}/
|
||||
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
|
||||
</div>
|
||||
|
||||
<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/homeassistant/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>)
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class='install-instructions raspberry'>
|
||||
|
||||
<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>
|
||||
|
||||
<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 -)"
|
||||
```
|
||||
|
||||
<p><b>Step 2. Install requirements</b></p>
|
||||
|
||||
```bash
|
||||
sudo apt-get install python3-dev
|
||||
sudo apt-get install libsqlite3-dev libreadline-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. Clone the source</b></p>
|
||||
```bash
|
||||
git clone --recursive https://github.com/balloob/home-assistant.git
|
||||
```
|
||||
|
||||
<p><b>Step 6. Set the virtual environment</b></p>
|
||||
```bash
|
||||
cd home-assistant
|
||||
pyenv local homeassistant
|
||||
```
|
||||
|
||||
<p><b>Step 6. Finish the install</b></p>
|
||||
```bash
|
||||
python3 -m pip install -r requirements.txt
|
||||
```
|
||||
|
||||
<p><b>Step 7. Start it up</b></p>
|
||||
```bash
|
||||
python3 -m homeassistant
|
||||
```
|
||||
|
||||
<p>It will be up and running on port 8123</p>
|
||||
|
||||
<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>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
## {% linkable_title 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).
|
||||
|
@ -11,8 +11,8 @@ 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.
|
||||
Check if Python 3.4 is installed by running `python3 --version`. If it is not installed, [download it here](https://www.python.org/getit/).
|
||||
|
||||
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`.
|
||||
Pip should come bundled with the latest Python 3 but is ommitted by some distributions. If you are unable to run `python3 -m pip --version` you can install pip by [downloading the installer](https://bootstrap.pypa.io/get-pip.py) and run it with Python 3: `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).
|
||||
|
Loading…
x
Reference in New Issue
Block a user