MQTT - OHS sitemap switch not updating


I cant get my sitemap switch to update when using the sonoff switch or MQTT client.

Many thanks to the other MQTT posters as they have helped narrow down the issue.

I have a sonoff flashed with Tasmota, using mosquitto & MQTT spy. Mosquitto appears to be working ok.

The sonoff relay & light switches on & off ok, when I use the sitemap switch in OH2.
The sonoff relay & light switches on & off ok when I use “cmnd/bench/POWER ON” via MQTT spy
The sonoff relay & light switches on & off ok when I use the button on the sonoff

But when I use MQTTspy or the sonoff button it wont update the sitemap switch in OH2. Based on the posts I’ve read the other members who have had this problem added "


My items file is

Switch mySwitch {mqtt="<[mosquitto:stat/bench/POWER:state:*:default],>[mosquitto:cmnd/bench/POWER:command:ON:1],>[mosquitto:cmnd/bench/POWER:command:OFF:0]", autoupdate="false"}

Any pointers would be greatly appreciated.

Watch for logs from the MQTT binding on openhab.log. Particularly look for errors.

Try using a proxy item and split the incoming and outgoing into separate items and use rules too log and update the proxy item, at least while debugging.

Sorry, I should have mentioned there are no errors in the openhab.log, and there is nothing obvious in the debug log for the MQTT binding.

Great work with your MQTT pointers and using a proxy, I’ll give it ago.

I tested a raw/basic switch and MQTT client and found my understanding was incorrect, I expected the as shown on the sitemap would automatically reflect the MQTT update, but it only does this after a refresh.

can you give it a go in internet explorer. I believe this issue happened to me in chrome as well.