MagicHome WRGB Controller Tasmota help

Hi folks, wondered if anyone could give me any insight here?

I have a MagicHome branded WRGB LED controller that I have successfully flashed Tasmota 9.5.0 to. I have it configured as a Generic module with all colour PWM settings correct. In Tasmota, I can change colours correctly, control brightness, and by using SetOption105 1 (white blend) I can get the strip to switch over to the white LED’s by dragging the colour slider all the way to the left. So far so good.

I have then configured my MQTT details and used SetOption19 1 and HA has auto discovered the strip. This is where the issues begin - if I try to issue any colour to the strip in HA, it flashes the colour selected then jumps straight back to the white LED’s. If I then chose a colour in Tasmota GUI, it changes correctly and the HA icon updates to the matching colour. Again though, if I chose a new colour in HA it flashes that colour then switches back to the white LED’s.

Couple of console grabs from Tasmota. When manually selecting a colour from the Tasmota GUI:

MQT: stat/Sofalights/RESULT = {"POWER":"ON","Dimmer":100,"Color":"13,0,255,0","HSBColor":"243,100,100","White":0,"Channel":[5,0,100,0]}

When selecting a colour from HA frontend:

18:40:06.512 MQT: tele/Sofalights/STATE = {"Time":"2021-07-06T18:40:06","Uptime":"0T00:10:50","UptimeSec":650,"Heap":27,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":99,"MqttCount":1,"POWER":"ON","Dimmer":100,"Color":"0,255,64,0","HSBColor":"135,100,100","White":0,"Channel":[0,100,25,0],"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"Tell My Wi-Fi Love Her","BSSId":"E4:C3:2A:1E:D2:62","Channel":7,"Mode":"11n","RSSI":76,"Signal":-62,"LinkCount":1,"Downtime":"0T00:00:06"}} 18:40:06.517 MQT: stat/Sofalights/RESULT = {"POWER":"ON","Dimmer":100,"Color":"0,255,64,0","HSBColor":"135,100,100","White":0,"Channel":[0,100,25,0]} 18:40:06.592 MQT: tele/Sofalights/STATE = {"Time":"2021-07-06T18:40:06","Uptime":"0T00:10:50","UptimeSec":650,"Heap":25,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":106,"MqttCount":1,"POWER":"ON","Dimmer":100,"Color":"0,255,64,0","HSBColor":"135,100,100","White":0,"Channel":[0,100,25,0],"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"Tell My Wi-Fi Love Her","BSSId":"E4:C3:2A:1E:D2:62","Channel":7,"Mode":"11n","RSSI":74,"Signal":-63,"LinkCount":1,"Downtime":"0T00:00:06"}} 18:40:06.598 MQT: stat/Sofalights/RESULT = {"POWER":"ON","Dimmer":100,"Color":"0,255,64,0","HSBColor":"135,100,100","White":0,"Channel":[0,100,25,0]} 18:40:06.616 MQT: tele/Sofalights/STATE = {"Time":"2021-07-06T18:40:06","Uptime":"0T00:10:50","UptimeSec":650,"Heap":25,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":107,"MqttCount":1,"POWER":"ON","Dimmer":100,"Color":"0,0,0,255","HSBColor":"135,100,0","White":100,"Channel":[0,0,0,100],"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"Tell My Wi-Fi Love Her","BSSId":"E4:C3:2A:1E:D2:62","Channel":7,"Mode":"11n","RSSI":74,"Signal":-63,"LinkCount":1,"Downtime":"0T00:00:06"}} 18:40:06.622 MQT: stat/Sofalights/RESULT = {"POWER":"ON","Dimmer":100,"Color":"0,0,0,255","HSBColor":"135,100,0","White":100,"Channel":[0,0,0,100]}

It looks to me like HA is sending the colour command twice then a white command all in the same button click.

Anyone have any ideas what I might need to do to config this in HA?

Quick update, if I remove the white channel from the config the colour selection works fine!

Hi!

Instead of using a Generic, have you tried looking for the right template in the tasmota website?

I searched in that site for “MagicHome” and found 8 different templates (multiple RGB, RGBW, RGBWW), with different settings, I preffer using the web browser Find option, instead of the site’s search.

Maybe you can search for the model number or compared your controller with the posted pics and load the correct template (that’s how I got my magichome controller’s template working, didn’t even have a model number, had to compare pictures).

There are two ways Tasmotized devices can be automatically discovered by Home Assistant and Setoption19 is used to select which one will be employed:

SetOption19 Set Home Assistant discovery protocol.
0 = use Tasmota integration (default)
1 = use MQTT discovery

The default is Tasmota’s own method which is used by Home Assistant’s Tasmota integration. You chose the second one which is Home Assistant’s method known as MQTT Discovery.

Which leads us to this important announcement at the very top of the release notes for the version of Tasmota you installed (9.5.0):

If you have Tasmotized lights and you want to have them discovered by Home Assistant in order to control them, especially if you want to change their colors, use Tasmota’s discovery method (SetOption19 0).

Had that issue too, took me a while to understand Setoption19… and the relationship between Tasmota integration and MQTT broker.
BTW Tasmota integration works waaay better than MQTT discovery in my opinion.

Thanks Taras, that has got me one step closer!

Colours are working fine now with Tasmota integration rather than discovery, the only quirk is that the white and colour LED’s come on together!

1 Like

Just one last follow up to this, I did a SetOption105 0 to turn the white blend off, then turned it back on and the issue with both sets of LED’s coming on has resolved. Thanks all, working like a charm now!