Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamQuote:startDriver TuyaMCU
setChannelType 1 toggle
setChannelType 2 dimmer
tuyaMcu_setDimmerRange 0 1000
linkTuyaMCUOutputToChannel 1 1 1
linkTuyaMCUOutputToChannel 2 2 2
tuyaMcu_defWiFiState 4
// when channel 1 changes, save it to flash channel 201
addEventHandler OnChannelChange 1 setChannel 201 $CH1
// when channel 2 changes, save it to flash channel 202
addEventHandler OnChannelChange 2 setChannel 202 $CH2
PowerSave 1
// On start
// addRepeatingEvent [RepeatTime] [RepeatCount]
// This should fire once due to RepeatCount 1
addRepeatingEvent 1 1 backlog setChannel 1 $CH201; setChannel 2 $CH202
TL;DR: 150 W Tuya dimmers (WB2S/CB3S) flash to OpenBeken in <3 min and use a 0-1000 internal brightness scale; “Everything works well with MQTT and Home Assistant” [Elektroda, p.kaczmarek2, post #20051870]
Why it matters: you eliminate cloud lock-in, silence the beeper, and gain local HA control in one evening.
• Max load: 150 W TRIAC-less MOSFET dimmer (SIF12N65F/SIF7N65F) [Elektroda, p.kaczmarek2, #20051870; spln, #20411501] • Wi-Fi SoC: BK7231T/N on WB2S/CB3S modules; 802.11 b/g/n 2.4 GHz [Elektroda, p.kaczmarek2, post #20051870] • UART speed: 9 600 bps default; optional 115 200 bps with tuyaMcu_setBaudRate [Elektroda, p.kaczmarek2, post #20551594] • Dimmer range: GUI 0-100 ↔ TuyaMCU 0-1000 [Elektroda, p.kaczmarek2, post #20051870] • Heartbeat: TuyaMCU command 0 every ≈1 s [Elektroda, Log excerpt, post #20386150]
startDriver TuyaMCU
setChannelType 1 toggle
setChannelType 2 dimmer
tuyaMcu_setDimmerRange 0 1000
linkTuyaMCUOutputToChannel 1 1 1
linkTuyaMCUOutputToChannel 2 2 2
tuyaMcu_defWiFiState 4 # silences beeper
PowerSave 1 # runs cooler
[Elektroda, p.kaczmarek2, post #20385930]startDriver TuyaMCU then tuyaMcu_sendQueryState. The console prints packets like dpId 2 dataType 2 value 1000; map each id with linkTuyaMCUOutputToChannel. This avoids trial-and-error and works even when the original firmware is gone [Elektroda, MotoSpeed, post #20277227]tuyaMcu_defWiFiState 3 (or 4) to autoexec. The command fakes a “router connected” flag, which stops the MCU’s pairing alarm. It cures both rapid (state 0) and slow (state 1) beeps [Elektroda, p.kaczmarek2, #20385930; max_allan, #20386150].bri_stat_t and bri_cmd_t, exposing the slider. Users report success on v1.17.118 firmware [Elektroda, jrhenk, post #20604096]addEventHandler OnChannelChange and restore them with a one-shot addRepeatingEvent at boot. Example script keeps toggle and dimmer values and survived cold restarts in tests [Elektroda, p.kaczmarek2, #20460296; gbauer, #20464027].
setChannelType 1 toggle
setChannelType 2 dimmer
setChannelType 3 toggle
setChannelType 4 dimmer
linkTuyaMCUOutputToChannel 1 1 1
linkTuyaMCUOutputToChannel 2 2 2
linkTuyaMCUOutputToChannel 7 1 3
linkTuyaMCUOutputToChannel 8 2 4
[Elektroda, p.kaczmarek2, post #20254038]heartbeat_valid never flips to 1, the Holtek MCU may hang. Power-cycle the mains and confirm 9 600 bps. Boards with CB3S sometimes ship with broken bootloaders; reflashing via SPI pads recovers them [Elektroda, rtrabold, #20254253; p.kaczmarek2, #20312073].PowerSave 1 to drop Wi-Fi Tx current. <devicename>/. Toggle uses 1/get and 1/set; brightness uses 2/get and 2/set. Payload is 0/1 for toggle and 0-99 for brightness (scaled) [Elektroda, nelevit, post #20326969]smartlife_mcu_xxx AP, ready for Cloudcutter flashing [Elektroda, jrhenk, post #20551054]