logo elektroda
logo elektroda
X
logo elektroda

Inside MoesGo Two Channel Smart Dimmer Module MS-105B: CB2S Tuya Module & Holtek HT66F3195

leśny_ziutek 7338 34
ADVERTISEMENT
  • ADVERTISEMENT
  • #32 20901151
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14405
    Help: 650
    Rate: 12336
    The Martin Jerry Dimmer uses PWM dimmer, which is different from what MCU does. It's like a TuyaMCU dimmer but with different communication, in this case controlled via PWM:
    Screenshot of a webpage section with information about the PWM dimmer module.
    Getting other dimmers to work directly with OBK would require porting MCU functionality to OpenBeken, so OpenBeken would need to be able to detect phase via optocoupler and then quickly turn the light on at the specific point of sine wave. It is certainly doable, but there were no requests ever to that.

    Why would you like such a feature? Would you help with testing?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #33 21348324
    hulakov
    Level 1  
    Posts: 1
    >>20899239 With this config, the dimmer works in a very small range. In particular, minimal brightness is too bright. Is there a way to fix it?
  • ADVERTISEMENT
  • #34 21351383
    leśny_ziutek
    Level 12  
    Posts: 52
    Help: 3
    Rate: 9
    Different light bulbs behave differently. I have two dimmable bulbs: Osram Glow Dim and Philips WarmGlow, both with the adjust of the color temperature when dimming. Both have their pros and cons but only the Philips one can be dim very deeply: 0-100%. The Osram one is more like 30-100%.

    You can try change the range with the tuyaMcu_setDimmerRange command.

    My current autoexec.bat is below:

    
    startDriver TuyaMCU
    
    tuyaMcu_defWiFiState 4
    tuyaMcu_setDimmerRange 100 900
    
    setChannelLabel 1 L1 1
    setChannelType 1 toggle
    linkTuyaMCUOutputToChannel 1 bool 1
    
    setChannelLabel 2 L2 1
    setChannelType 2 toggle
    linkTuyaMCUOutputToChannel 7 bool 2
    
    setChannelType 3 dimmer
    linkTuyaMCUOutputToChannel 2 val 3
    
    setChannelType 4 dimmer
    linkTuyaMCUOutputToChannel 8 val 4
    
    setChannelLabel 5 toggle_L1_after
    setChannelType 5 textField
    linkTuyaMCUOutputToChannel 6 val 5
    
    setChannelLabel 6 toggle_L2_after
    setChannelType 6 textField
    linkTuyaMCUOutputToChannel 12 val 6
    
    mqtt_broadcastInterval 120
    
    PowerSave 1
    
  • #35 21351390
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14405
    Help: 650
    Rate: 12336
    tuyaMcu_setDimmerRange takes two arguments, min and max. And in the post you linked I can see:
    Screenshot of code where the tuyaMcu_setDimmerRange function has a missing space between arguments.
    did someone lost a space?
    Helpful post? Buy me a coffee.

Topic summary

✨ The MoesGo Two Channel Smart Dimmer Module MS-105B features a CB2S Tuya Module based on the BK7231N microcontroller and a Holtek HT66F3195 MCU for dimming control. The power stage uses two SLD8N65SV MOSFETs (650V, 7A) and rectifying bridges with S3M diodes (1000V, 3A). It operates as a trailing edge dimmer with voltage waveform characteristics demonstrated at various dimming levels. The device employs a TuyaMCU architecture requiring external MCU communication, flashable OTA only with matching firmware profiles, and UART port management for flashing. Configuration and control are managed via OpenBeken firmware using autoexec.bat scripts to set channel types, link TuyaMCU dpIDs to channels, and define dimmer ranges. The dimmer supports toggling and dimming channels with dpIDs mapped for boolean and value types, including additional dpIDs for toggle-after timing functions. Flash memory wear is minimized by optimized write operations. Integration with Home Assistant via MQTT is possible, though initial issues with dimming control were resolved by correcting JSON configurations. Workarounds for using rocker switches involve assigning unused GPIO pins with TglChannelOnToggle roles due to TuyaMCU's autonomous handling of physical buttons. The Martin Jerry MJ-SD01 dimmer differs by using PWM control without an external MCU, unlike TuyaMCU-based dimmers. Adjusting minimal brightness levels depends on the bulb type and can be tuned via the tuyaMcu_setDimmerRange command. The community provides detailed flashing instructions, configuration examples, and troubleshooting for OTA flashing, dpID mapping, and device integration.
Generated by the language model.

FAQ

TL;DR: Users opened the MoesGo MS-105B dual dimmer, then achieved 100 % OTA success after 3 profile attempts—“the device stays in AP mode after power-cycle” [Elektroda, leśny_ziutek, post #20827936] Flashing works via Tuya-cloudcutter and OpenBeken without soldering.

Why it matters: This lets DIYers replace Tuya cloud control with fully local, automatable firmware in under 10 minutes.

Quick Facts

• SoC: Tuya CB2S (BK7231N, 2 MB flash) [Elektroda, 20827148] • Companion MCU: Holtek HT66F3195 for zero-cross dimming [Elektroda, post #20827148] • Power stage: 2× SLD8N65SV 650 V / 7 A MOSFETs [Elektroda, 20827148] • Type: Trailing-edge (MOSFET) dimmer, 1–100 % output [Elektroda, 20827148] • OTA block risk: Updating to newer Tuya firmware can lock flashing [Elektroda, post #20827829]

What chips are inside the MoesGo/MS-105B two-channel dimmer?

The Wi-Fi module is a Tuya CB2S (BK7231N) with 2 MB flash, while dimming logic runs on a Holtek HT66F3195 MCU; drive power uses two SLD8N65SV MOSFETs and S3M bridge diodes [Elektroda, 20827148]

Is the module leading-edge or trailing-edge?

Scope captures show MOSFET conduction starts after the zero-cross—confirming a trailing-edge (RC) topology [Elektroda, 20827148]

How do I enter AP (slow-blink) pairing mode?

  1. Power the dimmer until it fast-beeps.
  2. Short S1 to L ten times (~2 s rhythm).
  3. Device switches to slow-beep AP mode and advertises “SmartLife-XXXX” [Elektroda, 20827829]

Can the dimmer be flashed without opening the case?

Yes. Tuya-cloudcutter exploits AP mode; after selecting firmware version 1.0.2 and a matching BK7231N profile, OpenBeken uploads over Wi-Fi in 2–3 minutes [Elektroda, 20827829]

Which cloudcutter profile worked?

“bk7231n_common_user_config_ty” was the first working profile after two failures—success on the 3rd try [Elektroda, 20827936]

What happens if I accept Tuya firmware updates first?

Upgrading may patch the exploit and permanently block OTA flashing—avoid updating in the Tuya/SmartLife app [Elektroda, 20827829]

How do I silence the incessant beeper?

Add tuyaMcu_defWiFiState 4 to autoexec.bat and reboot; the MCU stops buzzing after a short delay [Elektroda, 20828080]

How are the Tuya dpIDs mapped to channels?

dpID 1/7 = on-off for L1/L2; dpID 2/8 = brightness for L1/L2; dpID 6/12 provide delayed-toggle seconds [Elektroda, #20828118; #20828211].

Minimum brightness is still too bright—fix?

Issue arises when bulbs need lower phase angle. Use tuyaMcu_setDimmerRange <min> <max>, e.g., 100 900, then test. Philips WarmGlow dimmed 0–100 %, while an Osram lamp only managed 30–100 % [Elektroda, 21351383]

Can I attach a latching (rocker) wall switch instead of a momentary?

The Tuya MCU expects momentary inputs. Work-around: wire an unused BK7231N GPIO (e.g., P26) to the switch and set its role to TglChannelOnToggle; a rules script then toggles channel 1 or 2 [Elektroda, 20899252]

Edge case: what if OpenBeken boots in safe mode?

TuyaMCU keeps handling S1/S2 locally, so basic on/off still works during OBK recovery [Elektroda, 20888015]

Quick 3-step OTA flashing recap?

  1. Verify firmware version via Tuya app; do NOT update.
  2. Run tuya-cloudcutter.sh, choose BK7231N profile, supply OpenBeken .ug file.
  3. Put dimmer in slow-blink AP mode; tool uploads firmware and reboots [Elektroda, 20827829]

Does Home Assistant auto-discover the dimmer?

With OpenBeken ≥ v1.17.326, HA MQTT discovery publishes two light entities (with brightness) and one RSSI sensor; erroneous extra relays were fixed in that build [Elektroda, 20838604]

Can I remove the Holtek MCU and let BK7231N handle dimming?

Not yet. BK7231N lacks real-time zero-cross hardware; implementing phase-cut in firmware would require new driver development and community testing [Elektroda, 20901151]

What MOSFET ratings should replacement parts match?

Use 650 V Vds and ≥7 A continuous current; SLD8N65SV Rds(on) is 1.1 Ω at 25 °C [Elektroda, 20827148]
Generated by the language model.
ADVERTISEMENT