Joakim Sørensen 1bfc28a008 Hassbian docs (#3487)
* Added link

Added link to hassbian-config

* Added note

Added note for upgrade HA from hassbian-config

* Added note

Added note on how to uppdate HA from hassbian-config

* Updated to match current version

Updated to match current version of hassbian-config.

* Corrected problems with link

* Corrected typo

* Corrected typo

* Corrected typo

* Update common-tasks.markdown

* Update upgrading.markdown

* Fix spelling

* Fix spelling
2017-10-05 08:55:59 +02:00

5.1 KiB

layout, title, description, date, sidebar, comments, sharing, footer, redirect_from
layout title description date sidebar comments sharing footer redirect_from
page Common tasks on Hassbian Instructions how to do common tasks on Hassbian. 2016-09-26 21:00 true false true true /docs/hassbian/common-tasks/

{% linkable_title Login to the Raspberry Pi %}

To login to your Raspberry Pi running HASSbian you're 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.

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.

$ ssh pi@ip-address-of-pi

Windows users start 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.

Optionally, starting with Windows 10 anniversary update, you can use the built-in 'Bash on Windows' to use SSH if you have enabled Developer mode and have installed the "Windows Subsystem for Linux (beta)" feature.

{% linkable_title Start/Stop/Restart Home Assistant %}

Log in as the pi account and execute the following commands:

$ 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 %}

You can also use `hassbian-config` to automate the process by running `sudo hassbian-config upgrade home-assistant`

Log in as the pi account and execute the following commands:

$ 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 /srv/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.

{% linkable_title Manually launch Home Assistant %}

Log in as the pi account and execute the following commands:

$ 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 it first. If you want the log output to be colored, execute hass --script check_config first. This will install the colorlog module.

{% linkable_title Check your configuration %}

Log in as the pi account and execute the following commands:

$ 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 %}

Log in as the pi account and execute the following commands:

$ sudo su -s /bin/bash homeassistant
$ cd /home/homeassistant/.homeassistant
$ nano home-assistant.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.

Optionally, you can also view the log with journalctl. Log in as the pi account and execute the following commands:

$ sudo journalctl -fu home-assistant@homeassistant.service

{% linkable_title Edit the Home Assistant configuration %}

Log in as the pi account and execute the following commands:

$ 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 guide for how to configure Home Assistant.

{% linkable_title Change locale, timezone and keyboard layout %}

$ sudo raspi-config