Yo, Ben here! I’m pumped to share my 2020 Smart Home series on YouTube. In preparation for the next video (Part 2 - HASS Class), here are the steps I use to install Home Assistant. If you’re new to HA, you’re in the right place! Also, be sure to check out the offical Getting Started page if you want more info!
What is Home Assistant?
Home Assistant is a free, open-source home automation software that can control all of your favorite smart home devices.
How is it used?
Most users run Home Assistant on a dedicated device like Raspberry Pi 4. Its interface is accessed through a web browser by any device on the same local network.
Recommended Hardware
For most people, I’d recommend a Raspberry Pi 4 (2GB) - it’s plenty fast, and is the most straightforward device to get started with.
You’ll also need a few other items.
CanaKit sells Rasperry Pi 4 kits, which are a great option as well.
If you’re looking for more horsepower, here are my other favorite options.
Device | CPU | RAM | Price | Performance | Additonal Required Parts |
---|---|---|---|---|---|
Raspberry Pi 3 B+ | 4 x 1.4 GHz | 1 GB | $60 | good | power supply, SD card, case |
Raspberry Pi 4 B | 4 x 1.5 GHz | 1 to 4 GB | $100 | better | power supply, SD card, case |
NUC8i3BEH | 2 x 3.6 GHz | 32 GB | $280 | best | RAM, SSD |
NUC8i5BEH | 4 x 3.8 GHz | 32 GB | $370 | best x1.5 | RAM, SSD |
NUC8i7BEH | 4 x 4.5 GHz | 32 GB | $470 | best x2 | RAM, SSD |
Intel NUC Notes
The Intel’s NUC7 and NUC8 kits enable Home Assitant to run ridiculously fast thanks to their exponentially faster CPUs (compared to a Pi) and native SSD support. If you plan on doing anything with video transcoding (e.g., use Add-Ons like Plex or MotionEye), you’ll want something with more power than a Pi.
HassOS does not currently support the use of NVME SSDs (see GitHub Issue #422). For now, you still have to use a standard SSD.
I use a NUC8i7BEH with 16GB RAM and a 240GB SSD to run my house. Crazy overkill for HA (I know), but it’s nice for image processing and such!
As of 17 DEC 19, NUC8 kits are challenging to obtain driving up prices unreasonably. Also, keep in mind that most kits do not come with RAM or an SSD which add to the cost.
How to Install Home Assistant on a Raspberry Pi
-
Download the latest file for your device (e.g.
hassos_rpi4-3.7.img.gz
) - HERE or GITHUB - Install the balenaEtcher application
- Using an SD card reader, connect the SD card to your computer
- Select the disk image and target drive, and then click Flash!
- If you can, use hardwired ethernet (it’s faster and doesn’t require any configuration). Otherwise, follow the steps below to configure WIFI.
- Remove the imaged SD card from your computer and then plug it back in.
- Go to Computer and look for a mounted drive labeled hassio-boot
- In the root folder, right click and create a new folder called CONFIG
- Inside of that folder, right click and create another few folder called network
- Inside of the
CONFIG/network
folder, right click -> New -> Text File and name the file my-network - Open the file in NotePad and paste the contents of the code block shown below.
- Change
line 7
andline 13
to match your WIFI setup - Save this file
- Remove the .txt file extension by right clicking and hitting rename
- Note: Be sure the file name extension box is checked in under the Window’s view tab
[connection] id=my-network uuid=72111c67-4a5d-4d5c-925e-f8ee26efb3c3 type=802-11-wireless [802-11-wireless] mode=infrastructure ssid=YOUR_SSID # Uncomment below if your SSID is not broadcasted #hidden=true [802-11-wireless-security] auth-alg=open key-mgmt=wpa-psk psk=YOUR_WIFI_PASSWORD [ipv4] method=auto [ipv6] addr-gen-mode=stable-privacy method=auto
- Plug everything into the Pi - SD card, power, and ethernet
- Wait ~10 minutes
- From any other computer on your local network, open Chrome and type
http://hassio.local:8123
- Note: If that URL does not work, you may need to enter your device’s IP address manually. A great way to find this is to use a smartphone app like Fing (Android, Apple). It’ll search your WIFI network for connected devices, and you should see one labeled
hassio
orRaspberry Pi Foundation
. Type that IP address into chrome (e.g.http://192.168.1.125:8123
)
- Note: If that URL does not work, you may need to enter your device’s IP address manually. A great way to find this is to use a smartphone app like Fing (Android, Apple). It’ll search your WIFI network for connected devices, and you should see one labeled
- Follow the on-screen instructions to complete setup
USB Boot - Raspberry Pi 3
In the lastest Home Assistant blog post, USB boot for the Raspberry Pi 3 was officially announced! Running HA from a USB-mounted SSD is a game-changer. SD cards can wear out as they aren’t designed for constant use, unlike an SSD. Here’s how I setup Home Assistant to run from a USB-mounted SSD on my Rpi3.
Note: The Raspberry Pi 4 does not support USB boot yet (it’s coming!)
- First, we need to enable the USB boot option on the Raspberry Pi.
- To start, you’ll need an SD card formatted with Home Assistant (follow steps 1-4 above)
- Unplug, and then plug in the formatted SD card into your computer
- Go to Computer, open the drive labeled
hassos-boot
- Using a text editor like NotePad, open the file named
config.txt
- At the top of the text, hit enter to create a new line
- Paste this
program_usb_boot_mode=1
- Save the file and close NotePad
- Plug the SD card and power cable into your Pi
- This will transfer that config option to the Pi’s permanent memory
- Wait 2 minutes and unplug the Pi and your SD card You’re done with SD card now.
- Get a compatible SSD-to-USB adapter
- the Saberent EC-UASP USB 3.0 adapter works for me
- Find or buy a 2.5” SSD
- I use a Seagate IronWolf 110 240GB drive
- Plug the USB drive into your computer.
- Flash Home Assistant directly to your SSD using balenaEtcher.
- You need to enable
dangerous mode
in belenaEtcher’s settings to image a disk drive. Be SUPER sure you select the right drive, so you don’t wipe your PC’s drive. It should be labeled something likeSABERENT SCSI Disk Drive - 240GB
- You need to enable
- If desired, follow step 5 above to setup WIFI.
- Unplug the drive from your PC, plug it, ethernet, and power into your Pi.
- The USB drive light should be blinking, and you’re off and running
- _The blinking is almost as annoying as talking about politics at a family holiday party. I had to put a piece of tape over mine.
- _The blinking is almost as annoying as talking about politics at a family holiday party. I had to put a piece of tape over mine.
P.S. - What’s the difference between Home Assistant, HassIO, and HassOS?
UPDATE - Thanks to feedback from Paulus and Franck, I’ve revised the following for accuracy.
There are three different software layers that work together to form Home Assistant. At a high level…
- HassOS functions like an “operating system”. It manages the HassIO and Home Assistant software layers. It enables access to hardware features (rebooting, USB ports, GPIO pins, network connections, etc.).
- HassIO is a supervisor that links Home Assistant (the software layer), HassOS, and other software packages (Add-Ons).
- Home Assistant is the main software layer you interact with, which runs all the automations, user interface, etc.
In most tutorials, installing Home Assistant means “flashing HassOS,” which is the best option for most people.
However, it is possible to install HassIO without HassOS or install just Home Assistant in a Python virtual environment or via Docker. Most people shouldn’t need to worry about this, but it can make sense for some hardware configurations.