I am trying to setup simple RGB Control using GPIO12,13 & 15 but i am not successful. I want to use color picker and it should give output HSB to PWM Pins. But nothing is happening.
Please if anyone had past experience please guide me whats wrong ?
rule "Set RGB LEDs from Color item using ColorPicker"
when
Item abc received command
then
if (receivedCommand instanceof HSBType)
{
val red = receivedCommand.red * 10.23
val green = receivedCommand.green * 10.23
val blue = receivedCommand.blue * 10.23
aacc_color_r.sendCommand(red)
aacc_color_g.sendCommand(green)
aacc_color_b.sendCommand(blue)
}
end
Does OH2 publish the state of these 3 items to the broker when the items get their commands from the rule? (check with a tool like MQTT.fx)
Your 3 mqtt String items are bound to an outgoing config to publish the state (not the command) but this shouldn’t be the problem since after the command, the state is updated and the String items should publish the updated state to the Broker.
Maybe the ESP does not react to incoming state updates (and requires incoming commands in another topic)?
I have tested with MQTT.fx but nothing is coming out. If i toggle switches its printed in MQTT.fx but this Color picker is not giving any output. any other suggestion ???
I also tried to chage state with command in things file, but still nothing.
then something is not working with your rule
add some logInfo statements to see what is happening.
Also, check the state of the 3 items from within openHAB console after the rule fires.