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?
- Remove the second-relay footprint.
- Solder a 5 V PIR module: VCC to the relay’s 5 V hole, OUT to unused hole, GND to nearby pad.
- 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]
Comments
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? [Read more]
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. [Read more]
How was it working with original Tuya firmware? [Read more]
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... [Read more]
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... [Read more]
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. [Read more]