Home - lka/HomeAutomation GitHub Wiki

Welcome to my HomeAutomation wiki!

Why I'm using a kubernetes cluster to do Home Automation

My first contact with home automation was a raspberry pi 2 with pilight, a spreadboard and pilight interface to send RF signals to switch on and off the christmas illumination.

It wasn't too comfortable and I had to put the raspi on top of a cabinet in the living room to be near by the christmas tree. It did what it should and the rest of the year I played around with different modules and programs running on the pi. That had the result, that next year the pilight wasn't working anymore because of all of this stuff that had been installed and never uninstalled cleanly.

That's why I came to hypriot-os with docker and docker containers, because I thought that throwing away a docker container is the best way to clean up, but the result was the same. The directories with dockerfiles grew up and the communication between docker containers was more and more difficult. To start and configure them I used docker-compose and then I decided to use more than one raspberry pi.

Now it was time to use a kubernetes cluster and I installed k8s and did the configuration with ansible playbooks. The k8s master couldn't do much more than being the master and the second raspi did the jobs. It was time for a third raspi...

Meanwhile I found a solution for my roller shutters. Behind each wall switch I have installed a Shelly 2.5 which has 2 relays and is connected to my wifi. The solution to have it connected to a home automation was ShellyForHass integration in Home Assistant. For this there exists one solution with own OS and one with docker containers and a helm chart. I decided to use docker containers but k8s was too heavy weighted.

But there was a project k3s from rancher labs. I had some difficulties to get it started but now it works like a charm.

Required preconditions for Home Automation

All switches and power sockets should work as expected. The home automation should be an add on to do things automatically and it should be normally invisible. If automation doesn't work you should be able to do it by hand. Have a history, a logfile for errors, a description and a backup. Always have one in reserve....

Automate the garden irrigation

Sensors and switches with Home Assistant