Lumary (Tuya) Recessed Light RGBIC

It did work!

Albeit there is some weirdness going on with brightness that causes the LEDs to flash random colors, and a bit of flickering. I thought it might have had something to do with WS2812B vs WS2812.

Here is my current config so far I am using to test:

esphome:
  name: basement-cig-light-2-2
  friendly_name: "Basement Ceiling Light Row 2 Col 2"

bk72xx:
  board: cbu

logger:
  baud_rate: 115200
  level: DEBUG


output:
  - platform: libretiny_pwm
    id: output_cold
    pin: P8
    frequency: 10000 Hz
  - platform: libretiny_pwm
    id: output_warm
    pin: P7
    frequency: 10000 Hz
    

light:
  - platform: cwww
    id: light_cwww
    name: Light
    cold_white_color_temperature: 6500 K
    warm_white_color_temperature: 2700 K
    cold_white: output_cold
    warm_white: output_warm

  - platform: beken_spi_led_strip
    rgb_order: RGB
    # 		"gmkb": 60,"gmkg": 60, "gmkr": 80,
    # color_correct: [80%, 60%, 60%]
    pin: P16
    num_leds: 36
    chipset: ws2812
    name: "My Light"
    id: my_light
    effects:
      - addressable_scan:
      - addressable_rainbow:
      - addressable_color_wipe:
      - addressable_twinkle:
      - addressable_random_twinkle:
      - addressable_fireworks:
      - addressable_flicker:
      - lambda:
          name: My Custom Effect
          update_interval: 5s
          lambda: |-
            static int state = 0;
            auto call = id(my_light).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;


ota:
  platform: "esphome"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  fast_connect: true
  #use_address: xxx.xxx.xxx.xxx

captive_portal:

mdns:
  disabled: true

api:
  reboot_timeout: 0s

web_server:
  local: true


text_sensor:
  - platform: libretiny
    version:
      name: LibreTiny Version
  - platform: wifi_info
    ip_address:
      id: ip_address
      name: IP Address
  - platform: debug
    device:
      name: Device Info
    reset_reason:
      name: Reset Reason


button:
  - platform: factory_reset
    name: Reset to Factory Settings
  - platform: restart
    name: Restart


debug:
  update_interval: 5s

sensor:
  - platform: debug
    free:
      name: Heap Free
    loop_time:
      name: Loop Time
  - platform: uptime
    name: Uptime

I did toodle around with OpenBeken WS2812B control via PixelAnime driver last night. The lights were smoother, brightness worked correctly, and colors were more inline with default behavior.

I am gonna poke around their driver and see how it may overlap with belken_spi_led component.

This is great news, if it isn’t too much to ask - could you do a write up of what you did so a newb like myself could replicate it? I would love to get these things off of the tuya infrastructure.

I can do that next weekend!

But overall:

  1. Use tuya-cloudcutter and push OpenBeken as custom firmware
    – Choose the Lumary 4" Ceiling Light as your tuya-cloudcutter device profile
  2. For OpenBeken module config
    – P7 = PWM
    – P8 = PWN
    – Change startup command text: backlog startDriver SM16703P; SM16703P_Init 36; startDriver PixelAnim
  3. Perform OpenBeken home assistant mqtt discovery

I do plan on figuring out how to make the lights as smooth on esphome as it is for OBK.

Any update here? I am invested!