Control water temp for floor heating

I have a heating system that is shared between radiators and floor heating. As the heating need for floor heating is always less than radiators I’m building intelligence to control the water temperature that goes out in the floor heating tubes.

The water temperature will be based on outside temperature. For each outside temp between +20 and -20 I need to have a corresponding water temp i.e. outside +1C=water +23C, outside 0C=water +25C, outside -1C=water +27C etc. Thus, this will require 41 logic expression.

Can this be done in a clever way in PLEG or should I go with LUA code (which I’m yet unfamiliar with)?

If you can fit the data to a linear equation you can implement it in PLEG
Otherwise you will need LUA and some type of lookup table.

i.e.

The following is valid for -20 <= AirTemp <= 21

table = {220, 217, 214, 211, 208, 205, 202, 199, 196, 193, 190, 187, 184, 181, 178, 175, 172, 169, 166, 163, 160, 157, 154, 151, 148, 145, 142, 139, 136, 133, 130, 127, 124, 121, 118, 115, 112, 109, 106, 103, 100}

airtemp = 23
watertemp = table[airtemp + 21]

A table would be quite clever. Maybe it’s time for me to dig into LUA.

Would the best approach be to add the LUA code to a PLEG action? I could have the outdoor temp as trigger.

Why not us a formula like WaterTemp=AirTemp*-2+25

Verstuurd vanaf mijn SM-T530 met Tapatalk

The curve is not linear so a formula won’t work.