logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

[BK7231N/CB2L] Lumary 5/6 Inch Downlight - OpenBeken driver for KP18058esp LED controller

swpharis  42 6039 Cool? (+2)
📢 Listen (AI):

TL;DR

  • Lumary 5/6 Inch Downlight uses a BK7231N/CB2L module and a KP18058esp LED controller for an OpenBeken driver setup.
  • Accessing the internals requires removing the diffusing filter, undoing 3 screws, unplugging the ribbon cable, and gently prying off the back cover.
  • The CB2L module is soldered to the power board, and the plastic housing is very soft and brittle.
Remove diffusing filter.
Undo 3 screws.
Unplug ribbon cable from LED board.
Gently pry off back cover with small flat tool. Plastic is very soft/brittle.
CB2L module is soldered to power board.


About Author
swpharis wrote 18 posts with rating 8 , helped 1 times. Been with us since 2023 year.

Comments

p.kaczmarek2 21 Jun 2023 15:34

I haven't seen such mounting of CB2L module yet. Do you have a configuration for this device? Or maybe at least a flash dump, so I can extract GPIOs? [Read more]

swpharis 25 Jun 2023 03:12

Best way to dump flash on OSX? I was able to build the BK GUI Flash tool in mono with errors, but it crashes when launched. [Read more]

p.kaczmarek2 25 Jun 2023 09:32

I don't know this system much. Maybe Python's hid_download_py can work. You can see CB2S (very similar to CB2L) dumping in this video: https://www.youtube.com/watch?v=PKkiqDNFIx8 [Read more]

swpharis 25 Jun 2023 16:00

Python does work - someone posted earlier - https://www.elektroda.com/rtvforum/topic3984791.html Issue was with forms. System.Windows.Forms.dll "The Carbon driver has not been ported to 64bits,... [Read more]

swpharis 28 Jun 2023 21:32

Just got a single pack of one of these and it uses a different module. There isn't consistency. Configuration values are the same. Module firmware from Lumary before flashing was 2.3.x in the Tuya app.... [Read more]

p.kaczmarek2 28 Jun 2023 23:39

Can you post Tuya Config? So you got BK7231T version that time? [Read more]

swpharis 29 Jun 2023 03:19

https://obrazki.elektroda.pl/4901648200_1687996097_thumb.jpg Already flashed it. Yes it was WB2L with newer firmware. Manufacturer date was sept. 21. Manf date on others was Dec. 21 Added... [Read more]

p.kaczmarek2 29 Jun 2023 09:27

There are PWM-SDA and PWM-SCL markings on the board. This indicates a "I2C-like" LED driver such as BP5758, SM2135, etc. Please see where are the SDA/SCL signals going. What is the name of the chip? It... [Read more]

swpharis 29 Jun 2023 16:57

It’s a KP18058esp. https://obrazki.elektroda.pl/9598941000_1688044204_thumb.jpg Added after 1 [hours] 45 [minutes]: Pinned it out. https://obrazki.elektroda.pl/2822231400_16880506... [Read more]

p.kaczmarek2 29 Jun 2023 17:13

Can you check if any of existing LED IC drivers works with that chip? [Read more]

swpharis 29 Jun 2023 17:32

Can you explain more what you are asking please? [Read more]

p.kaczmarek2 29 Jun 2023 18:42

KP18058 looks like one of those "I2C-like" LED driver chips, where only two digital lines (SDA and SCL) are used to control 5 channels of LEDs. The problem is, KP18058 doesn't seem to be well known. ... [Read more]

swpharis 29 Jun 2023 19:54

More info on this setup - (third revision with SDA). I had a wiring issue in original read. Read @ 115200 Write @ 921600 Other rates fail. I corrected and the results of read are below: { "rstnum":"3", "rstcor":"c", "Jsonver":"1.0.0", "brightmin":"5", "gmwb":"75", "title20":"1", "deftemp":"100", "gmwg":"70", "bleonoff":"1", "kp58ccur":"13", "wfcfg":"spcl_auto", "colormin":"10", "pmemory":"1", "gmkb":"60", "iicb":"0", "cmod":"rgbcw", "mixway":"0", "kp58rgb_mode":"0", "iicscl":"7", "wt":"20", "prodagain":"0", "rstbr":"50", "remdmode":"0", "colormax":"100", "kp58wcur":"30", "cagt":"20", "iicw":"4", "notdisturb":"1", "module":"CB2L", "colorpfun":"0", "iicsda":"8", "kp58comps_lv":"0", "cwmaxp":"100", "dmod":"9", "gmwr":"100", "iicc":"3", "rgbt":"10", "gmkg":"60", "onoffmode":"1", "brightmax":"100", "iicg":"2", "wfct":"3", "rsttemp":"100", "category":"0505", "gmkr":"80", "defcolor":"c", "iicr":"1", "defbright":"100", "crc":"93", "}Ihlp%Agw_diJ(Aastro_timerbv":"40.00", "pv":"2.2", "lpv":"3.4", "pk":"key8u54q9dtru5jw", "firmk":"key8u54q9dtru5jw", "cadv":"_id", "wx_uuid":"null", "dy_tls_m":"2", "cloud_cap":"1025", "psk21_key":"null... [Read more]

p.kaczmarek2 29 Jun 2023 20:03

Thanks, this is also helpful, but we still need an insight into the two wire protocol of that device. Can you tell us where it was bought? I've spoken to @dedamraz and he seems to be eager to buy... [Read more]

swpharis 29 Jun 2023 20:29

Amazon https://www.amazon.com/gp/product/B09Y5RPSF4/ref=ppx_yo_dt_b_asin_title_o09_s00?ie=UTF8&psc=1 Be aware there are different listings for what seem to be the same light. This listing is the one... [Read more]

DeDaMrAz 29 Jun 2023 21:02

Thank you @swpharis for the links, ordered placed we will have them by July 11 to analyze and try to support it. [Read more]

p.kaczmarek2 29 Jun 2023 21:59

Please stand by @swpharis , we will need your help with testing once @dedamraz does packets capture. I wonder how the protocol looks like. Some such LED drivers are using 8 bits per channel, giving us... [Read more]

swpharis 29 Jun 2023 23:09

I think it's going to be 1024 Google translated from Chinese.: KP18058 is a high-precision five-channel full-pressure LED linear constant current moderation chip, which can be independently set by... [Read more]

DeDaMrAz 06 Jul 2023 17:49

I received one light type but unfortunately it has TYWE2S module and no KP LED controller :/ awaiting for the other one to arrive. [Read more]

FAQ

TL;DR: This FAQ gives OpenBeken users 15 answers and the expert warning "SHOCK HAZARD" for flashing Lumary 5/6 Inch Downlights with CB2L, BK7231N, and KP18058ESP, solving disassembly, UART flashing, pin roles, channel mapping, and dim cool-white issues. [#20659312] Why it matters: The same Lumary-looking downlight can contain CB2L, WB2L, or TYWE2S hardware, so correct identification prevents failed flashing and unsafe probing.

Variant discussed Module Chip family LED control OpenBeken outcome
Lumary US-DL6A-4 4-pack CB2L BK7231N KP18058ESP, DAT P8, CLK P7 Supported with KP18058 roles
Single-pack September 2021 unit WB2L BK7231T Same configuration values Flashed OTA by firmware selection
Received test unit TYWE2S ESP-based Tuya module No KP LED controller Not the target KP18058 board

Key insight: Treat each Lumary 5/6 inch downlight as a board-specific device. Open it, identify the module and LED driver, then apply KP18058_DAT on P8 and KP18058_CLK on P7 only when the KP18058ESP board is present.

Quick Facts

  • The working KP18058ESP Lumary template uses BK7231N, CB2L, flags 1024, GPIO7 as KP18058_CLK, and GPIO8 as KP18058_DAT. [#20680104]
  • UART testing reported read at 115200 baud and write at 921600 baud; other rates failed on that setup. [#20635729]
  • The extracted KP18058 Tuya configuration used iicsda: 8, iicscl: 7, brightmin: 5, brightmax: 100, and cwmaxp: 100. [#20635729]
  • The early PWM-only CB2L board mapped RGB and white channels as green P24, cool P8, blue P6, warm P7, and red P26. [#20630634]
  • KP18058 current control accepts values from 0 to 31; KP18058_Current 14 30 sets RGB to 14 and CW to 30. [#21434389]

How do I disassemble a Lumary 5/6 inch downlight to access the CB2L module and LED driver board?

Remove the diffuser, undo 3 screws, unplug the ribbon cable, then pry off the back cover carefully.
  1. Remove the diffusing filter.
  2. Undo the 3 screws and disconnect the LED-board ribbon cable.
  3. Use a small flat tool on the back cover, because the plastic is soft and brittle. The CB2L module sits soldered to the power board. [#20625124]

What is the CB2L module in a Lumary downlight, and how is it related to the BK7231N chip?

CB2L is the soldered Wi-Fi module used on several Lumary downlight revisions. "CB2L is a Tuya-style wireless module that provides Wi-Fi control for the light, using the BK7231N chip as its main microcontroller." The extracted device configuration explicitly reported CB2L and BK7231N together. [#20630634]

What is the KP18058ESP LED controller, and why does OpenBeken need a specific driver for it?

KP18058ESP is a five-channel LED controller that needs its own OpenBeken protocol driver. "KP18058ESP is an I2C-like RGBCW LED driver chip that controls five LED channels over SDA and SCL, using a protocol not handled by SM2135, BP5758, SM2235, or BP1658CJ." OpenBeken initially lacked support, so developers decoded the two-wire protocol. [#20635653]

How can I dump the flash from a BK7231N or CB2L device on macOS if the BK GUI Flash tool crashes under Mono?

Use Python hid_download_py, or run the BK GUI Flash tool in a virtual machine. The Mono build failed on macOS because System.Windows.Forms.dll used a Carbon driver not ported to 64-bit. A forum video showed similar CB2S dumping, and Python was reported working. [#20630634]

What UART pins and flashing speeds worked for reading and writing the Lumary CB2L downlight firmware?

Power the extension pins, then connect TX, RX, and CEN on the board back. Ground CEN to the large ground pad when needed. The successful setup read firmware at 115200 baud and wrote firmware at 921600 baud. Other baud rates failed on the third KP18058 board revision. [#20635729]

Which OpenBeken pin roles should I use for the Lumary 5/6 inch downlight with KP18058ESP on BK7231N?

Use KP18058_CLK on GPIO7 and KP18058_DAT on GPIO8 for the documented Lumary US-DL6A-4 template. The template identifies the device as Lumary 5/6 Inch Downlight, model US-DL6A-4, chip BK7231N, and board CB2L. It also tags the device as KP18058ESP and 110V. [#20680104]

How should I configure KP18058_DAT and KP18058_CLK in OpenBeken for the Lumary US-DL6A-4 downlight?

Assign GPIO8 to KP18058_DAT and GPIO7 to KP18058_CLK in the OpenBeken pin configuration. Earlier testing hardcoded P8 as SDA and P7 as SCL, then later builds added selectable KP18058 pin roles. The published template uses exactly those two roles for US-DL6A-4. [#20680104]

What does the OpenBeken command KP18058_Map 2 0 1 3 4 do for RGB, warm white, and cool white channel mapping?

KP18058_Map 2 0 1 3 4 remaps KP18058 physical channels to the desired RGBWC order. The developer described 20134 as RGBWC and suggested adding it to autoexec.bat. On the confirmed Lumary setup, startDriver KP18058 plus KP18058_Map 2 0 1 3 4 made the light work correctly. [#20665364]

Why did SM2135, BP5758, SM2235, and BP1658CJ drivers not work with the KP18058ESP LED controller?

Those drivers failed because KP18058ESP used a different two-wire command protocol. The existing OpenBeken drivers were worth testing because their chips also use SDA and SCL. Testing found the three available drivers did not work, so developers captured and decoded KP18058 traffic instead. [#20635765]

KP18058ESP vs BP5758 vs SM2135: how do these I2C-like LED driver chips differ for RGBCW lights?

KP18058ESP, BP5758, and SM2135 all use two digital lines, but they do not guarantee protocol compatibility. KP18058ESP controlled five RGBCW channels in this Lumary board through DAT on P8 and CLK on P7. BP5758 looked similar enough to test, yet it still failed before native KP18058 support arrived. [#20661196]

Why do different Lumary downlights from similar Amazon listings contain different modules like CB2L, WB2L, or TYWE2S?

Lumary shipped similar-looking downlights with different internal revisions and modules. One single-pack unit used WB2L with newer 2.3.x Tuya firmware, while other units used CB2L. A later received light had TYWE2S and no KP LED controller, proving listing appearance did not guarantee the same board. [#20644531]

What should I do if Tuya config extraction fails with a magic constant header not found error on a Lumary downlight backup?

Treat the device as a different revision and inspect the board manually. One August 2022 CB2L board produced magic constant header not found and no Tuya config from a 2 MB backup. The user then identified SDA/SCL board markings and confirmed a KP18058ESP chip by opening the light. [#20634833]

How can I troubleshoot a Lumary KP18058 downlight where the cool white channel is much dimmer than warm white in OpenBeken?

Check the LED remap and then test KP18058 current settings. The reported faulty case used KP18058DAT on P8, KP18058CLK on P7, and remap 1 2 0 4 3. Cool white glowed near 2% at 100%, then returned bright after power cycling, suggesting configuration or current handling needed testing. [#21434384]

What does the KP18058_Current 14 30 command control, and what current values are safe for RGB and CW LEDs?

KP18058_Current 14 30 sets RGB current to 14 and CW current to 30. Allowed values run from 0 to 31, with 30 described as the default CW value and 31 as maximum. Use caution, because raising current can burn LEDs. [#21434389]

What safety risks should I know about when opening or probing the Lumary 110V downlight power board with a non-isolated LED supply?

The Lumary power board can expose dangerous mains-related LED circuitry while opened. The drawn schematic warning said there was no input-side LED regulation and marked it as a shock hazard. The same discussion identified the device as 110–120V only and criticized the low-cost non-isolated design. [#20659432]
%}