Weather Compensation for Central Heating Boiler

Ok I am absolutely sure there are better ways to do this but it has been on my to do list for over three years and finally got it done today.

First of all the goal here is flex the Gas Central Heating boiler so that the Flow Temp ( temperature of the water flowing to radiators) to keep the house at the desired target temperature.

The Worcester Weather Comp kit is about £200, I want to know and control what is happening so not my first choice.

ie use as little gas as possible to keep the house at the target temp.

So

Flow Temp= “Desired Room Temp” +(“Heating Curve Slope” * (“Desired Room Temp” - “Outdoor Temp”))

Desired Room Temp - I get from the Tado Thermostat in the Lounge, I chose the Lounge as it is a room where we spend most of our time and is one of the warmest rooms in the house (Bathroom gets warmer and cooler throughout the day)

Heating Curve Slope (HCS) - is the Heat Loss Parameter I (HLP) get from the Glow integration that has a Gas and Elec meter AND a temp/humidity sensor in the lounge. This runs for 21 days during the heating system and calculates the HLP, mine if 1.6.

So today, Desired Temp is 21c, Outdoor temp is 12.3c, DLP (HCS) is 1.6 so the Target Flow temp is 35c.

Outdoor Temp - I get from the average two outdoor Hue Motion Sensors in the (North side of the house) and a failover of the Tado reported Outdoor Temp (form cloud source)

I recently purchased the bbqkees EMS (a esp32 device) that connects into the bus port on my Worcester 400 boiler, it can be connected using the thermostat or service ports also, so is pretty flexible. This gives me access to control the Boiler Flow Temp - along with a massive load of other interesting things…

I wanted to do it all in Node Red - my preferred automation tool sitting on Home Assistant.

At its simplest I get the Desired Temp and the Outdoor temp and store them in Global variables, I also did that for the HLP but realistically it should be hard coded in.

Then I just use an inject mode to run the Flow Temp calculation every 30 mins and use a Function node with this in it.

let a1 = global.get("CH-TargetTemp");
let a2 = global.get('CH-HLP');
let a3 = global.get('OutdoorTemp');
let result = (a1 + (a2 * (a1 - a3)));
result = Math.round(result);
result = Math.max(30, Math.min(82, result));
msg.payload = result
return msg;

Then the output is fed to a Home Assistant Action Node to set the Flow Temp.

I have continued to enhance this with the help of chatgpt to make it more resilient and respect the upper and lower limits of the boiler to this

// Get values
let a1_raw = global.get("CH-TargetTemp");

// CH-Target Temp taken from Tado Lounge Thermostat Setting

let a1 = (a1_raw !== undefined && a1_raw !== null && !isNaN(Number(a1_raw)))
    ? Number(a1_raw)
    : 20;   // FAILOVER = 20

let a2 = Number(global.get("CH-HLP")) || 0;
let a3_raw = global.get("OutdoorTemp");

// ----------- Outdoor Temp Validation -----------

// If missing / undefined / null / NaN, fallback
let a3;
if (a3_raw === undefined || a3_raw === null || isNaN(Number(a3_raw))) {
    a3 = global.get("LastGoodOutdoorTemp") || 10;
} else {
    a3 = Number(a3_raw);
}

// Reject impossible readings
if (a3 < -20 || a3 > 50) {
    a3 = global.get("LastGoodOutdoorTemp") || 10;
} else {
    global.set("LastGoodOutdoorTemp", a3);
}

// ----------- Optional smoothing to reduce noise -----------

let prevAvg = global.get("OutdoorAvg") || a3;
let smooth = (prevAvg * 0.8) + (a3 * 0.2);
global.set("OutdoorAvg", smooth);
a3 = smooth;

// ----------- Main calculation -----------
// Using the weather Comp Formula using Outdoor (northern side) Temp, 
// Tado Lounge Thermostat for Lounge, and Heating Curve Slope from the 
// Heat Loss Parameter from Glow House Heat Loss assessment

let result = a1 + (a2 * (a1 - a3));

// round
result = Math.round(result);

// clamp 30 ≤ result ≤ 82 - Lowest and Highest limit on Boiler
result = Math.max(30, Math.min(82, result));

msg.payload = result;
return msg;

It will continue to evolve but wanted to share what I learned so far.

It is running, it is working nicely.

Will be interesting to see what Tado makes of a variable Flow Temp.

Also will need to drive the Hot Water using the Immersion Heater instead of the System Boiler, easily done using overnight cheap 7p/kWh elec, about 30 mins at 3 kWh does it.

As a recap this is what I am using to make all this work

Tado - Each room has its own thermostat/schedule and it turns on off the Boiler, failover cloud based our door temp

bbqkees ems - Lets me access the central heating boiler and manage it from Home Assistant /Node red - about £100

Hue - Outdoor Motion Sensors ( using 2 and averaging them)

MQTT - bbqkees ems and writes to MQTT

Home Assistant - through MQTT to manage the boiler

Node Red - as the automation tool

Glow Display & CAD with in room Temp/Humidity Sensor - to calculate the Heat Loss - also feeds into MQTT for real time elec and gas meter readings

The Glow Meter readers and temp/humidity sensors cost about £100 - but is great for tracking energy usage in Home Assistant

Shelly 16a relay with add on to add three temperature probes, one for flow, return and hot water, the relay controls the hot water tank immersion heater and is set to auto turn off in 30 mins, I added a hardwired switch to the Shelly for my wife to have access to an easy hot water boost control.

Update day later

Changed lowest Flow to 40c, I need to see it performing at that first, if it needs to it will automatically flex up.

Looking at the delta-t, difference between flow (out) and return (back) I am recording a very low 4c so this indicates a radiator balancing issue or I can address by reducing the radiator pump using the bbqkees device. Will see if that improves it.

I also suspect the return temp sensorI have on the boiler is mounted too close to the boiler and may be reading boiler temp increase rather than the actual return temp, will relocate further away from boiler.

3 Likes

Very nice!

How did you get the HCS? I have the little Glow display device with local MQTT but that only gets information from the gas and energy meters.

Glow sell a temp/humidity sensor - expensive but that is not what you are actually buying.

It once installed and working on the Glow system, you need at least 20 days of normal heating - ie in the winter months.

You go to their website login and it creates it there.

I am seeing my Flow temp flexing up and down throughout the day and night.

While we are having a cold spell here - ie about freezing it has boosted the flow to 48c at night seeing it drop to 42c.

Very very happy with it right now doing an excellent job while keeping the DeltaT an average 10c - I would like to see higher but OK as an average, but seeing flex throughout the from 2c to 20c.


On this you can see the Outdoor temp Highs and Lows per day and the CH DeltaT (difference between temp from boiler to temp from radiators) and how key rooms are responding - a negative number here represents the room max over heat - normally when target room temp drops at night say, or when the south facing rooms get extra heat from the sun.

The perfect one will be when each of the target rooms is 0 - ie perfectly at the target temp.

Boiler weather compensating it was being more reactive before the sudden cold spell we have just had, as it it warms up a bit now should see a greater variety in target temps.

This one shows Target rooms, Lounge, Master Bed and Ensuite, trying to keep as close to 0 as possible, hitting 0 indicates the room has hit target temperature, a minus figure is when it over shoots and gets a little too warm, usually at times when the target temp drops as we go to bed at night or if we get some sunshine.

The CH Delta fluctuates throughout the day depending loading and then I have the average Northern side of outside the house.

It was daunting to get into this but extremely rewarding now.

Interesting post, and a topic I have been pondering for a while since I had my own Worcester Bosch 4000 and EMS gateway fitted earlier this year.

Using your JavaScript I created a template sensor as follows:

{% set a1 = states('input_number.comfort_target_temperature') | float(0) %}
{% set a2 = 1.6 %}
{% set a3 = states('sensor.weather_station_outdoor_temperature') | float(0) %}
{% set result = (a1 + (a2 * (a1 - a3))) | round(0) %}
{% set clamped = [30, [result, 80] | min] | max %}
{{ clamped | int }}

As you can see I’ve also set my HLP to 1.6 for now (I haven’t as yet properly calibrated my heating setup and calculated the heat loss).

I’ve then created a very simple automation that sets the boiler flow via the EMS gateway when the state of the template sensor changes.

24 hours in and it’s working very nicely, the rooms are keeping a comfortable and consistent temperature and more importantly the gas usage is much lower.

1 Like

What range are you seeing flow temperature - mine is flexing between 42c and 48c during this cold spell.

Yes, very similar range. It went up to 48 at its highest last night, and is currently sitting at 39 (~6 on my outdoor temperature sensor). My house faces east/west in central Shropshire so isn’t the easiest to keep consistently warm.

Thanks again for all the info!

You mentioned you’re getting your heat loss from a single H&T sensor in the living room, but you also have it measured in other rooms, is that right?

What was your criteria to choose the living room one?

OK,

Background
I use Tado TRVs on every radiator except for the one in the airing cupboard.

Some how the Tado TRVs are remarkably accurate for sensing the correct temperature in the room and somehow detect a window left open (Tado magic!)

I have 5 key spaces out of the 12 rooms under heat.

The lounge and dining room ( or my wife’s craft room ) are one open space with two large radiators and I treat it as one space the Lounge.

In the Lounge, Kitchen, Office, Master Bedroom, Ensuite I have put Tado wireless thermostats.

All 11 heating zones are all maintained at 17c as a minimum, keeping every room, including Guest Bedroom and Guest Bathroom aired.

All heating zones have their own schedule based on our usage, for example the Master Bedroom is 18c throughout the night, boosts a little when we are waking up and just before we go to bed, (had to reduce that slightly as the bedroom increase 2c when we and our 2 dogs go to bed without the heating, so reduced the uplift or we end having a too warm bedroom during the night)

All 11 zones drop 2c when we are out of the house and when Tado detects us getting close to home the house returns to normal temp. It does this extremely well.

The downside her his the Tado smarts require internet access. however during an outage every zone follows its program do never noticed any issues.

These help keeps the room at +/- 0.3c of the target.

Other actions I have taken is to oversize the radiator in the Lounge and move its large radiator to the Master Bedroom and to upgrade the useless towel rail radiators with something that actually heats the room.

Also, fitted blackout/thermal blinds to every window and added Aqara Blind controllers so the house blinds shut at dusk or a little earlier if it extra overcast and dark outside.

This has had huge impact on rooms, no longer getting the cold air from the windows felt in the room, I can’t prove it it but it seems to make the room easier to keep heat in.

Also as a Home Automation nerd, can’t help loving all the window blinds all closing in sync when seen from outside.

Also added benefit is when Eufy security cameras ‘sees’ the window cleaner automatically closes the blinds in the bedrooms and bathrooms to avoid any awkward moments :slight_smile:

Using Lounge/Craftroom for DLP(HCS)

I picked and only tested the Lounge/Craftroom space to determine DLP (HCS) as it was a space that was kept the warmest and with us both at home all the time it was the most used space, it is where most heating energy goes.

Once I had the baseline for the Lounge/Craftroom I can tweak the formula if other areas not responding, but so far they are.

The only thing I thinking of is perhaps offsetting by 1 or 2c down.

So at the moment the boiler is fluctuating between 42c at night and 48c in the day.

I would like to bring it down so I can test to see if the actions I have taken will make the house ready for a Heat Pump on 10/15 years.

Hopefully that answers your questions.