logo elektroda
logo elektroda
X
logo elektroda

[BK7231N/CBU] WiFi 8046 SmartLED double light switch - firmware, template, guide

p.kaczmarek2 2097 0

TL;DR

  • The CLY701-2G (8046) double smart light switch uses a BK7231N/CBU WiFi module and the same PCB family as the single and triple versions.
  • Inside, a BP2525 power-supply section and two relay-driving transistors sit on a second board, while the touch-button PCB matches the single version.
  • OpenBeken flashing and GPIO auto-configuration were done with BK7231GUIFlashTool over a USB-to-UART adapter, using Tuya JSON extracted from the device.
  • A pair of these switches cost less than PLN 60 on a Polish auction site.
  • The mod removes dependence on Tuya cloud servers, but only the WiFi LED is separately controllable; relays and LEDs are not individually exposed.
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Double smart light switch with WiFi module and Tuya app.
    Some time ago I presented a "single" version this product , today I am adding information about the "double" version. As before - first a description of the interior, and then changing the firmware of the WiFi module, so as to free the product from the cloud, from the manufacturer's servers and gain complete independence. In the topic I will also provide the GPIO configuration of this product, which I managed to generate based on JSON information from Tuya, which I extracted from the batch of this product with my flasher .

    Purchase 2xCLY701-2G (8046)
    As I wrote earlier, a set of these switches came to me from a reader so that I could upload the firmware to them. Then the reader picked them up and thanks to that, I documented them. All of them were bought on a Polish auction website and quite cheaply - the double version for less than PLN 60:
    Smart WiFi Wall Switch Black 2xCLY701-2G with app.
    Specifications of the Smart WiFi Wall Switch Black 2xCLY701-2G (8046)
    Original box:
    Original box of a black Smart LED WiFi 2x wall switch with label and barcode. Original box of Smart Wall Switch 2xCLY701-2G (8046)
    Instruction:
    WiFi switch manual against a cardboard box background. Original box with user manual for WiFi smart switch.
    The set includes mounting screws:
    Black wall switch 2xCLY701-2G in a box with mounting screws


    Interior 2xCLY701-2G (8046)
    The interior is very similar to the single version:
    PCB of the CLY701-1 switch with two touch coils. Disassembled casing of the 2xCLY701-2G product showing the PCB. Black casing plate with C1442 marking
    Only that in the single version there is a "middle" button soldered, and here there are two extreme ones. Probably the triple version has all three soldered on. The PCB design is common to all versions.
    The WiFi module is also a CBU:
    Disassembled WiFi module and PCB of the 2xCLY701-2G (8046) switch.
    On the second board there is a power supply section (based on BP2525), you can also see two transistors for controlling the relays, the relays are not visible in the photo because they are on the other side of the PCB.
    Close-up of a PCB circuit with electronic components and soldering points. Interior of PCB in double switch 2xCLY701-2G (8046) Close-up of a printed circuit board (PCB) with electronic components inside the 2xCLY701-2G switch.
    The PCB itself with touch buttons and the WiFi module is very similar to the "single" version:
    Device circuit board with WiFi module. Close-up of a circuit board with electronics and a WiFi module. Close-up of the circuit board of a 2xCLY701-2G wall switch with electronic components and a WiFi module. Close-up of a circuit board with electronic components and a connector. Green printed circuit board with a WiFi module and various electronic components.


    Firmware change
    Both uploading OpenBeken , as well as automatic GPIO configuration will be performed by my tool:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    Just connect the USB to UART converter according to the instructions from the link.
    Flashing cheat:
    Connection diagram for the CBU (BK7231N) module with flashing instructions.
    My connection in practice:
    PCB board connected to USB to UART converter on a wooden background. Close-up of a WiFi module with several wires connected to a PCB.
    I extracted the following configuration from the Tuya partition:
    Code: JSON
    Log in, to see the code

    which translates into the OBK template:
    Code: JSON
    Log in, to see the code

    Unfortunately, this switch does not have separate LEDs and relays, the only LED that we can control separately is the one for WiFi.

    Summary
    Hassle-free and as in "single" version . Another device free from the cloud.
    Finally, I can only add that I prefer to buy "triple" versions of switches, because after changing the WiFi module firmware, you can use unused touch buttons to control other devices in the house, e.g. to control a 12V LED strip connected above a window or in a bar. The ability to control devices over WiFi and control them at will after a firmware change really opens up a wide range of possibilities that wouldn't make sense electrically otherwise.

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14600 posts with rating 12617, helped 654 times. Been with us since 2014 year.
  • ADVERTISEMENT
📢 Listen (AI):

FAQ

TL;DR: For OpenBeken users converting a Tuya wall switch, this guide covers a 2-gang BK7231N/CBU SmartLED 8046 switch for under PLN 60 and shows a proven template. As the author puts it, "Another device free from the cloud." It solves flashing, GPIO mapping, and relay/button identification in one place. [#20731255]

Why it matters: This FAQ gives a ready-to-use path from stock Tuya firmware to a local OpenBeken setup on the 2xCLY701-2G (8046) switch.

Version Buttons fitted on PCB Relay channels Flashing approach
Single Middle button 1 Same BK7231GUIFlashTool flow
Double Two outer buttons 2 Same BK7231GUIFlashTool flow
Triple All three buttons expected 3 Same PCB family, same general method

Key insight: The most useful result is the extracted OpenBeken template: Relay 1 is on GPIO28, Relay 2 on GPIO9, Button 1 on GPIO20, Button 2 on GPIO16, and the only separately controllable LED is the WiFi LED on GPIO22. [#20731255]

Quick Facts

  • The double 2xCLY701-2G (8046) switch was bought on a Polish auction site for less than PLN 60, making it a low-cost OpenBeken conversion target. [#20731255]
  • The module is a CBU using a BK7231N chip, and the power board includes a BP2525-based supply section plus 2 transistors for relay control. [#20731255]
  • The extracted Tuya JSON reports ch_num: 2, reset_t: 5, firmware-related field jv: 1.0.1, and GPIO assignments for 2 relays, 2 buttons, and 1 WiFi LED. [#20731255]
  • OpenBeken template pins are explicit: GPIO28 = Rel 1, GPIO9 = Rel 2, GPIO20 = Btn 1, GPIO16 = Btn 2, GPIO22 = WifiLED_n. [#20731255]
  • The PCB design is shared across versions: the single version fits the middle button, the double fits the two outer buttons, and the triple version is expected to fit all 3. [#20731255]

How do I flash OpenBeken onto the BK7231N/CBU module in the 8046 SmartLED double light switch?

You flash it with BK7231GUIFlashTool over a USB-to-UART connection. 1. Open the switch and access the CBU module pads. 2. Connect the USB-to-UART adapter exactly as shown in the tool instructions and the flashing diagram. 3. Use BK7231GUIFlashTool to upload OpenBeken and then apply the detected GPIO configuration. The author states that both firmware upload and automatic GPIO configuration are handled by that tool. [#20731255]

What GPIO template should I use for the 2xCLY701-2G (8046) Wall Switch 2 Gang with a BK7231N CBU module?

Use the OpenBeken template named Wall Switch 2 Gang 8046 SmartLED for model 2xCLY701-2G (8046). It sets GPIO9 to Rel;2, GPIO16 to Btn;2, GPIO20 to Btn;1, GPIO22 to WifiLED_n;0, and GPIO28 to Rel;1. The template also identifies the chip as BK7231N and the board as CBU, so it matches the hardware shown in the switch teardown. [#20731255]

Which pins control the two relays and touch buttons on the 8046 SmartLED double switch after converting it from Tuya to OpenBeken?

Relay 1 uses GPIO28, Relay 2 uses GPIO9, Button 1 uses GPIO20, and Button 2 uses GPIO16. The WiFi status LED uses GPIO22 with an active-low WifiLED_n mapping. Those values come directly from the Tuya partition data and the OpenBeken template generated from it, so they are the key pins for configuring the double switch correctly. [#20731255]

What is the CBU module in a Tuya wall switch, and how does it relate to the BK7231N chip?

The CBU module is the WiFi module used in this Tuya wall switch, and in this device it is based on the BK7231N chip. "CBU" is a WiFi module board that integrates the BK7231N platform for Tuya devices, providing the radio and control interface used by the switch firmware. In the teardown photos, the author identifies the WiFi module specifically as a CBU. [#20731255]

What is BP2525 in the power supply section of this SmartLED switch, and what does it do?

BP2525 is the main part in the switch’s onboard power supply section. "BP2525" is a power-supply controller IC that generates the low-voltage power rail for the control electronics, and it sits on the secondary board with the relay-driving transistors. The author explicitly notes that the supply section is based on BP2525 and is separate from the touch-button and WiFi-module PCB. [#20731255]

Why does the 2xCLY701-2G (8046) switch only allow separate control of the WiFi LED and not separate relay status LEDs?

It only exposes separate control for the WiFi LED because the switch does not have independently controllable relay-status LEDs. The author states this limitation directly after generating the OpenBeken template: the only LED that can be controlled separately is the WiFi LED on GPIO22. That means relay indication is not broken out as separate GPIO-driven outputs in this hardware version. [#20731255]

What is stored in the Tuya partition JSON, and how can BK7231GUIFlashTool turn it into an OpenBeken template?

The Tuya partition JSON stores device identity, module type, button pins, relay pins, LED pins, and behavior settings. In this switch, it includes fields such as module: "CBU", bt1_pin: 20, bt2_pin: 16, rl1_pin: 28, rl2_pin: 9, netled_pin: 22, and ch_num: 2. BK7231GUIFlashTool reads that data and translates it into an OpenBeken template with matching GPIO roles, which saves manual pin discovery. [#20731255]

What USB-to-UART wiring is needed to connect and flash the BK7231N-based 8046 SmartLED switch safely?

Use a USB-to-UART adapter and wire it exactly according to the flashing instructions referenced by the author. The post shows both a flashing diagram and real connection photos, and it says to connect the converter “according to the instructions from the link.” For this switch, the practical method is bench flashing through the CBU module pads with USB-to-UART, not through the normal wall-switch mains wiring. [#20731255]

How does the double 2xCLY701-2G (8046) version compare with the single version in terms of PCB layout, buttons, and firmware flashing?

The double version is very similar to the single version in both hardware layout and flashing method. The main PCB is shared, but the single version has the middle button fitted, while the double has the two outer buttons fitted. The WiFi module is still CBU, and the author says flashing OpenBeken and generating GPIO configuration work the same way with BK7231GUIFlashTool. [#20731255]

What differences should I expect between the single, double, and triple SmartLED switch versions if they share the same PCB design?

Expect the same PCB family with different button populations and channel counts. The author says the single version solders the middle button, the double solders the two outer buttons, and the triple version is expected to have all 3 buttons soldered. That shared design means firmware conversion should stay broadly similar, while GPIO use changes with the number of active relays and touch inputs. [#20731255]

How can unused touch buttons on a reflashed triple Tuya wall switch be repurposed to control other devices in OpenBeken?

You can map unused touch buttons to trigger other WiFi-controlled actions in OpenBeken instead of switching a local mains load. The author gives a concrete example: use an unused button on a triple version to control a 12V LED strip above a window or in a bar. That repurposing is useful after reflashing because it turns spare touch inputs into general-purpose controls for other devices in the home. [#20731255]

What troubleshooting steps help if BK7231GUIFlashTool cannot read or flash a CBU module in a Tuya wall switch?

First, verify the USB-to-UART wiring against the flashing diagram. Second, confirm the module is the CBU version with a BK7231N chip, because the template and process target that hardware. Third, retry with the tool’s documented connection method before changing GPIO assumptions. A common failure case is treating the device like a different Tuya module or using the wrong connection points, which prevents reading the Tuya partition or flashing firmware. [#20731255]

Why would someone replace the original Tuya firmware with OpenBeken on a BK7231N SmartLED switch?

The main reason is to remove cloud dependence and gain full local control. The author states that reflashing lets you free the product from the manufacturer’s servers and “gain complete independence.” In practice, that also exposes GPIO mappings, allows custom button behavior, and makes spare touch inputs on larger switch versions useful for controlling other devices over WiFi. [#20731255]

What practical safety precautions should I take before opening and flashing a mains-powered WiFi wall switch like the 8046?

Disconnect the switch from its normal mains installation before opening it and only flash the WiFi module through USB-to-UART while the PCB is on the bench. The teardown shows exposed power-supply hardware based on BP2525 and relay-control circuitry, so safe handling starts with keeping mains wiring out of the flashing process. Use the separate flashing connection shown by the author instead of powering the wall switch in its installed state. [#20731255]

Where can I find a ready-made OpenBeken template and guide for the Wall Switch 2 Gang 8046 SmartLED with BK7231N/CBU?

You can find both in the same forum post that documents the 2xCLY701-2G (8046) teardown and conversion. It includes the generated OpenBeken JSON template, identifies the board as CBU and chip as BK7231N, and links the flashing workflow to BK7231GUIFlashTool and OpenBeken. The template also includes the device image and the forum wiki/topic reference for this exact 2-gang SmartLED switch. [#20731255]
Generated by the language model.
ADVERTISEMENT