logo elektroda
logo elektroda
X
logo elektroda

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

swpharis 4275 42
ADVERTISEMENT
  • #31 20663929
    p.kaczmarek2
    Moderator Smart Home
    Hmm, maybe let's try with red, green and blue at full bright first. Here or in private message.

    Added after 30 [minutes]:

    I've got something from @DeDaMrAz , here's a screenshot (modified by me in paint):
    [BK7231N/CB2L] Lumary 5/6 Inch Downlight - OpenBeken driver for KP18058esp LED controller

    Added after 40 [minutes]:

    we're getting closer [BK7231N/CB2L] Lumary 5/6 Inch Downlight - OpenBeken driver for KP18058esp LED controller
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #32 20664104
    DeDaMrAz
    Level 19  
    Progress :) build 1.17.189

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

    KP18058_RGBCW FF00000000 - turns light on
    KP18058_RGBCW 0000000000 - turns light off

    Added after 2 [hours] 54 [minutes]:

    @swpharis

    KP15058 is now decoded and supported in general :) pin assignment and configuration will be done in next day or two.

    If you want to test this - update to build 1.17.195 and use the following commands:

    startDriver KP18058 -> to start a driver
    KP18058_Map 0 1 2 3 4 -> to map channels where 0-4 is respectfully BGRCW
    KP18058_RGBCW FF00000000 -> meaning blue will turn on with full brightness
    KP18058_RGBCW 00FF000000 -> meaning red will turn on with full brightness
    etc...
    KP18058_RGBCW 0000000000 -> will power all LED's off

    You can try any channel with values from 00 to FF,

    The rest will follow, thank you for your patience and if you find this useful and want to contribute you can do so via this link - https://paypal.me/openshwprojects
  • ADVERTISEMENT
  • #33 20664486
    p.kaczmarek2
    Moderator Smart Home
    Today I will add KP18058 pin roles so users can choose which GPIOs are used for communication, I will also try to address the brightness issue, it seems there is one more little thing we need to resolve..
    Helpful post? Buy me a coffee.
  • #34 20665364
    DeDaMrAz
    Level 19  
    Ok driver implementation is almost 100% done.

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

    The only thing to play around is the KP18058_Map 2 0 1 3 4 (20134 -> RGBWC - this should be a default mapping but may change from device to device) that can be added to autoexec file and you can enable Flag 18 for smooth transition.

    All this is ready with latest build - 1.17.199

    The only thing left is pin assignment @p.kaczmarek2 said soon and this chip is 100% supported now.

    @swpharis please test on your device and report back, thanks.
  • #35 20665521
    swpharis
    Level 5  
    DeDaMrAz wrote:
    Ok driver implementation is almost 100% done.

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

    The only thing to play around is the KP18058_Map 2 0 1 3 4 (20134 -> RGBWC - this should be a default mapping but may change from device to device) that can be added to autoexec file and you can enable Flag 18 for smooth transition.

    All this is ready with latest build - 1.17.199

    The only thing left is pin assignment @p.kaczmarek2 said soon and this chip is 100% supported now.

    @swpharis please test on your device and report back, thanks.

    Running 1.17.199 - The driver loads OK. Driver commands return OK. How can I define pin assignment to test fully?
  • #36 20665523
    DeDaMrAz
    Level 19  
    Since your light is the same you can create autoexec.bat file and enter following commands:

    startDriver KP18058
    KP18058_Map 2 0 1 3 4


    and test, pin assignment will be complete in the next build.

    EDIT: pin assignments is currently hardcoded so P8 -> SDA and P7 -> SCL
  • ADVERTISEMENT
  • #37 20665537
    swpharis
    Level 5  
    It is working perfectly on my setup. Thanks for the efforts in this. I'll be supporting the project shortly.
  • #38 20665538
    DeDaMrAz
    Level 19  
    Glad to hear that :) and happy to see it working on your setup as well.

    Feel free to reach out if you find any other interesting device that OBK is not supporting - yet :) or have any questions about this project.
  • ADVERTISEMENT
  • #39 20666810
    p.kaczmarek2
    Moderator Smart Home
    Thank you for the cooperation, I have pushed the KP18058 pin roles selection support.
    [BK7231N/CB2L] Lumary 5/6 Inch Downlight - OpenBeken driver for KP18058esp LED controller
    It should be available in the next release.
    Helpful post? Buy me a coffee.
  • #40 20680104
    p.kaczmarek2
    Moderator Smart Home
    Template:
    Code: JSON
    Log in, to see the code
    Helpful post? Buy me a coffee.
  • #41 21434384
    WingmanNZ
    Level 3  
    >>20665538 Hi @DeDaMrAz I was wondering if you have come across any users that have the cool white (C) in RGBCW not working at the correct brightness level? The behaviour I see is that the cool white channel does not work to the same brightness level as the warm white.

    Device configuration, as extracted from Tuya:
    - KP18058DAT on P8
    - KP18058CLK on P7
    - LED remap is 1 2 0 4 3
    Device seems to be using CB2L module, which is using BK7231N.
    And the Tuya section starts at UNCOMMON POSITION 0


    When I set the Light to 100% cool white the light emits a very low glow (as if it is at 2% brightness). If I power off the lamp and then power it back on, it returns to full cool white brightness. So it seems perhaps there is something I am missing.

    Any ideas?
  • #42 21434388
    DeDaMrAz
    Level 19  
    Try with this command

    Quote:
    KP18058_Current 14 30


    That should be the default value (14mA), try with that and play around with that value - but be warned your led's may burn easily!!
  • #43 21434389
    insmod
    Level 24  
    >>21434388 It should be KP18058_Current 14 30, where 14 is for RGB and 30 for CW. Allowed values are from 0 to 31. But, since 30 is default value for CW, and 31 is max, i don't know if it would help.

Topic summary

The discussion revolves around the Lumary 5/6 Inch Downlight, specifically focusing on the CB2L module and the KP18058esp LED controller. Users share insights on disassembling the downlight, extracting flash dumps, and configuring the device for use with OpenBeken firmware. Various methods for flashing and dumping the firmware are explored, including the use of Python scripts and the BK GUI Flash tool. The KP18058 LED driver is identified as an I2C-like controller, and users discuss compatibility with existing LED drivers. Progress is made in decoding the communication protocol, with successful commands established for controlling the LED channels. The conversation highlights the variability in modules used across different units and the ongoing efforts to support the KP18058 in OpenBeken.
Summary generated by the language model.
ADVERTISEMENT