logo elektroda
logo elektroda
X
logo elektroda

[BK7231T][WB8P] LEDVANCE SmartPlus Classic Bulb Multicolor, E27

lionboy 2898 19
ADVERTISEMENT
  • #1 20897449
    lionboy
    Level 10  
    This is a short teardown of the Ledvance SmartPlus Classic A100 14W Multicolor.

    The bulb uses a BK7231T (WB8P - new for me) Tuya chip.

    Packaging of Ledvance SmartPlus Classic A100 14W Multicolor bulb on a table. A circuit board with electrical components on a desk. A printed circuit board with visible BK7231T chip and various capacitors, lying on a desk. Printed circuit board with electronic components lying on a wooden table. Smart bulb Ledvance SmartPlus Classic A100 with exposed circuitry.

    Installing OpenBK7231T: solder wires onto the 3v3, GND, TX1 and RX1; connect those to a UART and then follow the https://developer.tuya.com/en/docs/iot/wb8p-module-datasheet?id=K9fwx4f89tvzd. You will need to hold a wire connecting CEN to GND to get the chip into flashing mode.

    Pin Configuration:

    {
      "vendor": "Ledvance",
      "bDetailed": "0",
      "name": "SmartPlus Classic A100 14W Multicolor",
      "model": "A100",
      "chip": "BK7231T",
      "board": "WB8P",
      "flags": "1024",
      "keywords": [
        "E27"
      ],
      "pins": {
        "7": "PWM;0",
        "8": "PWM;1",
        "9": "PWM;2",
        "24": "PWM;4",
        "26": "PWM;3"
      },
      "command": "",
      "image": "https://obrazki.elektroda.pl/7726775800_1704666944.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic4026971.html"
    }


    I am not so much sure with CW:

    color_temp: PWM 26
    white: PWM 24

    Is not working like I want :D

    Attach 2MB flash is version 1.0.3 no profile for this.

    Thanks
  • ADVERTISEMENT
  • #2 20897713
    p.kaczmarek2
    Moderator Smart Home
    That part:
    
    color_temp: PWM 26
    white: PWM 24
    

    indicates that you have device using alternate CW control:
    
    8	[LED] Alternate CW light mode (first PWM for warm/cold slider, second for brightness)
    

    See: https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/flags.md

    Usually devices are using one PWM for Cool White, and second PWM for Warm White, but in your case, device has one PWM for White Temperature, and second for White Brightness.

    You can see a sample of such device here:


    Helpful post? Buy me a coffee.
  • #3 20898117
    lionboy
    Level 10  

    Still not working with this configuration, what I saw from GPIO Finder PWM 24 and PWM 26 have the same color Warm White, I don't find Cool White but on his box show me have this control

    For RGB is ok because PWM1 is Red, PWM2 is Green and PWM3 is Blue, but I don't know from what channel to start I think from 1 is ok and PWM24 and 26 to be on 4 and 5 channel.

    Thanks
  • #4 20898242
    p.kaczmarek2
    Moderator Smart Home
    
    8	[LED] Alternate CW light mode (first PWM for warm/cold slider, second for brightness)
    

    This expects channel 4 to be warm/cold (in your case P26) and channel 5 to be dimmer (in your case P24).

    I(t looks like you're trying the opposite setting. Can you try swapping them?
    Helpful post? Buy me a coffee.
  • #5 20898272
    lionboy
    Level 10  

    p.kaczmarek2 wrote:
    
    8	[LED] Alternate CW light mode (first PWM for warm/cold slider, second for brightness)
    

    This expects channel 4 to be warm/cold (in your case P26) and channel 5 to be dimmer (in your case P24).

    It looks like you're trying the opposite setting. Can you try swapping them?


    But is ok to start from channel 1 with RED or need to start from channel 0 RED the 1 Green and 3 Blue.....

    And you think i need to have on PWM_n or let with PWM normal?

    Thanks
  • ADVERTISEMENT
  • #6 20898273
    p.kaczmarek2
    Moderator Smart Home
    I think it will make no difference. We even have a self test that ensures that both numbering standards are supported.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #7 20898284
    lionboy
    Level 10  

    If i will change like this:

    User interface with PWM settings for different pins.

    Brightness don't work anymore with Flag 8 active

    Added after 3 [hours] 45 [minutes]:

    Sorry but i migrate to ESP still don't understand how to control Warm/Cool RGBW bulb if anyone need this is code for ESPHome:

    
    output:
      - platform: libretiny_pwm
        id: output_red
        pin: P7
      - platform: libretiny_pwm
        id: output_green
        pin: P8
      - platform: libretiny_pwm
        id: output_blue
        pin: P9
      - platform: libretiny_pwm
        id: output_warm_white
        pin: P26
      - platform: libretiny_pwm
        id: output_cold_white
        pin: P24
    # here go the light definitions, effects and restore mode
    light:
      - platform: rgbww
        name: "Living Lamp"
        id: 'lampa_living'
        color_interlock: true
        red: output_red
        green: output_green
        blue: output_blue
        warm_white: output_warm_white
        cold_white: output_cold_white
        warm_white_color_temperature: 2700 K
        cold_white_color_temperature: 6500 K
    


    This is a RGBW not RGBWW but is work with this code from up only can't control Warm/Cool rest is everything great

    Thanks
  • #8 21051437
    rchristescu
    Level 7  
    I also flashed this bulb with OBK and I have the same issue: Cold white is not working.
    Configuration Pin 26 as PWM channel 3 is not OK because:
    First - PWM5 on WB8P (Pin 26 of the IC) is not soldered on the main pcb.
    Close-up of a circuit board with visible pins and a labeled connection diagram.

    Second - there are no cold white leds. Only red, green, blue and warm white.
    Two images of an LED bulb's circuit board without casing, displaying different LED arrangements.

    The configuration should be:
    Pin 7: PWM on channel 0
    Pin 8: PWM on channel 1
    Pin 9: PWM on channel 2
    Pin 24: PWM on channel 4

    But I am absolutely sure that with original firmware it has warm/cold white.
    So, my assumption is that cold white is made by red + green + blue on the same time.

    As I am pretty new to OKB, I don't know how to implement / test this assumption, any help is welcome.
  • #9 21051457
    divadiow
    Level 34  
    does indeed look like it's an RGBW bulb with only one shade of white LED. it would have to be making up some white with the RGBs.
  • #10 21051665
    divadiow
    Level 34  
    OBK should work 100% though I think.

    Is the main difference that OBK doesn't have transition effects?
  • #11 21051793
    rchristescu
    Level 7  

    I test the command:
    led_basecolor_rgb #FFFFFF

    and I get the cold white as with original firmware.
    So my assumption is right, cold white is made by mixing red, green and blue altogether.

    What I don't know is how to tell OBK that for channel 3 (cold white) pins 7, 8 and 9 should be used at the same time.
    In other words, how to substitute the missing cold white leds with all RGB leds.
  • #12 21051804
    divadiow
    Level 34  
    Ah. Maybe play with:

    Flag 24 - [LED] Emulate Cool White with RGB in device with four PWMS
  • ADVERTISEMENT
  • #13 21051909
    rchristescu
    Level 7  

    Yes, checking Flag 24 solved the issue, thank you so much.
    Now the bulb works perfectly!
  • Helpful post
    #15 21051966
    rchristescu
    Level 7  
    I think the device template should be updated in the Templates list.
    Actual configuration is wrong, pin 26 is not used and Flag 24 shall be checked.
    The right configuration is:
    Code: JSON
    Log in, to see the code

    I don't know how to request this update.
  • #16 21052864
    p.kaczmarek2
    Moderator Smart Home
    I am glad to see @divadiow solved the issue.
    Regarding the template - @rchristescu so the post #2 is invalid? That's not alternative CW bulb but RGBW bulb with emulated channel?

    Okay, let me see...
    https://github.com/OpenBekenIOT/webapp/commit/a401742a7f63cc75bd97b300577589a7ee3ce09c
    Change applied, is it correct now? Thank you
    Helpful post? Buy me a coffee.
  • #18 21195788
    themaftei
    Level 1  
    I wanted to ask if it is possible to make this work with ESPHome, perhaps by emulating cool white? Also, is it possible to flash the firmware using Tuyacloudcutter instead of having to tear down and flash via UART? I came across a device called the Ledvance A60 (is in the device list of esp home) and was wondering if I could flash the firmware on an A100 over the air without bricking the bulb.
  • #19 21195977
    lionboy
    Level 10  
    themaftei wrote:
    I wanted to ask if it is possible to make this work with ESPHome, perhaps by emulating cool white? Also, is it possible to flash the firmware using Tuyacloudcutter instead of having to tear down and flash via UART? I came across a device called the Ledvance A60 (is in the device list of esp home) and was wondering if I could flash the firmware on an A100 over the air without bricking the bulb.


    This is what i use in ESPHOME

    esphome:
      name: lampa-living
      friendly_name: lampa-living
    
    bk72xx:
      board: generic-bk7231t-qfn32-tuya
    
    # Enable logging
    logger:
    
    # Enable Home Assistant API
    api:
      encryption:
        key: "put your api encryption"
    
    ota:
      - platform: esphome
        password: "put your password"
    
    wifi:
      ssid: !secret wifi_smart
      password: !secret wifi_smart_pass
    
      # Enable fallback hotspot in case wifi connection fails
      ap:
        ssid: "Lampa-Living Fallback Hotspot"
        password: "Hu6j0OHHwUTd"
        
    web_server:
    
    captive_portal:
    
    mdns:
    
    text_sensor:
      - platform: wifi_info
        ip_address:
          name: 'Lampa Living IP'
        ssid:
          name: 'Lampa Living SSID'
        dns_address:
          name: 'Lampa Living DNS'
    sensor:
      - platform: uptime
        name: Uptime
    
    output:
      - platform: libretiny_pwm
        id: output_red
        pin: P7
      - platform: libretiny_pwm
        id: output_green
        pin: P8
      - platform: libretiny_pwm
        id: output_blue
        pin: P9
      - platform: libretiny_pwm
        id: output_warm_white
        pin: P24
    #  - platform: libretiny_pwm
    #    id: output_cold_white
    #    pin: P24
    
    # here go the light definitions, effects and restore mode
    light:
      - platform: rgbw
        name: "Living Lamp"
        id: 'lampa_living'
        color_interlock: true
        red: output_red
        green: output_green
        blue: output_blue
    #    warm_white: output_warm_white
        white: output_warm_white
    #    warm_white_color_temperature: 2700 K
    #    cold_white_color_temperature: 6500 K
        effects:
          # Use default parameters:
          - random:
          # Customize parameters
          - random:
              name: "Slow Random Effect"
              transition_length: 30s
              update_interval: 30s
          - random:
              name: "Fast Random Effect"
              transition_length: 4s
              update_interval: 5s
          - pulse:
          - pulse:
              name: "Fast Pulse"
              transition_length: 0.5s
              update_interval: 0.5s
              min_brightness: 0%
              max_brightness: 100%
          - pulse:
              name: "Slow Pulse"
              # transition_length: 1s      # defaults to 1s
              update_interval: 2s
          - pulse:
              name: "Asymmetrical Pulse"
              transition_length:
                on_length: 1s
                off_length: 500ms
              update_interval: 1.5s
          - strobe:
          - strobe:
              name: Strobe Effect
              colors:
                - state: true
                  brightness: 100%
                  red: 100%
                  green: 90%
                  blue: 0%
                  duration: 500ms
                - state: false
                  duration: 250ms
                - state: true
                  brightness: 100%
                  red: 0%
                  green: 100%
                  blue: 0%
                  duration: 500ms
          - lambda:
              name: My Custom Effect
              update_interval: 1s
              lambda: |-
                static int state = 0;
                auto call = id(lampa_living).turn_on();
                // Transition of 1000ms = 1s
                call.set_transition_length(1000);
                if (state == 0) {
                  call.set_rgb(1.0, 1.0, 1.0);
                } else if (state == 1) {
                  call.set_rgb(1.0, 0.0, 1.0);
                } else if (state == 2) {
                  call.set_rgb(0.0, 0.0, 1.0);
                } else {
                  call.set_rgb(1.0, 0.0, 0.0);
                }
                call.perform();
                state += 1;
                if (state == 4)
                  state = 0;
          - lambda:
              name: randomflicker
              update_interval: 200 ms
              lambda: |-
                auto call = id(lampa_living).turn_on();
                float r = random_float() * 2.0f - 1.0f; 
                r =  r * r * r;
                call.set_transition_length(r);
                //static double br=id(global_brightness);
                call.set_brightness(0.7 + r/10);
                call.set_publish(false);
                call.set_save(false);
                call.perform();
          - lambda:
              name: Chill Mode
              update_interval: 70s
              lambda: |-
                auto call = id(lampa_living).turn_on();
                call.set_transition_length(55000);
                call.set_white(0.0);
                esphome::Color c = esphome::Color::random_color();
                call.set_rgb((c.red%255)/255.0, (c.green%255)/255.0, (c.blue%255)/255.0);
                call.set_publish(false);
                call.set_save(false);
                call.perform();
          - lambda:
              name: Chill Mode (Vibrant)
              update_interval: 120s
              lambda: |-
                auto call = id(lampa_living).turn_on();
                call.set_transition_length(800);
                call.set_white(0.0);
                esphome::Color c = esphome::Color::random_color();
                call.set_rgb((c.red%128)/255.0, (c.green%128)/255.0, (c.blue%128)/255.0);
                call.set_publish(false);
                call.set_save(false);
                call.perform();
          - lambda:
              name: Disco
              update_interval: 500ms
              lambda: |-
                auto call = id(lampa_living).turn_on();
                //call.set_transition_length(rand() % 400 + 1);
                call.set_transition_length(500);
                call.set_white(0.0);
                esphome::Color c = esphome::Color::random_color();
                call.set_rgb((c.red)/255.0, (c.green)/255.0, (c.blue)/255.0);
                call.set_publish(false);
                call.set_save(false);
                call.perform();
          - lambda:
              name: WTF
              update_interval: 200ms
              lambda: |-
                auto call = id(lampa_living).turn_on();
                call.set_transition_length(200);
                call.set_white(0.0);
                call.set_brightness((rand() % 255 + 1) / 255.0);
                call.set_color_temperature(rand() % 2 == 0 ? 0: 512);
                call.perform();
          - strobe:
              name: Lightning
              colors:
                - state: True
                  brightness: 100%
                  red: 90%
                  green: 90%
                  blue: 100%
                  white: 0%
                  duration: 50ms
                - state: False
                  duration: 50ms
                - state: True
                  brightness: 100%
                  red: 90%
                  green: 90%
                  blue: 100%
                  white: 0%
                  duration: 160ms
                - state: False
                  duration: 50ms
                - state: True
                  brightness: 100%
                  red: 90%
                  green: 90%
                  blue: 100%
                  white: 0%
                  duration: 50ms
                - state: False
                  duration: 3000ms
          - random:
              name: "Slow Random Colors"
              transition_length: 30s
              update_interval: 30s
          - random:
              name: "Fast Random Colors"
              transition_length: 4s
              update_interval: 5s
          - strobe:
              name: In Alarm
              colors:
                - state: True
                  red: 100%
                  blue: 0%
                  green: 0%
                  white: 0%
                  duration: 150ms
                - state: False
                  duration: 100ms
                - state: True
                  red: 100%
                  blue: 0%
                  green: 0%
                  white: 0%  
                  duration: 150ms
                - state: False
                  duration: 100ms
                - state: True
                  red: 0%
                  blue: 100%
                  green: 0%
                  white: 0%
                  duration: 150ms
                - state: False
                  duration: 100ms
                - state: True
                  red: 0%
                  blue: 100%
                  green: 0%
                  white: 0%
                  duration: 150ms
                - state: False
                  duration: 100ms
    
  • #20 21236313
    lightmaster001
    Level 1  
    I managed to flash the Ledvance A60 9W Lamp via cloudcutter with a generic device profile for the right software-version (in my case (oem-bk7231n-light-ty-1.3.21-sdk-2.3.3-40.00) I used the configuration for the A100 first, but some Pins were different.

    This is the Device configuration I extracted from Tuya:
    - LED Green (Channel 2) on P24
    - LED Cool (Channel 4) on P8
    - LED Blue (Channel 3) on P6
    - LED Warm (Channel 5) on P7
    - PWM Frequency 1000
    - LED Red (Channel 1) on P26
    I converted this to
    "6": "PWM;3",
    "7": "PWM;5",
    "8": "PWM;4",
    "24": "PWM;2",
    "26": "PWM;1"
    and disabled flag 24

    This made the lamp work perfectly fine.

Topic summary

The discussion revolves around the Ledvance SmartPlus Classic A100 14W Multicolor bulb, which utilizes a BK7231T (WB8P) Tuya chip. Users are troubleshooting issues related to the bulb's PWM (Pulse Width Modulation) configuration for controlling warm/cool white and RGB colors. Key points include the identification of PWM channels for different colors, the need to swap PWM settings for proper functionality, and the realization that cold white is achieved by mixing RGB colors. Solutions involve adjusting firmware flags and configurations, with some users successfully flashing the bulb using OpenBK7231T and ESPHome. The conversation highlights the importance of correct pin assignments and firmware settings to enable full functionality of the bulb.
Summary generated by the language model.
ADVERTISEMENT