CozyLife B22 9W CW/WW LED Bulb - OpenLN882H Flash Conversion Overview [BP5758]
Here's a swift tour of a basic CozyLife B22 9W CW/WW LED bulb bought from Ali Express
https://www.aliexpress.com/item/1005009804894661.html
The box gives the impression it's an RGB bulb, but it's just a generic box that's been seen with many varieties of bulb. This device is cold white/warm white.
No markings on the exterior of the bulb at all. With reasonable force the dome can be popped off by hand, the silicon removed with a spudger and the positive/neutral lugs at the base lifted out with a scalpel.
A9, RX, TX, GND and 3V3 are nicely labelled on the rear of PCB
soldered-up ready for flash backup and programming of OpenLN882H
boot log from TX at 2000000 baud
A9 grounded for UART download mode, Easy Flasher takes backup
backup flashed to dev board to be sure it was a good backup. It boots and can be paired with CozyLife app
A9 still grounded Easy Flasher programs OpenLN882H to flash
OBK boots, AP broadcast, accessed at 192.168.4.1 when connected as a client, join home wifi.
We see in a close-up picture that A5 and A6 are tracing to the 4 pins that go to the LED disc. These two will be CLK and DAT lines for the BP5758 controller chip on the disc.
A5 = BP5758D_DAT
A6 = BP5758D_CLK
startup command to limit current and temperature
More detailed LN882H info and guides:
https://www.elektroda.com/rtvforum/topic4027545.html
https://www.elektroda.com/rtvforum/topic4085019.html
https://www.elektroda.com/rtvforum/topic4028087.html
https://www.elektroda.com/rtvforum/topic4032240.html
https://www.elektroda.com/rtvforum/topic4050274.html
search device list for other examples; https://openbekeniot.github.io/webapp/devicesList.html
OBK template
Flash backup: https://github.com/openshwprojects/FlashDumps...mits/a8a1da6260ef37a73fc6be03a2544df571b6251c

https://www.aliexpress.com/item/1005009804894661.html
The box gives the impression it's an RGB bulb, but it's just a generic box that's been seen with many varieties of bulb. This device is cold white/warm white.





No markings on the exterior of the bulb at all. With reasonable force the dome can be popped off by hand, the silicon removed with a spudger and the positive/neutral lugs at the base lifted out with a scalpel.













A9, RX, TX, GND and 3V3 are nicely labelled on the rear of PCB

soldered-up ready for flash backup and programming of OpenLN882H

boot log from TX at 2000000 baud
Code: Text
A9 grounded for UART download mode, Easy Flasher takes backup

backup flashed to dev board to be sure it was a good backup. It boots and can be paired with CozyLife app



A9 still grounded Easy Flasher programs OpenLN882H to flash

OBK boots, AP broadcast, accessed at 192.168.4.1 when connected as a client, join home wifi.
We see in a close-up picture that A5 and A6 are tracing to the 4 pins that go to the LED disc. These two will be CLK and DAT lines for the BP5758 controller chip on the disc.


A5 = BP5758D_DAT
A6 = BP5758D_CLK

startup command to limit current and temperature
Code: Text
More detailed LN882H info and guides:
https://www.elektroda.com/rtvforum/topic4027545.html
https://www.elektroda.com/rtvforum/topic4085019.html
https://www.elektroda.com/rtvforum/topic4028087.html
https://www.elektroda.com/rtvforum/topic4032240.html
https://www.elektroda.com/rtvforum/topic4050274.html
search device list for other examples; https://openbekeniot.github.io/webapp/devicesList.html
OBK template
Code: JSON
Flash backup: https://github.com/openshwprojects/FlashDumps...mits/a8a1da6260ef37a73fc6be03a2544df571b6251c
Comments
CW bulb with 5-channels two-wire chip BP5758? So 3 out of 5 channels are not used... How does it make sense? Is it at least cheaper than RGB+CW? With the current board layout, you could easily solder... [Read more]
ha. yeh, dunno. it does mean the RGB picker on OBK GUI is a little bit redundant. [Read more]
I see, I guess we need some kind of method to mark in LED_Map that RGB channels are not used... I haven't seen yet any other device that had 5-channel I2C-like LED controller but used only two chan... [Read more]
hmm yes. I just scanned device list for BP5758 and each device mentions RGB in some form. seems to be the first. [Read more]
I have a 6W E27 CB2L BP5758D RGBWW without CW, so 4 channels. Plus i remember i saw E27 CB2L BP5758D without RGB on some russian site. I can find it if you're interested. [Read more]
this one maybe? https://mysku.club/blog/russia-stores/103970.html [Read more]
Yep, that one [Read more]
I am preparing self test to add handling for these cases. https://obrazki.elektroda.pl/7857141300_1757089577_bigthumb.jpg I will probably opt for something like this: LED_Map -1 -1 -1 1 2 ... [Read more]
not from me! -1 -1 -1 make sense to me Added after 2 [minutes]: does that also cover @insmod's missing CW LED_Map # # # -1 # [Read more]
The only downside is that I need to check for this -1 (0xff, 255) in remap... hopefully this will suffice: https://obrazki.elektroda.pl/5759889500_1757095617_bigthumb.jpg I will open a PR in few... [Read more]
GUI looks good but sadly no light. toggling dimmer makes no diff https://obrazki.elektroda.pl/2925569700_1757098583_thumb.jpg Added after 1 [minutes]: toggling 100% green and blue buttons... [Read more]
I suspect I know what may be wrong. If you have CW light, then OBK CW channels have indexes 3 and 4. So your LED_Map should consist only of -1 (for skipped channels) and 3 and 4. Added after 2 [minutes]:... [Read more]
yep. that's all it was. dimmer, toggle, web app all good now LED_Map -1 -1 -1 3 4 Added after 6 [minutes]: HA works. RGB bits are there but CW/WW works https://obrazki.elektroda.pl/1611... [Read more]
I didn't adjust HA discovery yet, so that's expected. I only changed UI of OBK. Added after 4 [minutes]: Pushed HA Discovery. I just count number of non-negative remaps and use it as number of pwms.... [Read more]
yep cool https://obrazki.elektroda.pl/6514202900_1757106303_bigthumb.jpg [Read more]