[SOLVED] Thermostat resets setpoint


I’m using Danfoss Z-wave 014G0160 thermostat to control the temperature in my home. I want to set up the rule that on different times of the day it regulates temperature differently.
For example, keep the temp low in the night, heat the room up for the time I wake up and again keep the temp low when I go to work etc. I use cron times to regulate that.

The problem is that for some reason the setpoint keeps resetting after some random time and I can’t figure out why. Is there anything wrong with the rule code or is there something that I’m missing in the thermostat configuration? When testing then the reset happens on random times - sometimes on the same second as the rule activates, sometimes minutes later, sometimes half an hour later.
Currently I set up the rule with only one cron rule and this is the only rule file I have:

rule "Setpoint to 26.0"

    Time cron "0 31 9 ? * MON-FRI *"


rule "Elutoa temperatuur"

    Item ElutoaSetpoint changed or
    Item ElutoaTemp changed
    var Number cur_temp = ElutoaTemp.state as Number
    var Number setpoint = ElutoaSetpoint.state as Number
    val  Number hysteresis = 0.5

    if (cur_temp < (setpoint - hysteresis)) {
        if (ElutoaRadikas.state != ON) {ElutoaRadikas.sendCommand(ON)}
    else if(cur_temp > setpoint + hysteresis) {
        if (ElutoaRadikas.state != OFF) {ElutoaRadikas.sendCommand(OFF)}

**2018-09-03 09:31:00.446 [vent.ItemStateChangedEvent] - ElutoaSetpoint changed from 24 to 26.0**
2018-09-03 09:31:00.463 [ome.event.ItemCommandEvent] - Item 'ElutoaRadikas' received command ON
2018-09-03 09:31:00.467 [vent.ItemStateChangedEvent] - ElutoaRadikas changed from OFF to ON
2018-09-03 09:31:38.931 [vent.ItemStateChangedEvent] - ElutoaTemp changed from 24.61 to 24.65
2018-09-03 09:31:38.971 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:6675270d:node3' has been updated.
2018-09-03 09:36:39.930 [vent.ItemStateChangedEvent] - ElutoaTemp changed from 24.65 to 24.71
2018-09-03 09:36:39.980 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:6675270d:node3' has been updated.
**2018-09-03 09:36:40.088 [vent.ItemStateChangedEvent] - ElutoaSetpoint changed from 26.0 to 24**
2018-09-03 09:36:40.113 [ome.event.ItemCommandEvent] - Item 'ElutoaRadikas' received command OFF

Here’s the information about the thermostat, if needed:

Here’s the picture of the current (factory default) settings of the thermostat:

OK, so postUpdate will only update the ElutoaSetpoint Item inside of OH. It doesn’t go out to the actual thermostat. You should use sendCommand(26.0) instead so that the new number gets sent to the device.

What you are seeing is likely that you updated the state of the Item in OH but later on after the Zwave binding polls for the current status of the device it changes it back to what the device was perviousely set to. \

The 26.0 never went to the device.

This of course assumes that this Item is linked to a channel on the thermostat Thing. But that is the only thing that makes sense given the above information.

Awsome. Thank you so much! This solved the problem.