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.
Michael Veale said on someone.elses.computer:
@Edent a good use for my old pi was turning my old refillable brother laserjet into a wireless printer. but the old one was a 3 not a 2
stark@ubuntu:~$ :idle: said on techhub.social:
@Edent
Unfortunately I have run out of #raspberrypi, and used my last one for my #octoprint server.
I still have my first and original RaspberryPi 1A, but it is 800MHz and 500MB ram, it just can't do enough anymore and is way too slow for any servers. You can basically only use it for #IOT devices. iot octoprint raspberrypi
Valentin Sawadski said on mastodon.social:
@Stark9837 @Edent My Raspberry Pi 1 still runs AirPlay and Spotify without problems. My Raspberry Pi 2 runs TimeMachine and PiHole.
As long as the HW works, I’ll keep using them 💪
stark@ubuntu:~$ :idle: said on techhub.social:
@vsaw @Edent
I still want to benchmark it with #Klipper to see how it performs, because #raspberrypi is actually getting quite powerful and could be overkill for Klipper, but then again I want to run a web-server with it for #Moonraker or #Mainsail. So I will have to see.
Otherwise, I think I am just going to use it for my dedicated #MQTT broker, because my MQTT broker is getting a lot of use, but is currently running on my Pi I am using for other stuff. So I would rather want to keep everything more organised and separate. Because it is hindering the upgrades that I want to make on my Pi, as it would interrupt my MQTT services. klipper mainsail moonraker mqtt raspberrypi
Adrian Cockle said on mastodon.social:
@Edent probably not worth trying on my first gen Pi Zero then? 🙂
bazcurtis said on masto.ai:
@Edent I am really enjoying Home Assistant. I installed it about two weeks ago on my Raspberry Pi 400. I bought an external SSD to boot from.
Funnily enough I haven’t got to the home automation part yet. I have been working on integrating my solar inverter and Hildebrand CAD.
I have written some nice cards to show my grid status. Here is an example. I have some nice notifications as well
#HomeAssistant homeassistant
andrew! said on defcon.social:
@Edent my favourite thing about living in cambridge is that the raspberry pi foundation is based here. one of the few places in the world where is it easy to get your hands on an rpi4
Lunatech said on infosec.exchange:
@Stark9837 @Edent In recent days I have read a couple articles suggesting the #LePotato as a good replacement for the #RaspberryPi 3B - I have not used it personally so can't say how compatible it is with a real Raspberry Pi though. Be aware the ethernet connection is only 10/100, not GB. lepotato raspberrypi
Denilson says:
Someone built a website trying to track when Raspberry Pi will be available: https://rpilocator.com/
Yeah, RPi4 has been sold out for months.
Karl Austin said on tweep.uk:
@Edent I keep thinking about HA instead of Hubitat, but then I might need to beef up my NAS a bit as it's already fairly loaded running other stuff and at least Hubitat is it's own device :/
Herman says:
First of I'm a fan of the work of the creator of Home Assistant and the community, but it begs the question why it was built in such a way that it can not be comfortably hosted on something like a Raspberry Pi 2. Resource consumption seems to be not much of a concern. Maybe it is me, but I really feel like languages like Python are not good for this world and we're moving from efficient software to less efficient software on more and more fronts.
Navaneetha KS says:
@Herman You can try the HAOS version https://github.com/home-assistant/operating-system/releases where you can find images for Raspberry pi 2. Please look in the assets of the release. I have tried and it works
Dan Bullock says:
Installed HA 10.5 on RP2, working great
More comments on Mastodon.