[ANNOUNCE] node-red-contrib-dynamic-thermostat 0.0.4

Yes, I appreciate the description. It was an area of knowledge I had no experience in at all, so this was all very helpful. I'm working on a node-red pool controller, so this might be helpful in controlling my heater.

1 Like

Of course if you want really good control then <blatant plug> you should be using node-red-contrib-pid with node-red-contrib-timeprop </blatant plug>.

As an option have a look here:

and here:

What I'd like is a learning thermostat.

I'd like to ask it to achieve a target temp at a specified time and it could learn what time to start heating based on previous heat cycles & given relevant environmental values (especially the external temperature).

Probably too much to ask :slight_smile:.

Who seeks finds :wink:

@cflurin, I think that isn't what @borpin searched, because the ramp-thermostat doesn't learn, or include second (outside) temperature. I would searching something like @borpin, but can't find anything. And wondering about that, because this will be a really smart thermostat saving energy and get more comfort.

The only example I found on the net to this problem is:
https://www.domoticz.com/wiki/Plugins/Smart_Virtual_Thermostat.html

This program tries to switch the heater in dependency from the outside temperature to get the right inside temperature at the right time.

1 Like

I'd been looking at this and you are right.

The Ramp is the right idea, but it needs some method of learning what the actual gradient will be (when the heating is switched on) taking into account other factors. If you know what the gradient will be and you have a target (time/temp) you can determine when the heating should be switched on.

In my case I also want to allow for overshoot - the UFH keeps heating after it is switched off.

Sounds easy, isn't really, and no one seems to have done it yet (other than propriety systems).

Have a look at node-red-contrib-pid, it is more complex to setup and tune but is capable of giving much better performance than an on/off controller. You would probably want to use it in conjuction with node-red-contrib-timeprop.

1 Like

Probably a simplistic system that adjust the ramp rate based on the outside temperature (or better the wind-chill temperature which would allow for wind) would be good enough.

2 Likes

A pid could be one better way than only switch on/off, but machine learning, I suggest is the better way. if we get running it ;-). Also in conjunction with overshoot.

I will dive in a little bit more, if I find time. But at a first short view it seems too difficult for me. I found a good page to start perhaps it helps to understand, what to do. I'll see.

What I also found on node-red is DIY smar heating system. He wants to implent ML in summertime. Sounds good :-).

1 Like

Why? They are not alternatives. The machine learning could save energy by delaying the startup till the latest possible time, but the control loop itself is an unrelated matter.

If I'm remember right, a PID is a controller which regulate the output in dependence of temperature in this case. So I thought, this is well if the setpoint is reached to hold the temperature at a given level.

But a PID doesn't know, when to start. The previous state is off or a lower temperature. Perhaps in case of overshoot a PID will help. I don't know in this case, because it can switch the heater off, but if you have e.g. a marmor heater, the marmor will be hot a longer time and always heat.

So in my opinion a PID or something similar is for a case where you regulate something which you can switch on and of with an "immediate" result. A PID will not learn - or do it?

I'm not a specialist. This are only my thought and I'm happy to learn.

To clarify: the ramp-thermostat for my use case is to control the room temperature for every room not to control the central heater.
I'm using the same algorithm for 15 years (the first version was an c# program), the cost saving is appox. 20-25%.

How it works:
as soon one thermostat turns on the room valve is actived and the central heating control turns on the piping pump.
Depending on the flow temperature the central heating control turns on/off the heater.

We have a floor heating, which works with a low flow temperature (appox. 32-35 Celsius degrees). On the other hand the floor heating is quite slow. So the ramp gradient is different for every room and is a result of optimisation.
In my case the outside temperature is irrelevant.

It doesn't learn, but it adjusts the output by cycling the power on/off in order to maintain the temperature at the required setpoint. So it is about the mathematics of the control loop. Since it is is tuned to compensate for the maths of the loop it can adjust for the fact that the heating system keeps heating after the power is removed and minimise overshoot.

What (I think) you mean is that the PID does not know when to start ramping the required temperature up. In which case you are exactly right. The PID will keep the actual setpoint on the ramp, but if you want to ramp it up to the setpoint at a defined rate then for that you need to provide a ramping setpoint. That is why I say the two things are separate. I only mentioned PID because the the overshoot problem was brought up,and PID can help with that.

OK, I am using a ramp for heating a conservatory heated by fan heaters. In fact I use an exponential rise aiming at the maximum temperature that I know that the heater will rise above the outside ambient. This is then stopped at the actual required temperature of course, which is reached at the time specified via the dashboard. So quite a different application.

Ok, thanks - I think now I understand :slight_smile:

Played around with it for a while. Works well at first. Now I get the following error message always 2x at the same time when I set a target temperature.
msg : error
TypeError: Cannot read property 'hasOwnProperty' of null

Edit: Seems like the error has fixed itself. Need some time after the deploy until it works.

@DenisMtfl
Hello, I really like your thermostat node. It is very suitable for my application around bathroom.
Can you add a function to de and activate the thermostat with an (ON OFF) input message?

I don't think that @DenisMtfl is a regular contributor here. You might be better submitting an issue on the node's github page.

A workaround would be to use a node-red-contrib-simple-gate to block messages into the thermostat node and at the same time send an Off message to the following flow.

1 Like