Home Assistant (on Raspbian): useful commands

2 minutes of reading
Guide purposes
  • Procreate a list of useful commands to administer Home Assistant installed on Raspberry Pi with Raspbian operating system (No. HASSIO)
  • Difficulty level: did
Concepts dealt with:
  • Software use
Software components used:
Prerequisites
Physical devices used:
GUIDE more indicated for:

All environments

Notes and disclaimer
  • qualsiasi eventuale modifica agli impianti domestici dev'essere progettata ed realizzata SOLO da personale qualificato;
  • any changes implemented in probefore is a propersonal responsibility as well as a profirst risk and danger (the contents of the present page are purely educational);
  • any changes implemented in proprior to a device it voids the guarantee, quality approvals and certifications.

Abstract

As known, exist various techniques for the installation of Home Assistant.

In case you made it (brave but in the long run blessed) choice to install Home Assistant on a Raspberry equipped with Raspbian operating system or directly the distribution Hassbian, the commands used cyclically via SSH terminal they are the most disparate. We try to collect them in this guide (which will come, it goes without saying, renewed / updated over time).
If you have advice / suggestions / additions: crew@indomus.it.

The community say thank you LoneWolf for directing us in preparing this guide.

Command list

Checking the status of the service Home Assistant
sudo systemctl status home-assistant@homeassistant
STARTING THE SERVICE HOME ASSISTANT
sudo systemctl start home-assistant@homeassistant
STOP THE SERVICE HOME ASSISTANT
sudo systemctl stop home-assistant@homeassistant
RESTART THE SERVICE HOME ASSISTANT
sudo systemctl restart home-assistant@homeassistant
DISABLE THE SERVICE AUTOSTART HOME ASSISTANT
sudo systemctl disable home-assistant@homeassistant
View real-time systemlog lines for Home Assistant
sudo tail -f /var/log/syslog | grep hass
Consult the service log Home Assistant
sudo journalctl -f -u home-assistant@homeassistant
Consult only service log errors home assistant
sudo journalctl -f -u home-assistant@homeassistant | grep -i ‘error’
Check the configuration by manual launch
hass --script check_config –h
To update Home Assistant
sudo systemctl stop home-assistant@homeassistant
sudo -u homeassistant -H -s
source /srv/homeassistant/bin/activate
pip3 install --upgrade homeassistant
exit
sudo systemctl start home-assistant@homeassistant
Update the permissions of all folders and path files Home Assistant

It often happens that the permissions may not be aligned, which creates proproblems - often and willingly - to the execution of Home Assistant. It happens for example by creating additional folders and files.
To resolve, run the following command:

sudo chmod -R 0777 /home/homeassistant


Home Assistant Official LogoATTENZIONE: remember that there is on our FORUM community an ad hoc section dedicated to Home Assistant, for any doubt, question, information on the specific merit of these components.

inDomus telegram channel