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

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

1 Like

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

Hi @algirdasc - wonderful project! Would you mind sharing how you have connected this instance with HA? I have 2 boxes with underfloor heating valves so I would need 2 controlling sets which somehow would need to connect to HA (which is in rack in basement) to interoperate between each other…

Thank you

I’m using HA just for status display and setpoint temperature control. Automation is done via NodeRED. I’m reading data from my gas boiler/heater and then do some calculations and valve logic and send data back to gas boiler, raspberry responsible for valve control. Depending on your heating system, I would suggest to do separate instances of NodeRED for each box. Then via MQTT you could integrate both into HA for display / control.

1 Like

Did you use any software to actually control the heat flow based on the sensors or did you write that control logic yourself?

My boiler controls heat flow according to sensor reading (for radiator heating it varies between 45-65c, floor heating up to 40c), but when boiler starts heating radiators and there is demand for floor heating, then NodeRED controls actuators to limit flow until 40c.

Nice setup. At the moment we are building a new house. Had the same setup in mind.
Could you share the code to switch on-of the valves do I can test and setup my relay board with an ESP8266.

Thanks !!

This is soo impressive, awesome project @algirdasc !

I was looking for an inspiration for smart heating for a long time. So far I only found an option with ESP8266 + 8 Channel Relay Board, a project described in here:

https://khaz.me/cheap-and-easy-control-of-8-relays-through-home-assistant/

Since I have home assistant running with node-red, I think adding a RPI may not be necessary. I have Xiaomi temperature sensors already integrated in hass. I reckon I would need one ESP8266 to control the relay, and second to read the temperature coming from multiple DS18B20.

I am very much interested though in 3 things:

  1. how you wired up all connections. I am bit lost with the photos… each valve has 2 wires, why are they not connected to all to A&C on relay? I see only on CH1 you connected like that, and rest is from C to C…

  2. you used 220V actuators. Is there an advantage over 24V version? I saw there are such options on aliexpress as well

  3. node-red… ahh, I am absolute beginner with node red. I know one can do magic with this, but I am making my first steps only. Would you be so kind to share the code you are using? I wonder what is the logic to control the valves. I have gas heating with weather control, so the heating system decides on the temperature on the supply. However, in each room I would like to be able to control the temperature individually.

Node red just closes the valve fully when temperature is above target? and opens it again fully when temperature drops below target? I guess there are some delays? Or maybe it is more complicated - and we can read in % the state of valve (0% = closed, 100% = fully open)?

Anyway, project is really great, with Grafana dashboard it looks amazing and better than many professional versions :slight_smile:

1 Like

There is no code - just control your GPIO PIN to switch on or off the relay (and valve).

Hi,

When I was doing smart heating, one of the goals was to have single point of failure and heating must be as independable as possible, because it is critical system. Thats why I choose RPI and not ESP8266/Arduino. I got rid of Xiaomi BT sensors and started using Konke/Sonoff Zigbee temperature & humidity sensors (Xiaomi Zigbee sensors are too slow and theyr report time is not configurable) so they would communicate directly with RPI, in case WiFi router crashes. Anyway, that is my approach and filosofy on heating, yours can be different. Either way, you don’t need separate ESP for reading DS18B20 sensors and controling relays, because DS18B20 are 1-wire sensors (bunch of sensors would take 1 GPIO pin on ESP). Regarding your questions:

  1. I have only 7 valves, so CH1 was used to control gas boiler thermostat pin where I needed to open/close circuit. But now I’ve connected BSB controller to control my gas boiler even smarter, so this channel now is not used anymore.
  2. The only advantage is wether you have 24v power supply or not. Other than that - they work the same. Keep in mind, that 220v is much more dangerous, so be careful :slight_smile:
  3. I don’t think my example would help you. It has two controls - one if for gas boiler itself and other is open/close with additional temperature and error checks. I have 3 virtual room units (or thermostats). One for living room (it has 3 radiators in one big room), one for underfloor heating (it is set with lower flow temperature and different heating curve) and one for bedrooms (two rooms with one radiator in each room). Ok. so this is what my flow looks like. I have time trigger (runs every 30 s.) to poll data from gas boiler controller and checks if any of the room units reports heating demand. If there is no demand from room unit, then valves for that room unit is closed. If room unit reports for heating demand, then it starts checking temperature sensors and determine which valves needs to be open (each radiator has temperature sensor nearby). There are few additional checks (sensor failure and etc.) in the background, but basically this is it. If you still interested, I could share my flow on github, but as I said, this is my trial and error polished flow for my house and situation, yours could be different.

Valve full open from closed state takes ~3-4 minutes. Take into considerations to delay heating process if possible, because it could trigger overheat protection on your gas boiler when there is no flow. My boiler has setting for delay, so it is not problem at all. I tried implementing PID methods for controling valves in %, but since my boiler can modulate heating and keep flow temperature steady, having valve opened half-open ir quarter-open is not needed at all. (See screenshot attached and look at room unit 1 temperature - boiler managed to keep steady temperature throughout the day with amplitude of 0.3 degree. Valves were open or closed depending on temperature in each of zone (first was open for 10 hours and was constantly heating with low temperature, second was closed for 3 days, third was open or closed throughout the day)).

If you need more information or pictures of hardware, or anything else - let me know.

Hi,
I have a very similar approach, controlling a 6 block relay with an ESP8266 module. The automation is done in HA, since I cannot figure how to set it in Node Red (how to start the boiler if any of the relays is open, and turn off the boiler if all the relays are closed). So, can ou share the Node red config, please?

You can store relay states in global/flow context and trigger checks to calculate wether start boiler or not.

You can find my heating flow here: https://gist.github.com/algirdasc/61e513b13a990891dc479eed82c898ea

Hello! Congrats on that great heating system. As i am starting to build myself also heating system, then i see that the difference is that i am going to use air to water heat pump that is meant for floor heating. What do you think Algirdas, should i use also for DS18B20? i need to build two this kind of systems, as the pipes are in different rooms ( i have two house blocks).
Best regards from Estonia

Hi, if you have floor heating in all of the house, I think DS18B20’s are not mandatory, as flow temperature would be controlled by your heat pump, you just need to open and close valves when room temperature reaches setpoint. I’m using DS18B20’s because I need to determine if flow temperture risen above 40-ish degrees to stop floor heating.

Hi! Thank you for response, i am goinig to have one radiator, but this is just to give some warmth for winter time that the temperaturenwoulsnt go to - degrees. Any
ideas?

Hi algirdas!

Congrats for the great project!

I am planning to build underfloor water heating with Bosch gas heater (supporting EMS BUS). Already using HA with NodeRed and considering to do the control/automation following your setup. You mentioned that you have 3 virtual room units - could you share more about them?

I need something wired or wireless located in the relevant room, to use as a backup in old-style way to set the temperature, no need to measure temperature, Aqara senors are already in place. Probably the room controller should communicate with HA as well, so to become part of the common process.

Thanks and congrats again.