How to install and configure Home Assistant (HASSBIAN) on a Raspberry Pi

4 minutes of reading
PURPOSES OF THE GUIDE:
  • Install and configure a customization of Raspbian already equipped with Home Assistant on board (HASSBIAN)
  • Difficulty level: bass
CONCEPTS FACED:
  • software installation and configuration
SOFTWARE COMPONENTS USED:
Prerequisites:
  • Home network connected to the Internet
  • Raspberry Pi not configured (SD Card virgin)
PHYSICAL DEVICES USED:
GUIDE MOST INDICATED FOR:

All environments

Notes and disclaimer
  • qualsiasi modifica all'impianto elettrico dev'essere progettata ed effettuata 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.
Driving review: 1.1
ATTENZIONE: from the end 2019 the distribution Hassbian (subject of this guide) it is no longer supported or officially updated by the developers. To get the same result (install Home Assistant on Raspbian) we recommend following the appropriate guide, or consult the more complete file ai "first steps"With Home Assistant.

Abstract

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 guide addresses instead a Pprodifferently, or gives directions on how to install su Raspberry Pi a typically used operating system distribution (Raspbian) which includes on board lto presence of Home Assistant pre-installed.

This distribution is defined HASSBIAN (Home Assistant + Raspbian), and it's prolearned (and maintained) by the same community as Home Assistant.

A list possible alternatives installation is available here.


Home Assistant Official Logo

Prosubsidence

preconditions

Before starting the Raspberry Pi it is necessary to "install" Home Assistant (distribution HASSBIAN) on the microSD, which is the equivalent of the Hard Disk in a common personal computer.
To install the operating system you need:
  • a computer (Windows, Apple or Linux);
  • the image Home Assistant HASSBIAN to install;
  • the microSD and the related USB adapter.
La procedura we are going to describe is valid both for HASSBIAN both for any other operating system and / or customization suitable for Raspberry.

Install HASSBIAN on the SD Card

To install HASSBIAN on Raspberry, le procedures are different depending on the computer you have available.

Proprocedure WINDOWS

  • download and install the software Etcher da etcher.io;
  • download the free image of HASSBIAN from here: https://github.com/home-assistant/pi-gen/releases/latest
  • connect the microSD to the computer;
  • perform Etcher;
  • select the image previously downloaded;
  • select the microSD;
  • click "Burn" to install the image on the microSD;
  • wait for the task to complete, then extract the microSD, now proestablished for the use of HASSBIAN.
The Etcher software

Proprocedure MAC

with ETCHER

  • download and install the software Etcher da etcher.io;
  • download the free image of HASSBIAN from here: https://github.com/home-assistant/pi-gen/releases/latest
  • connect the microSD to the computer;
  • perform Etcher;
  • select the image of HASSBIAN previously downloaded;
  • select the microSD;
  • Click "Burn" to install the image of HASSBIAN on the microSD;
  • wait for the task to complete, then extract the microSD, now proestablished for the use of HASSBIAN.
The Etcher software

with TERMINAL (for those familiar with the command line)

diskutil list
to identify the disk (NOT the partition), eg disk4 and not disk4s1
  • remove the disk with the command
diskutil unmountDisk /dev/disk<disk# from diskutil>
indicating the previously identified disk eg discussil unmountDisk / dev / disk4
  • install the image using the command
sudo dd bs=1m if=image.img of=/dev/rdisk<disk# from diskutil> conv=sync
where image.img is the image to be copied and disk # is the previously identified disk (hence the microSD)
eg
sudo dd bs=1m if=2018-04-18-raspbian-stretch.img of=/dev/rdisk4 conv=sync

Procedura Linux

Also for linux is available Etcher (same sequence described above) or you can use the CLI. In this case, similarly to proprocedure Mac, it is sufficient to identify the disk (the microSD) to be removed by the command
lsblk
after which it is sufficient to use the command
dd bs=4M if=image.img of=/dev/sdX conv=fsync
where image.img is the image to be copied and sdX is the previously identified disk (hence the microSD)
More information on the proLinux cedures are available here.

Customization Wi-Fi (Optional)

Premise: this it is a secondary step, in fact the Wi-Fi will be configurable in a second phase directly on the operating system (Raspbian) appena installed on the Raspberry. To make the unit immediately operational, it will be sufficient to connect the ethernet cable to your router and your Raspberry.
Alternatively it is possible to instruct HASSBIAN - even before the first power up - creating a file "network / my-network”Containing the coordinates of yours Wi-Fi (SSID and password). All indications are available here.

First access on Home Assistant

At the end of the proprocedure, HASSIO will finally be running on our Raspberry. To discover the Raspberry IP it will be sufficient to execute the command:

ifconfig

which will list the IPs associated with the raspberry:

Raspbian ifconfig

TheIP address it is usually indicated to the right of the word "inet"And usually is part of the subnet 192.168.00/16.
Discovered the IP, access to HASSIO pointing on proYour browser has the following address:

http://indirizzo_ip_raspberry:8123

Where indirizzo_ip_raspberry is, appanointed, the IP address assigned to the Raspberry.

Configure home automation accessories

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"Which is in the folder"usr/share/hassium"

To the topic related to the configuration file of Home Assistant dedicated a guide apposita.

Useful commands

We have dedicated an ad hoc page to the most classic commands in everyday use on Raspbian.

Home Assistant su Raspberry Pi: various installations, things to do


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.


Please comment below