Skip to content

Commit 0d90196

Browse files
committed
Make commands more visible
1 parent 6e6d6f4 commit 0d90196

File tree

1 file changed

+45
-23
lines changed

1 file changed

+45
-23
lines changed

source/getting-started/installation-raspberry-pi-image.markdown

Lines changed: 45 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -46,30 +46,38 @@ To login to your Raspberry Pi running HASSbian your going to be using a ssh clie
4646

4747
Connect to the Raspberry Pi over ssh. Default user name is `pi` and password is `raspberry`.
4848
Linux and Mac OS users execute the following command in a terminal.
49+
4950
```bash
5051
$ ssh pi@ip-address-of-pi
5152
```
53+
5254
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`.
5355

5456
#### {% linkable_title Start/Stop/Restart Home Assistant on HaSSbian %}
5557
Log in as the `pi` account account and execute the following commands:
58+
5659
```bash
57-
sudo systemctl stop home-assistant@homeassistant.service
60+
$ sudo systemctl stop home-assistant@homeassistant.service
5861
```
62+
5963
Replace `stop` with `start` or `restart` to get the desired functionality.
6064
To get the current state of the `homeassistant.service` replace `stop` with `status`.
6165

6266
#### {% linkable_title Update Home Assistant on HASSbian %}
67+
6368
Log in as the `pi` account and execute the following commands:
69+
6470
```bash
65-
sudo systemctl stop home-assistant@homeassistant.service
66-
sudo su -s /bin/bash homeassistant
67-
source /srv/homeassistant/bin/activate
68-
pip3 install --upgrade homeassistant
69-
exit
70-
sudo systemctl start home-assistant@homeassistant.service
71+
$ sudo systemctl stop home-assistant@homeassistant.service
72+
$ sudo su -s /bin/bash homeassistant
73+
$ source /srv/homeassistant/bin/activate
74+
$ pip3 install --upgrade homeassistant
75+
$ exit
76+
$ sudo systemctl start home-assistant@homeassistant.service
7177
```
78+
7279
This will in order do the following:
80+
7381
- Stop the Home Assistant service running on HASSbian
7482
- Open a shell as the `homeassistant` user running the Homeassistant service and that has ownership over the Home Assistant installation.
7583
- 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:
7987

8088
#### {% linkable_title Manually launch Home Assistant on HASSbian %}
8189
Log in as the `pi` account and execute the following commands:
90+
8291
```bash
83-
sudo su -s /bin/bash homeassistant
84-
source /srv/homeassistant/bin/activate
85-
hass
92+
$ sudo su -s /bin/bash homeassistant
93+
$ source /srv/homeassistant/bin/activate
94+
$ hass
8695
```
96+
8797
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.
8898

8999
#### {% linkable_title Check your configuration on HASSbian %}
90100
Log in as the `pi` account and execute the following commands:
101+
91102
```bash
92-
sudo su -s /bin/bash homeassistant
93-
source /srv/homeassistant/bin/activate
94-
hass --script check_config
103+
$ sudo su -s /bin/bash homeassistant
104+
$ source /srv/homeassistant/bin/activate
105+
$ hass --script check_config
95106
```
107+
96108
This will output any errors in your configuration files to console.
97109

98110
#### {% linkable_title Read the Home Assistant log file on HASSbian %}
99111
Log in as the `pi` account and execute the following commands:
112+
100113
```bash
101-
sudo su -s /bin/bash homeassistant
102-
cd /home/homeassistant/.homeassistant
103-
nano homeassistant.log
114+
$ sudo su -s /bin/bash homeassistant
115+
$ cd /home/homeassistant/.homeassistant
116+
$ nano homeassistant.log
104117
```
118+
105119
This will in order do the following:
120+
106121
- Open a shell as the `homeassistant` user.
107122
- Change directory to the Home Assistant configuration directory.
108123
- Open the log file in the nano editor.
109124

110-
Optionaly, you can also view the log with `journalctl`.
125+
Optionaly, you can also view the log with `journalctl`.
111126
Log in as the `pi` account and execute the following commands:
127+
112128
```bash
113-
sudo journalctl -fu home-assistant@homeassistant.service
129+
$ sudo journalctl -fu home-assistant@homeassistant.service
114130
```
115131

116132
#### {% linkable_title Edit the Home Assistant configuration on HASSbian %}
117133
Log in as the `pi` account and execute the following commands:
134+
118135
```bash
119-
sudo su -s /bin/bash homeassistant
120-
cd /home/homeassistant/.homeassistant
121-
nano configuration.yaml
136+
$ sudo su -s /bin/bash homeassistant
137+
$ cd /home/homeassistant/.homeassistant
138+
$ nano configuration.yaml
122139
```
140+
123141
This will in order do the following:
142+
124143
- Open a shell as the `homeassistant` user.
125144
- Change directory to the Home Assistant configuration directory.
126145
- Open the configuration file in the nano editor.
146+
127147
It's generally recommended that you read the [Getting started][configuring-homeassistant] guide for how to configure Home Assistant.
128148

129149
#### {% linkable_title Upgrade and update HASSbian %}
130150
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.
131151
Log in as the `pi` account and execute the following commands:
152+
132153
```bash
133-
sudo apt-get update
134-
sudo apt-get upgrade
154+
$ sudo apt-get update
155+
$ sudo apt-get upgrade
135156
```
157+
136158
Press `Y` to confirm that you would like to continue.
137159

138160
### {% linkable_title Troubleshooting %}

0 commit comments

Comments
 (0)