I have added a new Sonoff POW switch (with current Tasmota firmware) to my openHAB installation. Basic MQTT messaging is working fine.
This is my item definition:
Group group_sonoff
Switch sonoff_Test "Sonoff Test" (group_sonoff) { mqtt=">[mosquitto:sonoff_test/cmnd/POWER:command:*:default], <[mosquitto:sonoff_test/stat/POWER:state:default]" }
I’ve added the Sonoff switch to my sitemap and can toggle it without problems and see the result in my events.log file. These events are also logged when I manually trigger the switch with the button on the Sonoff.
2018-02-05 11:02:45.815 [vent.ItemStateChangedEvent] - sonoff_Test changed from OFF to ON
2018-02-05 11:03:53.565 [vent.ItemStateChangedEvent] - sonoff_Test changed from ON to OFF
However, this simple rule never seems to be triggered:
rule "Sonoff Test"
when
Item sonoff_Test changed from OFF to ON or Item sonoff_Test changed from ON to OFF
then
logInfo("sonoff.rules", "sonoff_Test changed")
end
I have also tried the triggers “Item sonoff_Test changed” and “Item sonoff_Test received update” without success. No errors where logged with any of the triggers, but the log-action itself was never executed.
Any ideas? Thanks you!