Hello everybody, I’m trying to connect my dimmer item with a physical switch on my ESP via MQTT but I’m having some strange behavior. This is how my item is defined and it’s representation in sitemap:
What actually happens is that when I change the value of the dimmer in PaperUI, I get two MQTT requests sent to my ESP, one after another. Also, if i change the value on my ESP via physical knob, ESP send a value to openHab, but then openHab sends the same value back to ESP…
Hi Marcin, yes, I have but in that case, the UI isn’t updated (at least not without a rule). I’ve inspected event log and found out that when I move the slider in the UI, it behaves as two event (onMouseDown and onMouseUp).
Btw, I managed to prevent openHab from retriggering the MQTT msg (instead of state, i was subscribed to a command) back to ESP. But now this double publishing is bothering me as:
it sends another (useless) msg and just adds more work for everybody
values that are sent from the dimmer could be different: ie. first msg would have a dimmer value of 15 and second msg could be, let’s say 55 - and you see that that could be a serious problem as ESP receiving the msg will first set LED brightness to 15% and immediatelly after that set it to 55%…
Ok, i found out that only PaperUI triggers multiple MQTT requests so i assume that is related to it only…Working as expected from the iOS app… haven’t tested other browser based UIs…
If i catch some time to analyze PaperUI, I’ll try to fix it and create a PR on git…