logo elektroda
logo elektroda
X
logo elektroda

OpenBeken for RGB Light Bar (AM-RGB-LB-5) by Sky-Lighting with BK7231N and WS2812B

emarck 561 2
ADVERTISEMENT
📢 Listen (AI):
  • The RGB Light Bar (AM-RGB-LB-5) by Sky-Lighting has been available under various brand names since around July 2024, for example at Action DE and Amazon.de. It is usually integrated into the smart home using the LSC Smart Connect or Smart Life app.

    OpenBeken for RGB Light Bar (AM-RGB-LB-5) by Sky-Lighting with BK7231N and WS2812B

    ManufacturerSky-Lighting
    Model nameRGB Light Bar
    Model numberAM-RGB-LB-5
    PCB namePBL6231N-5523CD1


    Products

    Brand nameBattletronSailsco
    Product nameLED Light BarLight Bar 40cm RGBIC
    Product number6232000900X00239890H
    GTIN-13 (EAN-13)8712879162735


    Principle of operation

    Power is supplied via a standard USB Standard-A connector, but a power supply unit (5 V, 1 A) is not included with the product. A microcontroller BK7231N by Beken is used directly on the circuit board, which connects to the Tuya cloud via Wi-Fi and controls the 40 cm long light strip. The 33 individually addressable RGBIC LEDs (WS2812B) can be operated either by the IR remote control, app, or music via microphone.


    Firmware flashing

    Although the light bar can only be operated locally via remote control and in music mode, it is not possible to disconnect from the Tuya cloud using CloudCutter. The pre-installed firmware version 1.1.16 with class oem_bk7231n_slide_strip_ty has already been patched against the known vulnerability.
    Therefore, OpenBeken must be flashed via the serial interface (GND, 3V3, TX1, RX1).

    OpenBeken for RGB Light Bar (AM-RGB-LB-5) by Sky-Lighting with BK7231N and WS2812B


    Firmware configuration

    OpenBeken template:
    {
      "vendor": "Sky-Lighting",
      "bDetailed": "0",
      "name": "RGB Light Bar",
      "model": "AM-RGB-LB-5",
      "chip": "BK7231N",
      "board": "on PCB",
      "flags": "5120",
      "keywords": [
        "PBL6231N-5523CD1",
        "Action",
        "3207958",
        "Battletron",
        "6232000900",
        "Gaming",
        "LSC",
        "8712879162735",
        "Sailsco",
        "X00239890H",
        "Ambient",
        "LED",
        "RGBIC",
        "WS2812B",
        "Buttons",
        "IR Receiver",
        "IR Remote",
        "Microphone",
        "USB",
        "5 V",
        "0.9 A"
      ],
      "pins": {
        "8": "AlwaysHigh;0",
        "16": "SM16703P_DIN;0",
        "20": "Btn_SmartLED;0",
        "22": "Btn_ScriptOnly;3",
        "26": "IRRecv;0",
        "28": "Btn_ScriptOnly;2"
      },
      "command": "",
      "image": "https://obrazki.elektroda.pl/9941091200_1753433119.webp",
      "wiki": "https://www.elektroda.com/rtvforum/topic4131618.html"
    }

    Contents of the autoexec.bat file:
    // Enable DDP (Distributed Display Protocol) driver
    startDriver DDP
    
    // Enable addressable LED (WS2812B) driver
    startDriver SM16703P
    
    // Init LEDs
    SM16703P_Init 33 GRB // 33 LEDs in GRB (Green Red Blue) order
    
    // Enable NTP (Network Time Protocol) driver
    startDriver ntp
    
    // Config local NTP server IP address
    //ntp_setServer 192.168.1.1 // OpenWrt
    //ntp_setServer 192.168.10.1 // LibreCMC
    ntp_setServer 192.168.178.1 // Fritz!Box
    
    // Config local timezone
    //ntp_timeZoneOfs 1 // CET (Central European Time)
    ntp_timeZoneOfs 2 // CEST (Central European Summer Time)
    
    // Config location
    ntp_setLatlong 52.518611 13.408333 // Berlin, Germany
    
    // Enable animation driver
    startDriver PixelAnim
    
    // Add names to the buttons
    //setChannelLabel 1 "Power" 1
    setChannelLabel 2 "Mode" 1
    setChannelLabel 3 "Music 1
    
    // Config animations (0 = Rainbow Cycle, 1 = Fire, 2 = Shooting Star)
    setChannel 20 -1 // Initialize animation index
    setChannelLabel 20 "Animation Index"
    alias nextAnimation backlog addChannel 20 1 0 2 1; Anim $CH20 // Cycle animation index upwards
    alias previousAnimation backlog addChannel 20 -1 0 2 1; Anim $CH20 // Cycle animation index downwards
    setChannel 21 10 // Initialize animation speed
    setChannelLabel 0 "Animation Speed"
    alias adjustAnimationSpeed backlog addChannel 21 1 0 10 1; AnimSpeed $CH21 // Cycle animation speed
    
    // Config buttons
    SetButtonTimes 10 3 3
    addEventHandler OnClick 28 nextAnimation
    addEventHandler OnDblClick 28 previousAnimation
    addEventHandler OnHold 28 adjustAnimationSpeed
    
    // Config IR remote
    addEventHandler2 IR_NEC 0x0 0x45 led_enableAll 1 // On
    addEventHandler2 IR_NEC 0x0 0x47 led_enableAll 0 // Off
    addEventHandler2 IR_NEC 0x0 0x44 led_basecolor_rgb #FF0000 // Red
    addEventHandler2 IR_NEC 0x0 0x40 led_basecolor_rgb #00FF00 // Lime
    addEventHandler2 IR_NEC 0x0 0x43 led_basecolor_rgb #0000FF // Blue
    addEventHandler2 IR_NEC 0x0 0x7 led_basecolor_rgb #FF8000 // Some Orange
    addEventHandler2 IR_NEC 0x0 0x15 led_basecolor_rgb #00FF80 // Some SpringGreen
    addEventHandler2 IR_NEC 0x0 0x9 led_basecolor_rgb #00FFFF // Cyan
    addEventHandler2 IR_NEC 0x0 0x16 led_basecolor_rgb #FFFF00 // Yellow
    addEventHandler2 IR_NEC 0x0 0xD led_basecolor_rgb #FF00FF // Magenta
    addEventHandler2 IR_NEC 0x0 0x19 nextAnimation
    addEventHandler2 IR_NEC 0x0 0x18 led_basecolor_rgb #FFFFFF // White
    addEventHandler2 IR_NEC 0x0 0xC add_dimmer 20 // Brighter
    addEventHandler2 IR_NEC 0x0 0x5E add_dimmer -20 // Darker
    addEventHandler2 IR_NEC 0x0 0x8 backlog SM16703P_SetPixel 0 255 0 0; SM16703P_SetPixel 1 255 0 0; SM16703P_SetPixel 2 255 0 0; SM16703P_SetPixel 3 255 0 0; SM16703P_SetPixel 4 255 0 0; SM16703P_SetPixel 5 255 128 0; SM16703P_SetPixel 6 255 255 0; SM16703P_SetPixel 7 255 255 0; SM16703P_SetPixel 8 255 255 0; SM16703P_SetPixel 9 255 255 0; SM16703P_SetPixel 10 0 255 0; SM16703P_SetPixel 11 0 255 0; SM16703P_SetPixel 12 0 255 0; SM16703P_SetPixel 13 0 255 0; SM16703P_SetPixel 14 0 255 0; SM16703P_SetPixel 15 0 255 128; SM16703P_SetPixel 16 0 255 255; SM16703P_SetPixel 17 0 255 255; SM16703P_SetPixel 18 0 255 255; SM16703P_SetPixel 19 0 255 255; SM16703P_SetPixel 20 0 0 255; SM16703P_SetPixel 21 0 0 255; SM16703P_SetPixel 22 0 0 255; SM16703P_SetPixel 23 0 0 255; SM16703P_SetPixel 24 0 0 255; SM16703P_SetPixel 25 255 0 255; SM16703P_SetPixel 26 255 0 255; SM16703P_SetPixel 27 255 0 255; SM16703P_SetPixel 28 255 0 255; SM16703P_SetPixel 29 255 255 255; SM16703P_SetPixel 30 255 255 255; SM16703P_SetPixel 31 255 255 255; SM16703P_SetPixel 32 255 255 255; SM16703P_Start // 5 Red, 1 Some Orange, 4 Yellow, 5 Lime, 1 Some SpringGreen, 4 Cyan, 5 Blue, 4 Magenta, 4 White
    addEventHandler2 IR_NEC 0x0 0x1C backlog SM16703P_SetPixel 0 255 0 0; SM16703P_SetPixel 1 255 0 0; SM16703P_SetPixel 2 255 0 0; SM16703P_SetPixel 3 255 0 0; SM16703P_SetPixel 4 255 0 0; SM16703P_SetPixel 5 255 0 0; SM16703P_SetPixel 6 255 0 0; SM16703P_SetPixel 7 255 0 0; SM16703P_SetPixel 8 255 0 0; SM16703P_SetPixel 9 255 0 0; SM16703P_SetPixel 10 255 0 0; SM16703P_SetPixel 11 0 255 0; SM16703P_SetPixel 12 0 255 0; SM16703P_SetPixel 13 0 255 0; SM16703P_SetPixel 14 0 255 0; SM16703P_SetPixel 15 0 255 0; SM16703P_SetPixel 16 0 255 0; SM16703P_SetPixel 17 0 255 0; SM16703P_SetPixel 18 0 255 0; SM16703P_SetPixel 19 0 255 0; SM16703P_SetPixel 20 0 255 0; SM16703P_SetPixel 21 0 255 0; SM16703P_SetPixel 22 0 0 255; SM16703P_SetPixel 23 0 0 255; SM16703P_SetPixel 24 0 0 255; SM16703P_SetPixel 25 0 0 255; SM16703P_SetPixel 26 0 0 255; SM16703P_SetPixel 27 0 0 255; SM16703P_SetPixel 28 0 0 255; SM16703P_SetPixel 29 0 0 255; SM16703P_SetPixel 30 0 0 255; SM16703P_SetPixel 31 0 0 255; SM16703P_SetPixel 32 0 0 255; SM16703P_Start // 11 Red, 11 Lime, 11 Blue
    addEventHandler2 IR_NEC 0x0 0x5A backlog SM16703P_SetPixel 0 255 0 0; SM16703P_SetPixel 1 255 0 0; SM16703P_SetPixel 2 255 0 0; SM16703P_SetPixel 3 255 128 0; SM16703P_SetPixel 4 255 128 0; SM16703P_SetPixel 5 255 255 0; SM16703P_SetPixel 6 255 255 0; SM16703P_SetPixel 7 128 255 0; SM16703P_SetPixel 8 128 255 0; SM16703P_SetPixel 9 0 255 0; SM16703P_SetPixel 10 0 255 0; SM16703P_SetPixel 11 0 255 128; SM16703P_SetPixel 12 0 255 128; SM16703P_SetPixel 13 0 255 255; SM16703P_SetPixel 14 0 255 255; SM16703P_SetPixel 15 0 128 255; SM16703P_SetPixel 16 0 128 255; SM16703P_SetPixel 17 0 0 255; SM16703P_SetPixel 18 0 0 255; SM16703P_SetPixel 19 128 0 255; SM16703P_SetPixel 20 128 0 255; SM16703P_SetPixel 21 255 0 255; SM16703P_SetPixel 22 255 0 255; SM16703P_SetPixel 23 255 0 128; SM16703P_SetPixel 24 255 0 128; SM16703P_SetPixel 25 255 0 128; SM16703P_SetPixel 26 255 0 128; SM16703P_SetPixel 27 0 255 128; SM16703P_SetPixel 28 0 255 128; SM16703P_SetPixel 29 255 255 255; SM16703P_SetPixel 30 255 255 255; SM16703P_SetPixel 31 255 128 0; SM16703P_SetPixel 32 255 128 0; SM16703P_Start // 3 Red, 2 Some Orange, 2 Yellow, 2 Some Chartreuse, 2 Lime, 2 Some SpringGreen, 2 Cyan, 2 Some Azure, 2 Blue, 2 Some Violet, 2 Magenta, 4 Rose, 2 Some SpringGreen, 2 White, 2 Some Orange
    
    // Time values available
    waitFor NTPState 1


    Firmware explaination

    This firmware configuration attempts to replicate the original functionality as closely as possible. The microphone on P23 is not currently supported by OpenBeken and will be added in the future. The three static patterns that can be controlled via the remote control have been recreated in detail. The PixelAnim library is used for the animations, which currently only offers three patterns. However, the power button now also allows brightness adjustment and control of single-color patterns.


    Demonstrations

    First pattern:
    OpenBeken for RGB Light Bar (AM-RGB-LB-5) by Sky-Lighting with BK7231N and WS2812B

    Second pattern:
    OpenBeken for RGB Light Bar (AM-RGB-LB-5) by Sky-Lighting with BK7231N and WS2812B

    Third pattern:
    OpenBeken for RGB Light Bar (AM-RGB-LB-5) by Sky-Lighting with BK7231N and WS2812B

    Rainbow Cycle animation:



    Fire animation:



    Red Shooting Star animation:



    Green Shooting Star animation:



    Blue Shooting Star animation:



    The animations run at maximum speed by default and can be slowed down if necessary. The Shooting Star animation automatically uses the last color set. The videos show examples of this for the three primary colors.

    Cool? Ranking DIY
    About Author
    emarck
    Level 4  
    Offline 
    emarck wrote 6 posts with rating 6, helped 2 times. Been with us since 2025 year.
  • ADVERTISEMENT
  • #2 21616768
    p.kaczmarek2
    Moderator Smart Home
    Very nice presentation, thank you for sharing! I haven't seen such a complete build for a long time. I'll probably feature your autoexec on our samples page. https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md

    Added after 2 [hours] 1 [minutes]:

    PS: Can you attach video showing how it looks irl when animating?
    Helpful post? Buy me a coffee.
  • #3 21619175
    emarck
    Level 4  
    I added photos for the patterns and videos for the animations to my initial post. Does this meet all the requirements for inclusion in the list of supported devices?
    It would be great if the PixelAnim library could feature even more animations in the future.
📢 Listen (AI):
ADVERTISEMENT