FAQ
TL;DR: 1000-step dimming, “TuyaMCU works” [Elektroda, p.kaczmarek2, post #20654184], confirmed at 115 200 bps [Elektroda, p.kaczmarek2, post #20652300] Flash OBK, map dpID 20 to power and 22 to brightness; add MQTT retain to keep state.
Why it matters: Correct mapping and retain stop ‘unknown’ states in Home Assistant after every reboot.
Quick Facts
• Baud rate: 115 200 bps (TuyaMCU default) [Elektroda, 20652300]
• Brightness range: 0–1000 (dpID 22) [Elektroda, 20654276]
• Power toggle: dpID 20, Boolean 0/1 [Elektroda, 20654276]
• Enable OBK Flag 7 to retain MQTT state after HA restarts [Elektroda, 20814571]
• WB2S module flash size: Approx. 2 MB [OpenBeken docs]
What chipset is inside the Tuya S1-B-WT triac dimmer?
The dimmer uses a Tuya WB2S Wi-Fi module based on the BK7231S SoC and communicates with a TuyaMCU daughterboard over UART at 115 200 bps [Elektroda, andyc1, #20652186; p.kaczmarek2, #20652300].
Which tool and firmware should I flash?
Use BK7231 GUI Flash Tool with the latest OpenBeken (OBK) binary for BK7231S. Backup the 2 MB flash first, then write OBK to 0x0. OBK v1.17 or newer auto-detects TuyaMCU packets [OpenBeken docs; Elektroda, p.kaczmarek2, #21285036].
How do I wire the module for flashing?
Connect 3.3 V, GND, RX, TX to the WB2S header, then power-cycle to enter boot. Shorting CEN to GND also works, but a simple repower is faster [Elektroda, p.kaczmarek2, post #20665907]
What is the minimal working autoexec.bat?
- startDriver TuyaMCU
- tuyaMcu_setBaudRate 115200
- setChannelType 1 toggle; setChannelType 2 dimmer
- tuyaMcu_setDimmerRange 0 1000
- linkTuyaMCUOutputToChannel 20 1 1; linkTuyaMCUOutputToChannel 22 2 2
This five-line script makes the on/off switch and 0–1000 dimmer operational [Elektroda, 20654338]
Home Assistant shows only a switch, not a dimmer—how can I fix it?
Ensure Channel 2 is typed as “dimmer” and that MQTT discovery is enabled. Reload MQTT in HA or restart the broker. If discovery fails, add a light entity in configuration.yaml pointing to topic extension_1/2/set with payload 0-1000 [Elektroda, atomphil, post #20799131]
Why does the device lose state after HA restarts?
MQTT messages were published without the retain flag. Enable OBK Flag 7 (Always Retain) so the broker stores the last on/off and level values; HA then restores them on start-up [Elektroda, andyc1, post #20814571]
MQTT topic structure and commands?
Default base topic is extension_1. Send:
• On: extension_1/1/set payload 1
• Off: extension_1/1/set payload 0
• Dim: extension_1/2/set payload 0-1000
OBK publishes current values to /get sub-topics with retain when Flag 7 is active [OpenBeken docs; Elektroda, #20654116].
Physical wall switch changes are not reflected—what to check?
Open Web-App log and look for incoming dpID packets. If none appear, verify UART wires and that autoexec.bat uses the same baud rate and dpIDs on every module. A cold power cycle fixed a partial TuyaMCU init bug on six units [Elektroda, andyc1, post #20665740]
Edge case: One module stops updating after flashing several units.
Match autoexec.bat across all devices, then power-cycle. Mismatched scripts prevented two-way communication; restarting via web UI alone did not clear the fault [Elektroda, 20665740]
Can I choose leading versus trailing-edge dimming?
Skydance’s OEM datasheet shows a DIP switch for leading-/trailing-edge selection, but the Tuya variant fixes trailing-edge in firmware; OBK cannot change it through software alone [Skydance datasheet; Elektroda, #20785588].
How do I factory-reset or reflash if I mis-configure OBK?
Hold the physical reset button for >10 s to erase config. If the web UI is unreachable, re-enter boot mode, read flash, and rewrite a clean OBK image with BK7231 GUI Tool [OpenBeken docs].
What happens if TuyaMCU sends no heartbeat?
OBK logs will show missing 55 AA packets. After 5 s without heartbeats, channels freeze until UART traffic resumes, preventing ghost toggles but also blocking HA updates [Elektroda, p.kaczmarek2, post #20654116]