Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tam
tuyaMcu_defWiFiState 4
Starting write test!
Now is: piątek, 24 stycznia 2025 15:16:49.
Flasher mode: BK7231N
Going to open port: COM5.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus success!
Going to set baud rate setting (921600)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 1560EB
Will now search for Flash def in out database...
Flash def found! For: 1560EB
Flash information: mid: 1560EB, icName: TH25Q16HB, manufacturer: TH, szMem: 1000000, szSR: 2, cwUnp: 0, cwEnp: 7, cwMsk: 407C, sb: 2, lb: 5, cwdRd: 05-35-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 0
sr: 0
final sr: 0
msk: 407c
cw: 0, sb: 2, lb: 5
bfd: 0
SetProtectState(True) success!
Going to read encryption key...
Encryption key read done!
Encryption key: 510fb093 a3cbeadc 5993a17e c7adeb03
Erasing sector 0x1D0000... ok!
All selected sectors erased!
Writing sector 1900544... ok! Starting CRC check for 1 sectors, starting at offset 0x1D0000
CRC matches 0x890D0AC8!
Write success!
Starting read!
Read parms: start 0x1D1000 (sector 465), len 0x1000 (1904640 sectors)
Now is: piątek, 24 stycznia 2025 15:17:17.
Flasher mode: BK7231N
Going to open port: COM5.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus success!
Going to set baud rate setting (921600)!
Will try to read device flash MID (for unprotect N):
Flash MID loaded: 1560EB
Will now search for Flash def in out database...
Flash def found! For: 1560EB
Flash information: mid: 1560EB, icName: TH25Q16HB, manufacturer: TH, szMem: 1000000, szSR: 2, cwUnp: 0, cwEnp: 7, cwMsk: 407C, sb: 2, lb: 5, cwdRd: 05-35-FF-FF, cwdWr: 01-FF-FF-FF
Entering SetProtectState(True)...
sr: 0
sr: 0
final sr: 0
msk: 407c
cw: 0, sb: 2, lb: 5
bfd: 0
SetProtectState(True) success!
Going to read encryption key...
Encryption key read done!
Encryption key: 510fb093 a3cbeadc 5993a17e c7adeb03
Going to start reading at offset 0x1D1000...
Reading 0x1D1000... Ok!
Basic read operation finished, but now it's time to verify...
Starting CRC check for 1 sectors, starting at offset 0x1D1000
CRC matches 0x2E171159!
All read!
Loaded total 0x1000 bytes
OBK config loaded. You can now view it by clicking 'Change OBK settings' button.
You can also edit it whatever you want.
You can also use 'Write OBK config' button to write it back with your changes.
startDriver TuyaMCU
startDriver SSDP
PowerSave 1
tuyaMcu_setBaudRate 115200
tuyaMcu_defWiFiState 4
tuyaMcu_setupLED 24 0
# Disable automatic sending to prevent overriding TuyaMCU's saved state during boot
tuyaMcu_enableAutoSend 0
# Optional: Enable automatic sending after a delay if you want normal operation
addRepeatingEvent 12 1 tuyaMcu_enableAutoSend 1
TL;DR: With 115200 baud and 5 confirmed core dpIDs, the WT5 works in OpenBeken via TuyaMCU; as one maintainer put it, "It’s TuyaMCU device." This FAQ is for WT5 owners who want stable RGB+CCT control, RF coexistence, correct autoexec.bat setup, and a fix for boot-time state overwrite using
tuyaMcu_enableAutoSend. [#20687286]
Why it matters: A WT5 can appear fully working after flashing, yet still break daily use if OpenBeken overwrites the TuyaMCU’s RF-restored state a few seconds after power-up.
| Approach | RGB+CCT control | RF coexistence | Boot-state behavior | Effort |
|---|---|---|---|---|
| OpenBeken + TuyaMCU | Works | Yes | Needs autosend control for best coexistence | Low |
| ESPHome on WT5 | Partial in-thread, later working but less documented here | Unclear | Not resolved in-thread | Medium |
| Replacing secondary MCU / direct RF driver | Possible in theory | Custom | Fully custom | High |
Key insight: The easiest stable WT5 setup is to keep the secondary MCU and RF path intact, run OpenBeken as the Wi-Fi side over TuyaMCU at 115200, and suppress automatic resend on boot when RF state retention matters. [#21619412]
tuyaMcu_enableAutoSend 0, was added specifically to stop OBK from overwriting the TuyaMCU’s saved state during boot; an example autoexec re-enables autosend after 12 seconds. [#21619412]autoexec.bat, not the Import page. A working minimal setup is:
startDriver TuyaMCUtuyaMcu_setBaudRate 115200tuyaMcu_defWiFiState 4 and tuyaMcu_setupLED 24 0
Several users confirmed this works on WT5 units with WB3S and CB3S modules. The Import page only runs once, while autoexec.bat runs on every reboot, which fixes the “works until power cycle” problem. [#21052871]tuyaMcu_sendQueryState results on flashed devices. For practical OpenBeken control, dpIDs 20, 21, 22, 23, and 24 are the important ones. [#20699088]tuyaMcu_setBaudRate 115200, tuyaMcu_defWiFiState 4, and tuyaMcu_setupLED 24 0. Later, tuyaMcu_enableAutoSend 0 was added to suppress OBK’s automatic resend during boot, and one proven example re-enabled it after 12 seconds with addRepeatingEvent 12 1 tuyaMcu_enableAutoSend 1. Use startDriver TuyaMCU first, then the baud and Wi-Fi-state commands, then LED setup. That sequence preserves RF coexistence and fixes the common startup overwrite issue. [#21619412]tuyaMcu_enableAutoSend turns OpenBeken’s automatic TuyaMCU sending on or off. Setting it to 0 stops OBK from pushing its stored LED values during boot, so the TuyaMCU can keep the last RF-restored state instead of being overwritten a few seconds later. A WT5 user later posted a working solution with tuyaMcu_enableAutoSend 0 and optional re-enable after 12 seconds. That command was added specifically to solve the long-running WT5 mixed RF and Wi-Fi startup problem. [#21619412]tuyaMcu_sendQueryState from the web console with the log open, first in CCT mode and then in RGB mode. In the thread, query results in CCT returned dpIDs 20, 21, 22, 23, and 26, while RGB-mode query also returned dpID 24 with the 12-byte color string. That makes tuyaMcu_sendQueryState the fastest way to verify what the MCU will actually report back on your unit. It also exposes cases where RGB state exists internally but is not pushed during normal RF use. [#20886598]00 73 03 e8 03 e8 for a green test, matching a known Tuya color format already seen in another OpenBeken topic. The thread’s working conclusion was that dpID 24 is the actionable RGB field, while dpID 28 remained less certain and appeared to mirror extra white-related data. [#20689271]