Item changed trigger not working in rules

This OH2 problem is driving me crazy. I have an Item “Darkness” that is defined as follows

Contact  Darkness  "Darkness [MAP(darkness.map):%s]"   {mqtt="<[mqtt:dpie3/din8/down:state:CLOSED],<[mqtt:dpie3/din8/up:state:OPEN],<[mqtt:dpie3/din8/state:state:CLOSED:down],<[mqtt:dpie3/din8/state:state:OPEN:up]"}

I can see in the events.log that the Item changes when the relevant mqtt messages are received. My problem is that rules that should trigger on the change of the item does not trigger. I did also add a cron time rule, just to see that the rules file is read and that the item is working. See the code below:

rule "Dummy"
when 
    Item Darkness changed
then
    logInfo("dummy", "Darkness changed")
end

rule "Cron"
when
    Time cron "*/5 * * * * ?"
then
    logInfo("dummy", "Darkness state is "+Darkness.state)
end

This is the output in the openhab.log when I change the value of Darkness (by sending the relevant MQTT message):

2017-10-20 14:53:50.004 [INFO ] [eclipse.smarthome.model.script.dummy] - Darkness state is CLOSED

No trace of the “Darkness changed” printout. :frowning:

Similar questions on this forum seems to relate to wrong naming of the rules file, or incorrect item binding. But I do see the item change in the event log.

This is driving me crazy! Please help!!

try “received update” instead of change. I think change need a traget changed to what.

Good idea, but unfortunately it makes no difference. I also tried “received command” without success.

Is Darkness actually changing? If it is already CLOSED then sending CLOSED will not change the state of the Item so the rule will not trigger.

Furthermore, if you use state in your mqtt configuration and send a message that doesn’t change the state of the Item, the binding will not update the item so you can see if using command works but usually you can’t send commands to Contacts.