Radical reduction - my homeautomation journey

published on 02.08.2024
tags: mental health homeautomation

For some years, I have a homeautomation running in my apartment. I did not extend it over time by a lot, but I like to have reliable, low maintenance services, especially about temperature regulation and lighting. This is a story of radical reduction. I basically went from left to right in 5 hours (there are zoom-in pictures in the following article):

The progress

How did this even happen?

Feature bleed. My home automation had those features:

This doesn't sound a lot, but it was.

This system evolved over time. I started with MAX Themostates and Homematic window sensors, which I connected to a Raspberry PI using a custom flashed Max CubeCUL (german link) and cod.m's CC1101 Raspberry Module, and Homegear installed on Raspbian.

For UI, I installed (openHAB)[https://www.openhab.org/].

To connect openHAB and Homegear, I implemented a Flow in Homegears internal NodeRED - which is called NodeBLUE - to custom map my thermostates to "homie"-mqtt standard, because openHAB is able to autodetect Homie devices via MQTT.

So I needed an additional MQTT broker - mosquitto. The System was the following:

This was around 2020, the first stage. First stage of Automation

From here, the system grew quite big over time. Since I don't want to elaborate each point with a own paragraph, I will just jot it down using bulletins:

This system remained like this for long time, because I was severly annoyed by it's complexity and didn't want to touch it at all. Actually, in the occasions I tried to do something with it - for example updating the software components or Raspbian - I constantly broke the system. After a while, I just had absolutely no energy for it. It looked somehow like this (all running on a raspberry pi):

Second stage of Automation

As you can see in the summary, this is just a grown system where you attach things one-by-one until you have an annoying monster. I have enough of this at work, but I don't want to have that in my appartment. So you see, feature and complexity bleed is even happning in just a very simple home automation.

The big reduction

When I introduced my homelab server this year, I moved HomeAssistant from the Pi to the homelab server. But I recognised that the server does absolutely not need to run 24/7 and actually consumes a lot more power compared to the raspberry pi 4 which runs the home automation - actually 10W compared to 4W (which is both perfecly fine - but we all try to save energy right). So I wanted to have scheduled boots and shutdowns for my homelab, but also have the HomeAssistant UI available all the time. This means, move HomeAssistant back to the raspberry pi.

At the same moment, I decided to update the OS, and all other software which...

lolmeme

obviously completely messed up my installation, especially Homegear. I spend 5-6 hours trying to fix everything, but as I mentioned earlier I'm usually not very eager to throw away stuff and do a clean sheet installation.

Starting from scratch on the Raspberry

At this point, I wanted to do things very differently and use as little software as possible, so I don't run into problems when updating the components. Let it be Homegear, zigbee2mqtt, HomeAssistant, grafana or influx, in the last years I had issues with each of them during software updates. Not to speak of raspbian itself. It might be due to the fact that I do not update very often and if so, I instantly jump multiple versions. So my goals for the new system were the following:

Since I wanted to keep the sheets clean in Raspbian, I decided not to install software via apk, but use docker and docker-compose instead to manage the actual automation system in a reproducable way. The docker compose project is available at my github account.

Outside of docker, I only want to have the backup system and the operation system running.

The backups problem I solved by just using a shell script which does a gzipped tar backup of the whole docker-compose project folder, including all configurations which are mounted into the containers. This backup is triggered by a cronjob once a day. On my Macbook, I also run a cronjob every hour to check if there are new backups via ssh and save them to my local disk. To me, this sounded as the most straight forward and easiest solution, utilizing long proven software.

In the end, this means that in case of a reinstallation I just need to

to make the whole system work.

Homeautomation

The Solution

I just ended up with two containers are are part of the docker-compose file, and I will try as good as possible to keep it like that.

Homegear, I again use to connect to my MAX Thermostates using a CUL Cube and to my Homematic window sensors using the mentioned MAX CubeCUL and CC1101 Module. AFAIK, HomeAssistant is not capable of utilizing the Cube so I basically just did the very basic setup and paired all the devices to Homegear, and then connected Homegear to HomeAssistant since it can act like a normal Homematic CCU.

Btw, do you recognize that too many products in Homeautomation start with Home? This get's really confusing by now.

HomeAssistant will be the main driver of my automation from now on, and to me this feels very well. I was actually surprised how much of my old implementations can be covered by HomeAssistant by now.

What it has done for me:

Summary

I'm very happy with the last few days. I was able to drastically strip down my homeautomation they way I would like it to be. While doing this, I actually realized how this system was stressing me out. I was able to implement all automations I had before, use a lot less software and build a more robust backup and config management system at the same time.