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.
ccbde
September 11, 2024, 1:37pm
23
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:
Use tuya-cloudcutter and push OpenBeken as custom firmware
– Choose the Lumary 4" Ceiling Light as your tuya-cloudcutter device profile
For OpenBeken module config
– P7 = PWM
– P8 = PWN
– Change startup command text: backlog startDriver SM16703P; SM16703P_Init 36; startDriver PixelAnim
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.
ccbde
October 7, 2024, 5:55pm
25
Any update here? I am invested!
ccbde
November 24, 2024, 12:15am
26
I have flashed these, with OpenBeken - but I have no been able to get the cfgpins to work. Do you have any insight?
I’m also running into some issues. @LearningESP - could you please share more in depth info on what you did, before it’s lost to time? Also, did you have any luck with ESPhome?
Maybe you have to set up lightpartitions? Like with this device: Using LSC 3203632.1 RGBIC+CCTIC Ledstrip with ESPHome - ESPHome - Home Assistant Community Also based on SM16703 chip.
@twoenter post reinvigorated me to play with this again… thank you!
A working ESPHome config is below:
esphome:
name: basement-cig-light-2-2
friendly_name: "Basement Ceiling Light Row 2 Col 2"
bk72xx:
board: cbu
logger:
level: INFO
output:
- platform: libretiny_pwm
id: output_cold
pin: P8
frequency: 20000 Hz
- platform: libretiny_pwm
id: output_warm
pin: P7
frequency: 20000 Hz
light:
- platform: cwww
id: light_cwww
name: "Inner Ring"
cold_white_color_temperature: 6500 K
warm_white_color_temperature: 2700 K
cold_white: output_cold
warm_white: output_warm
constant_brightness: true
- platform: beken_spi_led_strip
rgb_order: RGB
# "gmkb": 60,"gmkg": 60, "gmkr": 80,
# color_correct: [80%, 60%, 60%, 100%]
# gamma_correct: 2.8
max_refresh_rate: 16ms
pin: P16
num_leds: 36
chipset: SK6812
name: "Outer Ring"
id: my_light
effects:
- addressable_scan:
- addressable_rainbow:
- addressable_color_wipe:
- addressable_twinkle:
- addressable_random_twinkle:
- addressable_fireworks:
- addressable_flicker:
ota:
- platform: esphome
password: "REDACTED"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
fast_connect: true
use_address: 192.168.XXX.XXX
ap:
ssid: "Basement-Light-Row-2-Col-2"
password: "REDACTED"
captive_portal:
# Enable Home Assistant API
api:
reboot_timeout: 0s
encryption:
key: "REDACTED"
web_server:
local: False
js_url: http://REDACTED:8123/local/www.js
version: 3
text_sensor:
- platform: libretiny
version:
name: LibreTiny Version
- platform: wifi_info
ip_address:
id: ip_address
name: IP Address
dns_address:
name: DNS 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
1 Like