logo elektroda
logo elektroda
X
logo elektroda

OpenBeken WS2812B animations - new HTTP panel integration, PixelAnim driver

p.kaczmarek2 4206 38
ADVERTISEMENT
📢 Listen (AI):
  • LED control panel with brightness, color, and animation options.
    OpenBeken, our Tasmota/Esphome style firmware for new chinese WiFi modules with BK7231T, BK7231N and similiar chipsets, has a new WS2812 LED driver - along with animations system. The driver should also work for similiar LED strips, not just WS2812B, so SM16703, etc, is supported as well. This means you can now flash your Action/LSC per-pixel coloured devices and run them without the cloud.

    Here I will show you how to run the new driver. This time, no scripting is needed! Keep in mind that I already have shown the per-pixel LED scripting details in the other topic:
    https://www.elektroda.com/rtvforum/topic4036716.html

    UPDATE - it's now enabled in releases past 1.17.600
    Ok, so first, it's important to know that PixelAnim driver may not be yet available in the main release. To check it, open command execution and try starting it:
    Screenshot of BK7231T_WB3S_WhiteStripWindows console showing unknown PixelAnim driver.
    If it does not start, you need to either enable correct #define in obk_config and compile your version yourself, see:
    https://www.elektroda.com/rtvforum/topic4033833.html
    or just get an already-enabled version from PRs:
    https://github.com/openshwprojects/OpenBK7231T_App/pulls
    In either case, check our tutorial to learn how to get binaries compiled online, on Github:
    https://www.elektroda.com/rtvforum/topic4033833.html

    Now, let's focus on the device configuration.
    You will need to create autoexec.bat, see:



    Here is the required script:
    
    startDriver SM16703P
    SM16703P_Init 16 
    startDriver PixelAnim
    

    That's really all you need to run your LEDs! No pin setting required. Those LEDs are always on hardware SPI port pin, P16. Well, the only more thing you may want to configure, is the color format. You can use SM16703P_Init command for that:
    Screenshot of a section of instructions for initializing SM16703P LEDs.
    Saving and executing (or rebooting your device) should give you extended HTTP panel:
    Screenshot of LED lighting control interface.
    Here you can either control your device in single color mode or run one of the predefined animations. We will have more animations as the time goes. Keep in mind that settings like led power on/off or brightness are also linked to animations, that means you can control that easily even from Home Assistant.
    Animation setting itself is not yet available for Home Assistant Discovery, but we're working on it.
    Ok, here are some sample effects, played on our setup from LED smart drawers organiser topic:
    LED drawers with animated blue lighting
    Animated LED lights mounted on drawers in a workshop.
    LED-lit drawers with light effects.
    As you can see, animations are working correctly.
    It is worth to mention that those LEDs are also working in OBK simulator:
    OpenBeken simulator with connected WS2812 LEDs.

    Ok, that's all for now. Let me know if the animations are working for you! They should work not only for WS2812B, but also for other similiar chips like SM16703P, etc. I will try to add more advanced animations soon, or maybe I will just port a part of WLED? We will see!

    PS: Next feature that is planned to be supported is RGB (IC) + CW (two PWMs) combination

    Added after 9 [minutes]:

    @divadiow are WS2812B animations working stable for you? I am thinking about adding
    #define ENABLE_DRIVER_PIXELANIM 1
    to main release.

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 12750 posts with rating 10578, helped 593 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 21101503
    divadiow
    Level 35  
    p.kaczmarek2 wrote:
    WS2812B animations working stable for you?


    for the short periods I was testing yes. I'll leave one anim going all night tonight
  • #3 21101527
    p.kaczmarek2
    Moderator Smart Home
    I've checked things again and decided to give it a chance, it's enabled in release 1.17.600
    Helpful post? Buy me a coffee.
  • #4 21101563
    divadiow
    Level 35  
    rainbow cycle running.

    I realised last night my strip is GRB




    Screenshot of OpenBK_BK7231N_CBU_Outsmart program with LED RGB settings and animations.

    Added after 7 [hours] 31 [minutes]:

    still going strong

    Screenshot with system information, including build date, version, and online time.
  • #5 21101720
    p.kaczmarek2
    Moderator Smart Home
    Ok so now it's time to also add a CW + RGB IC integration. By that, I mean a device that has:
    - two PWM pins for Cool White and Warm White colors
    - WS2812B or similiar strip
    I will do that entirely in Simulator, here's my setup:
    Circuit simulation with PWM and WS2812B strip in OpenBeken Simulator.
    This is the same as in some of, for example, Action LSC lights

    Added after 4 [hours] 2 [minutes]:

    I've updated PixelAnim to support RGB IC + double PWM (CW) devices:
    Simulation of configuring RGB IC LEDs with dual PWM on a computer screen. Simulator interface controlling RGB IC and PWM lighting with LED animations. LED lighting simulation with control settings.
    Helpful post? Buy me a coffee.
  • #6 21112269
    divadiow
    Level 35  
    p.kaczmarek2 wrote:
    I've updated PixelAnim to support RGB IC + double PWM (CW) devices:


    I didn't notice you had completed this.

    annoyingly this device, with unused CW and W, looks to be missing some components for those channels

    Close-up of a green circuit board with connected wires. Various electronic components and the text CE ROHS are on the board.

    Added after 2 [hours] 23 [minutes]:

    divadiow wrote:
    I realised last night my strip is GRB


    is it possible to swap R and G for when these strips are used?
  • ADVERTISEMENT
  • #7 21115800
    divadiow
    Level 35  
    divadiow wrote:
    is it possible to swap R and G for when these strips are used?


    thanks @DeDaMrAz. of course it is.

    Code: Text
    Log in, to see the code


    animations look like how theyre meant to now

    Image of an illuminated LED strip with red, green, and orange lights.
  • #8 21116171
    p.kaczmarek2
    Moderator Smart Home
    I have split SPI DMA backend into separate file and added SM15155 support. @divadiow can you check whether last binary from my PR still works for you? Or did I break something?
    https://github.com/openshwprojects/OpenBK7231T_App/pull/1263

    Related topic https://www.elektroda.com/rtvforum/topic4009272.html (SM15155 support)
    Helpful post? Buy me a coffee.
  • #9 21116184
    divadiow
    Level 35  
    it seems fine with my WS2812B. All animation colours are what I would expect and the colour picker is as accurate as before
  • #10 21116231
    p.kaczmarek2
    Moderator Smart Home
    Ok so SM15155 driver is merged. We're officialy the first open source project to support SM15155 i guess

    divadiow wrote:

    annoyingly this device, with unused CW and W, looks to be missing some components for those channels

    it should be possible to solder transistors and resistors there to get CW running
    Helpful post? Buy me a coffee.
  • #11 21116241
    divadiow
    Level 35  
    p.kaczmarek2 wrote:
    it should be possible to solder transistors and resistors there to get CW running

    yes, sure. i just rather they'd already be there :)

    I'd have to use normal sized ones I guess or delicately try to solder the little ones from a donor device in my parts box
  • #13 21384320
    Vein
    Level 22  
    @
    p.kaczmarek2 wrote:
    Home Assistant Discovery
    .
    Any chance of controlling the animations from HA?
  • #14 21384322
    p.kaczmarek2
    Moderator Smart Home
    We can look into this soon, but for the moment you'll need to make the button manually:
    Home Assistant - how to create an event trigger button, MQTT, dashboard .
    And yes you'll have to wait for the Home Assistant Discovery integration.
    Although. you can also help with the implementation yourself - are you able to provide a YAML of such an animation controller as it would look like? Or write such a yaml in configuration.yaml and put it here so I can build on it?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #15 21386665
    Vein
    Level 22  
    p.kaczmarek2 wrote:
    We can look into this soon, but for the moment you have to manually make a button:
    .
    the problem is that I don't know what command to send over mqtt to make the individual animations visible
  • #16 21386723
    p.kaczmarek2
    Moderator Smart Home
    Such things are in the documentation:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
    Screenshot of a table from OBK command documentation with highlighted words Anim and AnimationIndex. .
    Start by checking in the OBK command line itself, then test with HA
    Helpful post? Buy me a coffee.
  • Helpful post
    #18 21496837
    divadiow
    Level 35  
    Not exactly a professional installation but here's Rainbow Cycle PixelAnim brightening up the holiday boat this week ❤️



  • #19 21496907
    p.kaczmarek2
    Moderator Smart Home
    Very nice, are you also going to try running bulbs with DDP? We could try to make such a project.

    Btw, today i've ordered:
    
    RGBCW, 1m 30 IP65, White PCB, CHINA
    

    for testing with OBK
    Helpful post? Buy me a coffee.
  • #20 21497381
    divadiow
    Level 35  
    DDP is one of the many things I've yet to play with. The recent xlights chats were intriguing.
    Id definitely like more animation options.
    I should explore what can be achieved within OBK too using commands in autoexec
  • #21 21637465
    divadiow
    Level 35  
    I hadn't realised that the driver arguments were case sensitive

    Code: Text
    Log in, to see the code


    Table with SM16703P_Init command and parameters for LED strip driver

    attempting to "Toggle Light" if lowercase causes ESP to panic

    Code: Text
    Log in, to see the code
  • #22 21637555
    insmod
    Level 27  
    >>21637465
    For ESP, that was deliberate.
    It doesn't matter lower case or not, just startdriver sm16703p is enough, without sm16703p_init.
  • #23 21645363
    p.kaczmarek2
    Moderator Smart Home
    I've got DMX strip so I am introducing it in OBK. However, OBK it's not ready yet, so I am making a HAL for writing bytes to LEDs. See my DMX initial testing topic:
    https://www.elektroda.com/rtvforum/topic4135784.html
    Related PR:
    https://github.com/openshwprojects/OpenBK7231T_App/pull/1776
    No testing needed yet, I will ask when ready. I have moved old SM16703 code to drv_leds_shared.c and I am going to add a DMX backend for that, so we have a shared core for LEDs and two backends - SPI LED backend and DMX (RS485) backend.
    More information soon.
    PS: With the same approach, maybe we could also turn OBK into DDP sender?

    Added after 6 [hours] 30 [minutes]:

    @divadiow https://github.com/openshwprojects/OpenBK7231T_App/pull/1776 is ready for testing - is ws2812 pixelanim still working?
    Helpful post? Buy me a coffee.
  • #24 21645638
    insmod
    Level 27  
    >>21645363
    ESP32-C6 1776_merge_cad302233c80_4M single WS2812B - rainbow works.
  • #25 21645739
    p.kaczmarek2
    Moderator Smart Home
    Thanks! So the work on DMX continues...

    Self tests are great:
    Visual Studio showing DMX test code with console output indicating UART test failure
    I was on smaller machine with no intelisense and confused memset arguments and they caught it even before flashing:
    Screenshot of code editor showing DMX_Init function using memset in C

    @divadiow how many OBK light bulbs do you have? I have an idea for DDP sender test...

    Ok, soon i will probably rename core per pixel functions to LED_Start, LED_SetPixel, but keep older names as aliases...

    Added after 18 [seconds]:

    Or maybe better - Strip_Start, Strip_Set?
    Helpful post? Buy me a coffee.
  • #26 21646220
    divadiow
    Level 35  
    p.kaczmarek2 wrote:
    is ws2812 pixelanim still working?


    OpenBK7231N_1776_merge_d9af652d4a9d ✅
    OpenBK7231N_ALT_1776_merge_d9af652d4a9d ✅
    OpenBL602_1776_merge_d9af652d4a9d ✅
    OpenBK7238_1776_merge_d9af652d4a9d ✅

    BK7238 pixelanim timings with WS2811 are now OK on general release 1.18.159 and this PR - they were super fast on 1.18.145 (seen in vid https://www.elektroda.com/rtvforum/topic4064640.html#21625998). OTA still wipes LFS

    Added after 3 [minutes]:

    p.kaczmarek2 wrote:
    how many OBK light bulbs do you have?

    10-15 maybe. not sure how operational some are.
  • ADVERTISEMENT
  • #27 21646236
    p.kaczmarek2
    Moderator Smart Home
    Wait, I didn't touch SPI code itself, it should not work better.

    Okay, so you have 10-15 bulbs, so look... I have idea to turn OBK into DDP animation sender, or, more or less, something like that. I am not sure if I can test it myself, so maybe you're up to the task?

    What I want is several bulbs connected to power in a single line, like, 5, or maybe 10 bulbs, each powered, with separate IP address.

    Then we could try two things:
    1. one OBK as DDP coordinator, sending RGBW data for each LED to play OBK anims (so it would have to do 10 UDP sends multiple times per second... hmmm
    2. OBK DDP chaining, so basically something like, main OBK sends a stream of 10 pixels to first bulb, bulb "eats" one pixel, shows it, and forwards next 9 pixels to next bulb
    i am not sure about latency, maybe @insmod may have any ideas what to expect, but those are things I would try now with the bulbs.
    Helpful post? Buy me a coffee.
  • #28 21646255
    divadiow
    Level 35  
    p.kaczmarek2 wrote:
    Wait, I didn't touch SPI code itself, it should not work better.


    divadiow wrote:
    they were super fast on 1.18.145


    something changed since .145? doesn't matter, bonus.

    p.kaczmarek2 wrote:
    maybe you're up to the task?


    yes, maybe. I can probably cobble about 3 odd bulb holders together, but they're cheap so could get a few more

    Added after 2 [hours] 24 [minutes]:

    p.kaczmarek2 wrote:
    Or maybe better - Strip_Start, Strip_Set?


    strip could mean non-addressable though..?

    ALED_Start, ALED_Set (Addressable LED)?

    hmm

    PIX_Start, PIX_Set (pixel)
    DLED_Start, DLED_Set (digital)
  • #29 21647497
    divadiow
    Level 35  
    >>21646220

    &
    OpenESP32C3_1.18.160_4M ✅
  • #30 21647617
    p.kaczmarek2
    Moderator Smart Home
    3 is not much. I am checking how much I can do on my side:
    Dismantled lighting components, including lamp sockets, wires, and fixtures, lying on a wooden floor.

    I will probably use Strip_ prefix
    Helpful post? Buy me a coffee.
📢 Listen (AI):

Topic summary

OpenBeken firmware, designed for Chinese WiFi modules with BK7231T, BK7231N, and similar chipsets, introduces a new WS2812 LED driver with an integrated animation system supporting WS2812B and compatible LED strips such as SM16703 and SM15155. The PixelAnim driver, enabled from release 1.17.600, allows per-pixel color control without scripting, and supports RGB IC plus dual PWM channels for Cool White (CW) and Warm White (WW) integration, useful for devices like Action and LSC lights. Users confirmed stable long-duration animation runs and correct color rendering, including GRB strip configurations. The firmware now officially supports SM15155 LEDs, making OpenBeken the first open-source project with this capability. Discussions include hardware considerations for adding CW/WW channels via transistors and resistors, and the possibility of swapping red and green channels for certain strips. Integration with Home Assistant (HA) is under development; currently, manual MQTT button creation is required to control animations, with documentation available for command usage. Future plans include exploring DDP protocol support and expanding animation options, with ongoing testing of RGBCW LED strips (1m, IP65, white PCB) ordered from China.
Summary generated by the language model.
ADVERTISEMENT