Recently (some of my) Switch-Items won’t switch anymore. I’m not aware interfering with any of these recently, i.e. I didn’t change any rules that affect these Items. So from my current perspective they just stopped doing what they used to do flawlessly in the past. Here’s an example.
Switch zBett "Bettzeit [MAP(zustaende.map):%s]" <scene_sleeping> (gZustaende) ["Lighting"]
The example rule
rule "Test" when Time cron "0/15 0/1 * 1/1 * ? *" then logInfo("test.rules","1: " + zBett.state.toString) zBett.sendCommand(ON) logInfo("test.rules","2: " + zBett.state.toString) end
2019-03-05 09:45:15.021 [INFO ] [se.smarthome.model.script.test.rules] - 1: OFF 2019-03-05 09:45:15.032 [INFO ] [se.smarthome.model.script.test.rules] - 2: OFF
The switch stays OFF, apparently, beside the rule telling it to turn ON. In all my openHAB rules there’s just a single rule which could set the state of this particular Item back to OFF, but this rule is not triggered by a state change of zBett. I even commented the whole rule out. No change in behaviour.
I tried switching state via the openHAB-App manually and Echo devices by voice. Neither works. In the App I can see the switch turn back to OFF immediately.
The not-working Items are exposed to the myopenhabcloud. The states of some (but not all) Items have received an update the last time by the end of February, but they should have received several state changes since. I might have updated the openHAB-version from 2.3 to 2.4 around the time of the last updates (not sure).
The only difference between non-working and working (Cloud-)Items I can see is the additional [“Lighting”]-tag. Removing the tag on the Items doesn’t seem to have an effect on the described issue, though.
In the cloud I deleted all Items for a test. The Items (except those without the tag) don’t even get synched (which is not surprising since they have to receive a state change once to be visible in the cloud).
The problem persists after a re-start of the openHAB-service. I’m kinda lost on this one. Any ideas?
EDIT: It appears I can change the state using postUpdate() instead of sendCommand() in the above rule. A manual change still doesn’t work however and the updated Items don’t synch with the cloud.