Finished my updated Heating setup which I’m happy about, so let’s share some ideas.
My setup has got main unit which is heating 2floors with approx 16 radiators or so. I’ve hooked Wemos D1 mini with relay shield and DHT22 with Tasmota onto it so I can control it via MQTT or OH or Tasmota itself.
I have set of thermometers in each room, bathroom, hall etc. and I do have set of measured rooms which then are used as actual temperature for Heating setup.
Obviously some rooms/halls are not included as those are irelevant or not wanted due to great temperature fluctuancy, eg entrance hall, bathroom etc.
I don’t want to have rooms independently turn on/off boiler as it will result in constant switching on/off and therefore I’m not using "smart’ thermo couplers on each radiator but dumb ones configured to roughly 24C.
My usecase contains basically four things which may occur
- winter season (eg. actively heating)
** time scheduled heat/night/away mode - summer season (eg. standby)
- vacation
- manual override
during vacation and summer mode there is hardconfigured threshold which is maintained while on AUTO as we usually don’t want to have lower temperature than 17 or 15 no matter which part of the year we are at.
MANUAL mode will override any normal setting or season and so it will heat up house to target temperature even during summer.
Manual mode is maintaining target temperature +.3 and -.5 (configurable in rules) and lower temperature during BED time.
Manual mode is switched to AUTO at 2am each day, as usually you wanna manually override Heating only for limited period of time.
For automatic mode I’m using timepicker (customized css to match my dark mode) for convenient scheduling during Winter season.
On sitemap I’m hiding controls which are not necessary when switching heating modes so users are not distracted by stuff which is not used in given setting.
Lowest/Average switch is changing actual temperature which is being used in rules. It’s because sometimes you wanna heat up coldest room to target temperature and sometimes average is enought when you have open window somewhere and so on.
Lowest switch is as well used when my fireplace in livingroom is used, as livingroom is monitored room and with fireplace average will be much more higher than other rooms.
And finally in rules I’m using modified
I wanted to have my ruleset as clean and simple as possible, which I believe in current state I have
Indeed I’m tweaking and enhancing system on the go, but current setup is flexible and covers all my family needs already.
few screens:
heating.items
/* HEATING measured rooms */
Group:Number:AVG HeatingHouseTemp "Rooms Average [%.1f °C]" <temperature>
Group:Number:MIN HeatingHouseMin "Rooms Lowest [%.1f °C]" <temperature>
/* heating */
Switch Heating "Heating [%s]" <fire> (gStoreChange) { channel="mqtt:topic:Heating:heating" }
String Heating_Plan "Schedule [%s]" <none> (gStoreChange)
Switch Heating_Mode "Mode []" <none> (gStoreChange)
Switch Heating_Style "Heating style []" <none> (gStoreChange)
// temperatures
Number Heating_Temp_Manual "Target Temperature [%.1f °C]" <heating> (gStoreChange)
Number Heating_Temp_Day "Target Temperature [%.1f °C]" <heating> (gStoreChange)
Number Heating_Temp_Night "Night [%.1f °C]" <heating> (gStoreChange)
Number Heating_Temp_Away "Away [%.1f °C]" <heating> (gStoreChange)
// helpers
String Heating_AutoState (gStoreChange)
Switch Heating_Visibility (gStoreChange)
.sitemap
/* HEATING */
Text item=Heating {
Frame label="General" {
Text item=Heating label="Heating Status [%s]"
Selection item=Heating_Plan label="Schedule [%s]" mappings=[AWAY="Vacation",WINTER="Heating",SUMMER="Summer (stand by)"]
Switch item=Heating_Mode label="Operation Mode []" mappings=[ON="Manual", OFF="Auto"]
Switch item=Heating_Style mappings=[ON="Lowest", OFF="Average"]
Text item=HeatingHouseTemp
Text item=HeatingHouseMin
}
Frame label="Manual Setting" visibility=[Heating_Visibility=="ON"]{
Setpoint item=Heating_Temp_Manual minValue=15 maxValue=25 step=0.5
}
Frame label="Automatic Setting" visibility=[Heating_Visibility=="OFF"] {
Setpoint item=Heating_Temp_Day minValue=15 maxValue=25 step=0.5
Text label="" icon="none"
Setpoint item=Heating_Temp_Night minValue=15 maxValue=25 step=0.5
Setpoint item=Heating_Temp_Away minValue=15 maxValue=25 step=0.5
Webview url="http://ohserver:8888/static/time-line-picker/index.html?ip=ohserver:8888&dark=yes&transferItem=TransferItem1&states=Night,Away,Heating&yAxisLabel=1,2,3,4,5,67&colorset=666666,d9c468,8ed968" height=13 icon="none"
}
}
and .rules
/* Heating override: manual temperature */
rule 'Heating logic'
when
Item HeatingHouseTemp changed or
Item Heating_Temp_Manual changed or
Item Heating_Mode changed or
Item Heating_Plan changed
then
var Number actualTemp = 0
var Number targetTemp = 0
var Number lowerTemp = 0
// select if average or lowest temperature is monitored
if (Heating_Style.state == ON) actualTemp = (HeatingHouseMin.state as Number).floatValue // lowest
else actualTemp = (HeatingHouseTemp.state as Number).floatValue // average
// manual override
if (Heating_Mode.state == ON) {
// toggle sitemap items
Heating_Visibility.sendCommand(ON)
val wantedTemp = (Heating_Temp_Manual.state as Number).floatValue
if(vTimeOfDay.state == "BED"){
targetTemp = wantedTemp - 1.5 // 22 => 20.5
lowerTemp = wantedTemp - 3.5 // 22 => 18.5
}else{
targetTemp = wantedTemp + 0.3 // 22 => 22.3
lowerTemp = wantedTemp - 0.5 // 22 => 21.5
}
// auto mode
} else {
// toggle sitemap items
Heating_Visibility.sendCommand(OFF)
if (Heating_Plan.state == "WINTER"){
// winter
val mode = Heating_AutoState.state.toString
val dayTemp = (Heating_Temp_Day.state as Number).floatValue
val nightTemp = (Heating_Temp_Night.state as Number).floatValue
val awayTemp = (Heating_Temp_Away.state as Number).floatValue
if (mode == "Heating"){
targetTemp = dayTemp + 0.3
lowerTemp = dayTemp - 0.5
}else if (mode == "Night"){
targetTemp = nightTemp + 0.2
lowerTemp = nightTemp - 0.7
}else{
targetTemp = awayTemp + 0.2
lowerTemp = awayTemp - 0.7
}
}else if (Heating_Plan.state == "AWAY"){
// away
targetTemp = 15
lowerTemp = 13.5
}else{
// summer
targetTemp = 17
lowerTemp = 15
}
}
// temp is higher, switch OFF
if (actualTemp > targetTemp && Heating.state != OFF){
Heating.sendCommand(OFF)
logInfo("Heating", actualTemp.toString + " is over " + targetTemp.toString + ", Heating OFF")
}
// temp is lower, switch ON
if (actualTemp <= lowerTemp && Heating.state != ON){
Heating.sendCommand(ON)
logInfo("Heating", actualTemp.toString + " reached lower limit of " + targetTemp.toString + ", Heating ON")
}
end
rule "End Manual Heating mode at 2am"
when
Time cron "0 0 2 ? * * *"
then
Heating_Mode.sendCommand(OFF)
end
Ideas for even cleaner rules always welcomed
Thanks