I want to accomplish the following:
I have build an arduino device which controls a rollerblind via MQTT. The blind takes about 10 seconds or more to go from top to bottom. During travel the arduino reports the rollerblind position every second. With the feedback I want to set the position of a slider in habpanel but the slider is also used to send the position to the arduino via MQTT. So I have an item which sends the MQTT command (new curtain position in %) and an item which receives the actual status per minute.
Dimmer Front_Curtain1 "Dimmer Curtain 1 [%d %%]" <slider> {mqtt=">[mosquitto:myhouse/BG/Living/Front/Curtain/1:state:*:default]"}
String FrontCState1 "[%s]" {mqtt="<[mosquitto:myhouse/BG/Living/Front/Status/Curtain/1:state:default]"}
I use a small rule to send the status to the slider but it also sends the received status as a new position to the arduino.
I only want to update the GUI
rule update_slider_Curtain1
when
Item FrontCState1 changed
then
postUpdate(Front_Curtain1,FrontCState1.state)
end
Any ideas?
Michael