Hi all.
Latest purchase, wanted a light/fan switch for a ceiling fan but alas the fan controller is PWM and the ceiling fan is noisy.
I'm going to try it on a bathroom extractor fan instead.
Photo's of the board
Features a CB3S with TuyaMCU chip that appears to have the ID scrapped off.
Does require removing the CB3S for flashing.
Current autoexec.bat is as follows, First time with a TuyaMCU device, have the light relay working but struggling with the fan control.
//start NTP drive for current time
startDriver NTP
//power save functinon
PowerSave 1
// Start TuyaMCu driver
startDriver TuyaMCU
// set TuyaMCU baud rate
//tuyaMcu_setBaudRate 115200
// set TuyaMCU default wifi state 0x04, which means "paired",
// because some TuyaMCU MCUs will not report all data
// unless they think they are connected to cloud
tuyaMcu_defWiFiState 4
// Light on/off
setChannelLabel 1 "1"
setChannelType 1 Toggle
linkTuyaMCUOutputToChannel 15 bool 1
tuyaMcu_sendQueryState returns
[{"id":103,"type":4,"data":0},{"id":102,"type":4,"data":0},{"id":101,"type":4,"data":2},{"id":15,"type":1,"data":0},{"id":1,"type":1,"data":0}]
Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 01 00 01 00 11
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 1 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 0
Info:TuyaMCU:Received: 55 AA 03 07 00 05 0F 01 00 01 00 1F
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 15 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 0
Info:TuyaMCU:Received: 55 AA 03 07 00 05 65 04 00 01 02 7A
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 101 type 4-enum len 1
Info:TuyaMCU:ParseState: byte 2
Info:TuyaMCU:Received: 55 AA 03 07 00 05 66 04 00 01 00 79
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 102 type 4-enum len 1
Info:TuyaMCU:ParseState: byte 0
Info:TuyaMCU:Received: 55 AA 03 07 00 05 67 04 00 01 00 7A
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 103 type 4-enum len 1
Info:TuyaMCU:ParseState: byte 0
Looking for help in getting the fan control side working,
Cheers :)
Added after 17 [minutes]:
Logs taken from the webapp with only TuyaMCU selected
Pressing a speed selection button, once on and once off results in;
low fan on/off;
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 07 00 05 66 04 00 01 00 79
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 102 type 4-enum len 1
Info:TuyaMCU:ParseState: byte 0
Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 01 00 01 01 12
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 1 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 1
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 01 00 01 00 11
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 1 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 0
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Pressing the Med speed button once on and once off results in;
med fan on/off;
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 07 00 05 66 04 00 01 01 7A
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 102 type 4-enum len 1
Info:TuyaMCU:ParseState: byte 1
Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 01 00 01 01 12
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 1 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 1
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 01 00 01 00 11
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 1 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 0
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Pressing the Med speed button once on and once off results in;
high fan on/off;
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 07 00 05 66 04 00 01 02 7B
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 102 type 4-enum len 1
Info:TuyaMCU:ParseState: byte 2
Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 01 00 01 01 12
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 1 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 1
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 01 00 01 00 11
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 1 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 0
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
It appears ID 102 sets the fan speed & ID 1 turns the fan on/off.
How do you go about setting this up?
Cheers, Anthony
Latest purchase, wanted a light/fan switch for a ceiling fan but alas the fan controller is PWM and the ceiling fan is noisy.
I'm going to try it on a bathroom extractor fan instead.



Photo's of the board





Features a CB3S with TuyaMCU chip that appears to have the ID scrapped off.
Does require removing the CB3S for flashing.
Current autoexec.bat is as follows, First time with a TuyaMCU device, have the light relay working but struggling with the fan control.
//start NTP drive for current time
startDriver NTP
//power save functinon
PowerSave 1
// Start TuyaMCu driver
startDriver TuyaMCU
// set TuyaMCU baud rate
//tuyaMcu_setBaudRate 115200
// set TuyaMCU default wifi state 0x04, which means "paired",
// because some TuyaMCU MCUs will not report all data
// unless they think they are connected to cloud
tuyaMcu_defWiFiState 4
// Light on/off
setChannelLabel 1 "1"
setChannelType 1 Toggle
linkTuyaMCUOutputToChannel 15 bool 1
tuyaMcu_sendQueryState returns
[{"id":103,"type":4,"data":0},{"id":102,"type":4,"data":0},{"id":101,"type":4,"data":2},{"id":15,"type":1,"data":0},{"id":1,"type":1,"data":0}]
Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 01 00 01 00 11
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 1 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 0
Info:TuyaMCU:Received: 55 AA 03 07 00 05 0F 01 00 01 00 1F
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 15 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 0
Info:TuyaMCU:Received: 55 AA 03 07 00 05 65 04 00 01 02 7A
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 101 type 4-enum len 1
Info:TuyaMCU:ParseState: byte 2
Info:TuyaMCU:Received: 55 AA 03 07 00 05 66 04 00 01 00 79
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 102 type 4-enum len 1
Info:TuyaMCU:ParseState: byte 0
Info:TuyaMCU:Received: 55 AA 03 07 00 05 67 04 00 01 00 7A
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 103 type 4-enum len 1
Info:TuyaMCU:ParseState: byte 0
Looking for help in getting the fan control side working,
Cheers :)
Added after 17 [minutes]:
Logs taken from the webapp with only TuyaMCU selected
Pressing a speed selection button, once on and once off results in;
low fan on/off;
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 07 00 05 66 04 00 01 00 79
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 102 type 4-enum len 1
Info:TuyaMCU:ParseState: byte 0
Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 01 00 01 01 12
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 1 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 1
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 01 00 01 00 11
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 1 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 0
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Pressing the Med speed button once on and once off results in;
med fan on/off;
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 07 00 05 66 04 00 01 01 7A
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 102 type 4-enum len 1
Info:TuyaMCU:ParseState: byte 1
Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 01 00 01 01 12
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 1 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 1
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 01 00 01 00 11
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 1 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 0
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Pressing the Med speed button once on and once off results in;
high fan on/off;
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 07 00 05 66 04 00 01 02 7B
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 102 type 4-enum len 1
Info:TuyaMCU:ParseState: byte 2
Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 01 00 01 01 12
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 1 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 1
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 07 00 05 01 01 00 01 00 11
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
Info:TuyaMCU:ParseState: id 1 type 1-bool len 1
Info:TuyaMCU:ParseState: byte 0
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04
Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
It appears ID 102 sets the fan speed & ID 1 turns the fan on/off.
How do you go about setting this up?
Cheers, Anthony