logo elektroda
logo elektroda
X
logo elektroda

Configuration Issues with Tuya S1-B-WT Triac Dimmer after OBK Firmware Flashing

andyc1 6030 35
Best answers

How do I manually configure OpenBeken for a Tuya S1-B-WT triac dimmer after flashing OBK so the switch and dimmer actually control the light?

Your device is a TuyaMCU dimmer, and the working OBK setup needs the correct baud rate plus the real dpIDs from the MCU log, not the guessed 1/2 mapping. Use an autoexec.bat like `startDriver TuyaMCU`, `tuyaMcu_defWiFiState 4`, `tuyaMcu_setBaudRate 115200`, then `setChannelType 1 toggle`, `setChannelType 2 dimmer`, `tuyaMcu_setDimmerRange 0 1000`, and finally `linkTuyaMCUOutputToChannel 20 1 1` and `linkTuyaMCUOutputToChannel 22 2 2` [#20652300][#20654338] The log you posted shows dpID 20 as a boolean on/off state and dpID 22 as a value for brightness, which is why the earlier 1/2 mapping did nothing [#20654116][#20654338] To identify dpIDs on your own device, open the Web App log and use the physical wall switch / dimmer input, since web-page toggles may not generate the same TuyaMCU packets [#20654184][#20654210] After updating the config, fully power-cycle the module; a web-app reboot alone did not reliably initialize all devices, but power off/on fixed the state reporting for the thread starter [#20665740]
Generated by the language model.
ADVERTISEMENT
  • #31 20816374
    atomphil
    Level 10  
    Posts: 31
    Help: 4
    Rate: 17
    >>20799162

    I try this

    Screenshot of Bad_Dimmer configuration in Home Assistant.

    but no luck. There is still just a switch in HA. :/
  • ADVERTISEMENT
  • #32 21285008
    GiovanniG11
    Level 2  
    Posts: 3
    Hi mates, I have an S1-B and would drive it by Node Red, unfortunately it's very complicated to make it work with Tuya protocol, so someone suggested me to refresh it.
    Can you please write a brief guide with instructions?
    1) how to flash it and with what exactly
    2) how to connect it/how change settings to make it work
    3) does it use MQTT? Which are the commands to give?
    Thank you a lot!
  • ADVERTISEMENT
  • #33 21285036
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14622
    Help: 655
    Rate: 12637
    Your device is most likely using TuyaMCU, so here is a TuyaMCU guide:
    https://www.elektroda.com/rtvforum/topic4038151.html
    Here is the flash tool we're using for Beken:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    Here are our flashing guides, search for the ones for BK7231:
    https://www.youtube.com/@elektrodacom
    Some of the guides may use older flashing tools, so it's recommended to use BK7231 GUI Tool instead.
    Here is HA pairing guide: https://www.youtube.com/watch?v=pkcspey25V4

    Here are our docs:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/README.md
    You can also check autoexec examples and MQTT section.

    Please check out linked resources, but don't worry, we can also help you with the process step by step. First, make some photos of your device, then attempt to take 2MB flash backup...
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #34 21285042
    GiovanniG11
    Level 2  
    Posts: 3
    thank you, you cleared me..
    this process takes time too, learning, creating tool, using it and get confidence after flashing. Honestly I don't have now such time, so I will postpone my efforts for the future.
    Chances are I can get some success with Tuya protocol, I've sniffed the packet for turning on and off locally, if I can succeed also with dimmer values.. I can have the solution
  • ADVERTISEMENT
  • #35 21854299
    jtauscher87
    Level 7  
    Posts: 13
    Rate: 2
    PCB with annotated traces and test points, including Tx/Rx, GND, Vcc, 3.3V and L/N.

    In case this is helpful to anyone.
  • #36 21854335
    GiovanniG11
    Level 2  
    Posts: 3
    Thank you, anyway I consider much more efficient buy the WZ version (Zigbee) and use an adapter compatible with Zigbee2MQTT, there are several advantages: you don't need to reflash it to use it without the Tuya cloud, you may have more efficient connection/longer as Zigbee allows devices to repeat signals in case it's needed, you may save some energy as Zigbee requires less energy than Wi-Fi.
    I suppose the transmission may go wrong with Wi-Fi if there are too many broadcasts, as the processor needs to analyze all packets

Topic summary

✨ The discussion revolves around configuration issues with the Tuya S1-B-WT triac dimmer after flashing it with OpenBeken (OBK) firmware. The user successfully accessed the device's web application but faced challenges with the cloudcutter profile import, which did not yield a functional script. Various troubleshooting steps were suggested, including verifying the baud rate, using the correct dpIDs for the dimmer and switch, and ensuring proper wiring with a physical switch. After several attempts and adjustments to the autoexec.bat file, the user managed to resolve the issues, enabling the device to function correctly with Home Assistant. Additionally, the conversation touched on flashing procedures and the importance of consistent configurations across multiple devices.
Generated by the language model.

FAQ

TL;DR: At 115200 baud, the fix was "change the dpIDs" and use dpID 20 for on/off plus dpID 22 for brightness. This FAQ is for OpenBeken beginners whose S1-B-WT dimmer flashes successfully but does not control the light until TuyaMCU is mapped manually. [#20654338]

Why it matters: This thread turns a non-working reflashed dimmer into a repeatable OpenBeken setup, including Home Assistant and MQTT edge cases.

Approach Setup effort Local control path Extra hardware/software Reported pros Reported cons
S1-B-WT Wi-Fi + OpenBeken Higher OBK + MQTT/Home Assistant Flashing tool, serial wiring Full local control after mapping dpIDs Manual flashing and TuyaMCU setup needed
WZ Zigbee + Zigbee2MQTT Lower Zigbee2MQTT Zigbee adapter No reflashing, mesh repeaters, lower power use Requires Zigbee coordinator

Key insight: Importing a Cloudcutter profile was not enough here. The dimmer worked only after confirming TuyaMCU at 115200 baud and linking the real state dpIDs from the physical switch log.

Quick Facts

  • The working TuyaMCU serial speed was 115200 baud, confirmed both by the Cloudcutter profile and the extracted config binary. [#20652300]
  • The dimmer’s brightness datapoint used a 0–1000 value range, and OBK was configured with tuyaMcu_setDimmerRange 0 1000. [#20652300]
  • A valid physical-state log showed dpID 20 as DP_TYPE_BOOL and dpID 22 as DP_TYPE_VALUE with 4 data bytes and a sample value of 1000. [#20654276]
  • The working flash procedure on the WB2S module used only 3 V, TX, RX, and GND; shorting CEN to GND was not required for that user. [#20665834]
  • One user reflashed 6 additional modules successfully, but some reported state correctly only after a full power cut and restart, not just a web reboot. [#20665740]

How do I manually configure a Tuya Generic S1-B-WT triac dimmer in OpenBeken after flashing when the Cloudcutter profile import doesn’t create a working script?

Manually configure TuyaMCU and map the real dpIDs instead of relying on profile import. Use this 3-step process: 1. Add a minimal autoexec.bat with startDriver TuyaMCU, tuyaMcu_defWiFiState 4, and tuyaMcu_setBaudRate 115200. 2. Trigger the dimmer from the physical wall switch and read the OBK log. 3. Link the detected dpIDs to channels, which were 20 for toggle and 22 for brightness in this thread. After that change, the S1-B-WT started working correctly. [#20654390]

What is TuyaMCU, and how can I tell whether a Tuya S1-B-WT dimmer uses it after installing OBK firmware?

"TuyaMCU" is a microcontroller-side serial protocol that exchanges state and commands between the Wi-Fi module and the dimmer electronics, using datapoints, baud-rate settings, and periodic heartbeat frames. On this S1-B-WT, the main clue was that the Cloudcutter profile and extracted config both pointed to a serial setup at 115200 baud, and OBK logs showed recurring 55 AA ... heartbeat packets. If you see heartbeat traffic but no GPIO-only behavior, the dimmer is using TuyaMCU rather than a simple direct-pin design. [#20652300]

Why would a Tuya S1-B-WT dimmer show an on/off toggle and brightness slider in the OBK web app but still not switch the connected light on?

Because the web UI can show channels before they are linked to the device’s real TuyaMCU datapoints. In this thread, the user added a script that created a toggle and slider, but the light still stayed off. The cause was not the UI itself; it was missing or wrong dpID mapping. OBK could display controls, yet the dimmer would ignore them until the actual state datapoints were identified from TuyaMCU traffic and linked correctly. [#20649501]

How can I extract the OBK config or TuyaConfig from a flashed device to check whether the baud rate and TuyaMCU settings are correct?

Extract the OBK config file and inspect the serial settings, especially wifi_bdrate. In this case, the extracted binary confirmed wifi_bdrate as 115200, wifi_config_ver as 1.0.0, and crc as 127. That matched the Cloudcutter profile and explained why a lower-baud example script failed. Once those values were confirmed, the next step was to test TuyaMCU communication in the web log and map the correct dpIDs. [#20652300]

Which autoexec.bat commands are needed to get a Tuya S1-B-WT dimmer working with OpenBeken at 115200 baud?

Use TuyaMCU startup, set the dimmer channel types, define the 0–1000 range, and link the real dpIDs. The working script in this thread was: startDriver TuyaMCU tuyaMcu_defWiFiState 4 tuyaMcu_setBaudRate 115200 setChannelType 1 toggle setChannelType 2 dimmer tuyaMcu_setDimmerRange 0 1000 linkTuyaMCUOutputToChannel 20 1 1 linkTuyaMCUOutputToChannel 22 2 2 Those values matched the physical-switch log and fixed the dimmer. [#20664898]

What is a dpID in the TuyaMCU protocol, and how do I identify the correct dpIDs for switch state and brightness from the OBK web log?

"dpID" is a TuyaMCU datapoint identifier that labels one device function, such as relay state or brightness, and each dpID also carries a data type like boolean or numeric value. Identify it by opening the OBK log and looking for processing dpId ... entries after a real hardware action. In this thread, the decisive lines were dpId 20 with DP_TYPE_BOOL and dpId 22 with DP_TYPE_VALUE, which exposed the correct switch and dimmer mappings. [#20654210]

How do I use a physical wall switch to generate TuyaMCU state packets and confirm the correct dpIDs for an S1-B-WT dimmer?

Wire the wall switch as shown in the device manual, then operate the dimmer physically while the OBK web log is open. Do not rely on the web page slider for this test. The successful capture showed command 7 (State) packets, then dpId 20 as a boolean and dpId 22 as a value of 1000. Those packets gave the exact mapping needed for linkTuyaMCUOutputToChannel. Without the physical switch, the user only saw heartbeat traffic. [#20654276]

Why does the OBK log show only TuyaMCU heartbeat packets and no useful state changes when I move the dimmer from the web interface?

Because moving the dimmer in the web interface does not prove the TuyaMCU is sending back hardware state packets. The thread’s expert answer was blunt: "Toggling the dimmer on the web page will not help." You must use a physical wall switch wired as in the manual. Heartbeat frames like 55 AA 03 00 00 01 01 04 only confirm that serial communication exists; they do not reveal which dpIDs carry real switch and brightness state. [#20654184]

What do the log entries showing dpID 20 as a boolean and dpID 22 as a value mean for configuring a Tuya S1-B-WT dimmer?

They mean dpID 20 is the on/off datapoint and dpID 22 is the brightness datapoint. In the log, dpID 20 appeared as DP_TYPE_BOOL, and dpID 22 appeared as DP_TYPE_VALUE with 4 data bytes and a sample value of 1000. So the correct OBK mapping is to link dpID 20 to a toggle channel and dpID 22 to a dimmer channel with a 0–1000 range. That was the configuration that made the device work. [#20654338]

How should I set up Home Assistant discovery so an OpenBeken Tuya dimmer appears as a dimmer entity instead of only a switch?

Use channel-based dimmer mapping, not only tuyaMcu_setupLED 24 0, and keep Home Assistant discovery enabled. The thread showed that a script with setChannelType 1 toggle, setChannelType 2 dimmer, and linkTuyaMCUOutputToChannel 20 1 1 plus 22 2 2 should be the right discovery path. However, one user still saw only a switch in Home Assistant, so the maintainer said the first script should work and needed checking. In short, discovery expects a real dimmer channel, not just relay-only exposure. [#20799162]

What can I put in Home Assistant configuration.yaml to manually add an OpenBeken TuyaMCU dimmer if auto discovery creates the wrong entity type?

Use a manual dimmer definition in configuration.yaml instead of waiting for discovery to classify it correctly. The maintainer explicitly pointed the user to a manual dimmer YAML guide after discovery exposed the S1-B-WT only as a switch. If your script already uses setChannelType 2 dimmer and tuyaMcu_setDimmerRange 0 1000, but Home Assistant still shows only a switch, manual YAML is the fallback path mentioned in the thread. [#20799162]

Why do some reflashed S1-B-WT modules stop reporting on/off state changes from the RF wall switch until they are fully power-cycled?

Because some modules may not complete TuyaMCU initialization properly after configuration changes until a full power reset. In this thread, 6 extra modules worked from the OBK panel but failed to report RF wall-switch state back to OBK and Home Assistant. A web reboot alone did not fix them. After powering all devices off and back on, the modules started reporting on/off state correctly again. The maintainer suspected a Tuya MCU initialization bug or partial startup issue. [#20665763]

How can I fix OpenBeken devices that become 'unknown' in Home Assistant after an HA restart or power cut, especially with MQTT retain settings?

Enable OBK flag 7 so MQTT publishes retained values. The exact fix reported was: go to config > configure general > flags and enable flag 7 - Always set Retain flag to all published values. Before that change, Home Assistant showed the dimmers as unknown after each HA restart or power cut, and users had to toggle the wall switch before state returned. After enabling retain, the user reported the issue was resolved. [#20814571]

What’s the correct way to flash a WB2S-based Tuya dimmer with OpenBeken, and when should I short CEN to ground versus simply power-cycling it?

For this WB2S dimmer, both methods can reboot the module, but simple power-cycling was enough. One user succeeded with only 3 V, TX, RX, and GND connected and did not need to short CEN to ground during flashing. Later, the maintainer clarified there are two valid reboot methods: short CEN to ground or disconnect and reconnect power. He said both should work, and he prefers power-cycling. The same support reply also recommended taking a 2MB flash backup before deeper work. [#20665907]

Skydance S1-B-WT Wi-Fi with OpenBeken vs the Zigbee WZ version with Zigbee2MQTT — which approach is better for local control, reliability, and setup effort?

Choose Zigbee WZ for lower setup effort, and choose Wi-Fi plus OpenBeken if you want a reflashed local MQTT device. The 2026 follow-up argued that the Zigbee version is "much more efficient" because it avoids reflashing, works with Zigbee2MQTT, can repeat signals in a mesh, and uses less energy than Wi-Fi. The Wi-Fi S1-B-WT did achieve solid local control in Home Assistant, but only after flashing, serial setup, dpID mapping, and some troubleshooting. For beginners, Zigbee is the easier path. [#21854335]
Generated by the language model.
ADVERTISEMENT