PURPOSES OF THE GUIDE:
SOFTWARE COMPONENTS USED:
PHYSICAL DEVICES USED:
GUIDE MOST INDICATED FOR:
Notes and disclaimer
|Driving review: 2.3|
As explained in other tabs, Home Assistant is the one among the HUB ideal personal to make one profirst personal home automation in an organic and functional way. This crucial software component has the possibility to be installed on many systems and in different ways: Its Raspberry Pi the modality usually favored by the developers is the mode "HASSIO”, or a yes mode fully automatic, which however plans to dedicate the Raspberry Pi for exclusive use di Home Assistant, effectively closing any other features. This mode is described in this specific guide.
This guide covers instead another approccio, or to allow the installation and the functionnamento of Home Assistant on a Raspberry Pi previously installed and configured with Raspbian operating system, which enables us to use Raspberry different and parallel in the very presence of Home Assistant.
A list possible alternatives installation is available here.
- Install Raspbian
- Install Home Assistant
- configuration Home Assistant in autostart on boot
- Operational advice
- Update Searchnamento
- changes to the configuration file
- Configure home automation accessories
This guide is dedicated who already has a Raspberry in use with Raspbian operating system. For those who haven't yet prosaw and find themselves having a new Raspberry, perhaps purchased appspecially for making the proFirst of all, then this step of the guide should be unmarked by following another guide, which explains step by step how to configure the Raspbian operating system.
The guide to follow:
- for those with a USB keyboard and mouse, it's this one;
- for those who don't have them, it is this other.
Once the Raspbian configuration is finished, it is possible progive in this guide.
Once connected via ssh to the profirst Raspberry (using the "pi" user), perform an update firstnameenvironment:
sudo apt-get update -y sudo apt-get upgrade -y sudo rpi-update sudo reboot
after the restart caused by the last command, run the following commands to install Python and its dependencies:
sudo apt-get install python3 python3-venv python3-pip python3-dev -y sudo apt-get install build-essential libssl-dev libffi-dev -y
Then create a user dedicated to Home Assistant, calling it "homeassistant"
sudo useradd -rm homeassistant -G dialout
Let's create now the server installation directory and change the rights by attributing them to users appena created:
cd /srv sudo mkdir homeassistant sudo chown homeassistant:homeassistant homeassistant
Now it's time to create the virtual environment in which to execute Home Assistant:
sudo su -s /bin/bash homeassistant cd /srv/homeassistant python3 -m venv . source bin/activate
Once created and had access to the virtual environment (note the change of prompt) you need to install an ad hoc package for Python:
python3 -m pip install wheel
Finally, install Home Assistant through the command:
pip3 install homeassistant
Now it's possible start, for the first time, Home Assistant, executing the command:
The first start will cause the folder to be created automatically ".homeassistant"Under the path"/ Home / homeassistant"And the primary dependencies are installed, always automatically.
Now a few minutes of waiting (from 10 to 20): Home Assistant, at its first execution, prowill see to the installation and automatic configuration of a whole series of accessory components. The wait will end upon receipt, on the screen log, of the string:
INFO (MainThread) [homeassistant.core] Starting Home Assistant
Once the wait is over it will be possible to connect - via the browser of the profirst computer of appoggio - to the web interface of Home Assistant at the url:
where "indirizzoIpRaspeberry”Will be the IP address assigned to your Raspberry; or, more easily:
At this point it is comprofunction has beennamecorrect of Home Assistant, and it is therefore possible to interrupt the execution by pressing CTRL + C, then exit the virtualized environment with:
To ensure that Home Assistant start automatically at each boot of the Raspberry Pi, a configuration is required.
Once connected via ssh to the profirst Raspberry (using the "pi" user), run the following command to create the service configuration file:
sudo nano -w /email@example.com
Insert the following text in the editor:
[Unit] Description=Home Assistant After=network-online.target [Service] Type=simple User=%i ExecStart=/srv/homeassistant/bin/hass -c "/home/homeassistant/.homeassistant" [Install] WantedBy=multi-user.target
Then go out and save.
Finally, run the following commands:
sudo systemctl --system daemon-reload sudo systemctl enable home-assistant@homeassistant sudo systemctl start home-assistant@homeassistant
At this point Home Assistant will be properly configured for auto boot.
To update Home Assistant, after interrupting the execution, execute the following commands:
sudo su -s /bin/bash homeassistant source /srv/homeassistant/bin/activate pip3 install --upgrade homeassistant
Changes to the configuration file
The configuration file is located in the directory "/var/homeassistant/.homeassistant" And his name is "configuration.yaml"
Now you can begin to configure the first accessories of the profirst home automation. To do this it is necessary to make changes to the file "configuration.yaml"; on this issue, we dedicate a guide apposita.
|ATTENZIONE: 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.|