Automating an old electrical heating via Homeassistant
Or how to get away without buying an entirely new central heating
The broken central heating
A while ago the central electrical heating of my grandmother started to cease functioning. Unfortunately, we relatively quickly figured out that the early 80s technology control unit of the central heating has finally surrendered and thus was irreplacably broken.
After a quick look around and some outreach to fellow electrical engineers, we figured that there is none of these units still available today and thus not even the acquisition on ebay of a (used) control unit was a feasible option anymore.
This meant we were left with two options:
A.) Get a new heating and install it in her house: Expensive, unhappy grandma (construction works, noise - she’s old and doesn’t want to bother with these things anymore).
B.) Try something else and figure out a solution for this.
Would this work?
Given the not-so-favorable options at hand, we had a more detailed look at the central heating and whether we could foresee other options to get things going again. See the below drawing that (simplified but still accurately) describes what is even observable from the outside without opening the heating altogether.
Indeed, the manual switch (really a red switch on the front of the heating) worked nicely so we could turn on / off the central heating to our liking. However, for grandma this still didn’t pose a good option: Her central heating is in the basement and the days of her best walking abilities are also long gone. But what if we find a way to automate this for her at least so she can press a button “on demand” in her living room or even better have this connected with a temperature sensor in her living room?
Looks like we can do this
We opened the case and quickly figured out that the button is a simple (thank you 80’s!) solution that has two wires connected and can thus be easily controlled using e.g. a Shelly 1 v3 switch like the one shown here, which can be controlled using the Shelly app or even better with the Homeassistant integration that Shelly devices provide.
So our next step was to make the device accessible via Homeassistant to enable easier switching - see below map on how we connected things together in the end:
Basically this meant connecting the Shelly with two wires to the red switch on the central heating, connecting the Shelly via WiFi to the repeater installed in grandmas house and then making sure to also collect temperature data in her living room via WiFi to have the data for controlling the central heating without actually having a real controlling unit anymore.
I then created automation triggers based on conditions within Homeassistant to define when to turn on the heating and when to turn it off again: Remember, this is an old-style electrical (!) heating with high energy consumption so we wanted to limit the hours that this is actually running to the minimum so that grandma can live comfortably without having to freeze or burn through money needlessly. See below YAML configuration for the automation.
alias: Heating automation ON
description: Turn on heating when temperature falls < X °C
mode: single
triggers:
- at: "07:00:00"
trigger: time
- type: temperature
device_id: e026f4e73ea4df000c9fd669d71b1298
entity_id: sensor.awair_element_78711_temperature
domain: sensor
below: 20
for:
hours: 0
minutes: 5
seconds: 0
trigger: device
conditions:
- condition: time
after: "05:00:00"
before: "23:30:00"
actions:
- type: turn_on
device_id: 45f967615f0b391751baa894326fa36b
entity_id: switch.shelly1_98cdac2dc531
domain: switch
This does the following check:
Is it 7AM in the morning?
Is the temperature below 20°C for more than 5 minutes consecutively?
If any of the above is true _and_ its between 5AM and 11:30PM, turn on the Shelly and thus the central heating.
Similarly, we have created a rule that handles automatic shutdown of the central heating with a similar setup:
alias: Heating automation OFF
description: Turn OFF heating when temperature > X °C
mode: single
triggers:
- type: temperature
device_id: e026f4e73ea4df000c9fd669d71b1298
entity_id: sensor.awair_element_78711_temperature
domain: sensor
above: 22
for:
hours: 0
minutes: 5
seconds: 0
trigger: device
- at: "23:00:00"
trigger: time
conditions:
- condition: or
conditions:
- type: is_temperature
condition: device
device_id: e026f4e73ea4df000c9fd669d71b1298
entity_id: sensor.awair_element_78711_temperature
domain: sensor
above: 22
- condition: time
after: "23:00:00"
actions:
- type: turn_off
device_id: 45f967615f0b391751baa894326fa36b
entity_id: switch.shelly1_98cdac2dc531
domain: switch
So if either the temperature is >22°C or its 11PM in the evening, the heating gets turned off.
You may wonder why we went for the “turn off at 11PM” setup and this has exactly two reasons:
The central heating stores heat in grogs (“Schamotte” in German) - if these overheat, the heating creates noise to reduce pressure from heat in the unit - this is particularly loud and annoying during the night.
Energy consumption - the sleep schedule of grandma is rather “get up early” and not “stay up all night” - thus turning off at 11PM nomatter the temperature has been doing the job without jeopardizing her being happy with the temperature.
Long term perspective
Well, you may wonder if this is now really working well (and we really wondered too - wasn’t too optimistic about it). The good thing with Homeassistant now is, that we have data for this to see if things work well or not:
As you can see from the above, we had 2x turn on of the heating on the 24th of November at 7AM (time triggered) and 7:16PM (temperature driven) - similarly on the 22nd of November, where the temperatures in the morning were probably not low enough to keep the heating from running until they fell around 9:10AM again below the threshold. You can also see the effect of the heating when comparing this in a separate dashboard like this:
On top, you see the switch being turned on / off and below the measurement of the heating. Note, that this has a few issues obviously - lag, slow heatup process and borderline cases where the temperature turns on/off the heating relatively often. The user experience was great though!
Overall this turned out to be quite a funny little endeavour with a few technical tasks - happy grandma included who did not have to go through a replacement of her central heating in her 90s anymore.