mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Make commands more visible
This commit is contained in:
parent
6e6d6f49db
commit
0d90196754
@ -46,30 +46,38 @@ To login to your Raspberry Pi running HASSbian your going to be using a ssh clie
|
||||
|
||||
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`.
|
||||
|
||||
#### {% 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
|
||||
$ 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`.
|
||||
|
||||
#### {% linkable_title Update Home Assistant on HASSbian %}
|
||||
|
||||
Log in as the `pi` account and execute the following commands:
|
||||
|
||||
```bash
|
||||
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
|
||||
$ 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.
|
||||
@ -79,60 +87,74 @@ This will in order do the following:
|
||||
|
||||
#### {% 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
|
||||
$ 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
|
||||
$ 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
|
||||
$ 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`.
|
||||
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
|
||||
$ 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
|
||||
$ 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
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get upgrade
|
||||
```
|
||||
|
||||
Press `Y` to confirm that you would like to continue.
|
||||
|
||||
### {% linkable_title Troubleshooting %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user