Installing Home Assistant on Raspberry Pi
Home Assistant is free, open-source home automation software designed to act as a central control system for smart home technology. Both the core Home Assistant application itself and its extensions are written in Python.
Installation
The installation is not typical, but it is still very simple. First, as always, update the package list.
sudo apt updateThen install the dependency packages required by the software.
sudo apt-get install -y python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5Next, create a new homeassistant user. We will create it with the useradd command and use the -rm parameters, which create a system account and its home directory. The -G dialout,gpio,i2c arguments add the user to the dialout, gpio, and i2c groups. These permissions will be required to connect devices through GPIO ports, Z-Wave, and Zigbee.
sudo useradd -rm homeassistant -G dialout,gpio,i2cNow create an installation directory for the software and give the user we just created permission to access it.
sudo mkdir /srv/homeassistant
sudo chown homeassistant:homeassistant /srv/homeassistantNext, create a virtual environment and switch into it. To do that, we first need to switch to the homeassistant user.
sudo -u homeassistant -H -s
cd /srv/homeassistant
python3 -m venv .
source bin/activateAfter activating the virtual environment (notice that the console prompt changes to (homeassistant) homeassistant@raspberrypi:/srv/homeassistant $), install the package below.
python3 -m pip install wheelNow it is time to install Home Assistant. The installation may take a few minutes.
pip3 install homeassistantUse the command below to start the software for the first time. This command will create the configuration in the homeassistant user's home directory and install the basic dependencies.
hassNow open Home Assistant in your browser. The address is http://localhost:8123. If you are using a browser on another device on the network, replace localhost with the Raspberry Pi's IP address. You can complete the rest of the configuration there.
This tutorial was written based on the original tutorial published on the vendor's website here.
Comments (0)
No comments yet.
Add a comment
Comments are published after moderation. Your e-mail address stays private.