logo elektroda
logo elektroda
X
logo elektroda

[BK7231N CB2S] Moes Smart Switch 1 gang WiFi - MS-104

spln 3537 6

TL;DR

  • Moes Smart Switch Module MS-104 is a 1-gang WiFi smart switch module built around a Tuya CB2S (BK7231N) WiFi module.
  • The 1-gang board appears to share PCB design with the 2-gang version, while the 4-gang version uses different internals.
  • It supports 90 - 250V AC 50/60Hz input and up to 10A current.
  • Pin mapping identifies Pin23 as Button1, Pin24 as Relay1, and Pin26 as a PWM buzzer.
  • A solder blob between the CSN pad and adjacent cooling pad puts CB2S into programming mode, and hid_download_py flashed the latest release.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • Module name: Moes Smart Switch Module MS-104
    Protocol: WiFi 2,4GHz
    Input Voltage: 90 - 250V AC 50/60Hz
    Max Current: 10A
    Wifi module: Tuya CB2S (BK7231N) datasheet

    This is the 1 gang vesion of the module there is also a 2 gang version available (obviously with the same PCB based on tear-down).
    Bought it on aliexpress from MOES Online store. It has also Zigbee, Zigbee+RF, WiFi+RF versions.
    4 gang version has different internals, see tear-down in other topic: Link
    Flashed latest release with python flasher: hid_download_py

    Pictures of the module:
    [BK7231N CB2S] Moes Smart Switch 1 gang WiFi - MS-104 [BK7231N CB2S] Moes Smart Switch 1 gang WiFi - MS-104 [BK7231N CB2S] Moes Smart Switch 1 gang WiFi - MS-104 [BK7231N CB2S] Moes Smart Switch 1 gang WiFi - MS-104 [BK7231N CB2S] Moes Smart Switch 1 gang WiFi - MS-104


    Tear-down of the module:
    [BK7231N CB2S] Moes Smart Switch 1 gang WiFi - MS-104 [BK7231N CB2S] Moes Smart Switch 1 gang WiFi - MS-104 [BK7231N CB2S] Moes Smart Switch 1 gang WiFi - MS-104 [BK7231N CB2S] Moes Smart Switch 1 gang WiFi - MS-104 [BK7231N CB2S] Moes Smart Switch 1 gang WiFi - MS-104

    Pin config:
    [BK7231N CB2S] Moes Smart Switch 1 gang WiFi - MS-104

    Pin23: Button1
    Pin24: Relay1
    Pin26: Buzzer (works as PWM)

    Edit:
    One easy way I have found to put CB2S into programming mode to put a solder blob between CSN pad and the cooling pad next to it to ground it:
    [BK7231N CB2S] Moes Smart Switch 1 gang WiFi - MS-104

    Cool? Ranking DIY
    About Author
    spln
    Level 5  
    Offline 
    spln wrote 7 posts with rating 10, helped 1 times. Been with us since 2023 year.
  • ADVERTISEMENT
  • #2 20409374
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14390
    Help: 650
    Rate: 12313
    Thanks! I haven't seen a device with buzzer on configurable pin yet. Do you think it would be useful to add some scriptable commands for playing tunes with buzzer?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20410068
    spln
    Level 5  
    Posts: 7
    Help: 1
    Rate: 10
    Well, I don't have a use case in mind for the buzzer in my setup.
    But some people might want to play around with it for like an alarm or smart doorbell.
  • ADVERTISEMENT
  • #4 20410122
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14390
    Help: 650
    Rate: 12313
    How was it working with original Tuya firmware?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 20411399
    spln
    Level 5  
    Posts: 7
    Help: 1
    Rate: 10
    Well I haven't tried it with Tuya fw. My guess is that it's the same as the dimmer version with the Tuya MCU: Link
    Perhaps the idea was to notify connection issues by sound when the module is installed in a wall box behind the switch.
    Also this one doesn't have any LEDs, they have added the buzzer instead. In the linked thread it's mentioned that the beeps correspond the LED blinks on that module.
  • #6 20726105
    spln
    Level 5  
    Posts: 7
    Help: 1
    Rate: 10
    I have created a PIR motion sensor mod of this sensor. See pictures below.

    Used the place of the second relay for this. Checked the PCB and found out that one of the holes for the relay has 5V. There is also a ground pad nearby, and the other whole is not connected anywhere, so that became the PIR sensor output to easily get to the back of the PCB to connect to the CB2S.
    Used this sensor from Ali: aliexpress.com

    Pin config is the following:
      "pins": {
        "7": "dInput_NoPullUp;0",
        "23": "Btn;0",
        "24": "Rel;0"
      },
    


    Moes smart switch module with PIR sensor
    Close-up of a modified PCB with a yellow wire soldered on the surface.
    Modified PIR motion sensor mounted on a PCB with a relay and other electronic components.
    Close-up of a modified PCB with a PIR motion sensor, relay, and CB2S module.
  • #7 20726469
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14390
    Help: 650
    Rate: 12313
    Very nice mod. Given enough free GPIOs, you can still connect more sensors, like a DHT11 which requires just one GPIO and can give you temperature and humidity measurements.
    Helpful post? Buy me a coffee.
📢 Listen (AI):

Topic summary

✨ The Moes Smart Switch Module MS-104 is a 1 gang WiFi-enabled device utilizing the Tuya CB2S (BK7231N) module, supporting a voltage range of 90-250V AC and a maximum current of 10A. Users have discussed the potential utility of a buzzer on a configurable pin, suggesting it could be used for alarms or smart doorbells, although some users do not have specific use cases in mind. The original Tuya firmware's performance remains untested by some users, but it is speculated to function similarly to other Tuya devices. Additionally, a user has modified the switch to integrate a PIR motion sensor, utilizing available GPIOs for further sensor connections, such as a DHT11 for temperature and humidity measurements.
Generated by the language model.

FAQ

TL;DR: 10 A load, 90-250 V AC range, and “Very nice mod” praise [Elektroda, spln, #20408399; Elektroda, p.kaczmarek2, #20726469]. One solder-blob grounds CSN, letting you flash CB2S in ~30 s [Elektroda, spln, post #20408399]

Why it matters: Fast, open firmware turns this cheap Tuya switch into a hack-friendly IoT node.

Quick Facts

• Input voltage: 90–250 V AC, 50/60 Hz [Elektroda, spln, post #20408399] • Max load current: 10 A resistive [Elektroda, spln, post #20408399] • Wi-Fi SoC: Beken BK7231N on Tuya CB2S module [Elektroda, spln, post #20408399] • CB2S size: 12 mm × 13.7 mm × 2.2 mm [CB2S Datasheet] • Typical module idle power: ~0.4 W @ 3.3 V [CB2S Datasheet]

What hardware is inside the Moes MS-104 1-gang Wi-Fi switch?

The board carries a Tuya CB2S module with a Beken BK7231N Wi-Fi MCU, one 10 A relay, a tactile button, and a 3.3 V piezo buzzer; no status LEDs are fitted [Elektroda, spln, post #20408399]

Which CB2S pins drive the button, relay and buzzer?

Pin 23 maps to Button1, Pin 24 to Relay1, and Pin 26 outputs PWM audio to the buzzer [Elektroda, spln, post #20408399]

How do I enter programming mode on the CB2S module?

Short the CSN pad to the large ground pad beside it, power the board, then release the short. The MCU boots in USB-download mode, ready for hid_download_py flashing [Elektroda, spln, post #20408399]

Can I flash OpenBeken over USB without unsoldering the module?

Yes. Use the board’s exposed USB-to-serial pads, apply the CSN-to-GND bridge, and run hid_download_py; the process finishes in about 30 seconds [Elektroda, spln, post #20408399]

Did the original Tuya firmware use the buzzer?

Comparable Tuya dimmer models beep instead of blinking an LED, suggesting this unit beeps for pairing and fault alerts. No LEDs are present on the MS-104 board [Elektroda, spln, post #20411399]

Can the buzzer play custom tones or melodies?

OpenBeken exposes Pin 26 as PWM, so scripts can output square-wave patterns. Developers propose adding play-tone commands; tune support is feasible because the hardware already accepts variable duty cycles [Elektroda, p.kaczmarek2, post #20409374]

What is the rated electrical capacity of the switch?

The relay and power supply are specified for 90–250 V AC at up to 10 A resistive load [Elektroda, spln, post #20408399]

How can I convert the switch into a PIR motion sensor?

  1. Remove the second-relay footprint.
  2. Solder a 5 V PIR module: VCC to the relay’s 5 V hole, OUT to unused hole, GND to nearby pad.
  3. Map CB2S Pin 7 as dInput_NoPullUp for motion events [Elektroda, spln, post #20726105]

Which extra sensors still fit on the remaining GPIOs?

At least one free GPIO remains; adding a single-wire DHT11 delivers temperature and humidity readings, needing only that line plus 3.3 V and GND [Elektroda, p.kaczmarek2, post #20726469]

What fallback exists if the buzzer fails or is muted?

Because the board lacks LEDs, a silent buzzer removes all visual or audible feedback; firmware logs become your only status tool—an edge-case worth noting for remote installations [Elektroda, spln, post #20411399]

How much power does the BK7231N consume in idle Wi-Fi mode?

The CB2S datasheet lists roughly 120 mA @ 3.3 V during DTIM10 standby, about 0.4 W [CB2S Datasheet].

Are Zigbee or multi-gang versions pin-compatible?

The 2-gang Wi-Fi version shares the same PCB, so pinouts stay identical; Zigbee and RF variants change only the radio module, not relay control traces [Elektroda, spln, post #20408399]
Generated by the language model.
ADVERTISEMENT