Flux_led fix for new Magic Home bl602 based controllers

Hi…

I recently ended up with some of the new MagicHome controllers that are using a new chip (bl602) and discovered that I can turn them on and off, but couldn’t control brightness. After some messing around in the code I figured out the issue is that these new versions were not being identified as RGBW capable. I found the issue in the core flux_led code but am not sure where or how to submit a pull request since this change is in the original code, not the Home Assistant code. I’d be happy to submit a PR there, but from what I can tell, those repo(s) are dead and no longer maintained. Can someone point me to where I should report the fix needed?

It’s quite simple - just need to add a new identifier for these controllers in the __main__.py file:

        # Devices that don't require a separate rgb/w bit
        if (rx[1] == 0x04 or
            rx[1] == 0x06 or <======
            rx[1] == 0x33 or
            rx[1] == 0x81):
            self.rgbwprotocol = True

        # Devices that actually support rgbw
        if (rx[1] == 0x04 or
            rx[1] == 0x06 or  <======
            rx[1] == 0x25 or
            rx[1] == 0x33 or
            rx[1] == 0x81 or
            rx[1] == 0x44):
            self.rgbwcapable = True

hi!
I’m interested in this solution.
May I ask you a question? Where is this __main__.py file?
Thanks!

it’s a bit complicated, since the issue is in the upstream code, not home assistant code. i opened an issue on it to ask the home assistant maintainers to incorporate an upstream fix in the is request: https://github.com/home-assistant/core/issues/47810

if you like, i can post instructions for how to work around it now, but it’s going to be complicated. just fyi. :slight_smile:

Hi, as already posted on github issue of upstream component, I have a similar device based on BL602 chip, but unfortunately this commit doesn’t fix the issue. My board is marked as ZXH-2, like this MagicHome Chip - Album on Imgur but with IR soldered.

Support for these should be better in 2021.11

Dev repo is here:

Yep! I confirm that fluxled in 2021.11 with bl602 chips works perfectly. Thanks!