A week ago i had a problem, i couldnt change color of this controller with the binding wifiled
Then i tried flash with tasmota, and i solved the problem.
This controller allows control more than 5 meters of led strip.
This is a tutorial for the people that have the same problem
First prepare the device for upload tasmota
Then flash the device with tasmota: Important, you have to press the button of the wifi controller for entrer in flash mode
When the device finish to flash, you must enter in the http of tasmota and config the device with the custom pins
Configuration -> Configure Module
Module type: 18 Generic
GPIO12: PWM2
GPIO13: PWM3
GPIO14: PWM1
And in console you have to enable PWM functions within tasmota. To set PWM mode just type: SetOption15 1
Once you finish to config the wifi controller, config openhab items, rules and sitemaps
Items
Color ColorMagicLed "Color Salon" [ "Lighting" ]
String LedsMagic "Leds Color [%s]" {mqtt="<[broker:tele/MagicHome/RESULT:state:JSONPATH($.Color)]"}
Switch LedsMagic_power "Leds Salon [%s]" [ "Switchable" ] {mqtt=">[broker:cmnd/MagicHome/POWER:command:*:default], <[broker:tele/MagicHome/STATE:state:JSONPATH($.POWER)"}
Dimmer Dimmer_Salon "Dimmer Leds Salon [%.0f %%]" {mqtt=">[broker:cmnd/MagicHome/DIMMER:command:*:default], <[broker:tele/MagicHome/RESULT:state:JSONPATH($.Dimmer)"}
Rules
rule "Leds Salon"
when
Item ColorMagicLed changed
then
var HSBType hsb = ColorMagicLed.state as HSBType
var Color color = Color::getHSBColor(hsb.hue.floatValue / 360, hsb.saturation.floatValue / 100, hsb.brightness.floatValue / 100)
var String rgb = String::format("%1$02x%2$02x%3$02x", color.red, color.green, color.blue )
publish("broker", "cmnd/MagicHome/color", rgb)
LedsMagic.postUpdate(rgb)
end
Sitemaps
Switch item=LedsMagic_power
Slider item=Dimmer_Salon
Colorpicker item=ColorMagicLed