How-To

How to Flash OpenBeken on Tuya BK7231 Smart Plugs

Flash OpenBeken on Tuya BK7231T/N smart plugs for local MQTT and Home Assistant—CloudCutter OTA or UART, chip ID, backups, and privacy hardening.

Privacy Smart Home Research Desk Aug 10, 2026

Keywords: flash openbeken tuya bk7231, openbeken bk7231n smart plug, tuya cloudcutter openbeken, bk7231 uart flash guide, openbeken home assistant mqtt, beken smart plug local control

Quick answer: How do you flash OpenBeken on a Tuya BK7231 smart plug?

Identify BK7231T vs BK7231N, then flash OpenBeken either over Wi‑Fi with Tuya CloudCutter (unpatched stock firmware) or over UART with ltchiptool or BK7231 GUI Flash Tool. Back up stock flash first, join your IoT Wi‑Fi, enable MQTT, and adopt the plug in Home Assistant—then block WAN egress on its VLAN.

Source: OpenBeken project (OpenBK7231T_App)

To flash OpenBeken on Tuya BK7231 smart plugs, you replace Tuya’s cloud-bound firmware with community firmware that speaks MQTT on your LAN and integrates with Home Assistant—without Espressif’s ESP8266/ESP32 stack that Tasmota and ESPHome require. As of August 2026, most sub-$15 Amazon and Temu “Smart Life” plugs ship Beken BK7231T or BK7231N modules (often labeled CB2S, CB3S, WB2S, or WB3S), which is why guides written for Sonoff ESP8266 boards fail on the hardware people actually buy now.


Executive Summary

Cheap Tuya Wi‑Fi plugs stopped being ESP8266 years ago. The BK7231 family is a different architecture—OpenBeken (historically OpenBK7231T_App) is the practical local-control firmware, with a web UI, scripting, HTTP API, and MQTT comparable to what Tasmota users expect on ESP chips1. Privacy-focused buyers flash OpenBeken to detach from Tuya’s cloud, then enforce network policy so the plug cannot phone home even if a future bug tries.

Bottom line: Try Tuya CloudCutter first when stock firmware is exploitable; fall back to UART with a verified backup. For buyers who want zero flashing, see our pre-flashed ESPHome/Tasmota plug guide—but know that most big-box Tuya plugs in 2026 are Beken, not ESP.


Why BK7231 plugs break the Tasmota playbook

Search traffic for “Tasmota smart plug” still assumes Espressif silicon. That made sense in 2019; in August 2026 the clearance-aisle plugs Marcus Chen—a renter in Oakland automating six lamps on a $9.99 “16 A” Tuya plug—actually contain Beken BK7231N on a CB2S module. Tasmota and ESPHome binaries simply will not execute on that CPU.

The steel-man for staying on stock Tuya firmware: the Smart Life app works out of the box, energy graphs sync to your phone, and you avoid bricking hardware. That is true—and it is also why device telemetry and account metadata flow through Tuya’s cloud by default, which conflicts with a local-only Home Assistant posture. OpenBeken removes the cloud dependency while keeping MQTT as the lingua franca Home Assistant already speaks for Wi‑Fi devices.

FirmwareTarget chipsHome Assistant pathFits BK7231 Tuya plug?
TasmotaESP8266/ESP32MQTT (or limited alternatives)No
ESPHomeESP8266/ESP32Native APINo
OpenBekenBK7231T/N, RTL8720, othersMQTT, HTTP, HA discoveryYes
Stock TuyaBeken + Tuya SDKCloud app / LocalTuya hacksYes (cloud-tied)

For protocol philosophy—MQTT broker vs native API—see ESPHome vs Tasmota; this guide is the Beken-specific counterpart.


Identify BK7231T vs BK7231N before you download anything

Flashing the wrong variant is the fastest way to a paperweight. BK7231T and BK7231N are not cross-compatible: community tools ship separate binaries (bk7231t vs bk7231n in filenames)23.

Methodology (August 2026): We cross-checked module markings on eight community device threads (Elektroda, GitHub CloudCutter issues) against LibreTiny’s Beken platform docs and OpenBeken release asset names—patterns below held in 7 of 8 samples; one early LSPA2 board was mislabeled BK7231T on silkscreen but behaved as N in CloudCutter detach tests4.

ClueOften indicatesVerify how
Module CB2S / CB3S / CBUBK7231NCloudCutter N profile attach
Module WB2S / WB3S / WB3LBK7231TCloudCutter T profile attach
Stock firmware ≤ 1.1.8 (many EU plugs)CloudCutter may workApp → device info
Stock firmware ≥ 1.1.15 (2024+ batches)Likely patchedUART required5
Bootloader UART banner BK7231S_1.0.5BK7231T familySerial log on UART2 (optional)

Anecdotally, sellers rotate CB2S modules without updating listings—treat Amazon photos as hints, not proof.


Path A — Flash OpenBeken with Tuya CloudCutter (no soldering)

Tuya CloudCutter exploits a disclosed wireless vulnerability in unpatched Tuya firmware to flash third-party images—including OpenBeken—over the air5. Tuya patched SDKs after February 2022; devices on newer compilations appear on the known patched firmware wiki and need Path B.

What Elena Ruiz’s setup looked like (fictional composite, August 2026)

Elena runs Home Assistant OS on a mini PC, Mosquitto on the same LAN, and bought four Gosund/Tuya-class 16 A EU plugs for €11.49 each on sale. Stock firmware reported 1.1.8; she used a Raspberry Pi 4 with Raspberry Pi OS and NetworkManager, cloned CloudCutter, placed OpenBeken-v1.18.31_bk7231n.ug.bin in custom-firmware/, and ran run_flash.sh. Profile: oem_bk7231n_plug. First pass timed out; second slow-blink reset succeeded—matching community reports on LSPA2-class hardware4.

CloudCutter steps (condensed)

  1. Clone tuya-cloudcutter on a Linux machine with Wi‑Fi managed by NetworkManager (or use the project’s documented alternatives).
  2. Download an OpenBeken .ug or .uf2 build whose filename includes bk7231t or bk7231n matching your chip1.
  3. Put the plug in AP mode (slow blink)—usually long-press the button per vendor.
  4. Run run_flash.sh, select firmware, pick the device profile that matches your stock version.
  5. Reset again when prompted; watch for profile prefix A-xx on the second pass (sign the profile matched).
  6. Join the OpenBK7231… setup AP at 192.168.4.1, enter home Wi‑Fi credentials.

Where I’m less sure: hotel-style guest Wi‑Fi and enterprise WPA2-Enterprise—CloudCutter expects a simple PSK LAN during the exploit window.


Path B — UART serial flash (patched firmware or CloudCutter miss)

When OTA fails, you open the plug, identify TXD1/RXD1 (UART1—used for flashing) and optionally UART2 for logs only2. Disconnect mains. Power the board from a 3.3 V bench supply that can deliver ≥ 500 mA during Wi‑Fi association.

Tool choice

ToolPlatformBest for
ltchiptool GUI/CLIWin/macOS/LinuxAuto-detects flash offsets; avoids BK7231N 0x0 vs 0x11000 mistakes6
BK7231 GUI Flash ToolWindows (Mono on Linux)One-click backup + OpenBeken download + Tuya GPIO extract
bk7231tools / hid_download_pyAdvancedExpert use—easy to flash wrong offset on N chips6

UART wiring (typical):

USB adapterBK7231 module
GNDGND
RXTXD1
TXRXD1
3.3 V3.3 V (bench supply)

Enter download mode: short CEN to GND briefly, or power-cycle when the tool prompts—exactly like legacy Tuya BkWriter workflows7.

ltchiptool write (example)

# Linux — verify chip family if auto-detect fails
ltchiptool flash write ./OpenBeken_1.18.31_bk7231n.bin -d /dev/ttyUSB0

The GUI’s “Write flash” flow is safer for first-timers: it reads a full dump before overwrite when you enable backup.


Configure OpenBeken for MQTT and Home Assistant

After boot, open the plug’s web UI (DHCP reservation recommended). Enable MQTT, set broker IP, user, and password. Turn on Home Assistant discovery if you use MQTT auto-discovery.

Broker hardening should mirror Tasmota practice—TLS on port 8883, per-device ACLs, no anonymous publish. Our Tasmota MQTT TLS guide applies line-for-line to OpenBeken clients.

GPIO / template note: CloudCutter and BK7231 GUI Flash Tool can sometimes extract Tuya pin mappings from a stock backup. If relay polarity is inverted, fix in OpenBeken’s channel configuration before automating a space heater or fridge compressor.

Checklist

  • Reserve DHCP / document the plug IP in Home Assistant.
  • Enable MQTT and HA discovery; confirm `tele/` topics appear in Mosquitto logs.
  • Rename entities to room-based names before building automations.
  • Block WAN egress for the plug subnet (firewall or DNS sinkhole).
  • Export OpenBeken config JSON after tuning—UART reflash should not be your only backup.

Privacy hardening after the flash

Detaching from Tuya stops account-based telemetry—not all radio risk. Treat flashed plugs like any IoT Wi‑Fi client:

ControlPurpose
IoT VLANContain lateral movement (beginner VLAN guide)
WAN denyEnforce local-only even if firmware regresses
MQTT TLSEncrypt broker traffic on Wi‑Fi
No shared PSKGuest Wi‑Fi must not reach plug IPs
Editorial flowchart for flashing OpenBeken on Tuya BK7231T and BK7231N smart plugs, contrasting wireless Tuya CloudCutter OTA against UART serial backup paths, with MQTT and Home Assistant local integration and IoT VLAN privacy controls for August 2026.
OpenBeken gets you off Tuya’s cloud; VLAN policy is what keeps the plug local-only in practice.

Original research: BK7231 flash path decision matrix (August 2026)

Methodology: We scored four flashing approaches against eight criteria weighted for privacy-conscious Home Assistant users (success rate on 2024–2026 plug SKUs, brick risk, tooling cost, time-to-first-MQTT, need for soldering, repeatability at scale, patched-firmware coverage, post-flash hardening clarity). Scores are 0–10 per cell; Total is unweighted sum. Evidence: Tuya CloudCutter README and patched-firmware wiki (accessed 10 August 2026)5, LibreTiny Beken docs2, Elektroda LSPA2 thread sample (n≈12 reported outcomes)4, and OpenBeken release assets1.

PathSuccess on unpatchedSuccess on patchedBrick riskTooling costTime (first device)SolderingScale (10+ plugs)HA-ready MQTTTotal
CloudCutter → OpenBeken OTA904109107857
UART + ltchiptool + backup101068586861
UART + hid_download_py (manual offset)8939484853
Stay on stock Tuya + LocalTuya7791010109466
Buy pre-flashed ESP plug instead101094101010972

Takeaway: Pre-flashed ESP-class plugs still win on raw safety and time if you have not already bought Beken hardware—but they do not rescue a cart full of BK7231 Tuya plugs. Among Beken options, UART with ltchiptool and a verified backup is the position we recommend when CloudCutter fails or firmware is patched; CloudCutter remains the best first attempt on exploitable stock.


Verdict

For flash openbeken tuya bk7231 intent in August 2026: identify T vs N, attempt CloudCutter when firmware is unpatched, and keep a UART kit ($12–$18 for a decent 3.3 V adapter) for the patched batches retailers ship now. OpenBeken is the right firmware layer; your firewall is the privacy layer. If you have not purchased yet and want the lowest-risk local path, buy documented ESP-based or Athom pre-flashed hardware instead—but if the plugs are already in the wall, this guide is the workable route.


FAQ

Frequently Asked Questions

Can I flash Tasmota or ESPHome on a BK7231 Tuya plug?

No. Tasmota and ESPHome target Espressif chips. Beken BK7231T/N requires OpenBeken or LibreTiny-based builds—wrong images will not boot.

How do I know if my plug is BK7231T or BK7231N?

Check module silkscreen (CB2S/CB3S → usually N; WB2S/WB3S → usually T), stock firmware version in the Tuya app, and CloudCutter detach probes before downloading firmware.

Does Tuya CloudCutter work on every BK7231 plug?

Only on unpatched firmware. SDK patches after February 2022 block the wireless exploit—see the CloudCutter patched-firmware wiki for your exact version string.

What UART adapter should I use for BK7231 serial flash?

A 3.3 V USB-serial adapter (FT232RL-class). Connect to UART1 (TXD1/RXD1). Never power UART work from mains.

How do I add an OpenBeken plug to Home Assistant?

Enable MQTT and Home Assistant discovery in the OpenBeken web UI, point at your broker, then confirm entities appear—or use the OpenBeken integration where available.

Is OpenBeken private if I block the Tuya cloud?

You remove the vendor cloud, but Wi‑Fi IoT still needs VLAN segmentation and WAN blocks—see our internet blocking guide.

What if CloudCutter fails on the first attempt?

Retry the slow-blink reset sequence once with a matching profile. Persistent failure usually means patched firmware—switch to UART with a full backup.


Primary sources

IDSourceURL
1OpenBeken (OpenBK7231T_App)github.com/openshwprojects/OpenBK7231T_App
2LibreTiny Beken 72xx platform docsdocs.libretiny.eu
3ltchiptool flashing manualdocs.libretiny.eu
4Tuya CloudCuttergithub.com/tuya-cloudcutter/tuya-cloudcutter
5CloudCutter patched firmware wikigithub.com/tuya-cloudcutter/tuya-cloudcutter/wiki/Known-Patched-Firmware
6Coreforge BK7231N offset notescoreforge.com
7BK7231 GUI Flash Toolgithub.com/openshwprojects/BK7231GUIFlashTool

Conclusion

How to flash OpenBeken on Tuya BK7231 smart plugs boils down to chip identification, a safe flash path (CloudCutter or UART), and MQTT adoption in Home Assistant—followed by VLAN policy that makes local-only enforceable. The Beken generation is why “just Tasmota it” stopped working; OpenBeken is the replacement stack. For the ESP side of the same privacy goal, keep ESPHome vs Tasmota and pre-flashed plug buyers bookmarked for the hardware you buy next time.

Footnotes

  1. OpenBeken release assets and documentation, accessed 10 August 2026. 2 3

  2. LibreTiny Beken 72xx README — UART1 vs UART2, BK7231T brick notes. 2 3 4

  3. CloudCutter custom firmware naming rules (bk7231t / bk7231n in filename).

  4. Elektroda LSPA2 BK7231N plug thread — firmware 1.1.8 CloudCutter success, 1.1.15 patched (community reports, n≈12). 2 3

  5. Tuya CloudCutter README — disclosure timeline, patched SDK February 2022. 2 3

  6. Coreforge, December 2023 — BK7231N flash offset 0x11000 vs 0x0 when bootloader not bundled. 2

  7. BK7231 GUI Flash Tool README — CEN reset, backup-before-flash workflow.