logo elektroda
logo elektroda
X
logo elektroda

OpenBeken WS2812B animations - new HTTP panel integration, PixelAnim driver

p.kaczmarek2 3660 19
ADVERTISEMENT
  • 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 11822 posts with rating 9927, helped 564 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 21101503
    divadiow
    Level 34  
    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.
  • ADVERTISEMENT
  • #4 21101563
    divadiow
    Level 34  
    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.
  • ADVERTISEMENT
  • #6 21112269
    divadiow
    Level 34  
    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?
  • #7 21115800
    divadiow
    Level 34  
    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 34  
    it seems fine with my WS2812B. All animation colours are what I would expect and the colour picker is as accurate as before
  • ADVERTISEMENT
  • #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 34  
    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.
  • #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 34  
    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 34  
    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

Topic summary

OpenBeken firmware has introduced a new WS2812 LED driver with an animation system, compatible with various LED strips including SM16703. Users can now operate their devices without cloud dependency, and the driver is available in releases past version 1.17.600. Testing has shown successful operation of animations, including a rainbow cycle, with users confirming compatibility with GRB configurations. Recent updates include support for SM15155 and integration of Cool White and Warm White channels. Discussions also cover potential hardware modifications for enhanced functionality.
Summary generated by the language model.
ADVERTISEMENT