Moreover: I just share my project for advanced users, who are familiar with:
- ESP Easy (flashing firmware; using web-UI sections: devices, rules, logging and other);
- Simple schematics.
I am too busy man, so:
- I won't teach any newbies and amateurs to basics;
- I will try to answer to questions, but I do not promise to do it very quickly.
And I apologize for by bad English: it is not my native language.
Before involving of ESP Easy, I've used a simple thermostat to control a gas boiler. My heating system has cast iron radiators, which have a significant heat capacity, comparable with heat capacity of floor heating systems. After years of using a simple thermostat, I found, that this kind of control is simple, reliable, but not always optimal:
- temperature variations could be significant (sometimes it reach about 1.0C) even with 0.1C hysteresis;
- duration of cooling (disabled state of boiler) could be too long, because of significant heat capacity: after 50 minutes of cooling, natural convection of air is almost lost. It is not comfortable, because of temperature gradient (legs begin to be cold);
- if suddenly outdoor temperature decrease and gas boiler power is not enough (or specified coolant temperature is not enough), a gas boiler can start to cycling: target temperature is not reaching; thermostat is locked to enabled state and after heating, a gas boiler disables gas burner itself, but circulating pump remain at enabled state. So, when gas boiler is cycling, some of heat energy is lost through a heat exchanger.
But, ESP Easy firmware with using rules (some kind of scripts), give an opportunity to make an advanced thermostat.
Goals of this project:
- decrease temperature variations;
- prevent cycling of gas boiler;
- control duration of heat/cooling cycle (at least, make heating power of boiler match to summary cooling power of radiators by limiting duty cycle).
About project:
used hardware: Sonoff T10/T16 (based on ESP8266) + digital thermometer DS18B20 (you can use another one);
firmware version: mega-20211105_c79d675.
I've attached some files:
Archive "Rules.zip". It has two folders: "Advanced thermostat" and "Simple thermostat" (untested reduced project version without prediction, but with controlling of duration of heat/cooling cycle).
Each of folder has next files:
- Rules.src - it is source of rules. I don't use web-editor, so this file has a lot of comments. Using of this files for uploading to your device is not recommended (instead of this, upload file "rules1.txt");
- rules1.txt - reduced rules file (with deleted comments and empty strings) for uploading to your device;
- Variables.txt - description of variables.
Code: Select all
on System#Boot do
// Init HW...
// Init global parameters...
Code: Select all
// Targeted duration of cooling
TaskValueSet,DurOff,trgt,<YOUR_VALUE_BY_SECONDS>
// Duration of cooling after T-sensor fail
TaskValueSet,DurOff,fail,<YOUR_VALUE_BY_SECONDS>
I've tested/debugged this project for enough of time. You can visit my channel at thingspeak.com.
Some explanations: I use more complicated configure with 2 thermometers. So, do not be confuse about gaps of current temperature chart: only one of thermometers can be used at the same time. Moreover, when used thermometers in the kitchen, there is too much things are happened (cooking, making tea and etc.).
I wish good luck to control your boiler!