"Smarter" Thermostat (anticipate action)

Hi I am using the embedded thermostat in my NsPanel (Tasmota thermostat implementation) but before that one I used the HA Generic Thermostat with similar behaviour. My installation is floor heating with hot and cool water (winter/summer)

The thing is that they work ok, when the temperature is above/below setpoint the thermostat sends the action to my valve.

In the following picture it is shown how it works in summer mode (but the same applies in winter mode): As you can see once the room temperature is above the 25ºC setpoint (9:25) the thermostat sends the action (opens the valve) and the cold water starts flowing through the floor pipes.

I was wondering if there is some kind of thermostat implementation that is “smarter” (some kind of feedforward control) in order to detect that after 8:00 the temperature starts to increase (sun is hitting the walls) and then send the thermostat action in advance instead of waiting to the temperature reaching the setpoint (9:25) therefore avoiding the overshoot after that time (floor cooling has a large inertia).

I thought also implementing some kind of automation but I am not sure if that is the right idea (but I am fully open to suggestions).

Thanks!

A PID controller/thermostat is what you’re describing. A quick Google search shows there might be some options.

Here’s a quick link if you want to learn about the whole process. Benefits in feedforward in PID controllers
The hardest part is going to be finding the values for the feedforward part

Not just a PID, the standard PID algorithm implemented in the HA generic thermostat is only feedback, that is it will actuate based on the error between the room temperature and the setpoint, but when the error is detected it will be already late (it cannot anticipate).

My plan was not to build a new thermostat integration from scratch based on the basic control theory :slight_smile: I was wondering if there is something already available or through some kind of HA automation.

On the other hand, Google Nest Learning Thermostat claims to do this “anticipation”, so I am pretty sure this can be done in HA (if not already done by a 3rd party integration):

This isn’t what you’re describing; what it does is estimate based on outside air temp how long it will take to meet a new setpoint. So if your schedule has a temperature change in the future, it will try to hit that new temperature at that time rather than waiting until the setpoint changes to start heating/cooling. FYI - I got one for free years ago and while I still use it, I’d definitely never buy one.

Good point @soyxan , I didn’t fully think it through.

If you don’t find a good solution that someone else has implemented, the path I’d probably go down would be using a derivative helper to calculate the slope of your indoor temperature change and temporarily adjust the setpoint down or up for a short period of time to force it to pre-cool or heat using an automation. Should be pretty simple and I would guess reasonably effective.