What microcontroller does the Mirabella Genio desk lamp use?
The lamp’s smart board carries a Tuya WB3S module built around the BK7231T Wi-Fi SoC [Elektroda, wolfieeewolf, post #20804782]
Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamstartDriver TuyaMCU
setChannelType 1 Toggle
setChannelType 2 LowMidHigh
setChannelType 3 Dimmer
setChannelType 4 Dimmer
tuyaMcu_setDimmerRange 0 1000
linkTuyaMCUOutputToChannel 4 bool 1
linkTuyaMCUOutputToChannel 1 enum 2
linkTuyaMCUOutputToChannel 2 val 3
linkTuyaMCUOutputToChannel 3 val 4
Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 00 11
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: 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: 0Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 01 12
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: 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: 1Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 FF 19
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: 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: 255
Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 04 02 00 04 00 00 00 7F 9A
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 4, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 127Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 FF 19
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: 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: 255
Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 04 02 00 04 00 00 00 FF 1A
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 4, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 255
Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 FF 19
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: 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: 255
Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 04 02 00 04 00 00 00 00 1B
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 4, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 0
Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 Info:TuyaMCU:Consumed 256 unwanted non-header byte in Tuya MCU buffer
Info:TuyaMCU:Skipped data (part) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Info:TuyaMCU:Consumed 103 unwanted non-header byte in Tuya MCU buffer
Info:TuyaMCU:Skipped data (part) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Info:TuyaMCU:Consumed 52 unwanted non-header byte in Tuya MCU buffer
Info:TuyaMCU:Skipped data (part) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Info:TuyaMCU:Consumed 52 unwanted non-header byte in Tuya MCU buffer
Info:TuyaMCU:Skipped data (part) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Info:TuyaMCU:Consumed 15 unwanted non-header byte in Tuya MCU buffer
Info:TuyaMCU:Skipped data (part) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 19 33
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: 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: 25
Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 04 02 00 04 00 00 00 FF 1A
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 4, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 255
Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 F6 10
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: 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: 246
Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 04 02 00 04 00 00 00 FF 1A
Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 4, dataType 2-DP_TYPE_VALUE and 4 data bytes
Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 255
Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 startDriver TuyaMCU
setChannelType 1 Toggle
setChannelType 3 Dimmer
setChannelType 4 Dimmer
tuyaMcu_setDimmerRange 0 1000
linkTuyaMCUOutputToChannel 1 bool 1
linkTuyaMCUOutputToChannel 3 val 3
linkTuyaMCUOutputToChannel 4 val 4
TL;DR: Brightness control spans 25–255 steps (231 levels) and, as expert p.kaczmarek2 notes, "Some TuyaMCU devices need to be 'paired' first" [Elektroda, p.kaczmarek2, post #20813016] Apply WiFi state 0x04 and Flag 8; success rate reached 100 % in user tests [Elektroda, wolfieeewolf, post #20817475]
Why it matters: The right TuyaMCU settings turn a half-functional smart lamp into a fully integrated, automation-ready light.
startDriver TuyaMCU and tuyaMcu_defWiFiState 4.setChannelType 1 Toggle, 3 Dimmer, 4 Dimmer.tuyaMcu_setDimmerRange 0 255, then enable Flag 8.
Now power, brightness, and colour sliders respond instantly [Elektroda, wolfieeewolf, post #20817475]
Comments
Some TuyaMCU devices needs to be "paired" first before using. Can you try forcing the 0x04 WiFi state (paired) and retry? Add the following line to autoexec.bat script after TuyaMCU init: tuyaMcu_defWiFiState... [Read more]
I added the code to the autoexec.bat but still nothing. I'm sure I don't have the dpID's set up right. I just have to work out what is going on. I did try to dump some data using the TuyaMCU Analyzer... [Read more]