logo elektroda
logo elektroda
X
logo elektroda

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

alpenbeni 6249 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  
    Posts: 14
    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  
    Posts: 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: At 3.3 V and 115200 baud, this FAQ shows how to flash a BK7231N Casalux LED strip with OpenBK, map the correct pins, and fix common failures like 0xF000 flash errors. As one expert reply put it, "Reboot is enough" for some IR issues after setup. [#20906938]

Why it matters: This thread turns a low-cost supermarket RGB strip into a practical OpenBK device for MQTT, ioBroker, Alexa discovery, and IR control.

Option Worked for users Main use Reported limitation
BK7231GUIFlashTool Yes, on the original strip and later with a better UART cable Backup, Tuya config extraction, flashing Some setups failed at 0xF000 or 0x10000
hid_download_py / uartprogram Suggested for difficult devices Alternative flashing and recovery path Could still hang with unstable wiring or a weak adapter
Alexa via SSDP + Wemo Yes Voice discovery and on/off control Detected as a switch, not a color light

Key insight: The biggest success factor was not firmware settings but hardware quality: short wires, correct 3.3 V logic, and a reliable USB-to-UART adapter solved repeated BK7231N flashing failures on this strip.

Quick Facts

  • The original Casalux strip was sold at Aldi Süd for 7.99 €, included a power adapter, remote, corner cables, and used an IP20 coated strip. [#20857445]
  • The confirmed original-board RGB mapping in OpenBK was P6 = PWM 1, P7 = PWM 3, and P24 = PWM 2 after extracting the Tuya config. [#20857445]
  • The extracted Tuya data identified a CBU module with BK7231N and a PWM frequency of 1000 Hz (pwmhz=1000). [#20860012]
  • A newer Aldi revision sold on 2024-12-30 for 15 € used a different map: P7 = PWM 1, P8 = PWM 2, P6 = PWM 3, plus P14 = button and P20 = IR receiver. [#21373284]
  • One failed setup improved only after replacing the FTDI adapter with a 3.3 V logic-level 1 m DTECH USB-to-UART TTL cable; shortening wires from 10 cm to 5 cm alone did not fix flashing. [#20902081]

How do I flash the Casalux LED-RGB WiFi Flexband with a BK7231N chip using OpenBK and a USB-to-UART adapter?

You flash it by opening the controller, wiring a 3.3 V USB-to-UART adapter, and using BK7231GUIFlashTool with the BK7231N target at 115200 baud. 1. Connect VCC, GND, RX1, and TX1 correctly. 2. In the tool, choose your COM port, select BK7231N, and use “Do backup and flash new.” 3. If the tool waits for reboot, briefly short GND to CEN to continue. The working example used tool version 1.1.5. [#20857445]

Which UART connections do I need for the BK7231N controller, and why must the converter be set to 3.3V?

Use four UART lines: controller VCC to converter VCC, GND to GND, RX1 to TX, and TX1 to RX. Set the converter to 3.3 V because the thread’s working setup explicitly required 3.3 V logic and power for the BK7231N board. Using the wrong voltage risks failed communication or hardware damage during flashing. The successful flash example used a 3.3 V adapter connected directly to a PC. [#20857445]

What is the CEN pin on a BK7231N device, and how is it used during the OpenBK flashing process?

CEN is the reset-control pin used to reboot the BK7231N during flashing. In the working procedure, power-cycling did not resume the process, but briefly touching GND to CEN restarted the chip and let BK7231GUIFlashTool continue. That mattered when the tool showed yellow lines asking for a reboot. On this device, a very short GND-to-CEN contact was enough. [#20857445]

Where can I find the OpenBK web interface after flashing, and how do I connect the LED strip to my local Wi-Fi?

After flashing, connect your phone to the device’s temporary Wi-Fi named “OpenBK...” and open http://192.168.4.1. Then go to Config → Configure WiFi, enter your local Wi-Fi details, and save them. After the device joins your network, find its new IP address on your router and continue configuration from that address. This exact flow was used successfully on the Casalux strip. [#20857445]

How do I configure the Casalux LED strip pins in OpenBK from the extracted Tuya config for the original board revision?

For the original board, set P6 (PWM0) = PWM : 1, P7 (PWM1) = PWM : 3, and P24 (PWM4) = PWM : 2. Those values came from the extracted Tuya configuration, which listed red on P6, blue on P7, and green on P24. After saving that module setup in Config → Configure Module, the strip could change colors from the OpenBK main page. [#20857445]

What pin mapping works for the newer 2024/2025 Casalux LED-RGB WiFi Flexband board, including RGB, button, and IR receiver pins?

The newer board used P7 = PWM 1, P8 = PWM 2, and P6 = PWM 3 for RGB. It also used P14 = Btn 0 0 and P20 = IRRecv. An extra pad on P24 was present and labeled for an unused fourth light channel; if populated, it could be configured as PWM 4. This mapping was shared for the Aldi revision sold from 2024-12-30. [#21373284]

Why does BK7231GUIFlashTool fail around address 0xF000 or 0x10000 when backing up or flashing a BK7231N device?

It failed in this thread because the hardware link was unstable, not because of the OpenBK image itself. One user saw backup failures at 0xF000 or 0x10000, then a write failure at 0xF000, and later fixed the problem by replacing the USB-to-UART adapter. The expert diagnosis was clear: bad power, long wires, or a low-quality converter are the main causes. Even 115200 baud did not help until the adapter changed. [#20885081]

What is the difference between BK7231GUIFlashTool and hid_download_py or uartprogram, and which one is better for a problematic BK7231N flash?

BK7231GUIFlashTool is the easier option for backup, Tuya config extraction, and standard flashing, while hid_download_py or uartprogram are fallback methods for stubborn devices. In this thread, the GUI tool worked on stable hardware, but alternative tools were recommended when read or write operations failed. They were not automatically better: one user reported that uartprogram -b 115200 either failed immediately or hung after two blocks. For a problematic board, try the alternative tool only after fixing wiring and adapter quality. [#20884964]

How can I recover or diagnose a seemingly bricked BK7231N LED controller after a failed OpenBK flash?

Start by treating it as a communication problem and retry with better hardware. 1. Use a reliable 3.3 V USB-to-UART adapter. 2. Shorten the soldered leads and avoid hubs. 3. Retry backup or flash with the GUI tool or uartprogram. One device that appeared bricked after a failed write at 0xF000 was later flashed successfully only after switching to a different UART cable. That points to recovery by re-establishing stable serial flashing, not board replacement. [#20902081]

What is a Tuya config binary, and how does it help identify PWM pins, module type, and device settings for OpenBK?

“Tuya config binary” is a device configuration dump that stores board-specific settings, including pin roles, module type, and operating parameters, so OpenBK users can map hardware correctly after flashing. In this thread, it revealed CBU, BK7231N, RGB pin assignments, and pwmhz=1000. The tool also showed where the Tuya section started, such as 2023424 or an uncommon 2019328 offset on another sample. [#20869414]

Why did the extracted Tuya text show "TODO 1000," and what does the pwmhz value mean on this LED controller?

“TODO 1000” was a decoder label bug, and the value actually meant PWM Frequency 1000. The maintainer confirmed that the field came from pwmhz, then said the decryptor would replace the placeholder text with “PWM Frequency.” On this controller, pwmhz=1000 means the LED PWM signal runs at 1000 Hz. That value helps explain brightness behavior and confirms a real device setting, not an error in the strip itself. [#20860012]

How do I set up MQTT for OpenBK with ioBroker, including the broker settings and the Tasmota TELE flag needed for updates?

Set the MQTT broker IP address and the ioBroker Sonoff-adapter credentials in Config → Configure MQTT, then enable Flag 30 in Configure General/Flags. The exact flag was “[MQTT] Enable Tasmota TELE etc publishes (for ioBroker etc)”. Without that flag, the user did not get updates into ioBroker. After enabling it, the strip worked with MQTT in the ioBroker instance as intended. [#20857445]

What startup command should I use in OpenBK to make the Casalux LED strip discoverable by Alexa through SSDP and Wemo?

Use this startup command: backlog startDriver SSDP; startDriver Wemo. Enter it in Config → Change startup command text, save it, and reboot the controller. That starts the discovery services on every boot, so Alexa can find the strip as a new device. In the working setup, discovery happened after the reboot and a new-device scan in Alexa. [#20857445]

Why is the OpenBK-flashed LED strip found by Alexa only as a switch instead of a color light, and what are the current limitations?

Alexa finds it as a switch because the Wemo-based discovery worked, but color-light support was not ready in OpenBK for this setup. The thread states that changing colors in Alexa was not yet possible because the Hue driver was not ready to use there. So voice discovery and basic switching worked, but RGB control did not. That was the reported limitation of the Alexa integration on this strip. [#20857445]

How can I verify that the IR receiver is working on this Casalux/OpenBK controller, and what extra steps like pin selection or reboot are needed to see IR events?

Assign the correct IR pin, reboot the device, and then watch for IR events in the log or via scripts. One working setup used P20 as Btn and P26 as IRRecv on the original-style board. The user first saw nothing from the remote, but after a reboot the IR receiver started working. The maintainer’s key advice was short and accurate: reboot after enabling the IR driver. [#20905552]
Generated by the language model.
ADVERTISEMENT