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!

Screenshot of a website with loads of toggle switches.

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.


Share this post on…

  • Mastodon
  • Facebook
  • LinkedIn
  • BlueSky
  • Threads
  • Reddit
  • HackerNews
  • Lobsters
  • WhatsApp
  • Telegram

13 thoughts on “Adventures in home automation - Home Assistant on a Raspberry Pi 2”

  1. 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

    Reply | Reply to original comment on techhub.social
  2. 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

    Reply | Reply to original comment on masto.ai
  3. 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.

    Reply

What links here from around this blog?

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.

Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <p> <pre> <br> <img src="" alt="" title="" srcset="">