[SOLVED] After 2.2 Update - Items do not change STATE on command receive

After Update I figured out, that some Items do not Change its STATE and stays ‘NULL’

Rules and Items files are from 2.1 Version unchanged.

Example:
I Have an Item in a file ‘myitem.items’:

Switch demo "My Switch"

I can see the item in the console via >smarthome:items list
The State there is NULL

After that I created a Switch Widget in HABPanel and select the Item.
Then I clicked it and see in logs that the item received command ON

BUT
The STATE of the item still is ‘NULL’

when I update it via Console:

smarthome:update demo ON

The Item state changes
So all my rules depending on the State did not work anymore if a command is received.
Even Triggers in Rule like:

rule "Demo"
when Item demo changed
then
   logInfo("Log", "Demo Changed")
end

Does not Fire, cause Item does not change State.
Has Anyone similar issues?

1 Like

I helped myself by creating an additional rule to trigger the sate changed:

rule "Demo State change"
when
    Item demo received command
then
    if (receivedCommand != null)
        demo.postUpdate(receivedCommand.toString())
end

In 2.1 the state changed trigger was called on command send, was this changed in 2.2?

1 Like

I have the same problem. Some of my devices subscribed the “state” of some virtual switches using MQTT. After upgrading to OpenHAB 2.2 they stopped working as the state is not changed as it used to.

I’d like to know if this new behavior is intended or buggy.