logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

[Solved] I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module?

rojoricardo 1944 12
ADVERTISEMENT
  • #1 20331661
    rojoricardo
    Level 4  
    So I bought a cheap light bulb but it said it had RGBW but it advertised it had warm white and cold white, I opened the bulb and it only has RGB and warm white, I assume the cold white was emulated by the RGB LEDs and a little bit of the warm white, but how do I go about and do this emulation?
    I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module? I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module?
    I already changed the firmware to OpenBK and the module is:
    P8White Warm
    P7Blue
    P6Red
    P26Green
  • ADVERTISEMENT
  • Helpful post
    #2 20332352
    p.kaczmarek2
    Moderator Smart Home
    Hello, I will need to add a mechanism for that, would you be able to check if it works correctly for you later?
    Helpful post? Buy me a coffee.
  • #3 20333068
    rojoricardo
    Level 4  
    Of course, I can put it to the test

    Added after 49 [seconds]:

    Of course, I can put it to the test, just tell me how to do it, my bulb is hooked up and ready to go.
  • Helpful post
    #4 20333201
    p.kaczmarek2
    Moderator Smart Home
    Update software, enable this flag:
    I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module?
    The color order is RGBCW. R = 0, G = 1, B = 2, C = 3, W = 4
    Make sure your PWMs has channels 0, 1, 2 and 4 (not channel 3, Cool is emulated).

    The device should try to emulate Cool(Cold) White with RGB, example:
    I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module?

    Can you check and show how it looks on your device? Currently, it just takes the Cool channel value and puts in RGB channels (so R, G and B has the same value as cool)
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 20333765
    rojoricardo
    Level 4  
    p.kaczmarek2 wrote:
    Update software, enable this flag:
    I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module?
    The color order is RGBCW. R = 0, G = 1, B = 2, C = 3, W = 4
    Make sure your PWMs have channels 0, 1, 2 and 4 (not channel 3, Cool is emulated).

    The device should try to emulate Cool(Cold) White with RGB, example:
    I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module?

    Can you check and show how it looks on your device? Currently, it just takes the Cool channel value and puts in RGB channels (so R, G and B have the same value as cool)


    These next images are when full Warm White:
    I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module? I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module? I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module?

    These are for when going up from warm to cool (I had to lower the dimmer in order to appreciate the LEDs, also in the picture it looks bluer than it actually is)
    I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module? I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module? I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module?

    And these images are when at full Cool White (at full cool white the LEDs look bluish but not as much as it shows in the pictures)
    I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module? I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module? I bought a RGBWW bulb, CB2L board, only 4 PWM... how do i configure that module?
  • #6 20333913
    p.kaczmarek2
    Moderator Smart Home
    Do you think it's correct now?
    If you want cool white to be emulated with a certain combination of RGB (not 1:1:1, but something else), maybe using a luminance algorithm, let us know. Maybe less blue or make a setting configurable?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #7 20335102
    rojoricardo
    Level 4  
    Houston we have another problem, now that you fixed the 4 PWM issue and emulated the Cold white. When I go into the Home Assistant configuration button, and take a look at the .yaml text, it is like it created 3 different lights:

    mqtt:
      light:
      - unique_id: "Foco_OpenBK_test_01_light_0"
        name: "Foco_OpenBK_test_01 0"
        state_topic: "OpenBK_Foco_test_01/0/get"
        command_topic: "OpenBK_Foco_test_01/0/set"
        brightness_command_topic: "OpenBK_Foco_test_01/0/set"
        on_command_type: "brightness"
        brightness_scale: 99
        qos: 1
        payload_on: 99
        payload_off: 0
        retain: true
        optimistic: true
        availability:
          - topic: "OpenBK_Foco_test_01/connected"
      - unique_id: "Foco_OpenBK_test_01_light_1"
        name: "Foco_OpenBK_test_01 1"
        state_topic: "OpenBK_Foco_test_01/1/get"
        command_topic: "OpenBK_Foco_test_01/1/set"
        brightness_command_topic: "OpenBK_Foco_test_01/1/set"
        on_command_type: "brightness"
        brightness_scale: 99
        qos: 1
        payload_on: 99
        payload_off: 0
        retain: true
        optimistic: true
        availability:
          - topic: "OpenBK_Foco_test_01/connected"
      - unique_id: "Foco_OpenBK_test_01_light_2"
        name: "Foco_OpenBK_test_01 2"
        state_topic: "OpenBK_Foco_test_01/2/get"
        command_topic: "OpenBK_Foco_test_01/2/set"
        brightness_command_topic: "OpenBK_Foco_test_01/2/set"
        on_command_type: "brightness"
        brightness_scale: 99
        qos: 1
        payload_on: 99
        payload_off: 0
        retain: true
        optimistic: true
        availability:
          - topic: "OpenBK_Foco_test_01/connected"
      - unique_id: "Foco_OpenBK_test_01_light_4"
        name: "Foco_OpenBK_test_01 4"
        state_topic: "OpenBK_Foco_test_01/4/get"
        command_topic: "OpenBK_Foco_test_01/4/set"
        brightness_command_topic: "OpenBK_Foco_test_01/4/set"
        on_command_type: "brightness"
        brightness_scale: 99
        qos: 1
        payload_on: 99
        payload_off: 0
        retain: true
        optimistic: true
        availability:
          - topic: "OpenBK_Foco_test_01/connected"
    
  • ADVERTISEMENT
  • Helpful post
    #8 20335224
    p.kaczmarek2
    Moderator Smart Home
    Generator didn't expect 4 PWMs.

    Maybe try that:
    Code: YAML
    Log in, to see the code
    Helpful post? Buy me a coffee.
  • #9 20337974
    rojoricardo
    Level 4  
    That YAML did work, just changed the names and MQTT paths
  • #10 20342215
    rojoricardo
    Level 4  
    p.kaczmarek2 wrote:
    make a setting configurable?


    I was wondering about that, because I noticed that when trying to send color names from Home Assistant, for example, it doesn't get the color quite right, for example dark orange looks green, probably because green yields more light or shines with more intensity than red at the same range??? IDK...
  • #11 20342293
    p.kaczmarek2
    Moderator Smart Home
    Which version? One of the contributors added exponential brightness recently, but I am not sure if it can help in your case
    Helpful post? Buy me a coffee.
  • #12 20471490
    rojoricardo
    Level 4  
    I used gamma Correction and it worked better also supplied the solution
  • #13 20471959
    p.kaczmarek2
    Moderator Smart Home
    Don't forget to link Gamme correction docs:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/led_gamma_control.md
    
    
    	led_gamma_control () - led_gammaCtrl command handler, usage: led_gammaCtrl <sub-command> [parameter(s)]
    		sub-commands:
    			cal [f f f]   - set RGB calibration values from color-picker or parameters
    			gamma <f>     - LED gamma correction, range 1.0-3.0: 1.0 = gamma off, default = 2.2
    			brtMinRGB <f> - minimum brightness in % for RGB mode, range 0.0-10.0%, default = 0.1
    			brtMinCW <f>  - minimum brightness in % for CW mode, range 0.0-10.0%, default = 0.1
    			list          - list settings (and enable additional messages)
    		Results will be displayed as Logs Info:CFG: messages (may want to turn off MAIN, MQTT and GEN to silence other messages)
    		Any sub-command will enable channel messages containing output values in %
    
    		Calibration sequence:
    			1: clear current calibration values (= 1.0, default) by one of these methods:
    			   a: set color-picker to "white", i.e. #FFFFFF and enter command "led_gammaCtrl cal"
    			   b: or set values directly with command "led_gammaCtrl cal 1.0 1.0 1.0"
    			2: adjust RGB LEDs to emit white light of preferred temperature and brightness
    			3: enter command "led_gammaCtrl cal" - if successful the settings will be listed and stored in flash
    
    		Use command "gamma <f>" to set gamma value. Range 1.0-3.0: 1.0 = gamma off, default is 2.2.
    		  To fully disable gamma correction you may also want to set brtMinX to 0.0.
    		Use commands "brtMinRGB <f>" and "brtMinCW <f>" to set minimum brightness for RGB and CW LEDs.
    			Valid range is 0.0-10.0% of full range (including brightness 0). "channel messages" is useful in finding suitable
    			range: adjust brightness to desired minimum level and use the highest channel % value as brtMinX parameter.
    			Channels 0-2 is RGB, channels 3-4 is CW
    		Use command "list" to view gamma and calibration settings.
    
    Helpful post? Buy me a coffee.

Topic summary

✨ The discussion revolves around configuring a RGBWW bulb with a CB2L board that only has RGB and warm white LEDs, lacking a dedicated cold white channel. The user seeks to emulate cold white using RGB LEDs. After changing the firmware to OpenBK, they receive guidance on updating software, enabling specific flags, and configuring PWM channels to achieve the desired emulation. Various responses include suggestions for YAML configurations for Home Assistant, addressing issues with color representation, and implementing gamma correction for improved color accuracy. Users share images demonstrating the bulb's performance under different settings and discuss the challenges of achieving accurate color outputs.
Generated by the language model.

FAQ

TL;DR: 4 PWM channels (0,1,2,4) are used; "Cool is emulated" with RGB. Configure OpenBK RGBCW order, add MQTT YAML for Home Assistant, and apply gamma correction for accurate colors. [Elektroda, p.kaczmarek2, post #20333201]

Why it matters: It unlocks full tunable-white and color control on low-cost RGB+Warm-White CB2L bulbs without extra hardware.

Quick Facts

How do I configure a CB2L RGBWW bulb with only 4 PWM channels in OpenBK?

Update OpenBK, set color order RGBCW, and map PWMs R=0, G=1, B=2, W=4. Enable the Cool‑from‑RGB emulation flag in the UI. "Make sure your PWMs has channels 0, 1, 2 and 4 (not channel 3)." Save and reboot to apply. [Elektroda, p.kaczmarek2, post #20333201]

How do I enable Cool White emulation in OpenBK?

Upgrade to the build that adds emulation. In the web UI, enable the Cool White emulation flag. This routes the Cool channel into RGB mixing so the slider works as expected. Confirm your PWM pins exclude channel 3. [Elektroda, p.kaczmarek2, post #20333201]

What MQTT YAML works in Home Assistant for a 4‑PWM RGBCW bulb?

Define a single light using rgb_state_topic led_basecolor_rgb and command cmnd//led_basecolor_rgb. Control on/off via cmnd//led_enableAll with payload_on 1 and payload_off 0. Use brightness cmnd//led_dimmer (brightness_scale 100) and color_temp cmnd//led_temperature. Map state topics to /get. [Elektroda, p.kaczmarek2, post #20335224]

Why did Home Assistant create multiple single‑channel lights, and how do I fix it?

The auto‑generated config split PWM channels into separate lights. Replace it with a single manual MQTT light definition that uses RGB and temperature topics. This consolidates control into one entity. [Elektroda, rojoricardo, post #20335102]

How can I calibrate colors so oranges don’t look green?

Use gamma control and RGB calibration. Set gamma between 1.0–3.0 (default 2.2) and adjust brtMin values. Then run the calibration sequence.
  1. Reset calibration (led_gammaCtrl cal 1.0 1.0 1.0).
  2. Set RGB to your preferred white.
  3. Run led_gammaCtrl cal, then tune gamma and brtMin. This improves perceived color accuracy. [Elektroda, p.kaczmarek2, post #20471959]

Did gamma correction actually help in this case?

Yes. The user reported improved results after enabling gamma correction. "I used gamma Correction and it worked better." Apply calibration to refine it further. [Elektroda, rojoricardo, post #20471490]

How does OpenBK emulate Cool White with RGB right now?

It mirrors the Cool channel value into R, G, and B equally (a 1:1:1 mix). This creates a neutral cool tone without a dedicated CW LED. You can layer Warm White as needed. [Elektroda, p.kaczmarek2, post #20333201]

Can I reduce blue in the Cool White emulation mix?

The developer suggested making the RGB mix configurable. "Maybe less blue or make a setting configurable?" Track firmware updates or open a feature request if you need a specific ratio. [Elektroda, p.kaczmarek2, post #20333913]

Does OpenBK support exponential brightness curves?

A contributor added exponential brightness recently. It can help low‑level dimming smoothness. Check your firmware version and changelog before relying on it. "Added exponential brightness recently." [Elektroda, p.kaczmarek2, post #20342293]

What should I expect visually at full Cool when emulated?

Expect a slight bluish tint from the RGB mix at high Cool values. Photos from testing show blue dominance at full Cool. Reduce blue via future mix settings or use gamma to soften it. [Elektroda, rojoricardo, post #20333765]

Which MQTT topics control power, brightness, color, and temperature?

Use cmnd//led_enableAll for power. Use cmnd//led_dimmer for brightness (scale 100). Set RGB with cmnd//led_basecolor_rgb. Set mired temperature with cmnd//led_temperature. Read states from the corresponding /get topics. [Elektroda, p.kaczmarek2, post #20335224]

My bulb advertises RGBW+CW but only has RGB+Warm White. What should I do?

Confirm LED types inside the bulb. If only RGB and Warm White exist, enable Cool emulation and map R=0, G=1, B=2, W=4. You’ll still get tunable whites via emulation. [Elektroda, rojoricardo, post #20331661]

How do I verify the manual YAML works in Home Assistant?

Create the single MQTT light with the topics listed. Adjust the device name and MQTT paths to match your setup. The user confirmed success after making those changes. [Elektroda, rojoricardo, post #20337974]

The HA generator doesn’t support 4 PWMs. What’s the workaround?

Skip the generator and define one custom MQTT light. Use RGB hex commands and the temperature command as shown. This avoids per‑channel entities and keeps UI controls unified. [Elektroda, p.kaczmarek2, post #20335224]
Generated by the language model.
ADVERTISEMENT