You have two options:
1. just do a Yaml copy/paste from this topic (to configuration yaml, it's very simple, just remember to check device mqtt name)
2. wait for an update that will add a missing link between TuyaMCU and autodiscovery
Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamp.kaczmarek2 wrote:@nelevit before that's added to Autodiscovery, is the Yaml from the first post working for you?
mqtt:
light:
name: "TuyaMCU Dimmer (N)"
state_topic: "deviceName/1/get"
command_topic: "deviceName/1/set"
brightness_command_topic: "deviceName/2/set"
brightness_state_topic: "deviceName/2/get"
brightness_scale: 99
qos: 1
payload_on: 1
payload_off: 0
retain: true
optimistic: true
startDriver TuyaMCU
setChannelType 1 toggle
setChannelType 2 dimmer
setChannelType 3 toggle
setChannelType 4 dimmer
tuyaMcu_setDimmerRange 0 1000
linkTuyaMCUOutputToChannel 1 1 1
linkTuyaMCUOutputToChannel 2 2 2
linkTuyaMCUOutputToChannel 7 1 3
linkTuyaMCUOutputToChannel 8 2 4
Debug:MQTT:MQTT deduper sent 0, culled duplicates 0, culled too fast 0
Info:MAIN:Time 43, idle 189495/s, free 76640, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38
Debug:MQTT:MQTT deduper sent 0, culled duplicates 0, culled too fast 0
ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 0, product_information_valid=0, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
Info:MAIN:Time 44, idle 180267/s, free 75616, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38
Debug:MQTT:MQTT deduper sent 0, culled duplicates 0, culled too fast 0
ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
Info:TuyaMCU:TUYAMCU received: 55 AA 00 02 00 00 01
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 2 (MCUconf) with 7 bytes
Info:TuyaMCU:TuyaMCU_ProcessIncoming: TUYA_CMD_MCU_CONF, TODO!
ExtraDebug:TuyaMCU:Will send TUYA_CMD_QUERY_STATE (state_updated==false, try 0).
Info:MAIN:Time 47, idle 189132/s, free 75616, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38
Debug:MQTT:MQTT deduper sent 0, culled duplicates 0, culled too fast 0
ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 08 06 02 00 04 00 00 00 00 1A
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 6 with value 0 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 08 0C 02 00 04 00 00 00 00 20
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 12, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 12 with value 0 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 05 01 01 00 01 00 0E
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 12 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte:
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 1 with value 0 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 05 07 01 00 01 00 14
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 12 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 7, dataType 1-DP_TYPE_BOOL and 1 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte:
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 7 with value 0 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 08 02 02 00 04 00 00 00 14 2A
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 20
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 2 with value 20 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 08 08 02 00 04 00 00 00 1E 3A
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 8, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 30
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 8 with value 30 is not mapped
Info:MAIN:Time 48, idle 182562/s, free 75616, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38
Debug:MQTT:MQTT deduper sent 0, culled duplicates 0, culled too fast 0
ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 0, wifi_state_timer=0
Info:TuyaMCU:TUYAMCU received: 55 AA 00 00 00 01 01 01
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 0 (Hearbeat) with 8 bytes
ExtraDebug:TuyaMCU:Will send SetWiFiState 0.
Info:MAIN:Time 49, idle 142185/s, free 75616, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 334, idle 185617/s, free 75632, MQTT 0(21), bWifi 1, secondsWithNoPing -1, socks 2/38
Debug:MQTT:MQTT deduper sent 0, culled duplicates 0, culled too fast 0
ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, wifi_state_timer=38
Quote:
And it's still beeping...
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 7, dataType 1-DP_TYPE_BOOL and 1 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte:
Flag 19 - [MQTT] Always publish channels used by TuyaMCU
addChangeHandler Channel10 == 0 backlog echo "Channel 10 became zero"
addChangeHandler Channel10 == 1 backlog echo "Channel 10 became one"
addChangeHandler Channel10 == 0 publish switchVal ON
addChangeHandler Channel10 == 1 publish switchVal OFF
tuyaMcu_defWiFiState 3
The Wi-Fi is configured, and the
device successfully connects to
the router.
p.kaczmarek2 wrote:
Usage: add in autoexec bat line:tuyaMcu_defWiFiState 3
Can you try if it helps for you?
Debug:CMD:cmd [tuyaMcu_defWiFiState 4]
ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, wifi_state_timer=0
ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, wifi_state_timer=0
Info:TuyaMCU:TUYAMCU received: 55 AA 00 00 00 01 01 01
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 0 (Hearbeat) with 8 bytes
ExtraDebug:TuyaMCU:Will send SetWiFiState 0.
ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, wifi_state_timer=2
Info:TuyaMCU:TUYAMCU received: 55 AA 00 03 00 00 02
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 3 (WiFiState) with 7 bytes
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 08 06 02 00 04 00 00 00 00 1A
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 6, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 6 with value 0 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 08 0C 02 00 04 00 00 00 00 20
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 12, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 12 with value 0 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 05 01 01 00 01 00 0E
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 12 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte:
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 1 with value 0 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 05 07 01 00 01 00 14
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 12 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 7, dataType 1-DP_TYPE_BOOL and 1 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte:
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 7 with value 0 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 08 02 02 00 04 00 00 00 14 2A
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 20
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 2 with value 20 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 08 08 02 00 04 00 00 00 1E 3A
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 8, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 30
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 8 with value 30 is not mapped
ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, wifi_state_timer=3
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 08 03 02 00 04 00 00 00 00 17
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 3, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 3 with value 0 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 08 09 02 00 04 00 00 00 00 1D
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 9, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 9 with value 0 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 08 05 02 00 04 00 00 03 E8 04
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 5, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 1000
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 5 with value 1000 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 08 0B 02 00 04 00 00 03 E8 0A
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 11, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 1000
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 11 with value 1000 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 05 04 04 00 01 00 14
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 12 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 4, dataType 4-DP_TYPE_ENUM and 1 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte:
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 4 with value 0 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 05 0A 04 00 01 00 1A
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 12 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 10, dataType 4-DP_TYPE_ENUM and 1 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte:
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 10 with value 0 is not mapped
Info:TuyaMCU:TUYAMCU received: 55 AA 00 07 00 05 0E 04 00 01 00 1E
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=0]: processing command 7 (State) with 12 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 14, dataType 4-DP_TYPE_ENUM and 1 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte:
Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 14 with value 0 is not mapped
Quote:
I found when setting values from the logs page I have to wait for the wifi_state_timer to reach 60 and reset (so about a minute) for each value to take effect. That confused me a bit while testing it out, sometimes values worked, sometimes they didn't!
// when channel 0 changes, save it to flash channel 200
addEventHandler OnChannelChange 0 setChannel 200 $CH0
// 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
// On start
// addRepeatingEvent [RepeatTime] [RepeatCount]
// This should fire once due to RepeatCount 1
addRepeatingEvent 5 1 backlog setChannel 0 $CH200; setChannel 1 $CH201; setChannel 2 $CH202
// when channel 0 changes, save it to flash channel 200
addEventHandler OnChannelChange 0 setChannel 200 $CH0
// 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
addRepeatingEvent 5 1 backlog setChannel 0 $CH200; setChannel 1 $CH201; setChannel 2 $CH202
startDriver TuyaMCU
setChannelType 1 toggle
setChannelType 2 dimmer
tuyaMcu_setDimmerRange 0 1000
linkTuyaMCUOutputToChannel 1 1 1
linkTuyaMCUOutputToChannel 2 2 2
tuyaMcu_defWiFiState 3
// 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
// On start
// addRepeatingEvent [RepeatTime] [RepeatCount]
// This should fire once due to RepeatCount 1
addRepeatingEvent 5 1 backlog setChannel 1 $CH201; setChannel 2 $CH202
echo $CH2
echo $CH202
echo $CH202
echo $CH2
startDriver TuyaMCU
setChannelType 1 toggle
setChannelType 2 dimmer
tuyaMcu_setDimmerRange 0 1000
linkTuyaMCUOutputToChannel 1 1 1
linkTuyaMCUOutputToChannel 2 2 2
tuyaMcu_defWiFiState 3
// 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
// On start
// addRepeatingEvent [RepeatTime] [RepeatCount]
// This should fire once due to RepeatCount 1
addRepeatingEvent 1 1 backlog setChannel 1 $CH201; setChannel 2 $CH202
Quote:
{
"dev": {
"ids": [
"temp_studydimmer"
],
"name": "temp_studydimmer",
"sw": "1.17.118",
"mf": "Beken Corporation",
"mdl": "BK7231N",
"cu": "http://192.168.1.87/index"
},
"name": "temp_studydimmer 1",
"~": "openbk/temp_studydimmer",
"avty_t": "~/connected",
"pl_on": "1",
"pl_off": "0",
"uniq_id": "temp_studydimmer_light_1",
"qos": 1,
"stat_t": "~/1/get",
"cmd_t": "~/1/set"
}
Quote:
{
"dev": {
"ids": [
"Smart-Connect_RGBC-WW_01"
],
"name": "Smart-Connect_RGBC-WW_01",
"sw": "1.17.97",
"mf": "Beken Corporation",
"mdl": "BK7231T",
"cu": "http://192.168.1.80/index"
},
"name": "Smart-Connect_RGBC-WW_01",
"~": "Smart-Connect_RGBC-WW_01",
"avty_t": "~/connected",
"pl_on": "1",
"pl_off": "0",
"uniq_id": "Smart-Connect_RGBC-WW_01_light",
"qos": 1,
"rgb_cmd_tpl": "{{'#%02x%02x%02x0000'|format(red,green,blue)}}",
"rgb_val_tpl": "{{ value[0:2]|int(base=16) }},{{ value[2:4]|int(base=16) }},{{ value[4:6]|int(base=16) }}",
"rgb_stat_t": "~/led_basecolor_rgb/get",
"rgb_cmd_t": "cmnd/Smart-Connect_RGBC-WW_01/led_basecolor_rgb",
"clr_temp_cmd_t": "cmnd/Smart-Connect_RGBC-WW_01/led_temperature",
"clr_temp_stat_t": "~/led_temperature/get",
"min_mirs": "154",
"max_mirs": "500",
"stat_t": "~/led_enableAll/get",
"cmd_t": "cmnd/Smart-Connect_RGBC-WW_01/led_enableAll",
"bri_stat_t": "~/led_dimmer/get",
"bri_cmd_t": "cmnd/Smart-Connect_RGBC-WW_01/led_dimmer",
"bri_scl": 100
}
Quote:{
"dev": {
"ids": [
"temp_studydimmer"
],
"name": "temp_studydimmer",
"sw": "1.17.118",
"mf": "Beken Corporation",
"mdl": "BK7231N",
"cu": "http://192.168.1.87/index"
},
"name": "temp_studydimmer 1",
"~": "openbk/temp_studydimmer",
"avty_t": "~/connected",
"pl_on": "1",
"pl_off": "0",
"uniq_id": "temp_studydimmer_light_1",
"qos": 1,
"stat_t": "~/1/get",
"cmd_t": "~/1/set"
}
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]