Adventures in home automation - Home Assistant on a Raspberry Pi 2
They say that The Best Camera Is The One That's With You - the same is true of Raspberries Pi. As much as I'd love a 4B, they seem permanently sold out.
So I dug through my scrapheap of old tech and resurrected an ancient Pi2. It's old, outdated, slow, with limited RAM, and has a bunch of much-abused GPIO pins. But it works and - crucially - is still supported by Home Assistant OS.
Well... ish!
The official Home Assistant installation guide for the Pi says that you can use a:
Raspberry Pi 4 (Raspberry Pi 3 is ok too, if you have one laying around).
But, if you go to the latest releases page and then click "show all assets", you'll be rewarded with a file called haos_rpi2-9.5.img.xz
- that's Home Assistant OS for the Raspberry Pi 2. Sweet!
From there it was just a case of following the installation steps. But... my goodness the Pi 2 is slllloooowwwww.
I could see that the Pi was responding to pings, but the web interface wasn't coming up. I left it for a few hours and did something more interesting. And, when I came back, it worked!
But, that slowness becomes a recurrent theme. Not in the interface itself, which is delightfully snappy, but it is slow on any form of add-on installation, upgrade, or reboot. A lot of waiting is involved. Even something like viewing sensor history slows to a crawl.
It quickly detected all my smarthome gadgets (I have far too many). Integration was pretty easy - assuming you trust the system with your username and passwords... Most of these devices don't have OAuth. Some don't even have official APIs. But HA was able to interact with nearly everything.
Of course, that does mean the user interface is a lot!

As long as you're happy to fiddle around making everything just right, then the UI isn't too bad.
The phone UI is great! It interfaces directly with Android 13's quick actions. I was able to add a couple of buttons to my phone to do common tasks like switch off lights, and turn on electric blankets. The app is a bit of a power hog - because it is continually polling for updated data about your home. I put it in battery jail - I care more about control than reports.
Installing update is slow. Installing new integrations is slow. Rebooting is slow. But, thankfully, these are things you only do rarely. For switching lights on and off, getting the bed warm, and checking the air quality, it's fast enough.
At the moment, I'm using sloppy security. The Pi has the usernames and passwords for my various gadgets and talks to them via their official APIs. I guess I could reflash them all with FLOSS firmware - but that seems like a bit too much effort at this point.
Similarly, the Pi is running Let's Encrypt and uses Dynamic DNS to give me a permanent connection back to my home. I'm reasonably sure the security is good enough - but I probably need to Design a Home Network for Hostile Devices.
But, for now, I'm impressed with Home Assistant. It isn't quite "it just works" - but it's good enough for the enthusiast who is willing to put up with a few rough edges.
And I'm pleased my old Pi has a new purpose in life.
Navaneetha KS says:
Dan Bullock says:
More comments on Mastodon.