I want to check my thermostat for changes and activate the pump so my floor heating starts to work.
If the temperature is very close to the setpoint temperature, the pump will start and stop every 2 minutes or so.
How can I wait in a rule for changes and only run the rule, if the state did not change back within X minutes?
Add some hysteresis to the temp setting to prevent short cycling. Here is an example you can try.
rule " temperature"
when
Item TempSetpoint changed or
Item YourTemp changed
then
var Number cur_temp = YourTemp.state as Number
var Number setpoint = TempSetpoint.state as Number
val Number hysteresis = 0.5
if (cur_temp < (setpoint - hysteresis)) {
if (YourPump.state != ON) {YourPump.sendCommand(ON)}
}
else if(cur_temp > setpoint + hysteresis) {
if (YourPump.state != OFF) {YourPump.sendCommand(OFF)}
}
end
One option is to add a temp sensor. If that’s not practical maybe use the Expire binding with your pump item and set the delay time for bringing the pump on and/or shutting it off.
The “heating ON” “heating OFF” responses come from a temperature measurement I assume so the regulating loop works but is too aggressive. Where is the thermostat located?
Can you place the thermostat further away from the heating source or lower the water temperature inside the floor heating to make the loop more stable?