Magic home RGBWC, 5 channel controller support?

Hey guys,
I dis some searching and I have found threads fro Magic Home RGBW (4 channel) controller but none on the 5 channel variant so I figured I’d ask if anyone has had any luck getting WLED to work on one of these guys. It looks pretty much the same as most other devices on the outside except that the corners are cut. Inside it looks like an rgbw and has pads for +3.3v, gnd, TX, and RX and 6 (SIX) pins coming out (vcc R G B WW CW). I’ve gotten it connected to the point where I got data on the command line but nothing legible. I had other things to do so I didn’t look much further. It works just like any other Magic Home device as far as the app is concerned. The chip on the backside is an ESP8285.

Thanks,
Chris

Can be done by modifying [env:esp8285_5CH_H801]

Cool thanks. I thought possibly but wasn’t sure.

If you need help compiling buzz me in WLED discord

Thanks. I got it to compile. Quick question tho. Do you know if it’s possible to get the image smaller than 512k so that I can run OTA? If not no worries. :slight_smile:

Actually you can. Just take a look on section in platformio.ini 1m_OTA and copy to your section. Also look at firmware folder. You can find there 2 files with same name but one is compressed. Use compressed for OTA

Hi @cmgreenman the WLED logic uses RGB + 1 channel for white.

When using 5CH the only point where the 4th channel is used, is the in the function WS2812FX::setRgbwPwm(void).

I did implement this last year to get correct colors when changing from Alexa - so the only things that do work are 5 disctinct RGBW values that are kind of “translated” to RGBWW:

#ifdef WLED_USE_5CH_LEDS
    if (color.R == 255 && color.G == 255 && color.B == 255 && color.W == 255) {  
      bus->SetRgbwPwm(0, 0, 0,                 0, color.W * b / 255);
    } else if (color.R == 127 && color.G == 127 && color.B == 127 && color.W == 255) {  
      bus->SetRgbwPwm(0, 0, 0, color.W * b / 512, color.W * b / 255);
    } else if (color.R ==   0 && color.G ==  0 && color.B ==   0 && color.W == 255) {  
      bus->SetRgbwPwm(0, 0, 0, color.W * b / 255,                 0);
    } else if (color.R == 130 && color.G ==  90 && color.B ==   0 && color.W == 255) {  
      bus->SetRgbwPwm(0, 0, 0, color.W * b / 255, color.W * b / 512);
    } else if (color.R == 255 && color.G == 153 && color.B ==   0 && color.W == 255) {  
      bus->SetRgbwPwm(0, 0, 0, color.W * b / 255,                 0);
    } else {  // not only white colors
      bus->SetRgbwPwm(color.R * b / 255, color.G * b / 255, color.B * b / 255, color.W * b / 255);
    }

This means that you white LEDs will stay dark unless you grab one of these 5 RGBW values:

 R ,  G ,  B ,  W:
255, 255, 255, 255
255, 153,   0, 255
127, 127, 127, 255 
130,  90,   0, 255
0,     0,   0, 255

The logic for dealing with all other colors is still not ready …

Good to know. So if I grab one of those 5 RGBW values it will turn on both channels 4 and 5 but in the correct ratio to each other to provide the correct temperature, correct?

Any ETA when full 5 channel support will be available? I’m trying to get my RGB+CCT floods to do double duty and work with xlights and Home Assistant. :slight_smile:

Chris

Hi @cmgreenman, unfortunately not - home assistant does use color-temparature as well as HS (hue-saturation) for the white part and then translates this to RGB before sending it to WLED.

To get this working on 5 Channel LED stripes we need to convert this back to RGB + CW + WW.

The better way would be to enlarge the internal color-representation of WLED and thus make WLED capable of “understanding” a color-temperature or an XY-representation of the color.

Then Franck (who created the WLED integration for HASSIO) could change the API to pass the CT value directly to WLED.

You see: it’s not that easy…

…but maybe I do a work-around for the time in between :slight_smile: