Homeassisted Suicide

· 5min
cover

Home Assistant (which I shall abbreviate as HA, not to be confused with High Availability) is a project into which a lot of sweat and tears have gone in to. Seeing just for how many devices and systems Home Assistant has integrations for is nothing short of impressive. It is also greatly held back by baffling design choices, lava flow, and Python.

But let's set the scene: I have been running Domoticz for several years, along with other home automation systems and ecosystems. My goal was always to avoid using cloud services operated by some company because I saw things like the IFTTT Disaster coming. Domoticz was nice in the beginning, but after some time the cracks began to show. For what it was doing, it was simply too bloated and complex. Despite attempts to modernize at least the user-facing parts, people ended up making Dashboards for their dashboards.

I gave HA a try years ago, and found that it wasn't for me. It was simply too limited to be of any use, and I wanted to get away from doing core automation tasks with Raspis. What ended up running most of the interfacing with wireless sensors and devices was Hubitat, which did exactly what I needed it to do: Put a REST API in front of all of my devices regardless of vendor. Hubitat's UI is not going to win any awards, but the support is mostly excellent and it has many hacker-friendly features like the ability to just copy-paste code for a new device driver into a form and pressing save to make unsupported devices work. For the actual logic I wrote my own programs, like my home alarm system, which I eventually rewrote in Rust. The benefit of this approach is that exchanging Hubitat for something else is trivial and does not require me to spend time reconstructing functionality using a different built in system or clicking together lego logic blocks.

But then I found that someone finally made what I always wanted: A non-cloud, completely local device that enables voice control and interacting with things like LLMs. I was prepared to spend time tinkering and unfortunately it quickly became obvious that this thing was built with HA in mind. There is little to no documentation on how the integration works, though it is of course open source so one could take that code and build a lightweight backend for it. But I am too lazy for that, so I thought: Just run HA. It's been several years, surely things have improved since then. How hard could it be?

Turns out, if you are willing to run an entire VM for it, it's easy. If you don't want a full VM, you can run a docker image, but you lose some functionality and you might run into some issues. Installing "HA Core" on Arch was something I gave up on after a few hours because try as I might, several python dependencies just wouldn't play nice and simply don't run on current versions of libraries. So docker it is, the voice integration works, and I was able to make it connect to my LLM running outside the HA docker. But oh boy is this painful.

Here is the thing: Python virtual environments are terrible. They are a hack to try and get around very basic design errors that prevent you from having multiple versions of the same library available. Python is slow, and requires a lot of memory even for basic tasks. Getting an existing python project working can be a painful and long journey, as evidenced by Home Assistant. This doesn't provide good fertilizer for a complex software project. As a consequence, HA is a bloated mess that is brittle, resulting in the recommendation that you just download a VM image with everything installed at just the right version and just the right angle to "work". The architecture is needlessly complex with functionality being duplicated under different names (event bus and intents for example) and ripe with antipatterns like god objects (hass).

Even the voice integration is terrible: The configuration options are very restrictive, the way HA pushes state information into LLMs is naive to the extreme and doesn't allow for much customization, and making changes to any of this requires diving into a mess of python code and deployment issues that frankly, I just don't bother.

In my opinion, Home Assistant is impressive, and I respect the work and dedication that went into it, but it is not good software. I run it only to get voice functionality working, and have given up on trying to get my own data into the system for the time being. I don't think HA will ever be "fixed". Something else will come along and replace it instead. Or someone will write a new backend for the HA voice box. Or there will be a different device that doesn't require HA.

Either way, the bottom line is: While I currently still run HA for a single function, I am glad I don't have to.