A Comprehensive Guide to Installing Home Assistant on Raspberry Pi

Two years ago, a friend gifted me a box that was sold in the market, pre-installed with HassOS, which had a very complete set of features.

I tested and used it for a while, but using HassOS in China comes with many challenges.

  • • The most serious issue is network-related problems, making it often difficult to update Home Assistant and its related plugins.

  • • HassOS runs many services, consuming a lot of memory, which can cause the device to occasionally freeze.

So I decisively gave up on this box, leaving it in the corner to gather dust until now.

Unknown Issues

Today, I thought I hadn’t played with this box for a long time, so I took it out of the box, wiped off the dust, and plugged in the network cable to power it up.

After a long wait, the router interface showed a successful connection icon, but there was no network information from it.

I was dumbfounded, thinking it was a problem with the network cable, and tried several ports, but nothing worked.

At this moment, I noticed there was an HDMI port on the box, so I connected it to a monitor. The screen was filled with code, and there was no login entry.

Not being able to log into the terminal was completely frustrating for me; I couldn’t do anything at all. After various efforts, I gave up.

My Choices

People often ask me what kind of hardware is suitable for using Home Assistant.

Previously, I would respond: “Actually, the hardware is not important, as long as it can run Home Assistant.”

Now, I feel it’s necessary to give some advice to new users, hoping everyone can find the answers they want from my choices.

Why Choose It?

The first “hardware device” I owned was a Raspberry Pi 3B. Why did I buy it?

When buying something, it’s definitely for fun.

So what to play with? How to play? If I want to play with this and that, wanting to try everything, how should I do it?

Well, actually it’s because I knew nothing back then, and the Raspberry Pi was extremely popular, with countless project tutorials available online.

For example, magic mirrors, smart speakers, routers, smart cars, smart TVs, arcade game machines, cloud storage, temperature and humidity sensors, gas sensors, infrared sensors, and many more…

I found all these things interesting, so I decided to try them all out.

Benefits of Choosing It

As long as I can think of various fun projects, the Raspberry Pi has very comprehensive tutorials and images, which are easy to use right after flashing.

I don’t have to worry about complicated environment configurations or compatibility issues; after flashing, I can just follow the tutorials to use it.

So the core point is less hassle, more tutorials.

Almost all issues, including Bluetooth, audio, GPIO, and Linux systems, can be found online, especially for some obscure hardware drivers, which are often compatible with the Raspberry Pi (driver compatibility is very important). My painful history with compatibility was experienced with other hardware devices.

During that time, I transformed from a Windows novice to a new user familiar with basic Linux commands.

Encountering Problems

After I got bored with those projects, I really wanted to create my own image.

So I started from scratch to install the official system (before, I was using someone else’s pre-configured setup).

Everyone knows that starting from scratch is particularly challenging; without tutorials, it’s impossible to continue learning.

From configuring SSH to connecting WiFi, then enabling GPIO, and connecting the camera module, infrared receiver and transmitter, and controlling the cooling fan.

Whenever I encountered problems, I would search on Baidu (Baidu is omnipotent), and gradually accumulated knowledge, learning many things bit by bit.

Accidental Contact

Not Knowing How to Play

I still remember a long time ago, I accidentally flashed the Home Assistant image, which was probably version 0.6x.

I must have seen an introduction somewhere that said it was a smart home system, and it seemed quite impressive.

However, after flashing it, I entered the main interface and had no idea how to use it; it was completely different from what I expected, so I decisively deleted it and switched to another image.

Entering the Era of Smart Living

My second encounter with Home Assistant was because I bought my first smart device, the Philips bulb from Xiaomi. It was really expensive at the time, costing 69 yuan (a regular bulb only sells for 5 yuan at the supermarket).

Then, over the years, I felt that life gradually entered the era of smart homes.

Later, I bought my first smart speaker, the Tmall Genie, and learned that I could use the Tmall Genie to control devices in Home Assistant.

Continuous Learning

I learned about developing and using Home Assistant images from the HAChina website.

Honestly, this website was really great in the past; every aspect of Home Assistant was explained in detail. Although they sold courses, I didn’t buy them; I had no money and could only spend time learning myself.

So I read all the tutorials on this website multiple times, slowly trying things out. Over time, I mastered the skills to develop plugins.

Changes in the HA Era

Due to the rapid iteration of Home Assistant versions, after several disruptive updates, the development tutorials on the HAChina website are no longer applicable and have been removed.

As Home Assistant gradually developed, the free images on HAChina also entered the HassOS era (previously, it was the HA Core version installed with Python).

Hardware Requirements

Since I started flashing HassOS, my Raspberry Pi 3B has really suffered heavy blows, often freezing and completely unable to cope, with the CPU hitting 100% and becoming inaccessible.

Because the Raspberry Pi 3B has only 1G of RAM, if many integrations are installed, memory consumption can surge. I observed that some HassOS services were doing something unknown, suddenly causing the CPU to spike, making the system sluggish.

Thus, I completely abandoned HassOS and switched to the Docker platform, starting from scratch to learn Docker-related knowledge.

Docker is great!

From installing Home Assistant with Python, to HassOS, and then using Docker to install Home Assistant, everyone who has used it knows that Docker is fantastic.

Using Docker eliminates the need to worry about environment issues because Home Assistant has restrictions on the Python version, making it easy to run into problems.

I was stuck with Python 3.6 all the way to Python 3.10; if you don’t update Python, you can’t use the latest version of Home Assistant.

So I strongly recommend everyone to use Docker for installation; it’s worry-free and effortless.

Conclusion

If it weren’t for the fact that Raspberry Pis are too expensive now, I would definitely recommend it.

Advantages

  • • Official support from HA, comprehensive features, and strong compatibility.

  • • Numerous tutorials and complete documentation, with many free images (the images I created are paid 😂).

  • Suitable for learning Linux-related knowledge.

Disadvantages

Having mentioned so many advantages, it does have its drawbacks.

For example, low performance and prone to failure if used improperly (strongly reduce frequent read-write operations and use high-quality memory cards to solve this problem).

It’s too expensive now, too expensive, too expensive.

I bought it for just over 200 yuan in 2016, and then sold it for 450 yuan last year. From a cost-performance perspective, I really do not recommend buying it.

Solutions Matter More

However, I believe that for a beginner, while performance is important, what matters more is having a complete solution when problems arise.

Unlike the box in my hand, when issues arise, it becomes a brick, and I can’t find any information about it online.

My Orange Pi Bluetooth driver cannot be used in Home Assistant, and this problem remains unresolved; I can’t find any related solutions.

When a product has a very large user base, it will be prioritized for compatibility and adaptation.

The problems you encounter have already been encountered and solved by someone else.

Leave a Comment