(One of my summaries of the 2023 Dutch edgecase k8s conference in Utrecht, NL).
He wanted to automate his house. But he didn’t want to spend a lot of money. So: lots of second-hand computers, temperature monitors, pumps. The most expensive part was 1000 Euro (new price 3000, so that’s OK). Two cheap broken second-hand lawn mower robots that were combinable into one
Let’s start simple! He had an old analog electricity meter, so he tried to hook up a sensor that looked at the analog meter, but that didn’t really work. In 2020 he got a modern smart meter, so he could get cracking. Such a meter has a “P1” port for reading the measurement. He first ran it on a raspberry pi, but in the meantime he’s got it running in K3S.
A problem was that the container needed full host access to read out the serial port. The solution: a separate “serial2network” proxy that makes the serial data available over the network. Handy!
Next up: garden lighting. First a simple sensor + remotely operated switch. Battery life was an issue, as was water resistance and sensor degredation… His wife didn’t like it as it wasn’t very consistent. So they went back to a regular mechanical on/off switch…
But, he tried it again. Raspberry pi that grabs sunset times from the internet and switches on the lights 15 minutes before sunset. Nice. A further improvement was to put it into kubernetes. A cronjob for the sunset functionality. And the option to have an interface for manual adjustments.
Next up: monitoring the robot lawn mower. At the start, the mower worked just fine. But after they got a dog, it started to run into problems (a hole being dug in the garden, dog toys in front of the mower, etc). So he had to start monitoring.
Solution: a sensor in the robot mower’s “house” to see if he’s out into the garden or not. Mowing happens in specific time windows, so when he’s not home in time, a warning gets send to his personal slack channel. And of course the data is stored in some metrics software.
Next up: warming the water for the swimming pool. A pump pumps water into solar heaters on the roof and then into the pool. Initially, a regular timer made sure the pump was only on when it was sunny.
Let’s upgrade it. So: temperature sensor in the pool. Temperature sensor on the roof. Pump motor controller. And a raspberry pi to steer it. Data storage in some SQL database and a web interface. Later he changed the relay for the pump motor to a frequency steering system so that he could run the motor at half capacity: much cheaper.
All this was moved to kubernetes, too. Influxdb instead of the previous sql database. Grafana dashboards instead of the home-made web interface. Most of the software is written in python.
He set it all up as microservices. One dockerfile + some code for the lawn mower, one for the pool, etc. For his taste it was too much effort for his simple needs. Now it is just one dockerfile with all the code and separate config files to configure it. He continuous deployment via argocd :-)
At the end he showed Falco, an open source system for detecting threats and anomalies in containers, kubernetes and cloud services. Is someone running a console inside a container where that isn’t normally happening? It sends a signal.
Not something he really needed for his house automatiohn software, probably, but he installed it as he works for the company that builds Falco. Network connections that aren’t supposed to happen, for instance.
Vandebron is a sustainable-energy-company. In 2014, only 5% of the energy produced in the Netherlands was green. Their mission is to help get it to 100%. At the moment it is 40%. It is moving forward!
There are quite some challenges:
There is a move from central to decentral: instead of a few big power plants, you have lots of windmills. And solar panels on individual roofs.
Dumb to smart. The grid needs to be more flexible.
Fossils to green means electrifying, Which means more grid usage.
On demand to storage. A gas power plant can easily handle extra demand, but solar cannot. So you need more storage. Storage is really a problem at the moment.
Balancing the energy grid using IoT is something they focus on. Sometimes this means that they have to shut off wind turbines to prevent overcapacity and grid instability, for instance.
Something like “the energy grid” is “pretty important”. Critical infrastructure. So security is real important.
The starting point was an overpowered i7 intel NUC. Not industrial grade, though. Second ethernet port via usb. Ubuntu+k3s. No real update/upgrade policy. They wanted something better. Kubernetes was required, though.
They started looking at Talos linux “the kubernetes operating system”. And at “wireguard” tunnels towards the devices to prevent man-in-the-middle attacks. With a wind turbine out on sea, there’s quite some in-the-middle!
Wind turbines on sea: you need hardware that is real sturdy. For that, they worked with onlogic, a maker of such hardware. Industrial computers, rugged computers, panel PCs and edge servers. 75% of what they do is the industrial/rugged stuff.
“Industrial” means environments where humans normally work. Factories, 0-30 degrees temperature, not a lot of shocks. For wind turbines you need the rugged stuff: salt water, vibrations, storms…
What they came up with is a much more technically robust and stable version of the raspberry pi. Created in cooperation with raspberry. Works from -20 to +65 degrees celcius. Energy efficient. Shielded to withstand signal interference and to prevent interference to the outside world (important for sensitive measuring equipment and medical devices). Certified for many markets and industries.
My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):