Detailed guide on how to flash the new Tuya Beken Chips with OpenBK7231T

Here is a detailed guide on how to Open Bekenize/flash the new Tuya chips with OpenBK7231T. In this guide I am using an Australian DETA 6922HA-Series 2 Double Power Wall outlet. It uses WB3S - WB3S Module Datasheet-Tuya IoT Development Platform-Tuya Developer.

You will need a Windows OS computer and a USB-to-Serial converter to complete this this.

Happy Days!



It would be nice to include this guide in the main of OpenBKT7321T. If you ask, I’m sure the author will happily add the link in the “Detailed flashing guides along with device teardowns” section.

1 Like

Will do. I will submit a pull request today.


Thank you for doing this.


I never could get the windows bkwriter working and just use the python tool
On another note,you should dump the firmware bin to

Makes it a lot easier to flash openbkt by ota assuming tuya hasn’t patched it


Good point. Is tuya-cloudcutter able to flash custom firmware at the moment? Instructions say not quite yet but I am hoping this is out of date.

These two projects seem a match made in heaven for new Deta products

Yes, you can flash via ota after applying the cloudcutter patch.
There’s a list of devices you can pick (most have similar chip, cbu, cb3s etc) and if the patch doesn’t work you can just dump the tuya firmware bin for the devs to update.
Makes it easy for the next device without having to solder again.


We have released the new UI for OpenBK7231T_App which looks very familiar :wink:. Check it out Release 1.6.1 · openshwprojects/OpenBK7231T_App · GitHub


The link is now included in the

Thanks for the guide. I’m new to HA, but I’ve been watching a heap of HA-related videos for the last month or two. I was completely unaware of a reflash alternative for the WB3S until I came across the ‘Australian certified hardware’ thread the other day. I was half-prepared to buy a solder heat gun and start replacing modules.

I tried getting LocalTuya set up via the iot.tuya integration method the other day, and it’s a major nightmare. It wouldn’t let me retrieve my API password, so I gave up on that. I’d much prefer a cloudless approach.

I tried hooking up my 3-gang Deta wall switch last night, but I think my USB to TTL device from Jaycar doesn’t cut it. I’ve ordered one on eBay that was recommended by the creator of OpenBeken. I just wish I had a 3D printer so that I could print one of those little push-pin jumper templates to avoid soldering altogether.

I’ll report back here once the new CH340G arrives.

BTW, does OpenBeken support power monitoring yet? I have a single Deta power point with power monitoring that I want to use to trigger some more reliable automations when my TV is powered on and off. The LG integration is too slow.

I haven’t had any joy yet either, but have not ruled out a fault my end - have not had enough time to fully trouble shoot.

Hi, is there steps for restoring tuya firmware if I ever need to?
I backed up the firmware.bin from a bk7321n device using bk7231tools from here, extracted the rbl files
But now I’m not sure what’s the next step is.
Do I just flash cb3s_3gang_13july2_app_1.00.bin firmware?

Reading 4k page at 0X21FE000 (99.61%)
Reading 4k page at 0X21FF000 (99.80%)

C:\Users\Keel\Desktop\openbkt\bk7231tools-main>python dissect_dump -e -O cb3s_3gang_13july2.bin
usage: bk7231tools dissect_dump [-h] [-l LAYOUT] [-O OUTPUT_DIR] [-e] [--rbl] file
bk7231tools dissect_dump: error: the following arguments are required: file

C:\Users\Keel\Desktop\openbkt\bk7231tools-main>python dissect_dump -e -O cb3s_test cb3s_3gang_13july2.bin
RBL containers:
        0x10f9a: bootloader - [encoding_algorithm=NONE, size=0xea20] - extracted to cb3s_test\cb3s_3gang_13july2_bootloader_1.00.bin
        0x129f0a: app - [encoding_algorithm=NONE, size=0xe3140] - extracted to cb3s_test\cb3s_3gang_13july2_app_1.00.bin```

There’s support for power monitoring if your device has BL0937 onboard

You could use 3rd party 3d printing service and print this workstation


Great project.
I almost lost hope with my new switches that use BK7231T. Switches are going offline too often with Local Tuya integration.

I have a few Gosund SW2 Dimmer switches. I installed OpenBK on one of these device, but I have no idea how to set up the configuration to make them work with OpenBK.

I also have a few SW5 Gosund switches. I didn’t try flashing them yet, but I have the same question. How to find hot to configure them.


You can do trial and error but have a look at the devices listed in the Quick Setup. Then Google them and see if any of them are similar to your switches. Then try the quick setup as a starting point. Then change configs one at a time until you get the right config for your switch.

OpenBK is currently looking into building a javascript based database for configs which will allow you to add your new configs for others. Similar to Tasmota Blackader.

Seems to be in the Quick Setup already!

Thanks for your effort!
I’m wondering what is the flasher tool doing in detail and why is it windos only?

I think it’s a Tuya tool. There are Python options too. Take a look at the project page on Github: openshwprojects/OpenBK7231T_App: Open source firmware (Tasmota replacement) for BK7231T, BK7231N, XR809 and BL602 (

I managed to get a Deta 3 Gang Switch (6903HA Series 2) flashed and up and running today. I’ve not yet hooked it up to HA via MQTT, I’ll do that tomorrow.

DETA 3-Gang 6903HA Series 2_small

Buttons, Relays, and WiFi status LED all configured after a bunch of head scratching and trial and error. I’ll add a pull request to the repo to get the device template added later. For now, these are the pinouts:

Relay 1: GPIO8
Relay 2: GPIO26
Relay 3: GPIO24
Button 1: GPIO14
Button 2: GPIO9
Button 3: GPIO10

WiFi LED (WifiLED_n): GPIO1
1 Like

Great work! The OpenBK7231T_App should generate the MQTT settings for Home Assistant for you. Then copy that and add it to your configuration.yaml. If you have MQTT setup with Home Assistant already this should be 1 minute work. Good luck!