Hi all,
I have configured OH2 with mqtt and mqtt-eventbus. Having one thing (a nexa switch) and a linked item allows me to control a lamp without any problem. When I subscribe to the eventbus topic for state updates (configured as statePublishTopic=/openHAB/in/${item}/state) using mosquitto_sub ( mosquitto_sub -t /openHAB/in/livingroom_bookshelf_lamp/state) I can se state updates.
Now to the troublesome parts - when I toggle the switch, either by clicking in the GUI or by sending an mqtt command, I get four (4) state updates.
Client cmdline received PUBLISH (d0, q0, r0, m0, '/openHAB/out/livingroom_bookshelf_lamp/command', ... (3 bytes))
OFF
Client cmdline received PUBLISH (d0, q0, r0, m0, '/openHAB/in/livingroom_bookshelf_lamp/state', ... (3 bytes))
OFF
Client cmdline received PUBLISH (d0, q0, r0, m0, '/openHAB/in/livingroom_bookshelf_lamp/state', ... (2 bytes))
ON
Client cmdline received PUBLISH (d0, q0, r0, m0, '/openHAB/in/livingroom_bookshelf_lamp/state', ... (3 bytes))
OFF
Client cmdline received PUBLISH (d0, q0, r0, m0, '/openHAB/in/livingroom_bookshelf_lamp/state', ... (3 bytes))
OFF
First line is the actual command sent (OFF) and then comes the four state updates.
Is this expected behavior? Why is it happening?
Best regards,
/David Boman