Heating algorithm / service

Hi,

I am currently using Netatmo’s heating system, consisting of a relay to run on the heat source plus a number of smart radiator valves. The core functionality (incl. outdoor temperature compensation) works great.

What is not great is that with the number of devices I have, there is always something that needs a battery change. More importantly though, if the internet is down, the ability to control the heat is quite limited, and I really do not like that.

What I am looking for is a standalone heating algorightm, ideally in python, that would do the following:

  • Demand heat based on per-room temperature measurements (in OH via KNX), with overshoot “protection”
  • Control radiator valves (I can get a wired KNX ones that accept percentage values)
  • Perform outdoor temperature compensation

I also have variable source heat temperature controllable via OH, though I do not expect that to work out of the box, happy to add features there.

Any tips how to achieve the above?

There seems to be a Home Assistant feature that does something very similar but is specific to HA: GitHub - Alexwijn/SAT: The Smart Autotune Thermostat (SAT) is a custom component for Home Assistant that works with many compatible gateways for your boiler.

You have KNX system and want to use python to control heating system, am I wright?

Have you not any knx virtual thermostats in your home? This way will much better that you want.

1 Like

Yes, that is correct.

I think I have a good few knx devices that do heating control (gira multisensors etc) but I want something that would control the whole house and compensate for outside temperature, which I did not see as a feature I think.

Do you have any examples of KNX devices that do do that?

My preference for something in python is to have something customisable easily, to have the ability to tweak hearing curves, have a custom scheduler, tweak temps based on PV output and energy prices, etc. But as a basis, I want a good PID like algorithm with outdoor temp compensation and multi room valve support.

It is seem that you do not need any Python. All you have with KNX. Just give me list of devices, I will show you what can be use for PID/PWM .

As I understood, you are living in house (not flat) with own heating boiler. So this boiler must have input for outdoor temperature sensor. Just use it and the boiler will tweak hearing curves with outdoor temperature for heat water prepared.

KNX devices will only operate with this water open-close valves by internal PWM algorithm. So no high needs to use rather expensive % valves.

OH will give Schedules time. If you say what even do you need at different times I will say how do it in easy way.

Yes, I live in a house.

In terms of devices, I am planning the following valves:

Gira Valve drive 3, 2176 00.

I have a few Gira 2104 (CO2-Sensor with humidity and room temperature
controller), however, those seem to ONLY have PI controllers, not PID.

The source of heat is a heat pump. It does not have cold weather compensation, however, I managed to hook it up to OH via Modbus and I have control over the water temperature, so I suppose I can tweak that depending on the outside temperature.

I am also considering Gira X1 to provide logic for the most important things (like smoke sensors integration or leak detectors link to the water mains valve), which would live alongside OpenHab. ATM I am using various KNX devices that support logic but would like to centralise it.

They have all that you need.

Can you say model of it?

Better use KNX logic. This will be right planning.

Sorry, I need to go. I will write in detail some time later.

Thank you. Isn’t PID control better?

My heatpump is Daitsu Monobloc Active AOWD 17X, which I’ve connected via Modbus so can control water temperature.

Re. KNX logic - you mean, for example, using the CO2 sensor’s logic gates with an OR operation to integrate the demand from the individual valves?

Better, but not in this situation. Heating house is rather slow process. I can say more: at practices 2 points control of room temperature in domestic room may be good as PI/PID (if you not have a huge rooms like atrium)).

As I see, the heatpump knows about external temperature.

I mean that if you can make something with KNX, better do it with KNX.

Ordinally I use Zennio actuators for heating rooms. https://www.zennio.com/products/knx/hvac/heating/

Addition Zennio gives a powerful logics in their controllers.

So, I will be take one (or more) of HeatingBOX and 2position valves. Gira 2104 will give room temperature, HeatingBOX will use own thermostats with PWM controlling and control valves of the rooms.

The heatpump is seems to can self adopt to external temperature. If not, you can call to technical support of manufacture. Or at worth variant will make own curve with OH logic. Like this:

rule "Температура теплоноcія"
when
  Item Temp_Outdoor received update
then
  val outdoorTemp = Temp_Outdoor.state as Number
  var targetTemp = 50 // Base temperature
  
  if (outdoorTemp < -10) {
    targetTemp = 70
  } else if (outdoorTemp < 0) {
    targetTemp = 60
  } else {
    targetTemp = 50
  }
  
  postUpdate(Target_Heat_Temp, targetTemp)
end 

Setpoints can be else value, I setuped curves far years ago and forgot a lot of them.

If you still want to use % KNX valve I recommended CHEOPS S KNX | Heizungs- und Klimaregelung | KNX | Theben

But you need to check if shtock`s move proportional opens of water flow. Very often can be situation when open on 10% gives 100% of water flow. So % valves will be useless, only 2 points.

And % valves make some noise (if you want to set them in bedroom).