Setting Up Home Assistant on a Raspberry Pi 3 Model B
Takeru O'oyama
Posted on October 14, 2024
Introduction
As part of my DIY smart home project, I've decided to explore Home Assistant to bridge various functionalities.
(Click here to read the article in Japanese.)
Previously, I was running Homebridge on a Raspberry Pi. However, after moving to a new place, several changes prompted me to reconsider my setup:
- The Wi-Fi SSID changed.
- The number of IoT devices increased or decreased.
Given these changes, I thought about reintroducing Homebridge. But upon researching, I discovered Home Assistant.
After skimming through the Reddit post Homebridge vs Home Assistant, unbiased opinion and its comments, I gathered the following points:
- Homebridge is designed primarily for use with HomeKit.
- Home Assistant is not fully integrated with HomeKit.
- Home Assistant and Homebridge are not mutually exclusive; some people run both.
- Someone managed to make all Homebridge plugins work within Home Assistant.
Given the variety of setups people have, I decided it might be quicker to try Home Assistant myself.
Who Is This For?
- Those who want to set up Home Assistant on a Raspberry Pi 3 Model B.
- My future self who might forget these steps after three months.
Steps
I'll proceed according to the official documentation.
Downloading the Installer
- Raspberry Pi 5 or Raspberry Pi 4 with power supply (Raspberry Pi 3 Model B is ok to get started, but the Model A does not have enough RAM).
Raspberry Pi3 Model B ボード&ケースセット 3ple Decker対応 (Element14版, Clear)-Physical Computing Lab Date purchased: 12/30/2017
Since the Raspberry Pi 3 Model B will be used, there seems to be no problem.
- Micro SD Card.
- Ideally get one that is Application Class 2. Check for the label A2 on the card. Application Class 2 cards perform better especially on small read and write operations and are better suited to host applications.
- Make sure to use a card that provides at least 32 GB.
Samsung microSDカード 32GB EVO Plus Class10 UHS-I対応 スマホ カメラ向け (最大読出速度95MB/s:最大書込速度20MB/s) Date purchased: 12/30/2017
I think I bought this with this Raspberry Pi when I bought it. Maybe a little more capacity?
- SD Card reader. This is already part of most laptops, but you can purchase a standalone USB adapter if you don’t have one. The brand doesn’t matter, just pick the cheapest.
Anker 8-in-1 USB 3.0 ポータブルカードリーダー【microSDXC / microSDHC / microSD / MMC / RS-MMC / UHS-Iカード用】 Date purchased: 2/8/2020
(I think I bought this to move data from the SD card I used in my old digital camera...)
- Ethernet cable. Required for installation. After installation, Home Assistant can work with Wi-Fi, but an Ethernet connection is more reliable and highly recommended.
This uses a LAM cable that was lying around at home, as appropriate.
Remember to ensure you’re using an appropriate power supply with your Raspberry Pi. Mobile chargers may not be suitable, since some are designed to only provide the full power with that manufacturer’s handsets. USB ports on your computer also will not supply enough power and must not be used.
I'm not sure if it's an AC adapter for a phone or a PC power supply, so I thought it would be safer to have a dedicated power supply.
Raspberry Pi用電源セット(5V 3.0A)-Pi3フル負荷検証済 Date purchased: 1/16/2020
I thought I could use this power supply set that I had bought with the Raspberry Pi.
When I continue reading Install Home Assistant Operating System, it seems that the installer can be easily created with Raspberry Pi Imager. Since I am working on Ubuntu right now, I downloaded it from software.
Install Home Assistant
Insert the SD Card reader with the Micro SD card into the USB port of the PC and start imager.
Proceed with the installation wizard.
Select Home Assistant OS 13.1 (RPI 3)
as the OS.
Insert the SD card into the Raspberry Pi, turn on the power and wait for about 3 minutes, then the following screen will appear.
This may take 20 minutes or more
The indicator is running all the time, so I wait, literally, 20 minutes or so with a cup of coffee.
Create a user when the user creation screen appears. The account information should be in 1Password.
Set the data transmission policy, etc. as appropriate.
It found compatible devices in the same network on its own. It's amazing.
Setting up Wi-Fi on the Raspberry Pi
Go to Settings >> System >> Network >> WLAN0 >> Wi-Fi and select an access point.
No connection.
Guide: HomeAssistant WiFi Setup / Troubleshooting HomeAssistant WiFi (Works!) I tried this because many people seemed to be helped by it.
- connect an external monitor, keyboard, and mouse to the Raspberry Pi
- set up wireless in the manual
# Check the name of the network interface for wireless. Default is wlan0
network info
# Set up wireless in manual
network update <interface_name> --ipv4-method auto --ipv6-method auto \
--wifi-auth wpa-psk --wifi-mode infrastructure \
--wifi-ssid <WiFi_network> \
--wifi-psk <WiFi_password>
# Check network connection status again
network info
Return to PC and check wlan0 configuration status.
Since it was connected properly, unplug the wired LAN from the Raspberry Pi.
Go to Settings >> System and reboot from there as the power button appears in the upper right corner of the screen.
Final Thoughts
The setup itself went smoothly, but I had a hard time setting up the Wi-Fi.
I'd like to link with Amazon Alexa Skill and Homekit, so I'm going to proceed as is.
Posted on October 14, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.