MQTT Dimmer
-
I have set up an led dimmer.
It somehow works when i send an mqtt command like this
$ mosquitto_pub -t mygateway1-in/88/0/0/0/3 -m "10"This is what i have in my items
Dimmer Dimmed_Light "Dimmer Light [%d %%]" <slider> { mqtt=">[mymosquitto:mygateway1-in/88/0/0/3:state:*:default]" }Then a rule
/** * This is a demo rule which simulates a real dimmer by reacting to increase/decrease commands * and posting an updated state on the bus */ rule "Dimmed Light" when Item Dimmed_Light received command then var Number percent = 100 if(Dimmed_Light.state instanceof DecimalType) percent = Dimmed_Light.state as DecimalType if(receivedCommand==INCREASE) percent = percent + 5 if(receivedCommand==DECREASE) percent = percent - 5 if(percent<0) percent = 0 if(percent>100) percent = 100 postUpdate(Dimmed_Light, percent); endSitemap Slider item=Dimmed_Light
Somehow clicking on slider buttons does nothing. I don'e even see the messages when i subscribe to the mymosquitto:mygateway1-in channel. So seems the problem i have misconfiguration in the items string.
At the same time relay module works defined in items like thisSwitch vent_vsr_high "Vent High" { mqtt=">[mymosquitto:mygateway1-in/55/3/1/0/2:command:ON:1],>[mymosquitto:mygateway1-in/55/3/1/0/2:command:OFF:0]" }``` -
I have set up an led dimmer.
It somehow works when i send an mqtt command like this
$ mosquitto_pub -t mygateway1-in/88/0/0/0/3 -m "10"This is what i have in my items
Dimmer Dimmed_Light "Dimmer Light [%d %%]" <slider> { mqtt=">[mymosquitto:mygateway1-in/88/0/0/3:state:*:default]" }Then a rule
/** * This is a demo rule which simulates a real dimmer by reacting to increase/decrease commands * and posting an updated state on the bus */ rule "Dimmed Light" when Item Dimmed_Light received command then var Number percent = 100 if(Dimmed_Light.state instanceof DecimalType) percent = Dimmed_Light.state as DecimalType if(receivedCommand==INCREASE) percent = percent + 5 if(receivedCommand==DECREASE) percent = percent - 5 if(percent<0) percent = 0 if(percent>100) percent = 100 postUpdate(Dimmed_Light, percent); endSitemap Slider item=Dimmed_Light
Somehow clicking on slider buttons does nothing. I don'e even see the messages when i subscribe to the mymosquitto:mygateway1-in channel. So seems the problem i have misconfiguration in the items string.
At the same time relay module works defined in items like thisSwitch vent_vsr_high "Vent High" { mqtt=">[mymosquitto:mygateway1-in/55/3/1/0/2:command:ON:1],>[mymosquitto:mygateway1-in/55/3/1/0/2:command:OFF:0]" }```Looking for an answer on this too? Did you happen to figure this out?
-
Check out the other topic http://forum.mysensors.org/topic/3664/mqtt-dimmer-message/7
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login