corbanmailloux / esp-mqtt-rgb-led

MQTT RGB LEDs Using JSON for Home Assistant
MIT License
270 stars 74 forks source link

White LED is always ON with 4-colours-in-1-LED (5050 RGBW) #64

Open mankron opened 1 year ago

mankron commented 1 year ago

Hi, first thank you for your great job!

I use the MQTT RGBW Solution and don't know if there's an issue with my hardware or the code.

The LED I use is the "BTF-LIGHTING 5050 RGBW" (amzn) which has 4 colours in 1 LED.

Your Code

enum strip {
  BRIGHTNESS, // only one color/only white
  RGB,        // RGB LEDs
  RGBW        // RGB LEDs with an extra white LED per LED       X   <-----
};

looks like it means such an LED. Am I right or do you know if this type of LED is not supported?

My HA (actual release) config is:

Config-Yaml:

mqtt:
  light:
     schema: json
     name: xxx_TV_RGBW
     state_topic: "xxx/esp01/rgbwTV"
     command_topic: "xxx/esp01/rgbwTV/set"
     brightness: true
     color_mode: true
     supported_color_modes: ["rgbw"]
     effect: true
     effect_list: [colorfade_slow, colorfade_fast, flash]
     optimistic: false
     qos: 0

It's working but the colour white is always on.

Fun fact: During the effects the white LED goes out, in normal mode it's always on, I can't turn it off. You cannot produce intense RGB colors with the white LED switched on. Is there a way to turn off the white content using an extra switch or something?

corbanmailloux commented 1 year ago

I'm no longer maintaining this repo, but you do appear to be doing things correctly. My guess is that something with the communication with Home Assistant changed with the new color mode options: https://developers.home-assistant.io/blog/2022/08/18/light_white_value_removed/

I'd suggest moving away from this project and on to ESPHome, a much more fully featured (and maintained) system.

ESPHome has a component for RGBW lights that should work for your case. It has a very reliable, local API to connect to Home Assistant (if that's what you're using this for), but it also can easily be configured to connect to MQTT. With these components, the system will essentially replace this repo.