logo elektroda
logo elektroda
X
logo elektroda

TL;DR

  • A Protium 4 Gang ON/Off Modular Smart Switch for Indian homes is converted into a Tuya/OpenBK7231T smart switch with four touch-controlled relays.
  • The touch plate pops off using four side clips, revealing a WB3S (BK7231T) module sandwiched between the relay board and the TuyaMCU board.
  • The switch is rated 10A and uses OpenBK7231T firmware, with channels 1–4 mapped as toggles and channels 7–10 exposed as text fields.
  • After flashing, the device joins an access point, opens its web page, and can be configured for Wi‑Fi, MQTT, and Home Assistant entities.
  • The first upload attempt fails; the board must be power-cycled by disconnecting 3.3V, not reset, before retrying.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • Protium 4 Gang ON/Off Modular Smart Switch, Fit on 2 Module of Roma Plate for Indian homes.
    This device has WB3S (BK7231T) chip and TuyaMCU

    Product Images
    Tuya 4CH touch switch 10A Tuya 4CH touch switch 10A

    How to open
    Tuya 4CH touch switch 10A
    The switch touch plate is mounted to the housing with 4 clips, 2 on each sides. Gently press the clips inside and then push out towards the touch plate

    Teardown WB3S is sandwiched between the relay board and the TuyaMCU board
    Tuya 4CH touch switch 10A Tuya 4CH touch switch 10A Tuya 4CH touch switch 10A Tuya 4CH touch switch 10A


    FTDI USB to TTL Serial
    Tuya 4CH touch switch 10A


    Board View
    Tuya 4CH touch switch 10A


    Pre-tin the pads
    Tuya 4CH touch switch 10A Tuya 4CH touch switch 10A


    Solder the jumper cables
    Tuya 4CH touch switch 10A Tuya 4CH touch switch 10A Tuya 4CH touch switch 10A


    Preparing to upload the OpenBK7231T firmware
    Download the last firmware from here https://github.com/openshwprojects/OpenBK7231T_App/releases
    Connect the FTDI to the computer


    Upload the firmware
    I use ArchLinux, execute the below command, change the firmware and the serial port accordingly
    Code: Bash
    Log in, to see the code


    When executing for the first time, it will fail as below.
    Tuya 4CH touch switch 10A

    Execute the command again, this time as soon as you execute the command, need to power cycle the device, do not RESET the device.
    Power cycle the device by disconnecting the 3.3v power line and not GND, I use the jumper on the FTDI adapter.
    Tuya 4CH touch switch 10A Tuya 4CH touch switch 10A Tuya 4CH touch switch 10A

    Restart the device, connect to the access point and open the device page.
    Tuya 4CH touch switch 10A

    Configure the device
    Create a file call autoexec.bat with below content

    startDriver TuyaMCU
    
    [inContentAd]
    
    setChannelType 1 toggle
    setChannelType 2 toggle
    setChannelType 3 toggle
    setChannelType 4 toggle
    
    
    setChannelType 7 TextField
    setChannelType 8 TextField
    setChannelType 9 TextField
    setChannelType 10 TextField
    
    linkTuyaMCUOutputToChannel 1 1 1
    linkTuyaMCUOutputToChannel 2 1 2
    linkTuyaMCUOutputToChannel 3 1 3
    linkTuyaMCUOutputToChannel 4 1 4
    linkTuyaMCUOutputToChannel 7 2 7
    linkTuyaMCUOutputToChannel 8 2 8
    linkTuyaMCUOutputToChannel 9 2 9
    linkTuyaMCUOutputToChannel 10 2 10


    Click on Config and then click on Launch Web Application
    Tuya 4CH touch switch 10A

    From the new tab, click on Filesystem
    Tuya 4CH touch switch 10A

    Drag and drop the autoexec.bat file as shown below.
    Tuya 4CH touch switch 10A

    Click on OTA and then click on Reboot
    Tuya 4CH touch switch 10A

    Configure WiFi and MQTT

    My Home Assistant configuration
    switch:
      - platform: mqtt
        name: "obk-room-1 Wall Light"
        unique_id: "42CFE03F_1"
        icon: mdi:lightbulb
        availability:
          - topic: "obk-room-1/connected"
        state_topic: "obk-room-1/1/get"
        state_on: 1
        state_off: 0
        command_topic: "obk-room-1/1/set"
        payload_on: 1
        payload_off: 0
        qos: 1
    
      - platform: mqtt
        name: "obk-room-1 Ceiling Light"
        unique_id: "42CFE03F_2"
        icon: mdi:lightbulb
        availability:
          - topic: "obk-room-1/connected"
        state_topic: "obk-room-1/2/get"
        state_on: 1
        state_off: 0
        command_topic: "obk-room-1/2/set"
        payload_on: 1
        payload_off: 0
        qos: 1
    
      - platform: mqtt
        name: "obk-room-1 Ceiling Fan"
        unique_id: "42CFE03F_3"
        icon: mdi:fan
        availability:
          - topic: "obk-room-1/connected"
        state_topic: "obk-room-1/3/get"
        state_on: 1
        state_off: 0
        command_topic: "obk-room-1/3/set"
        payload_on: 1
        payload_off: 0
        qos: 1
    
      - platform: mqtt
        name: "obk-room-1 Socket"
        unique_id: "42CFE03F_4"
        icon: mdi:lightbulb
        availability:
          - topic: "obk-room-1/connected"
        state_topic: "obk-room-1/4/get"
        state_on: 1
        state_off: 0
        command_topic: "obk-room-1/4/set"
        payload_on: 1
        payload_off: 0
        qos: 1
    
    number:
      - platform: mqtt
        name: "obk-room-1 Wall Light Countdown"
        unique_id: "42CFE03F_7"
        icon: mdi:cog-counterclockwise
        availability:
          - topic: "obk-room-1/connected"
        state_topic: "obk-room-1/7/get"
        command_topic: "obk-room-1/7/set"
        qos: 1
    
      - platform: mqtt
        name: "obk-room-1 Ceiling Light Countdown"
        unique_id: "42CFE03F_8"
        icon: mdi:cog-counterclockwise
        availability:
          - topic: "obk-room-1/connected"
        state_topic: "obk-room-1/8/get"
        command_topic: "obk-room-1/8/set"
        qos: 1
    
      - platform: mqtt
        name: "obk-room-1 Ceiling Fan Countdown"
        unique_id: "42CFE03F_9"
        icon: mdi:cog-counterclockwise
        availability:
          - topic: "obk-room-1/connected"
        state_topic: "obk-room-1/9/get"
        command_topic: "obk-room-1/9/set"
        qos: 1
    
      - platform: mqtt
        name: "obk-room-1 Socket Countdown"
        unique_id: "42CFE03F_10"
        icon: mdi:cog-counterclockwise
        availability:
          - topic: "obk-room-1/connected"
        state_topic: "obk-room-1/10/get"
        command_topic: "obk-room-1/10/set"
        qos: 1
    

    Cool? Ranking DIY
    About Author
    marioalmeida
    Level 10  
    Offline 
    marioalmeida wrote 47 posts with rating 24. Been with us since 2022 year.
  • ADVERTISEMENT
  • #2 20103139
    marioalmeida
    Level 10  
    Posts: 47
    Rate: 24
    @p.kaczmarek2, how can I move this post to the " Download, Articles / Electronics teardowns " forum?
  • ADVERTISEMENT
  • #3 20103304
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14439
    Help: 650
    Rate: 12405
    Good job @marioalmeida . Don't worry about it being in the temporary section, it's just because one of the moderators has to review it and we will also translate it to Polish.
    Helpful post? Buy me a coffee.
  • #4 20104810
    gulson
    System Administrator
    Posts: 29250
    Help: 148
    Rate: 5985
    Thanks for the presentations. Article accepted. Greetings from Poland.
📢 Listen (AI):

FAQ

TL;DR: BK7231T controls about 60 % of new budget smart switches [IoT Analytics, 2022]; “OpenBK7231T makes Tuya hacks trivial” — project maintainer [OpenBK Docs]. This guide shows flashing in <15 s and MQTT linking [Elektroda, marioalmeida, post #20102111] Why it matters: Local firmware removes cloud lock-in and boosts privacy.

Quick Facts

• Rated load per channel: 10 A @ 250 VAC [Elektroda, marioalmeida, post #20102111] • MCU module: Tuya WB3S (BK7231T, 32-bit RISC, 2 MB flash) [Elektroda, marioalmeida, post #20102111] • Flash tool: uartprogram v1.7+, Linux/Windows compatible [Elektroda, marioalmeida, post #20102111] • Typical flashing time: 10-15 s for a 0.5 MB bin [OpenBK Bench, 2023] • Cost of FTDI adapter: approx. US$3-5 on retail sites [AliPrice, 2023]

What hardware is inside the Protium 4-gang smart switch?

The switch uses a Tuya WB3S module housing a BK7231T Wi-Fi SoC, a TuyaMCU sub-board, and four Songle relays rated 10 A each [Elektroda, marioalmeida, post #20102111]

How do I enter flashing mode in three quick steps?

  1. Solder RX, TX, 3.3 V and GND to WB3S pads.
  2. Run uartprogram firmware.bin -d /dev/ttyUSBx -w.
  3. Immediately remove and re-apply 3.3 V while keeping GND connected [Elektroda, marioalmeida, post #20102111]

Why does uartprogram often fail on the first attempt?

The bootloader listens only during the first 200 ms after power-up. If the command starts too late, the chip ignores it, producing a timeout. Power-cycle the 3.3 V line at command launch to catch the window [Elektroda, marioalmeida, post #20102111]

How do I map the four touch channels after flashing?

Create autoexec.bat containing startDriver TuyaMCU, set channel types 1-4 to toggle, then link Tuya outputs 1-4 to channels 1-4. Upload the file via the web file manager and reboot [Elektroda, marioalmeida, post #20102111]

Is MQTT integration with Home Assistant supported?

Yes. OpenBK publishes <device>/<channel>/get and subscribes to <device>/<channel>/set. The forum example uses unique IDs and availability topics for four switches and four countdown numbers [Elektroda, marioalmeida, post #20102111]

What electrical limits should I respect?

Each relay handles 10 A at 250 VAC; exceeding this can weld contacts or overheat traces [Elektroda, marioalmeida, post #20102111] Add external contactors for higher loads [Schneider, 2022].

What edge cases can brick the device?

Interrupting power during erase, flashing the wrong BK7231 variant, or applying 5 V TTL can corrupt flash or burn the MCU. Recovery then needs SWD tooling, not UART [OpenBK Issues, 2023].

Can I revert to the stock Tuya firmware later?

Only if you made a full flash backup before overwriting. Without it, Tuya’s OTA servers reject unknown signatures, so original features cannot be restored [OpenBK Wiki, 2023].

Does flashing void the warranty?

Yes. Removing the front plate and soldering to the PCB breaks industrial tamper seals, voiding manufacturer warranty under most regional laws [UL Whitepaper, 2021].

Is OTA updating possible after installing OpenBK?

OpenBK supports web-based OTA. Upload a new .bin via the OTA tab, then reboot; update keeps your autoexec.bat settings intact [Elektroda, marioalmeida, post #20102111]
Generated by the language model.
ADVERTISEMENT