mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Add more instructions to HASSbian docs. (#1262)
* Add more instructions to HASSbian docs. * Update installation-raspberry-pi-image.markdown - Add viewing of log trough journalctl - Add information about status command for Home Assistant service - Fix formatting
This commit is contained in:
parent
600942982a
commit
f7255cad86
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
layout: page
|
layout: page
|
||||||
title: "Hassbian image for Raspberry Pi"
|
title: "HASSbian image for Raspberry Pi"
|
||||||
description: "Instructions to flash the Home Assistant Hassbian image on a Raspberry Pi."
|
description: "Instructions to flash the Home Assistant HASSbian image on a Raspberry Pi."
|
||||||
date: 2016-09-26 21:00
|
date: 2016-09-26 21:00
|
||||||
sidebar: true
|
sidebar: true
|
||||||
comments: false
|
comments: false
|
||||||
@ -9,15 +9,15 @@ sharing: true
|
|||||||
footer: true
|
footer: true
|
||||||
---
|
---
|
||||||
|
|
||||||
The easiest way to install Home Assistant on your Raspberry Pi is by using Hassbian: a Raspberry Pi image with Home Assistant built-in. The image will install the latest version of Home Assistant on initial boot (~5 minutes).
|
The easiest way to install Home Assistant on your Raspberry Pi is by using HASSbian: a Raspberry Pi image with Home Assistant built-in. The image will install the latest version of Home Assistant on initial boot (~5 minutes).
|
||||||
|
|
||||||
1. [Download the latest image][image-download]
|
1. [Download the latest image][image-download]
|
||||||
2. Flash the image to an SD card:
|
2. Flash the image to an SD card:
|
||||||
- [Windows][flash-windows]
|
- [Windows][flash-windows]
|
||||||
- [Linux][flash-linux]
|
- [Linux][flash-linux]
|
||||||
- [Mac][flash-macos]
|
- [Mac OS][flash-macos]
|
||||||
3. Ensure your Raspberry Pi has access to the internet.
|
3. Ensure your Raspberry Pi has access to the internet.
|
||||||
4. Insert SD card to Raspberry Pi and turn it on. Initial installation of Home Assistant will take 5 minutes.
|
4. Insert SD card to Raspberry Pi and turn it on. Initial installation of Home Assistant will take about 5 minutes.
|
||||||
|
|
||||||
These instructions are also available as a [video](https://www.youtube.com/watch?v=iIz6XqDwHEk).
|
These instructions are also available as a [video](https://www.youtube.com/watch?v=iIz6XqDwHEk).
|
||||||
|
|
||||||
@ -36,21 +36,104 @@ Some extra tips:
|
|||||||
|
|
||||||
### {% linkable_title Technical Details %}
|
### {% linkable_title Technical Details %}
|
||||||
|
|
||||||
- Home Assistant is installed in a virtual Python environment at `src/homeassistant`
|
- Home Assistant is installed in a virtual Python environment at `/src/homeassistant/`
|
||||||
- Home Assistant will be started as a service run by the user `homeassistant`
|
- Home Assistant will be started as a service run by the user `homeassistant`
|
||||||
|
- The configuration is located at `/home/homeassistant/.homeassistant`
|
||||||
|
|
||||||
{% comment %}
|
### {% linkable_title Managing your HASSbian installation %}
|
||||||
|
#### {% linkable_title Login to HASSbian on the Raspberry Pi %}
|
||||||
|
To login to your Raspberry Pi running HASSbian your going to be using a ssh client. Depending on your platform there are several alternatives for doing this. Linux and Max OS generally have a ssh client installed. Windows users are recommended to download and install the ssh client [Putty][ssh-putty].
|
||||||
|
|
||||||
TODO:
|
Connect to the Raspberry Pi over ssh. Default user name is `pi` and password is `raspberry`.
|
||||||
|
Linux and Mac OS users execute the following command in a terminal.
|
||||||
|
```bash
|
||||||
|
$ ssh pi@ip-address-of-pi
|
||||||
|
```
|
||||||
|
Windows users start [Putty][ssh-putty], enter the IP address of the Raspberry Pi in the *Host name* field and port 22 in the *Port* field. Then click *Open* and a terminal window will open. Enter the credentials. Default user name is `pi` and password is `raspberry`.
|
||||||
|
|
||||||
Add instructions:
|
#### {% linkable_title Start/Stop/Restart Home Assistant on HaSSbian %}
|
||||||
|
Log in as the `pi` account account and execute the following commands:
|
||||||
|
```bash
|
||||||
|
sudo systemctl stop home-assistant@homeassistant.service
|
||||||
|
```
|
||||||
|
Replace `stop` with `start` or `restart` to get the desired functionality.
|
||||||
|
To get the current state of the `homeassistant.service` replace `stop` with `status`.
|
||||||
|
|
||||||
- How to login via shell (?) or at least mention how to work with a Pi
|
#### {% linkable_title Update Home Assistant on HASSbian %}
|
||||||
- How to restart HASS
|
Log in as the `pi` account and execute the following commands:
|
||||||
- How to see the logs for config validation
|
```bash
|
||||||
- How to update the config
|
sudo systemctl stop home-assistant@homeassistant.service
|
||||||
|
sudo su -s /bin/bash homeassistant
|
||||||
|
source /srv/homeassistant/bin/activate
|
||||||
|
pip3 install --upgrade homeassistant
|
||||||
|
exit
|
||||||
|
sudo systemctl start home-assistant@homeassistant.service
|
||||||
|
```
|
||||||
|
This will in order do the following:
|
||||||
|
- Stop the Home Assistant service running on HASSbian
|
||||||
|
- Open a shell as the `homeassistant` user running the Homeassistant service and that has ownership over the Home Assistant installation.
|
||||||
|
- Change into the virtual Python environment at `/src/homeassistant/` containing the Home Assistant installation.
|
||||||
|
- Upgrade the Home Assistant installation to the latest release.
|
||||||
|
- Exit the shell and return to the `pi` user.
|
||||||
|
- Restart the Home Assistant service.
|
||||||
|
|
||||||
{% endcomment %}
|
#### {% linkable_title Manually launch Home Assistant on HASSbian %}
|
||||||
|
Log in as the `pi` account and execute the following commands:
|
||||||
|
```bash
|
||||||
|
sudo su -s /bin/bash homeassistant
|
||||||
|
source /srv/homeassistant/bin/activate
|
||||||
|
hass
|
||||||
|
```
|
||||||
|
This will start Home Assistant in your shell and output anything that ends up in the log and more into the console. This will fail if the Home Assistant service is already running so don't forget to [stop][stop-homeassistant] it first.
|
||||||
|
|
||||||
|
#### {% linkable_title Check your configuration on HASSbian %}
|
||||||
|
Log in as the `pi` account and execute the following commands:
|
||||||
|
```bash
|
||||||
|
sudo su -s /bin/bash homeassistant
|
||||||
|
source /srv/homeassistant/bin/activate
|
||||||
|
hass --script check_config
|
||||||
|
```
|
||||||
|
This will output any errors in your configuration files to console.
|
||||||
|
|
||||||
|
#### {% linkable_title Read the Home Assistant log file on HASSbian %}
|
||||||
|
Log in as the `pi` account and execute the following commands:
|
||||||
|
```bash
|
||||||
|
sudo su -s /bin/bash homeassistant
|
||||||
|
cd /home/homeassistant/.homeassistant
|
||||||
|
nano homeassistant.log
|
||||||
|
```
|
||||||
|
This will in order do the following:
|
||||||
|
- Open a shell as the `homeassistant` user.
|
||||||
|
- Change directory to the Home Assistant configuration directory.
|
||||||
|
- Open the log file in the nano editor.
|
||||||
|
|
||||||
|
Optionaly, you can also view the log with `journalctl`.
|
||||||
|
Log in as the `pi` account and execute the following commands:
|
||||||
|
```bash
|
||||||
|
sudo journalctl -fu home-assistant@homeassistant.service
|
||||||
|
```
|
||||||
|
|
||||||
|
#### {% linkable_title Edit the Home Assistant configuration on HASSbian %}
|
||||||
|
Log in as the `pi` account and execute the following commands:
|
||||||
|
```bash
|
||||||
|
sudo su -s /bin/bash homeassistant
|
||||||
|
cd /home/homeassistant/.homeassistant
|
||||||
|
nano configuration.yaml
|
||||||
|
```
|
||||||
|
This will in order do the following:
|
||||||
|
- Open a shell as the `homeassistant` user.
|
||||||
|
- Change directory to the Home Assistant configuration directory.
|
||||||
|
- Open the configuration file in the nano editor.
|
||||||
|
It's generally recommended that you read the [Getting started][configuring-homeassistant] guide for how to configure Home Assistant.
|
||||||
|
|
||||||
|
#### {% linkable_title Upgrade and update HASSbian %}
|
||||||
|
HASSbian is based on Raspbian and uses the same repositories. Any changes to Raspbian will be reflected in HASSbian. To update and upgrade system packages and installed software (excluding Home Assistant) do the following.
|
||||||
|
Log in as the `pi` account and execute the following commands:
|
||||||
|
```bash
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get upgrade
|
||||||
|
```
|
||||||
|
Press `Y` to confirm that you would like to continue.
|
||||||
|
|
||||||
### {% linkable_title Troubleshooting %}
|
### {% linkable_title Troubleshooting %}
|
||||||
|
|
||||||
@ -69,3 +152,6 @@ In addition to this site, check out these sources for additional help:
|
|||||||
[flash-macos]: https://www.raspberrypi.org/documentation/installation/installing-images/mac.md
|
[flash-macos]: https://www.raspberrypi.org/documentation/installation/installing-images/mac.md
|
||||||
[flash-windows]: https://www.raspberrypi.org/documentation/installation/installing-images/windows.md
|
[flash-windows]: https://www.raspberrypi.org/documentation/installation/installing-images/windows.md
|
||||||
[pi-components]: /getting-started/installation-raspberry-pi/#raspberry-pi-hardware-specific-components
|
[pi-components]: /getting-started/installation-raspberry-pi/#raspberry-pi-hardware-specific-components
|
||||||
|
[ssh-putty]: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
|
||||||
|
[stop-homeassistant]: /getting-started/installation-raspberry-pi-image/#startstoprestart-home-assistant-on-hassbian
|
||||||
|
[configuring-homeassistant]: /getting-started/configuration/
|
||||||
|
@ -16,7 +16,7 @@ The default way to update Home Assistant to the latest release, when available,
|
|||||||
$ pip3 install --upgrade homeassistant
|
$ pip3 install --upgrade homeassistant
|
||||||
```
|
```
|
||||||
|
|
||||||
Different installation methods as [Raspberry Pi All-In-One Installer](/getting-started/installation-raspberry-pi-all-in-one/#upgrading), [Vagrant](/getting-started/installation-vagrant/), or [Virtualenv](/getting-started/installation-virtualenv/#upgrading-home-assistant) may have an alternative way for updating Home Assistant.
|
Different installation methods as [HASSbian](/getting-started/installation-raspberry-pi-image/#update-home-assistant-on-hassbian), [Raspberry Pi All-In-One Installer](/getting-started/installation-raspberry-pi-all-in-one/#upgrading), [Vagrant](/getting-started/installation-vagrant/), or [Virtualenv](/getting-started/installation-virtualenv/#upgrading-home-assistant) may have an alternative way for updating Home Assistant.
|
||||||
|
|
||||||
After updating, restart Home Assistant for the changes to take effect. This means that you have to restart `hass` itself or the [autostarting](/getting-started/autostart/) daemon if you use any.
|
After updating, restart Home Assistant for the changes to take effect. This means that you have to restart `hass` itself or the [autostarting](/getting-started/autostart/) daemon if you use any.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user