My approach to smart heating (radiators, floor heating, gas boiler)

Tags: #<Tag:0x00007f77ffbe4d98> #<Tag:0x00007f77ffbe4c08> #<Tag:0x00007f77ffbe4b18>

Hi there, as heating season begins to be more significant in my area, I’ve decided to show and tell about my aproach to smart home smart heating. To begin, I have water heating - 5 radiators (3 in living room, 1 in bedroom and 1 in kids room) and 2 “branches” of floor heating (hallway/entrance and bathroom) and all of this stuff is connected to manifold. Everything is heated by gas boiler. First problem, which encouraged me to redesign heating system is that floor heating was controled by RTL valves, which were connected to return pipe and as a result floor in bathroom area was either ice cold or depths of hell hot. As some of you may know, to achieve perfect harmony between radiators and floor heating, I should’ve added mixing device for floor heating, but it would cost to much money as all manifold area needed to be redesigned. So, I tried cheaper way first, which looks like, by far, proven itself. So here begins the idea-to-real-life part.

Step 1.
I’ve started by putting temperature senors near all radiators - so total 6 of Xiaomi BLE Temperature & Humidity sensors. 5 near all radiators and one in bathroom. I was lucky enough to have compact house, as all 6 temperature sensors was reachable via bluetooth from heater room. Also, I’ve put one of Sonoff Basic device in bathroom (which also controls bathroom fan) with DHT22 temperature sensor to measure floor temperature, which will help me to keep constant floor temperature.

Step 2.
By the time I could receive and analyze each heat source temperature it was time to start controlling it. I was knocking my head against the wall very long time trying to find a way to controll radiators, because all options was with major flaws - smart thermostatic radiator valves (TRVs) was way too expensive also all of them are battery operated and I don’t like that, as batteries discharges. Wired solution was too “wired and messy”. And one day I realised, that I could do all of controlling at manifold. Few weeks later (and few Aliexpress orders) later I’ve collected all neccesary nuts and bolts to my idea come true:

Don’t mind dirty air bleeder and mess at manifold. Those you see are normally closed (Which means that without power they opens valves they are bolted on. Which is perfect in case of failure), 220V floor heating valve actuators, but instead of controling floor heating, it controls… you’ve guessed it! radiators, and those two on far right - floor heating!

Step 3.
By far I could see temperature at specific locations of my house and ability to controll heating sources. All it was missing was some controller. My chinese friend by the name Aliexpress comes to help again and after few weeks I’ve ended with this badboy:


Meet (from the left) - Sonoff Pow (to reboot / turn off all this device), 5V power supply and *insert drum roll here* 8-channel relay block with built-in slot for raspberry pi. Everything is nicely mounted on din rail. Also, to control floor heating more efficiently, I’ve ended up with 7 units of DS18B20 one wire temperature sensors attached to each of return pipes. Also, I’ve connected Bluetooth USB dongle to receive information from Xiaomi BLE temperature sensors. Ok, so back to relays. I’ve got 5 radiators, 2 floor heating, so 7 devices in total, but as you can see, there is 8th (or 1st on the left) device connected - this is gas boiler thermostat relay.

Step 4.
Now it is time to start controling these things. And boy oh boy it was difficult and interesting at the same time. But let’s start from the start. I’ve got raspberry up and running with debian os. Installed Docker with Portainer (easier administration and maintenance) and NodeRED inside. Then I’ve set up xiaomi-ble-mqtt to periodically publish temperature information. I wont go into tiny details, because it is up to you and your fantasy how you want to control your heating. But basically it works like this: relay controls actuators which opens or closes water flow to radiators in regard of set temparature. If there is at least one of actuators opened, relay no. 1 turns on gas heater and turns off after all actuators closes. With floor heating it is a bit more complicated. Actuator opens only when bathroom floor temperature if fallen below the setpoint AND returning water temperature is below setpoint (35-40 degree Celcius) otherwise actuators closes and protects floor from overheating. All this information is being sent to HA and InfluxDB to draw some nice charts on Grafana:

Top graph shows manifold temperatures (few senors are disconnected due testing reasons). Other 6 graphs shows each heat source data - target temperature, current temperature and blue bar shows percentage of heating per hour. You can see that there is missing hallway / entrance floor heating, and this is because it is controlled “blindly” - without any sensors, just opening actuator for short period of time just to keep floor at entrance a bit warm.

Well this is it. Needless to say, this is the project I am proud the most. It is not perfect, but it perfectly suits my needs: heating started to feel more consistent than before, especially on floor heating in bathroom, on sunny days it reacts much faster, customizable automation, away modes and temperatures (for example, during summer I’m shutting down radiators and leaving only bathroom floor heating). In near future I’m thinking about adding window sensors and implementing that into automations (i.e stop heating when window is opened).

I hope you enjoyed my project as much as I did. And if anyone of you need some details on parts, software, hardware - I’ll be glad to help.

14 Likes

Very impressive!
I’m mainly working on lighting and sensoring at the moment, but when I get to individual room heating I will take a look at this thread again.

Nice job.

Do you also have a link for the ETI electric box?

No sorry, I bought it at my local household item store.

Hi (Labas),
how much was your project’s ~ cost ?
Interesting in making something similar my self.
What I do not like are Bluetooth temp. sensors, maybe you thought about radio based ones?
Example to connect with zigbee technology.
In theory they should have better battery time.
How about stability over time?

Hi, Mindaugas, it would be easier to answer in our native language, but i’ll try to say in english for everyone else.
It is hard to say exact price, because now it is slightly modified setup. The relay board was ~20€ (aliexpress), raspberry pi 4 ~60€ (thepihut), valves ~8€ each (aliexpress). Since my first post I’ve added SSD to raspberry and Arduino BSB Controller for my boiler. Now the setup satisfies my needs. So the price depends on your wishes. The bluetooth temperature sensors is the main thing I do not like as well. Since I’ve added USB3 SSD adapter (which intereferes with bluetooth of RPi4) bluetooth reception was almost none. I’ve placed couple of ESP32 with Bluetooth (esphome fw) accross my house to act as a Bluetooth <-> WiFi proxy. This setup is now more or less is stable (but it depends on Wifi router, which, sadly in my case, is not very stable). I have Zigbee2mqtt as well, but I’m not aware of any good and responsive temperature sensors. The Xiaomi ones are too slow to respond (every 0.5 degree or 1 hour which is way to slow for my setup). Better is Konke, but I had to re-pair couple times since I’ve got it. So for now Bluetooth proven to be best choice (battery life is similiar to zigbee).
All in all - this setup is worth it’s money, I can setup my heating the way I want and control it according to my home automation. If you need more information or help - let me know in PM, I could provide more detailed information.

Labas,

Seems good, building new house looking for aproaches to make correct wiring for automation heating. Would be nice to speak in private if I get in some problems.
I am thinking of controlling relays over wemos d1. Also receiving all temperature sensors over i2c.

Labas,

Of course, I could help as much as I can. I also thought to go with Wemos or ESP32 at first, but then heating would be dependent on WiFi (unless you’ll write all heating logic in controller itself, which in my opinion would be complicated). After my trial and error best, aproach is to have single point of failure. Raspberry PI with nodered proven to be most stable solutio with easy to program and maintain heating logic. Also it is important to set safeguards - ex. check temperature last update time, turn off heating in case of any failure and etc. Anyways, I would gladly share my experience and provide some concrete information.

Good point for reliability. I will think of this.

In the meantime rpi will be used for ha, node-red and parallax security.

Still thinking is it better to do all automation on HA or node-red?

In your setup node-red is activating gpios?

P.S. I will be using DS18B20 in the rooms, to measure room temperature, not return pipe. So I will need wemos or etc. for that, I don’t know if 1 pi would be capable of getting all the info from multiple temperature sensor with a long wire.
Everywhere is floor heating, so I will need to stabilize temperature in each room. It is much better to put sensors on room not on return.

I would suggest Node-RED as it has more sophisticated and easier to read automations. Try controlling devices via MQTT as much as possible and avoid using HA vere is possible. Sometimes updating HA breaks things and that could lead to heating failures, that is not acceptable, especially on heating season. Understand me right - HA is great tool, I’m using it a lot, but when I’m talking about crucial systems - it needs to be as much stable as possible.

About DS18B20 - if you have underfloor heating only, then you should’nt care about flow & return temperatures, you just need to control valves & room temperature. My situation is different (and wrong, because builder did not installed mixing device for underfloor heating) I have mixed heating - radiators & underfloor heating, so I must control return temperature to not overheat my underfloor heating. Regarding stability - I’m having some problems with DS18B20 connected to RPI. After some time I get CRC errors and all, except 2 sensors stops being detected. Thankfully other 2 working sensors are the crucial ones, and I got no problems with them. I could reproduce same error on RPI 2 and RPI 4, both was clean installed debian. Altough, they were working flawlessly connected to Wemos. And do not forget, that Wemos itself generates some heat, so connecting sensors close to Wemos could produce incorrect results.

for node-red and mqtt you are right, I am going to make cotrol over MQTT, that’s for sure. HA only for the panel :slight_smile: I ma thinking of leaving wemos near manifold and bringing all cables to manifold, so they would be in one place connected to wemos. But don’t know if there will be voltage decrease over length and how many I can connect to 1 wemos. Or maybe I need them to power supply externally and use wemos controlling pin only.

Did you consider using some more ready out of the box solutions to control the valves, something like the Sonoff 4ch relay boxes? I imagine that would be simpler and maybe even cheaper than going the relay board with rpi route, specially as there is direct support for the Sonoff 4ch in HA.

Yes. But using Sonoff (or any other relay box) would put many points of failure (Sonoff box itself, Wifi router, HA server) which is not acceptable to curcial system like heating. Using rpi and relay board is almost ‘out of the box’ or ‘plug and play’ solution, and heating would still work even when HA or WiFi goes down. Integration with HA does not play a big role in my setup, as it is only used to display or change some heating params. All heating logic and automation is managed by NodeRED. And last thing about prices - Sonoff CH4 is priced at 19.71€, times two (because I would need more than 4 ourtputs) makes ~40€, where relay board cost me about ~20-25€.

Labas,

I’m looking for some options when it comes to wet floor heating system in my newly built house. At first I was having much bigger plans when it comes to “smartening” the house. However, is there any brands that could be connected to HA or some other hub for automation purposes? E.g I’m looking into buying off the shelf solution for my house floor heating system.

Brands that are easily available for me:

  1. Danfoss. Danfoss Icon looks really nice design wise, as all others are not as likeable.
  2. Uponor
  3. Honeywell
  4. some others…

What could be the setup if I decide to go with some sort of brand?

  • I know I need 8 in-wall wired thermostats (have holes and wiring for it already)
  • Thermoactuators - 11 in my case
  • Some sort of master controller, right?
  • Some for of Wi-fi module for master controler?

algirdasc or Trilis29 by any chance you are on HA discord? I would love to ping one or two questions regarding the above.

Ačiū

For the off the shelf solution, you get same thing, just sometimes all data goes over external (who knows if secure) servers. Check HA Integrations page and you will see what is compatible. Master controller could be RPi, Wemos, Sonoff, Shelly.

If you want to regulate 11 actuators, you will need to use 11 relays. Any ESP board with extension board could make up to 16GPIO without a problem.

For master controller and getting all the info from Thermostats (wired ones) you need 8 more GPIO, so you can use RPi for that.

Also @algirdasc mentioned if WIFI or HA goes down everything works by Node-RED if you use RaspberryPi only or 2xPi.

From my experience to for the WiFi to go down this is RARE case.

I would recommend to make automation on Node-RED, or just always backup HA and make notification if it goes down :slight_smile: never been down for me yet.

All depends if you are tech-savvy and you are not afraid to program a little bit.

My discord Trilis#8339

If you look at Danfoss, look here - Danfoss Radio Controlled Thermostats (DIY)
It’s not Icon but it might be food for thought?