logo elektroda
logo elektroda
X
logo elektroda

[BK7231N] OpenBK Flashing and MQTT/Alexa Configuration for Casalux LED-RGB WiFi Flexband

alpenbeni 5937 31

TL;DR

  • The Casalux LED-RGB WiFi Flexband 56279 was flashed from Tuya firmware to OpenBK on a BK7231N controller.
  • Flashing used a UART USB converter, BK7231GUIFlashTool, and a brief GND-to-CEN reset to continue bootloader mode.
  • The controller maps LED Blue on P7, LED Red on P6, and LED Green on P24; the tool ran at 115200 baud.
  • MQTT works with ioBroker after enabling Flag 30, and Alexa finds the device via Wemo, but only as a switch.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • #31 20909352
    luebbe
    Level 6  
    Here's my autoexec.bat trying to match the colors of the original strip as closely as possible. Of course they don't look similar to these on the HA UI, like mentioned in another post.

    // IR driver will start itself automatically after reboot
    // IR events mapped to the buttons of the original remote control
    // trying to match the colors of the original strip
    
    // first row
    addEventHandler2 IR_NEC 0xEF00 0x0 add_dimmer 9
    addEventHandler2 IR_NEC 0xEF00 0x1 add_dimmer -9
    addEventHandler2 IR_NEC 0xEF00 0x2 led_enableAll 0
    addEventHandler2 IR_NEC 0xEF00 0x3 led_enableAll 1
    
    // second row
    addEventHandler2 IR_NEC 0xEF00 0x4 color #FF0000  // red
    addEventHandler2 IR_NEC 0xEF00 0x5 color #00FF00  // green
    addEventHandler2 IR_NEC 0xEF00 0x6 color #0000FF  // blue
    addEventHandler2 IR_NEC 0xEF00 0x7 color #FFFFFF  // white
    
    // third row
    addEventHandler2 IR_NEC 0xEF00 0x8 color #FF2000  // orange
    addEventHandler2 IR_NEC 0xEF00 0x9 color #80C020  // light green
    addEventHandler2 IR_NEC 0xEF00 0xA color #0020E0  // light blue
    addEventHandler2 IR_NEC 0xEF00 0xB color #FFA080  // flash (used as warm white)
    
    // fourth row
    addEventHandler2 IR_NEC 0xEF00 0xC color #A04000  // light orange
    addEventHandler2 IR_NEC 0xEF00 0xD color #90D0C0  // mint
    addEventHandler2 IR_NEC 0xEF00 0xE color #8000A0  // violet
    // addEventHandler2 IR_NEC 0xEF00 0xF                // strobe (unused)
    
    // fifth row
    addEventHandler2 IR_NEC 0xEF00 0x10 color #804000 // yellow with an orange touch
    addEventHandler2 IR_NEC 0xEF00 0x11 color #2090B0 // sky blue
    addEventHandler2 IR_NEC 0xEF00 0x12 color #B00070 // turquoise
    // addEventHandler2 IR_NEC 0xEF00 0x13               // fade (unused)
    
    // sixth row
    addEventHandler2 IR_NEC 0xEF00 0x14 color #FFC000 // yellow
    addEventHandler2 IR_NEC 0xEF00 0x15 color #0050A0 // dark turquoise
    addEventHandler2 IR_NEC 0xEF00 0x16 color #E00050 // pink
    // addEventHandler2 IR_NEC 0xEF00 0x17               // smooth (unused)
    
  • ADVERTISEMENT
  • #32 21373284
    JasonMask
    Level 1  
    Hi everyone,

    Aldi is selling a new Version of this light since last Monday (30.12.2024). Unfortunately for 15€ which is almost twice the price of the original.
    Essentially everything works as described for the original version, except of the pin configuration.

    I brute forced my self through this and want to share the configuration here to spare some time for others.

    P6 (PWM0): PWM 3
    P7 (PWM1): PWM 1
    P8 (PWM2): PWM 2

    P14 (N/A): Btn 0 0
    P20 (N/A): IRRecv

    Surprisingly P24 (PWM4) is also equipped with everything but the final connector for a light. A soldering pad is there and labeled with a C though. 
    In case you added a connector there while flashing the firmware the configuration would be:
    P24 (PWM4): PWM 4

    I´m not sure on what other option the new board provides (more things might be hooked to PWM3 and 5 or other Pins) so feel free to share if anyone finds out more.
    Also let me know in case someone needs pictures. I spared them as the labeling on the pcb board is clearly readable and holds no mystery ;)

    Happy new Year and best regards
📢 Listen (AI):

Topic summary

✨ The discussion centers on flashing Casalux LED-RGB WiFi Flexband LED strips (sold at Aldi Süd) with OpenBK firmware to enable MQTT control via iobroker and Alexa integration. Users explored the device's BK7231N chipset, flashing challenges, and configuration extraction. Initial flashing attempts failed due to issues like long wiring, insufficient power supply, and USB-to-UART adapter quality. Success was achieved using a DTECH USB to UART TTL cable with 3.3V logic and shorter wires. The device's Tuya JSON configuration was extracted, revealing PWM frequency at 1000Hz and pin assignments: LED Blue on P7, LED Red on P6, and likely LED Green on P24. IR remote control integration required correct pin setup (P20 as button input, P26 as IR receiver) and rebooting the device to activate the IR driver. Sample autoexec scripts for IR event handling were shared. A newer Aldi version of the strip was noted with different PWM pin mappings: P6 (PWM3), P7 (PWM1), P8 (PWM2), P20 (IRRecv), and an unused P24 (PWM4) pad. Users shared flashing methods including hid_download_py and uartreader tools, and troubleshooting tips for stable flashing and configuration extraction.
Generated by the language model.

FAQ

TL;DR: Flashing success jumps to 100 % when a quality USB-UART cable replaces an FTDI clone, and “short wires beat errors” says p.kaczmarek2 [Elektroda, p.kaczmarek2, post #20885081] [Elektroda, luebbe, post #20902081]

Why it matters: Stable flashing prevents hard-to-recover bricked controllers.

Quick Facts

• Controller: Beken BK7231N (CBU module) [Elektroda, alpenbeni, post #20857445] • Default PWM frequency: 1000 Hz [Elektroda, p.kaczmarek2, post #20860012] • Aldi Süd launch price: €7.99 (2023) → €15 (2024 rev) [Elektroda, alpenbeni, #20857445; Elektroda, JasonMask, #21373284] • Reliable UART baud: 115 200 bps [Elektroda, alpenbeni, post #20857445] • Typical flashing time: ≈90 s with ≤5 cm leads [Elektroda, luebbe, post #20902081]

What are the RGB pin assignments on the 2023 Casalux Flexband?

Set P6→PWM 1 (Red), P7→PWM 3 (Blue), P24→PWM 2 (Green) in “Configure Module”. [Elektroda, alpenbeni, post #20857445]

How does the 2024 hardware revision differ?

New boards route LEDs to P6→PWM 3, P7→PWM 1, and P8→PWM 2; IR remains on P20 and button on P14. P24 is pre-routed for an optional fourth channel. [Elektroda, JasonMask, post #21373284]

Flasher hangs at sector 0xF000—what fixes it?

Use a high-quality USB-UART cable, shorten wires, and power the strip from a dedicated 3.3 V regulator. Success rose from 0 % to 100 % after these steps. [Elektroda, luebbe, post #20902081]

How do I enable MQTT and Alexa in OpenBK?

Configure MQTT with broker IP and auth, tick Flag 30, then set startup command: backlog startDriver SSDP; startDriver Wemo. Alexa discovers the device as a switch. [Elektroda, alpenbeni, post #20857445]

Can I capture and use the IR remote?

Assign P26 to IRRecv, reboot to load the IR driver, then watch console logs for IR_NEC codes and map them with addEventHandler2. [Elektroda, luebbe, post #20905537]

What power supply rating do I need while flashing?

Provide at least 500 mA at 3.3 V. Under-powered FTDI adapters caused repeated CRC errors during backup. [Elektroda, luebbe, post #20870228]

How can I script color presets quickly?

Place commands like “color #FF2000” in /autoexec.bat with addEventHandler2 IR_NEC triggers; reboot to apply. [Elektroda, luebbe, post #20909352]
Generated by the language model.
ADVERTISEMENT