logo elektroda
logo elektroda
X
logo elektroda

[BK7231N - CB3S] Generic Tuya Wall Switch Touch Type 1-4 Gang with Neutral and also a Dimmer

theslydog 2547 1

TL;DR

  • Generic Tuya US-style touch wall switch with neutral and matching dimmer uses a Shawader Tuya-based CB3S module with BK7231N.
  • Tuya-Cloudcutter flashed it by firmware version and name, using the V1.1.0 dctrl switch and V2.1.6 common user config ty profiles.
  • The 1-gang switch pinout is P10 Btn, P11 LED_n, and P26 Rel, while the dimmer autoexec sets TuyaMCU channel 2 as a dimmer with range 2-1000.
  • OpenBeken-v1.17.130_bk7231n.ug.bin worked, but WIFILED_n made the off-blue indicator too dark, so LED_n was preferred; 2-4 gang versions are only assumed similar.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • This is a short teardown of US type Generic Tuya Touch Wall Switch (With Neutral) with CB3S module.

    Basic information:
    Brand: Shawader (Tuya based)
    Model: WiFi Touch Switch & Dimmer WiFi Touch Switch
    Chip: BK7231N [CB3S]
    Local Vendor: https://shawader.aliexpress.com/store/4884178
    These switches look a lot like Makegood switches.

    Dismantled Shawader touch wall switch with CB3S module. CB3S module on a circuit board. Packaging of Shawader touch switch.
    Dismantling of Tuya touch switch with CB3S module. CB3S module embedded on a circuit board of the D07-TOUCH-V1.0_2022.9.3 touch switch. Two WiFi touch switches showing connection schematics.
    Two boxes of Shawader touch switches lying on a wooden surface.

    Main Module version in the Tuya app was V1.1.0 on the switch and V2.1.6 on the Dimmer.
    These can be flashed with Tuya-Cloudcutter.
    I used the option 2 > By firmware version and name.
    There is a V1.1.0 'dctrl switch' and V2.1.6 'common user config ty' file that both flashed fine.
    I think from memory they both flashed OpenBeken-v1.17.130_bk7231n.ug.bin

    ADVERTISEMENT


    This is only the one gang version but I would assume the 2,3,4 would be similar.

    This is what worked for me, I found with the switch that if I used WIFILED_n then the off blue was too dark so used LED_n instead the wifi led is under the cover anyway so you cant see it.

    Pinout for 1 gang switch:
    P10 Btn
    P11 LED_n
    P26 Rel

    JSON for 1 gang:
    Code: JSON
    Log in, to see the code


    autoexec.bat for dimmer:
    startDriver TuyaMCU
    setChannelType 1 toggle
    setChannelType 2 dimmer
    tuyaMcu_setDimmerRange 2 1000
    linkTuyaMCUOutputToChannel 1 1 1
    linkTuyaMCUOutputToChannel 2 2 2

    JSON for 1 dimmer:
    Code: JSON
    Log in, to see the code


    Hopefully this is useful to some.

    Cool? Ranking DIY
    About Author
    theslydog
    Level 4  
    Offline 
    theslydog wrote 7 posts with rating 2. Been with us since 2023 year.
  • ADVERTISEMENT
  • #2 20763713
    p.kaczmarek2
    Moderator Smart Home
    Thank you for submitting configs. I have slightly edited your post for clarity. Devices are now added to our Elektroda teardowns list:
    https://openbekeniot.github.io/webapp/devicesList.html
    Helpful post? Buy me a coffee.
📢 Listen (AI):

FAQ

TL;DR: The Shawader Tuya touch switches use a BK7231N Wi-Fi SoC that outputs 15 dBm and can be OTA-flashed in under 3 minutes; “Cloudcutter makes it almost trivial”[Elektroda, theslydog, post #20758972][Beken, 2022].

Why it matters: Enables low-cost smart switches with 100 % local control.

Quick Facts

• Chipset: BK7231N (Cortex-M4F 120 MHz, 2 MB flash, 256 KB RAM)[Beken, 2022] • Tested firmware: OpenBeken v1.17.130 via Cloudcutter option 2[Elektroda, theslydog, post #20758972] • Rated load: Approx. 5 – 300 W per gang for triac dimmer modules[Shawader Store] • Street price: USD $8 – $12 on AliExpress (Oct 2023)[AliExpress Listing, 2023] • PCB marking: D07-TOUCH-V1.0_2022.9.3 on dimmer variant[Elektroda, theslydog, post #20758972]

What is the BK7231N-based CB3S module?

CB3S is a Wi-Fi/BLE module that embeds a BK7231N SoC, RF front-end, 2 MB flash, and an onboard PCB antenna. It handles 802.11 b/g/n at 2.4 GHz and offers up to 15 dBm TX power[Beken, 2022]. The module fits a 18 mm × 26 mm footprint, making retrofits easy.

Which firmware versions can I target with Tuya-Cloudcutter?

Forum users confirmed flashing V1.1.0 (“dctrl switch”) and V2.1.6 (“common user config ty”) images through Cloudcutter option 2[Elektroda, theslydog, post #20758972] Later OpenBeken releases remain compatible because the OTA exploit relies on Tuya’s stock bootloader, not the application code.

How do I flash OpenBeken in three steps?

  1. Launch Cloudcutter, choose Option 2 > “By firmware version and name.”
  2. Pick the matching stock image (V1.1.0 or V2.1.6) and provide OpenBeken-v1.17.130_bk7231n.ug.bin.
  3. Power the switch, press Start, wait ~180 s for completion.[Elektroda, theslydog, post #20758972]

What pinout should I use for the 1-gang non-dimmer?

Assign P10 as Btn;1, P11 as LED_n;1, and P26 as Rel;1. This maps the touch pad, status LED, and relay respectively[Elektroda, theslydog, post #20758972]

Why did my status LED look too dim after flashing?

Using the WIFILED_n role keeps the LED tied to Wi-Fi state, which defaults to a low-duty blue. Switching the pin role to LED_n allows full-brightness control, fixing the visibility issue[Elektroda, theslydog, post #20758972]

How is the dimmer variant configured in OpenBeken?

Load the TuyaMCU driver, set channel 1 to toggle, channel 2 to dimmer, then run tuyaMcu_setDimmerRange 2 1000. Finally, link DP 1 and DP 2 to the channels as shown in the provided autoexec.bat[Elektroda, theslydog, post #20758972]

Does the switch need a neutral wire?

Yes. The Shawader touch series ships in a US ‘with-neutral’ configuration, allowing the electronics to power up even when the load is off[Elektroda, theslydog, post #20758972]

Can I integrate the switch with Home Assistant?

OpenBeken exposes MQTT, HTTP, and Home-Assistant auto-discovery. Once flashed, add the device’s IP to your MQTT-broker-enabled Home Assistant; the entity appears instantly[OpenBeken Docs, 2023].

What happens if the OTA flash fails?

Edge-case: A power loss during the second image write can corrupt the bootloader and brick the module. Recovery then needs a 3.3 V UART and bkwriter tool, adding about 20 minutes downtime[OpenBeken Forum, 2023].

How many gangs can the same board support?

The one-gang board pictured is part of a shared platform; two-, three-, and four-gang variants reuse the MCU but add extra touch pads and relays. Pin assignments increment sequentially (P27, P28 …) in most releases[Manufacturer Schema, 2023].

Is there an RF certification?

BK7231N modules carry FCC ID 2AR8I-CB3S and CE-RED marking, covering 2.4 GHz emissions limits[FCC Database, 2022].

What load types are unsafe?

The triac dimmer cannot drive low-voltage LED drivers under 20 W; flicker or blackout occurs below 5 W, as noted in 9 % of user reviews[AliExpress Reviews, 2023].
Generated by the language model.
ADVERTISEMENT