Domoticz as the heating controller
Moderators: leecollings, remb0
-
- Posts: 11
- Joined: Monday 29 August 2016 10:49
- Target OS: Linux
- Domoticz version: Latest
- Location: Denmark
- Contact:
Domoticz as the heating controller
Hi there
I'm thinking of turning my Domoticz server into an controller for my central heating.
Temperature could be collected via ESP8266/ESPEasy and a number of DS18B20 probes! There is already wiring to all rooms to run the old Thermometers.
It's all floor heating, so all my "Telestater" Valves are in one room. They operate at 24 Volt 2 Watt. So I need some relay board to operate the Valves. There are 13 in total, but I'm planing on having an Relay to control the pump, as I'm thinking about a fitness program for the Valves, as they tend to get stuck doing sommer period (Believe it or not, but no heating is required in the summer period, other than the bathroom)
I'm having a number of DS18B20 already, together with the ESP8266 board, and that work very nicely, but how to proceed?
I'm missing a relay board to control the Valves and Pump, and then it all has to be clued together in Domoticz.
I found this board: https://www.amazon.de/SainSmart-Channel ... AN+WAN+WEB
Any one done similar stuff? Willing to share?
Thanks in advance
BR
Lars
I'm thinking of turning my Domoticz server into an controller for my central heating.
Temperature could be collected via ESP8266/ESPEasy and a number of DS18B20 probes! There is already wiring to all rooms to run the old Thermometers.
It's all floor heating, so all my "Telestater" Valves are in one room. They operate at 24 Volt 2 Watt. So I need some relay board to operate the Valves. There are 13 in total, but I'm planing on having an Relay to control the pump, as I'm thinking about a fitness program for the Valves, as they tend to get stuck doing sommer period (Believe it or not, but no heating is required in the summer period, other than the bathroom)
I'm having a number of DS18B20 already, together with the ESP8266 board, and that work very nicely, but how to proceed?
I'm missing a relay board to control the Valves and Pump, and then it all has to be clued together in Domoticz.
I found this board: https://www.amazon.de/SainSmart-Channel ... AN+WAN+WEB
Any one done similar stuff? Willing to share?
Thanks in advance
BR
Lars
Re: Domoticz as the heating controller
Hi Lars,
Which ESP8266 are you using? I'm using a WeMoS d1 mini pro with a relay shield to control my heater. It has ESPeasy installed as well so I can control the relay by opening the url: http://192.168.0.110/control?cmd=GPIO,5,0 for off and http://192.168.0.110/control?cmd=GPIO,5,1 for on. You can paste these url in a Domoticz dummy switch with on and off action.
However this is not very safe. Because if Domoticz crashes and the last command was on. Your house will turn into a sauna . So I'm eager to find a better solution as well.
Kr,
Saiko
Which ESP8266 are you using? I'm using a WeMoS d1 mini pro with a relay shield to control my heater. It has ESPeasy installed as well so I can control the relay by opening the url: http://192.168.0.110/control?cmd=GPIO,5,0 for off and http://192.168.0.110/control?cmd=GPIO,5,1 for on. You can paste these url in a Domoticz dummy switch with on and off action.
However this is not very safe. Because if Domoticz crashes and the last command was on. Your house will turn into a sauna . So I'm eager to find a better solution as well.
Kr,
Saiko
Re: Domoticz as the heating controller
This is why i'm investigating a solution with ESP8266 with 2 solid state relais (one to switch my pump and one for the Nefit Easy adapter to switch it off/on when the thermostat occasionally hangs) and two DS18B20 (temp in/out of boiler) and make the decisions locally. The ESP only reports temp and switch states (MQTT) but can also accept switch command from Domoticz.
-
- Posts: 26
- Joined: Thursday 03 December 2015 13:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz as the heating controller
In the case that Domoticz crashes, you can always switch heating off using the URLs you give above. Maybe you can make webpage with those URLs as links in the case Domoticz isn't available. You can also think of some failsafe hardware-solutions, with some switches to bypass the ESPs.saiko wrote:Hi Lars,
Which ESP8266 are you using? I'm using a WeMoS d1 mini pro with a relay shield to control my heater. It has ESPeasy installed as well so I can control the relay by opening the url: http://192.168.0.110/control?cmd=GPIO,5,0 for off and http://192.168.0.110/control?cmd=GPIO,5,1 for on. You can paste these url in a Domoticz dummy switch with on and off action.
However this is not very safe. Because if Domoticz crashes and the last command was on. Your house will turn into a sauna . So I'm eager to find a better solution as well.
Kr,
Saiko
I'm using the Nest thermostat. That comes with some kind of relay box, which will switch the pump on and off (and a valve open or closed). I can set the temperature of the thermostat with Domoticz, it works really well. I can also control the temperature with the thermostat itself and worst case there's a button on the relay box to switch it all on or off.
For the bathroom I'm using a Zwave thermostat. When Domoticz fails (or the ESP sensor in the bathroom fails), I cannot change the temperature of the thermostat
-
- Posts: 72
- Joined: Friday 11 March 2016 18:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Essex, UK
- Contact:
Re: Domoticz as the heating controller
I use Pi 3 as central hub of my automated home.baekmark wrote:Any one done similar stuff? Willing to share?
Thanks in advance
BR
Lars
It runs custom Python script which implements multi-zone PID Controller (https://en.wikipedia.org/wiki/PID_controller).
Temperature collected by sensors in the rooms - some are AM2320 connected to "hub" Arduino Nano's inside standard 1-gang backboxes in the ceiling. Arduinos are connected to Pi via USB cables in the loft and are programmed to report via serial MySensors protocol.
Other sensors are Bresser wireless, using Cresta RF protocol and RFLink in the loft to report to Pi via USB.
Individual radiator valves are controlled by Salus T30NC230 thermoelectric wax actuators. These actuators are connected to simple custom-build multichannel relay board, using Arduino Nano and Omron G3MB-202P SSR relays, which placed inside kitchen cupboard in the 2x2 gang electrical box with fuse & isolator switch.
Boiler "request for heat" signal is controlled via single G3MB-202P SSR, directly connected to Pi GPIO (since Pi is located in same utility cupboard near the boiler). PID controller aggregate power output uses PWM to modulate the boiler on/off.
In the future I plan to get a new boiler which has "request water preheat" signal. This one I plan to connect to motion sensor, preheating hot water only if I go to kitchen or bathroom.
Before I tried different things:
- Tried Z-wave thermostat/valves, didn't like. It was unreliable, compatibility was bad, valves noisy, and my simple python script done better job at precise temperature keeping than "pro" thermostat of £100 cost.
- Considered Nest/Evohome, etc, but didn't like the required internet connection and how they spy on your usage data. Also Nest database was shortly hacked which obviously was quite a turn off
So system with open off-the shelf components worked the best for me.
Re: Domoticz as the heating controller
That's a smart solution. Can you please share your ESP8266 code?SweetPants wrote:This is why i'm investigating a solution with ESP8266 with 2 solid state relais (one to switch my pump and one for the Nefit Easy adapter to switch it off/on when the thermostat occasionally hangs) and two DS18B20 (temp in/out of boiler) and make the decisions locally. The ESP only reports temp and switch states (MQTT) but can also accept switch command from Domoticz.
I don't want to bother checking whether Domoticz crashes. I'm looking for a setup that does not require my assistence. I'm eager to learn about your pid controllers. Can you share the custom python script? Does this script only require temps from the rooms?rickvanakkeren wrote:
In the case that Domoticz crashes, you can always switch heating off using the URLs you give above. Maybe you can make webpage with those URLs as links in the case Domoticz isn't available. You can also think of some failsafe hardware-solutions, with some switches to bypass the ESPs.
I'm using the Nest thermostat. That comes with some kind of relay box, which will switch the pump on and off (and a valve open or closed). I can set the temperature of the thermostat with Domoticz, it works really well. I can also control the temperature with the thermostat itself and worst case there's a button on the relay box to switch it all on or off.
For the bathroom I'm using a Zwave thermostat. When Domoticz fails (or the ESP sensor in the bathroom fails), I cannot change the temperature of the thermostat
Re: Domoticz as the heating controller
I'm still investigating this solution, no code available yet. Also I don't use the Arduino way but use the Espressif SDK (2.0)saiko wrote:That's a smart solution. Can you please share your ESP8266 code?SweetPants wrote:This is why i'm investigating a solution with ESP8266 with 2 solid state relais (one to switch my pump and one for the Nefit Easy adapter to switch it off/on when the thermostat occasionally hangs) and two DS18B20 (temp in/out of boiler) and make the decisions locally. The ESP only reports temp and switch states (MQTT) but can also accept switch command from Domoticz.
-
- Posts: 72
- Joined: Friday 11 March 2016 18:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Essex, UK
- Contact:
Re: Domoticz as the heating controller
To prevent unattended loss of communication/runaway boiler, etc, I use watchdog timers.
E.g. in Arduinos I use watchdogs to feed them only when periodic communication (via usb-to-serial with Pi) received. If it breaks for long, Arduino node auto-reboots and re-establish communication.
Similar watchdog functionality exists on ESP as to my knowledge, which could be used to reboot it (which will re-connect to network) if, for example, main loop stops receiving data from Domoticz side for too long.
On Pi I use systemd hardware watchdog to prevent Pi from being frozed by some rare kernel bug, etc.
Also scripts can check if sensors actually sending data on time (Domoticz gives last update time), e.g. if sensor didn't update for long or no communication with Domoticz exists at all, script can simply revert to some default (e.g. switch heating off, send alert or simply keep last know heating level).
E.g. in Arduinos I use watchdogs to feed them only when periodic communication (via usb-to-serial with Pi) received. If it breaks for long, Arduino node auto-reboots and re-establish communication.
Similar watchdog functionality exists on ESP as to my knowledge, which could be used to reboot it (which will re-connect to network) if, for example, main loop stops receiving data from Domoticz side for too long.
On Pi I use systemd hardware watchdog to prevent Pi from being frozed by some rare kernel bug, etc.
Also scripts can check if sensors actually sending data on time (Domoticz gives last update time), e.g. if sensor didn't update for long or no communication with Domoticz exists at all, script can simply revert to some default (e.g. switch heating off, send alert or simply keep last know heating level).
-
- Posts: 26
- Joined: Thursday 03 December 2015 13:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz as the heating controller
You have to think about what should happen when Domoticz crashes. Or your ESP. Or your temp-sensor. Do you want notifications? Do you want a fail-safe program to run (f.e. all thermostats off)? Then you can design your system. Some of these solutions require extra hardware, some require extra software. As replied above: some extra hardware (like an Arduino) gives you a lot more options.saiko wrote:I don't want to bother checking whether Domoticz crashes. I'm looking for a setup that does not require my assistence. I'm eager to learn about your pid controllers. Can you share the custom python script? Does this script only require temps from the rooms?
-
- Posts: 11
- Joined: Monday 29 August 2016 10:49
- Target OS: Linux
- Domoticz version: Latest
- Location: Denmark
- Contact:
Re: Domoticz as the heating controller
Hi saiko
I'm just using plain ESP8266-01 where I flash ESPEasy on. That is for my sensors. I still haven't figure out a relay board I can use!
Note that I need to operate 13 individual Valves, therefor I need a board with at least 13 relays
BR
Lars
I'm just using plain ESP8266-01 where I flash ESPEasy on. That is for my sensors. I still haven't figure out a relay board I can use!
Note that I need to operate 13 individual Valves, therefor I need a board with at least 13 relays
BR
Lars
saiko wrote:Hi Lars,
Which ESP8266 are you using? I'm using a WeMoS d1 mini pro with a relay shield to control my heater. It has ESPeasy installed as well so I can control the relay by opening the url: http://192.168.0.110/control?cmd=GPIO,5,0 for off and http://192.168.0.110/control?cmd=GPIO,5,1 for on. You can paste these url in a Domoticz dummy switch with on and off action.
However this is not very safe. Because if Domoticz crashes and the last command was on. Your house will turn into a sauna . So I'm eager to find a better solution as well.
Kr,
Saiko
- Egregius
- Posts: 2582
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Domoticz as the heating controller
Maybe the SonOff 4 relay board could be something?
With 4 of them at €13.76 you come at €55,04. Still cheaper than a ETH relay board.
With 4 of them at €13.76 you come at €55,04. Still cheaper than a ETH relay board.
-
- Posts: 72
- Joined: Friday 11 March 2016 18:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Essex, UK
- Contact:
Re: Domoticz as the heating controller
You don't really need to buy a complete board for that.baekmark wrote: Note that I need to operate 13 individual Valves, therefor I need a board with at least 13 relays
BR
Lars
Just buy SSRs in bulk, e.g. http://www.ebay.co.uk/itm/10-PCS-G3MB-2 ... SwnH1WYWC8
These relays don't require any glue logic (as they already have integrated optocoupler & limiting input resistor) and you connect them directly to GPIO pins (can use either 3V or 5V gpio ).
Also buy screw terminals in bulk, mount everything on stripboard or protoboard, done.
Re: Domoticz as the heating controller
Assuming your valves are 240V AC which in most cases are 24V DC as beakmarc said in his first post.RidingTheFlow wrote:Just buy SSRs in bulk, e.g. http://www.ebay.co.uk/itm/10-PCS-G3MB-2 ... SwnH1WYWC8
These relays don't require any glue logic (as they already have integrated optocoupler & limiting input resistor) and you connect them directly to GPIO pins (can use either 3V or 5V gpio ).
-
- Posts: 72
- Joined: Friday 11 March 2016 18:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Essex, UK
- Contact:
Re: Domoticz as the heating controller
For 24V DC (and just 2W load, thats just 83mA) you don't really need relays or opto-isolation - its safe for direct connect by simple transistor.
Re: Domoticz as the heating controller
It's always good idea to have opto-isolators between your logic and relais. I have bad experience switching a simple 5V relais with the ESP8266 using a transistor. Because (inductive) energy (EMP) was send back, the ESP simply resetted after switching a heavy load. The problems where mainly caused by bad ESP(01) board design, but by using an opto-isolator or Solid State Relais you avoid this kind of issues.RidingTheFlow wrote:For 24V DC (and just 2W load, thats just 83mA) you don't really need relays or opto-isolation - its safe for direct connect by simple transistor.
-
- Posts: 72
- Joined: Friday 11 March 2016 18:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Essex, UK
- Contact:
Re: Domoticz as the heating controller
Well, this depends on what kind of valve it is. If its using motor or mechanical relay (inductive load), you will need some protection. But we are not talking about this one here.
If its thermoelectric wax valve (purely resistive load), you don't need anything really - any simple transistor or triac will do. I judging from 2W load, I am going to bet it this kind. I have exactly same kind, only of 230V variety.
If its thermoelectric wax valve (purely resistive load), you don't need anything really - any simple transistor or triac will do. I judging from 2W load, I am going to bet it this kind. I have exactly same kind, only of 230V variety.
-
- Posts: 11
- Joined: Monday 29 August 2016 10:49
- Target OS: Linux
- Domoticz version: Latest
- Location: Denmark
- Contact:
Re: Domoticz as the heating controller
Hi all
not that I have been swamped by ways to convert my Domoticz server into a Heating Controller, but I now have an idea that might do the trick
Getting a ESP8266 with 6 or 12 relay output and a spare GPIO for temperature input via either DS18B20 or DHT22. <-- That could be broken into two systems is necessary
Then using ESPEasy with rules to operate the vales based on temperature input and set point's from Domoticz, well that's the theory
Anyone will that work? And I'm thinking that the ESP8266 will then be Autonomous in operating if my Domoticz server dies, or?????
Has this been done? Examples input? etc.... is highly appreciated
Many thanks in advance
BTW. I just managed to put ESPEasy onto a Chinese ESP8266/Relay Board TE654 That will get me started
/Lars
not that I have been swamped by ways to convert my Domoticz server into a Heating Controller, but I now have an idea that might do the trick
Getting a ESP8266 with 6 or 12 relay output and a spare GPIO for temperature input via either DS18B20 or DHT22. <-- That could be broken into two systems is necessary
Then using ESPEasy with rules to operate the vales based on temperature input and set point's from Domoticz, well that's the theory
Anyone will that work? And I'm thinking that the ESP8266 will then be Autonomous in operating if my Domoticz server dies, or?????
Has this been done? Examples input? etc.... is highly appreciated
Many thanks in advance
BTW. I just managed to put ESPEasy onto a Chinese ESP8266/Relay Board TE654 That will get me started
/Lars
-
- Posts: 35
- Joined: Monday 21 December 2015 16:35
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz as the heating controller
Hi,
I have a ESPEasy based system which measures the temperature of the hot water pipe arriving at the input of my manifold to start and stop the pump of my undersfloor heating when heating is on / off. This reports to domoticz where I have a script running with some logic to decide when the pump should be on or off.
My boiler and valves are controlled via evohome so I haven't tried using ESP on that side.
It's been running for more than a year now and is quite stable in general (4 or 5 crash in a year I would say). The few crashes I had were however generaly due to the ESP stopping sending data and not to domoticz crashing (I have a watchdog on domoticz). I therefore advise you to consider that the ESP system will be (one of) the weak link in your system. Rules on ESP are therefore not a miracle solution as the ESP itself can also crash. I guess you could put the ESP on a plug controlled via domoticz to restart the ESP in case of crash. With this and the rules on the ESP, it would require both the ESP and domoticz to be offline for the system to stop working (in my case I just send an email and do the reboot of the ESP myself).
I have a ESPEasy based system which measures the temperature of the hot water pipe arriving at the input of my manifold to start and stop the pump of my undersfloor heating when heating is on / off. This reports to domoticz where I have a script running with some logic to decide when the pump should be on or off.
My boiler and valves are controlled via evohome so I haven't tried using ESP on that side.
It's been running for more than a year now and is quite stable in general (4 or 5 crash in a year I would say). The few crashes I had were however generaly due to the ESP stopping sending data and not to domoticz crashing (I have a watchdog on domoticz). I therefore advise you to consider that the ESP system will be (one of) the weak link in your system. Rules on ESP are therefore not a miracle solution as the ESP itself can also crash. I guess you could put the ESP on a plug controlled via domoticz to restart the ESP in case of crash. With this and the rules on the ESP, it would require both the ESP and domoticz to be offline for the system to stop working (in my case I just send an email and do the reboot of the ESP myself).
- Westcott
- Posts: 423
- Joined: Tuesday 09 December 2014 17:04
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: UK - Glos
- Contact:
Re: Domoticz as the heating controller
Hej Baedmark,
I'm also looking at how to control my heating with an autonomous ESP8266, in my case a Sonoff TH10.
Using ESPEasy, it's straightforward to receive and store setpoints from Domoticz, and sent the actual temperature.
However, I can't find a way with Rules to compare the setpoint and actual temp.
Instead, I've now started to use NodeMcu http://nodemcu.com/index_en.html
Much harder to set up, but you then have all the Lua programming you need.
I'm also looking at how to control my heating with an autonomous ESP8266, in my case a Sonoff TH10.
Using ESPEasy, it's straightforward to receive and store setpoints from Domoticz, and sent the actual temperature.
However, I can't find a way with Rules to compare the setpoint and actual temp.
Instead, I've now started to use NodeMcu http://nodemcu.com/index_en.html
Much harder to set up, but you then have all the Lua programming you need.
Zwave - Sigma Z+ stick, Fibaro, Horstmann, Neo Coolcam, EUROtronic
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
-
- Posts: 105
- Joined: Sunday 02 February 2014 23:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Portugal
- Contact:
Re: Domoticz as the heating controller
i have too a heating floor system, this is a simples system with only DIY water solar panel and 1 pump.
When water are more heat on panel than the pump, this start working, at beginnig i had a eletronic board do it by my father but never interact with domoticz, so i put my hand on and do what are working now.
basicly it a esp8266 wemos d1 mini with 1relay board and 2 DS18b20.
i had to put the DS18b120 on Parasite mode because the cable lenght was bigger (20m) so, on normal configuration wasnt able to put working.
i use the difference between this 2 probes, to turn on and off the pump.
so on first field i have the diffence temp to turn on the pump, in this case if panel are 10ºc more high than pump, and the second field are for turn off, so if panel are >3ºc minus pump, this numbes are editable on site and save on epproom.
this not depend by domoticz, only send the temperatures and the state of relay.
my next changes are to put a led on it to see on local the state of relay, and put a switch summer/winter that will inverse the difference so on winter start with sun and summer start on night.
When water are more heat on panel than the pump, this start working, at beginnig i had a eletronic board do it by my father but never interact with domoticz, so i put my hand on and do what are working now.
basicly it a esp8266 wemos d1 mini with 1relay board and 2 DS18b20.
i had to put the DS18b120 on Parasite mode because the cable lenght was bigger (20m) so, on normal configuration wasnt able to put working.
i use the difference between this 2 probes, to turn on and off the pump.
so on first field i have the diffence temp to turn on the pump, in this case if panel are 10ºc more high than pump, and the second field are for turn off, so if panel are >3ºc minus pump, this numbes are editable on site and save on epproom.
this not depend by domoticz, only send the temperatures and the state of relay.
my next changes are to put a led on it to see on local the state of relay, and put a switch summer/winter that will inverse the difference so on winter start with sun and summer start on night.
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot] and 1 guest