logo elektroda
logo elektroda
X
logo elektroda

Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]

p.kaczmarek2 6738 8
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Hello, I will present here two seemingly typical LED lamps (E27 and E14) RGBCW Tuya Smart, which are distinguished by the fact that they are extremely difficult to program due to the obscured UART pads in the WB2L_M1 (BK7231N) modules. Normally, to change their charge, you would have to unsolder these modules, but in the subject I will show an alternative, more convenient way, i.e. changing their firmware without opening the housing thanks to the use of tuya-cloudcutter . The firmware will be changed to mine OpenBeken , the equivalent of Tasmota, intended for the more exotic platforms used by Tuya. The topic will be another description of the interior and programming of IoT devices and will not cover the topics already discussed. I invite you to learn about the other topics from the series, you can find them in this section ( Equipment interiors ).

    Purchase of the bulbs
    I bought both from China, below are screenshots of the offers:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    I paid about 10$ (PLN 40) per item. In some stores in Poland it is possible to get similar LED lamps cheaper (regular one-color with WiFi was once even for PLN 15), but I wanted to check those from China anyway, because I am looking for popular products to add their support to my OpenBeken .
    The shipment was from China but there were no customs issues. I waited for the goods for quite a long time, several weeks, until I lost track of time.


    Teardown and programming of the Tuya RGBCW E14 9W WiFi lamp
    On the outside of the package there is information about what it contains:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Package; as standard, there are QR codes for the SmartLife application:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Instruction. What distinguishes these LED lamps? Probably, including Bluetooth. The Beken production chip used inside, BK7231 (BK7231T or BK7231N) offers WiFi and Blueooth connectivity. This makes it more attractive to manufacturers than the ESP8266.
    WiFi is 2.4GHz standard.
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    But I have presented the tests of the SmartLife application on the forum many times, so we go straight to the teardown.
    The dome can be removed with your bare hand:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    The PCB with LEDs is more difficult to pry:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    You can see three types of LEDs: colored (RGB), warm white and cool white. The bottom of the board is also a heat sink:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    PCB marking: C stands for "cool" LED, W stands for "warm" LED.
    There was a small problem here - I wanted to remove the thread (it is put on), and instead of all the plastic, it broke in half, as in the photo:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    This was the first time it had happened to me. You will need to glue. At least the plate was removed:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    You can see a fusible resistor (in a sleeve), a rectifier bridge, a WiFi module ...
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    There are also two integrated circuits. BP2616F and BP2525. BP2525 is a transformerless power supply, it most likely provides 3.3V for WB2L_M1. The second component perhaps provides power to the LED.
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    On the other hand, you can see five NP6003 transistors. Five, one per channel, R, G, B, C, W. These are of course N channel MOSFETs .
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    It is worth paying attention to the Vds. Such a low voltage? This is because they do not switch the mains potential directly, they are connected downstream from the BP2616F. I also suspect that the BP2616F limits the current, so even if we permanently open all these five transistors, we will not exceed a certain predetermined barrier (I used to check it, smart LED lamps work either in RGB or CW mode, never all The LEDs are lit at once, out of curiosity I turned on all the LEDs one by one and I saw that after turning on RGB and CW at once, the current does not increase any more, because the BP2616F system limits it).
    The WB2L_M1 WiFi module used seems to be the WB2L version:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    However, this is not an ordinary WB2L. The WB2L has a BK7231T inside and the WB2L_M1 is based on a slightly newer Beken chip, the BK7231N. It is worth remembering about this when uploading the firmware.
    Additionally, we see that the RX / TX pins are covered.
    How to program BK7231?
    Please refer to the topics:
    Garden Tuya CCWFIO232PK Double Relay - BK7231T - Programming
    Qiachip Smart Switch - BK7231N / CB2S - interior, programming
    LED WiFi RGBCW Tuya - teardown, BK7231N, programming with my Tasmota replacement
    Light switch from the USA - Gosund Smart Switch SW5-A-V2.1 - BK7231T


    In order to desolder the module, I added flux and fresh Pb solder (Pb solder has lower melting point) to its pads and started to gradually heat them with hot air:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    At the bottom of the module you can see the desired UART interface for programming:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Obviously, this module is going to come back into place. You need to clean the pads with a braid:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    I also washed the plate, I have an IPA cleaner for it.
    Programming the module - as in the previous topics in the series:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    The module returns to its place - I put a fresh solder on one pad, placed the module properly, and then soldered the remaining pads:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    That's it for this lamp. It is also worth showing how the individual colors shine:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]


    Teardown and programming of the Tuya RGBCW E27 18W WiFi lamp
    The situation here is very similar, so I will limit the comment to a minimum.
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    This time the thread was removed. You can see how it was attached:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Inside, the situation is similar:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    BP2516 (instead of BP2616F) and BP2525 (same as before). This time I will present catalog notes:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    As before - de facto two power supplies.
    One powers the LEDs, the other the WiFi module.
    There are also 5 MLE08 (probably MOSFET) MLE08 transistors on the board, which I haven't been looking for anymore, but if someone finds it, I invite you to post it in the comments section below.
    Here, too, the programming pads are obscured. You have to unsolder.
    First, I removed one electrolytic capacitor because it was too close to the pads and I didn't want to overheat it.
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Additional Pb solder, flux and heat:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Bottom of the module:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Programming:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    The module returns to its place:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]

    OpenBeken configuration for RGBCW and Home Assistant
    Everything as with the previous topic in the series:
    LED WiFi RGBCW Tuya - interior, programming, BK7231N

    A more convenient way - changing the firmware remotely via WiFi
    In the case of these LED bulb, changing the firmware was very difficult. Not every beginner can solder, let alone use hot air and additionally solder the module back into place.
    Fortunately, in the case of BK7231T and BK7231N there is an alternative to "cable" programming, tuya-cloudcutter , which is essentially the equivalent of ESP tuya-convert .
    https://github.com/tuya-cloudcutter/tuya-cloudcutter
    Unfortunately, there is one catch ...
    In order for the tuya-cloudcutter to support a given device, someone has to rip the firmware once from it normally, so that the authors of the tuya-cloudcutter (or contributors, including myself) can get from it, say, offsets needed for OTA .
    When ripping the firmware , it is worth pairing our IoT device first, but with the test WiFi network, because our SSID and password will also be in this firmware memory.
    The entire firmware should be ripped, the entire 2MB.
    It is not worth ripping the firmware without pairingat all, because then there is no so-called schema in this memory and OTA is more difficult to prepare. Schema is downloaded from Tuya servers and saved to firmware when device is paired.
    After ripping, the firmware should be placed here;
    https://github.com/tuya-cloudcutter/tuya-cloudcutter/issues
    (possibly you can send it to me, give it somewhere on our forum, I will pass it on)
    Here, for example, I put a charge from one of the LED lamps from the topic:
    https://github.com/tuya-cloudcutter/tuya-cloudcutter/issues/91
    After getting offsets all products from a given series can be programmed without opening the case, as long as manufacturer don't change their firmware build.
    The installation of the tuya-cloudcutter itself is very simple
    I suggest you do this on an Ubuntu virtual machine. I had trouble with older versions, I recommend Ubuntu 20.04.4 LTS.
    You need to:
    1. install curl
    2.install docker, e.g. via get.docker.com
    3. download tuya-cloudcutter (git clone repository) and grant permissions to scripts from inside
    4. connect a USB WiFi card that supports AP mode (so-called "wifi dongle"). I use TL-WN722N myself.
    5. put the openbk batch in the Tuya-cloudcutter batches folder
    6. fire up ./run_flash and follow the instructions
    Screenshots of the tuya-cloudcutter run:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1] Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    Perhaps I will provide more detailed instructions in a separate topic.

    Summary
    I bought and dismantled these LED lamps so that you do not have to.
    Thanks tuya-cloudcutter it should be possible to program them without opening the case.
    Without this tool, it would be quite difficult - especially since the programming pads are covered here and you need to unsolder the module.
    Could they be desoldered without hot air? Probably a long soldering tip in the shape of a spatula (for example made of wire, for a transformer soldering iron) would be fine here, but it was easier for me with hot air.
    By the way, I managed to discover another novelty, namely the WB2L_M1 module, which is basically the same as WB2L but with BK7231N and not 'T'. You have to keep this in mind when programming. If we make a mistake and upload the firmware from the wrong version, we can block the device, especially in the case of OTA.

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 11844 posts with rating 9941, helped 566 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 20084540
    satanistik
    Level 27  
    Or maybe it would be possible to use this module from the bulb for something useful - e.g. a wifi relay. A colorful lamp is fun for max 5 minutes ;-) . Recently, I was looking for something to convert my ceiling fan into a remote control.


    Quote:
    Paweł, Piotr, Patryk, Przemek - I don't know your name, maybe stay with some short greeting in the style of Hello!
    I am reading your posts again and somehow I can't digest the words "... my dear", apart from that pronouns in the headings are written with capital letters.

    This electrode Polish is already an icon of portals with memes. A bit like with the municipal police - I did not get to the police, at least I fail - in the Polish language forum I have no chance, I will survive on electricians ;-) .
  • ADVERTISEMENT
  • #3 20084565
    p.kaczmarek2
    Moderator Smart Home
    @satanistik The cheapest LED bulb with BK7231 in our country was probably for PLN 15 in Action, but with only brightness control, without RGB or CW.
    I don't know how much the cheapest Sonoff clone is now (they are rather ESP, but that's a plus, because it's a solid platform, supported for years), but they are also probably not expensive. On the Polish auction portal PLN 27:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]

    If we assume these prices, i.e. a sonoff clone for PLN 27 and a LED bulb from BK7231 with Action for PLN 15 (but now it is for PLN 20), theoretically you can "fight" for this saving, I don't know, less than a nozzle, by adding a relay (and transistors and the rest) from electronic scrap, because my OpenBK allows you to configure this easily but in my opinion it would be just fun and it would be easier to buy a ready Sonoff from ESP or some clone of it (probably from BK).

    UNLESS you would like to additionally control the relay from this LED lamp - also possible, you just find a free pin of the WiFi module, give it the Relay role in OpenBeken and a free channel (e.g. 7, because channels 0 1 2 3 4 are mapped to RGBCW) and you can also control with it from Home Assistant.


    As for more interesting applications, for example, my OpenBK on BK7231T / BK7231N already supports I2C and port expander, so if you want to play more sensibly, it's enough such a module as from this LEDówki , MCP23017 and e.g. module 8 or 16 relays from China and then you do:
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    In the picture above there is a factory Tuya 4 relays controller on WB3S (BK7231T) with MCP23017 (and other features on I2C) added by me, which supports my OpenBeken. OpenBeken allows you to properly control the MCP23017 pins and additionally display them for MQTT / Home Assistant, i.e. in fact we have control of additional 16 relays.

    @satanistik returning to this LEDówki, I have seen other modifications, here someone used the free pins and brought out a button:
    http://www.hackspace.io/smart-bulb-smart-switch-smart-lamp/
    Two difficult to program Tuya WiFi smart LED lamps - E14 and E27 [WB2L_M1]
    This is on Tasmota and ESP8266, but my OpenBeken allows it to be done on BK7231.
    Although in my opinion this is not a good practice, if the power supply in the lamp is transformerless, then there may be a phase on this button and this is absolutely unacceptable.

    But in general, with my OpenBeken you can change the products on the BK7231 WiFi modules (and a little bit also XR809 and BL602), without any programming, you simply set another relays / buttons / PWMs / LEDs / ADCs via the HTTP form, or configure with the driver script.


    PS: Yes, now I feel like someone might ask ok, but what if we already have this "smart led tube" in the lamp on the ceiling, does it mean that I can no longer use the light switch of what I have on the wall?
    And that's a very good question - but there is also a solution to it. If we replace the flush switch with a 'smart' one, e.g. with Tasmota (now also with OpenBeken), then we can use Tasmota Device Groups to sensibly control it and from the switch level and from the Home Assistant
    https://www.youtube.com/watch?v=Bp1BsTe2zyY
    Tasmota Device Groups are supported by my OpenBeken (I implemented their multicast protocol over UDP and in my Tasmota ecosystem it can "talk" with OpenBK)
    Helpful post? Buy me a coffee.
  • #4 20084579
    satanistik
    Level 27  
    I know that you won't get much in terms of price - but it's like building an amplifier, with the time devoted to it, you could make some extra money at the construction site and buy something on the Allegro. Now, in the time of crisis on the components market, doing something from recovery takes on a new meaning - e.g. atmega8 in tme is at least 2023. In addition, for example, I have 3 speeds and 3 bulbs in the fan - that is 6 outputs and additionally the speeds cannot be turned on 2 at the same time. Well, I have to do the shallow anyway, because there is little space ;-) .
  • ADVERTISEMENT
  • #5 20084615
    Piotrek1970
    Level 18  
    satanistik wrote:
    fans
    Oh darling, correct it as soon as possible, because even though I'm not good at spelling :-) it is such a sight that "blackened" my eye.
  • #6 20085302
    chemik_16
    Level 26  
    the cheapest with ESP inside, at the moment are the "LED smart DGM L-WT9W1" bulbs, about PLN 9-10, so practically at the price of ESP, we can get the entire module with 8266, a converter without separation 230V-> 5V, about 10W and a circle with LEDs and a PWM driver for them; p

    from DGM PP-W162 sockets, also esp.
  • ADVERTISEMENT
  • #7 20085364
    p.kaczmarek2
    Moderator Smart Home
    @ chemik16 great information, I will be happy to check it, order it and post it on the forum. It is worth promoting products with ESP, because something has been harder to hit on IoT recently. However, I can see that "DGM L-WT9W1" is on the Polish auction portal for PLN 15, not 9-10.
    Helpful post? Buy me a coffee.
  • #8 20088361
    chemik_16
    Level 26  
    p.kaczmarek2 wrote:
    is on the Polish auction site for PLN 15, not 9-10.

    a month ago I took the whole carton after 9.90 and a little at the beginning of the year, but I can see that they are actually selling the leftovers, the sockets were in RTV stores for ~ PLN 30, but I also see no longer available. DGM are products from the times of the beginning of IoT and were sold after various ladybugs years ago, they probably do not make them anymore ...

Topic summary

The discussion revolves around the programming challenges associated with Tuya Smart LED lamps (E14 and E27) utilizing the WB2L_M1 (BK7231N) modules, particularly due to obscured UART pads. The author proposes an alternative method for firmware modification using tuya-cloudcutter, allowing the installation of OpenBeken firmware, akin to Tasmota, without disassembling the lamps. Participants share insights on the cost-effectiveness of using these modules for DIY projects, comparing them to other smart devices like Sonoff clones and discussing the availability and pricing of various smart bulbs in Poland. The conversation highlights the potential for repurposing components and the evolving market for IoT devices.
Summary generated by the language model.
ADVERTISEMENT