logo elektroda
logo elektroda
X
logo elektroda

[FL_M99_V3/BK7231N] Typical LXU402 relay module for PLN 30, controlled via WiFi

p.kaczmarek2 3213 1

TL;DR

  • Typowy moduł przekaźnikowy LXU402/FL_M99_V3 za ok. 30 zł z Wi‑Fi+BT na BK7231N został rozebrany i przeflashowany.
  • W środku znaleziono płytkę FL-S63-V1.0, przekaźnik Y3F-105DM, bezpiecznik, warystor oraz zasilacz BP2525 i AMS1117-3.3V.
  • Najłatwiej programuje się go po wylutowaniu modułu, z podaniem 3.3V, GND, RX i TX oraz użyciem BK7231GUIFlashTool.
  • Po wgraniu OpenBeken urządzenie działa, a Tuya identyfikuje je jako CB2S; autor zaleca też PowerSave 1 ze względu na słaby zasilacz.
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Relay module with FL-S63-V1.0 casing on a wooden surface
    I invite you to a short presentation of the interior and the process of changing the firmware of a typical relay module, which is, in a sense, a Sonoff clone based on the WiFi+Bluetooth BK7231N microcontroller.

    Purchase LXU402
    A reader sent me several pieces of this relay so that I could upload it OpenBeken ,
    As far as I know, he bought them in a Polish store, but this offer is no longer available. This is not a problem, as there are many other offers with LXU402:
    White relay module LXU402 with ON/OFF label and technical specifications.
    So let`s see what this product looks like in practice:
    Package of LXU402 relay module with power and certification information. LXU402 relay box with description and barcode Smart Breaker relay module packaging
    The dot next to WiFi+BT (and not next to WiFi itself) indicates that there is probably no ESP8266 inside, but there may be BK7231:
    White box with Wi-Fi and Bluetooth LE marking on a wooden background.
    Set contents:
    Wi-Fi ON/OFF relay module and mounting components on a table
    Instruction:
    Smart Breaker user manual on a table. User manual for the LXU402 relay module.
    I will skip the test with the Tuya application, it has been tested many times.

    LXU402 interior
    We look inside:
    Open LXU402 relay module with visible electronic components on the PCB.
    PCB name: FL-S63-V1.0
    You can see here the place for the radio system, the SOIC8 element and the resonator. Y3F-105DM relay:
    Close-up of the interior of the LXU402 relay module showing the PCB. PCB board of the LXU402 relay with electronic components.
    At least there is a fuse and a varistor at the input.
    Interior of the relay module marked FL-S63-V1.0
    The entire BP2525 power supply (as usual! Non-isolated power supply, step down from the mains) and AMS1117-3.3V:
    Close-up view of electronic components on a printed circuit board. Close-up of the relay module interior with electronic components.
    The current paths are bold (the relay cuts off only one wire):
    View of the bottom side of the LXU402 relay PCB.

    ADVERTISEMENT




    LXU402 firmware change
    The easiest way is to desolder the module. All you need is flux and braid. This saves us from problems like "we have a button with a capacitor on TXD1 and it interferes with programming":
    FL-S63-V1.0 PCB with soldered wires on a wooden background.
    Desoldered:
    PCB with pin labels, including 3.3V, GND, RX1, TX1. Photo of a WiFi module with a BK7231N microcontroller. Close-up of the FL_M99_V3 PCB with the BK7231 chip.
    GPIOs are signed - we need 3.3V, GND, RX and TX.
    We upload the batch according to:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    First I whitened the pads:
    Electronic module with labeled pins on a blue PCB board.
    Then I soldered the cables:
    Relay module with four soldered wires on a table.
    Here is my USB to UART and LDO 3.3V converter to power the WiFi module:
    Prototype breadboard with wires and a USB module.
    LXU402 relay module PCB with desoldered and soldered chip.
    FL-S63-V1.0 relay board with soldered WiFi module wires.
    After performing the power off/on cycle, the flasher correctly programs this module and loads OpenBeken, having previously read the Tuya configuration:
    Code: JSON
    Log in, to see the code

    Interestingly, the FL_M99_V3 module is seen by Tuya as CB2S .
    Verbal description:
    
    Device configuration, as extracted from Tuya: 
    - Button (channel 1) on P23
    - Pair/Toggle All Button on P7
    - WiFi LED on P8
    - Relay (channel 1) on P6
    Device seems to be using CB2S module, which is using BK7231N.
    And the Tuya section starts, as usual, at 2023424
    

    OBK template generated by https://openbekeniot.github.io/webapp/templateImporter.html:
    Code: JSON
    Log in, to see the code

    After uploading OBK, you can, for example, pair with HA (Home Assistant Discovery) according to the guide on the Elektroda YT channel: https://www.youtube.com/@elektrodacom

    Summary
    Simple and fast flashing. Probably even simpler than in the case of ESP, because I soldered only 4 cables and not 5, and my BK7231 Easy Flasher detected the GPIO template itself, and in the case of Tasmota you would probably have to guess it manually, i.e. either test the pins one by one or trace the paths. This way, another device was freed from the cloud:
    PS: Due to the poor quality and performance of power supplies in this type of products, I recommend turning them on in OBK PowerSave 1 to slightly save the capacitor at the converter output. This capacitor has happened several times I had to replace it ...

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14612 posts with rating 12630, helped 655 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 20883027
    marik_te
    Level 22  
    Posts: 666
    Help: 29
    Rate: 57
    As a curiosity, Sonoff`s photos. The housing is identical from the outside, but a completely different structure inside. And the price is almost the same.
    Image of a Sonoff electronic board on black pants, showing various components. Close-up of a Sonoff circuit board held in hands.
📢 Listen (AI):

FAQ

TL;DR: With 4 wires and a 3.3V UART setup, this LXU402 relay is a fast OpenBeken target; the author’s verdict is: "Simple and fast flashing." This FAQ helps DIY smart-home users reflash the FL_M99_V3/BK7231N module, map its GPIOs, and avoid mains-side mistakes on a typical PLN 30 Tuya-style relay. [#20879297]

Why it matters: This thread shows a repeatable way to replace Tuya cloud firmware with local OpenBeken control on a cheap single-relay Wi‑Fi module.

Feature LXU402 / FL_M99_V3 Sonoff shown in reply
Outside housing Similar shell Similar shell
Internal design FL-S63-V1.0 board, BP2525 supply, FL_M99_V3 radio module "Completely different" internal structure
Firmware path in thread OpenBeken flashing demonstrated No flashing procedure shown
Price comment Typical PLN 30 class "Almost the same" price

Key insight: Desoldering the Wi‑Fi module is the cleanest programming method here because it avoids board-side interference and lets the flasher read the Tuya pin map automatically. [#20879297]

Quick Facts

  • The relay module is presented as a typical PLN 30 Wi‑Fi relay, sold under the LXU402 model name and built around a BK7231N-based radio module. [#20879297]
  • The main power chain uses a BP2525 non-isolated mains step-down supply plus an AMS1117-3.3V regulator, so the low-voltage side is not safely isolated from AC mains. [#20879297]
  • The board-level identifiers shown are FL-S63-V1.0 for the PCB and FL_M99_V3 for the radio module, while Tuya identifies the module class as CB2S. [#20879297]
  • OpenBeken pin mapping from the extracted template is specific: P6 relay, P8 WiFi LED, P23 main button, and P7 toggle-all/pair button. [#20879297]
  • The author flashed the module with 4 wires3.3V, GND, RX, TX—and recommends the OpenBeken command PowerSave 1 to reduce stress on the converter-output capacitor. [#20879297]

How do I flash OpenBeken onto the LXU402 relay module with the FL_M99_V3 or BK7231N board step by step?

You flash it by removing the Wi‑Fi module, wiring only 4 serial lines, and programming it at 3.3V. 1. Desolder the FL_M99_V3 module with flux and braid. 2. Solder wires to 3.3V, GND, RX, and TX on the labeled pads. 3. Use the BK7231 GUI flasher, power-cycle the module, and load OpenBeken after reading the Tuya configuration. The author reports the flasher detected the GPIO template automatically after the power off/on cycle. [#20879297]

What is the BK7231N microcontroller, and how does it differ from the ESP8266 in smart relay modules like the LXU402?

The LXU402 uses BK7231N, not ESP8266. "BK7231N" is a Wi‑Fi plus Bluetooth microcontroller that runs the relay module’s radio and control logic, with the key characteristic that Tuya-class devices often identify it through CB2S-style modules rather than ESP8266 boards. In this thread, the package marking and WiFi+BT labeling suggested BK7231, and the author says flashing was simpler than some ESP cases because he used 4 wires instead of 5 and the tool detected the GPIO layout automatically. [#20879297]

Why is the FL_M99_V3 module in the LXU402 detected by Tuya as a CB2S module?

Tuya detects it as CB2S because the extracted device configuration explicitly reports "module":"CB2S". The author notes that the physical module is marked FL_M99_V3, yet Tuya still classifies it as CB2S, and the verbal summary states that this CB2S-class module uses BK7231N. In practice, that means OpenBeken users should trust the Tuya dump for pin mapping even if the silkscreen name differs. [#20879297]

Which GPIO pins on the LXU402 are used for the relay, WiFi LED, main button, and toggle-all button in OpenBeken?

OpenBeken maps the LXU402 pins as P6 relay, P8 WiFi LED, P23 main button, and P7 toggle-all or pair button. The generated OBK template lists 6: Rel;1, 7: Btn_Tgl_All;0, 8: WifiLED_n;0, and 23: Btn;1. The Tuya dump and the verbal pin summary in the post match this exact mapping. [#20879297]

What is OpenBeken, and why do people replace the stock Tuya firmware with it on devices like the LXU402?

OpenBeken is replacement firmware used here to take the LXU402 off the Tuya cloud and into local control. "OpenBeken" is firmware that replaces stock Tuya software, controls GPIO-based functions locally, and adds features such as template-based pin mapping and Home Assistant discovery support. The author frames the result as freeing "another device" from the cloud, and he shows a ready OBK template plus an HA Discovery path after flashing. [#20879297]

Why is desoldering the WiFi module the easiest way to program this LXU402 relay board?

Desoldering the Wi‑Fi module is easiest because it removes board-side interference during serial flashing. The author says this avoids problems like a button with a capacitor on TXD1 interfering with programming. It also exposes clearly labeled pads for 3.3V, GND, RX, and TX, which simplifies setup and reduces guesswork during flashing. [#20879297]

How do I connect a USB-to-UART adapter and 3.3V LDO correctly when flashing a BK7231N relay module?

Connect the UART only to the removed radio module and power it from a separate 3.3V LDO. 1. Solder wires to the module pads marked 3.3V, GND, RX, TX. 2. Use the USB-to-UART adapter for serial RX/TX and common ground. 3. Feed the module from the 3.3V regulator, then perform a power off/on cycle so the flasher can detect and program it. The post shows a USB-to-UART adapter and a dedicated 3.3V LDO used exactly this way. [#20879297]

What does the Tuya configuration dump reveal about the LXU402 hardware and pin mapping?

The Tuya dump reveals that the device is a 1-channel relay design using a CB2S module class and specific GPIO assignments. It lists rl1_pin as 6, bt1_pin as 23, total_bt_pin as 7, and netled1_pin as 8. The post’s verbal decode confirms those as relay, main button, toggle-all button, and Wi‑Fi LED, and it says the Tuya section starts at address 2023424. [#20879297]

Why does the author recommend enabling the OpenBeken command PowerSave 1 on this type of relay module?

He recommends PowerSave 1 to reduce stress on the power supply output capacitor. The post says these relay modules often use weak converter sections, and he specifically advises enabling PowerSave 1 to "slightly save the capacitor" at the converter output. He adds that he has had to replace that capacitor several times in similar products, which makes this a practical reliability tweak. [#20879297]

What safety concerns should I know about before working on the LXU402, especially with its non-isolated BP2525 mains power supply?

Treat the entire board as mains-referenced because its BP2525 supply is non-isolated. The post identifies it as a non-isolated power supply, step down from the mains, and also notes only one conductor is switched by the relay. That means bench work, probing, and flashing on the assembled board carry real shock risk, especially if AC is connected. [#20879297]

How does the LXU402 relay module compare with a Sonoff module when the outside housing looks the same but the internal design is different?

The housings look alike, but the internal construction is not the same. The reply states the Sonoff shown has an identical outside housing, a completely different structure inside, and a price almost the same as the LXU402 class device. In this thread, only the LXU402 gets a full teardown and OpenBeken flashing path, so the comparison is visual and structural, not a full electrical benchmark. [#20883027]

What is a non-isolated power supply in smart switches, and why does it matter during flashing and testing?

A non-isolated power supply means the low-voltage electronics are not galvanically separated from AC mains. "Non-isolated power supply" is a mains step-down circuit that powers logic without transformer isolation, with the key characteristic that the low-voltage side can remain electrically tied to dangerous mains potential. In this LXU402, the author identifies a BP2525 non-isolated supply, which is why he flashes the removed Wi‑Fi module separately at 3.3V instead of programming the live mains board. [#20879297]

How can I import or create an OpenBeken template for the LXU402 using the Tuya data and template importer web app?

You can create the template by feeding the extracted Tuya pin data into the OpenBeken template importer. The thread shows a generated OBK template for model LXU402, chip BK7231N, board FL_M99_V3, with pins 6, 7, 8, and 23 assigned to relay, toggle-all, Wi‑Fi LED, and button. It also includes the recommended command PowerSave 1, which makes the imported template immediately usable. [#20879297]

What problems can a button connected through a capacitor on TXD1 cause during programming of BK7231N modules?

It can block or disturb serial flashing on the TXD1 line. The author names this exact failure mode: a button with a capacitor on TXD1 can interfere with programming, which is why he prefers removing the module before flashing. In practice, that kind of loading can stop reliable communication until you isolate the radio board from the rest of the circuit. [#20879297]

How do I integrate a freshly flashed LXU402 running OpenBeken with Home Assistant using HA Discovery?

Use OpenBeken’s HA Discovery after flashing, then follow the Home Assistant pairing guide referenced in the thread. The author states that after uploading OBK, you can pair the module with HA (Home Assistant Discovery) and points to the Elektroda YouTube guide for the procedure. The important prerequisite is that OpenBeken is already running with the correct GPIO template loaded. [#20879297]
Generated by the language model.
ADVERTISEMENT