
Here is how you can flash a T34-based wall switch with OpenBeken. This switch has no programming pads available, so desoldering T34 in QFN case is required.
Purchased from AliExpress: https://www.aliexpress.com/item/1005005732402318.html


Nothing special in the box, comes with a capacitor and some screws, and a wiring diagram.


Teardown is very straightforward, a flat head screwdriver is all that is required: Just gently lever the front glass off (There is an opening at the bottom for this purpose). Removing the motherboard is as simple as unclipping 4 plastic clips and lifting it up. It is joined to the back via 6 pins.




Flashing is a lot less straightforward. This switch came patched for the cloudcutter exploit. (Firmware 1.3.10).
The 4 pads on the board don't appear to be connected to the T34 which is the brains of the operation. The far right pad is 3.3V, the one next to it is GND, unsure of the other two.
All the pins of the T34 are hidden, so flashing is non-trivial. I had to hot air desolder it, solder some jumper wires, and then dump/flash it via bk7231flasher. Miraculously, I managed to resolder it successfully. This is not for the faint of heart.
The dump also failed to extract the tuya config, but I was able to reverse it via inspection.

OpenBeken config is:
{
"vendor": "Tuya",
"bDetailed": "0",
"name": "Tuya Generic Touch Light Switch 3 Gang",
"model": ???",
"chip": "BK7231N",
"board": "",
"flags": "1024",
"keywords": [
"T34",
],
"pins": {
"8": "WifiLED;55",
"14": "Rel;1",
"22": "Btn;3",
"23": "Btn;2",
"24": "Btn;1",
"26": "Rel;2",
"28": "Rel;3"
},
"command": "",
"image": "https://obrazki.elektroda.pl/2902642800_1708303164.jpg",
"wiki": "https://www.elektroda.com/rtvforum/viewtopic.php?p=20968165"
}
ESPHome Config:
esphome:
name: lightswitch-3gang
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "REPLACEME"
ota:
password: "REPLACEME"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
fast_connect: true
reboot_timeout: 0s
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
password: !secret wifi_password
captive_portal:
button:
- platform: restart
name: "Restart"
sensor:
- platform: wifi_signal
name: "WiFi Signal Sensor"
update_interval: 60s
bk72xx:
board: generic-bk7231n-qfn32-tuya
binary_sensor:
- platform: gpio
id: binary_switch_1
pin:
number: P22
inverted: true
mode: INPUT_PULLUP
on_press:
then:
- switch.toggle: switch_1
- platform: gpio
id: binary_switch_2
pin:
number: P23
inverted: true
mode: INPUT_PULLUP
on_press:
then:
- switch.toggle: switch_2
- platform: gpio
id: binary_switch_3
pin:
number: P24
inverted: true
mode: INPUT_PULLUP
on_press:
then:
- switch.toggle: switch_3
switch:
- platform: gpio
id: switch_1
name: Relay 1
pin: P28
- platform: gpio
id: switch_2
name: Relay 2
pin: P26
- platform: gpio
id: switch_3
name: Relay 3
pin: P14
status_led:
pin:
number: P8
inverted: true # Inverting enables the key backlights.
Hope this is helpful to someone, but I would strongly advise not purchasing this one. With the T34 package, and no exposed pads or silk screen, these are non-trivial to flash.
Cool? Ranking DIY