
Available from:
Aliexpress.com
GPIO # | Component |
---|---|
GPIO00 | User |
GPIO01 | User |
GPIO02 | User |
GPIO03 | User |
GPIO04 | User |
GPIO05 | User |
GPIO09 | None |
GPIO10 | None |
GPIO12 | User |
GPIO13 | User |
GPIO14 | User |
GPIO15 | User |
GPIO16 | User |
FLAG | None |
{"NAME":"MY-KCL01800FB","GPIO":[255,255,255,255,255,255,0,0,255,255,255,255,255],"FLAG":0,"BASE":54}
Please read TuyaMCU to understand the terminology and configuration process.
Flashed via serial by using TYWE3S pins. Might work with Tuya Convert.
Tuya Product ID: GQxEe5orh45cMgA61.0
PCB code: KCL-M1801C_M 2018_11_12 V5.0
Functions
dpID 2
device mode: 0 = off / 1 = continuous / 2 = intermittent / 3 = timer
dpID 4
set timer (180 min max) not needed with Tasmota, there’s a Timer function
dpID 6
light control: 0 = off / 1 = rgb cycle / 2 = white / 3 = single color
dpID 7
led dimmer
dpID 8
led color: 14 char value in hex
(can define only RGB and send HSV value as max: RRGGBBffff6464
)
dpID 9
error notification: 70 = ok / 1 = error
dpID 101
mist strength: 0 = low / 1 = high
I found the built in buzzer very annoying and desoldered it for quieter operation!
Configuration
After applying the template and configuring Wi-Fi and MQTT issue
Backlog SetOption66 1; TuyaMCU 21,7; TuyaMCU 11,111; TuyaMCU 12,101; TuyaMCU 13,133; TuyaMCU 14,9; TuyaMCU 15,115; DimmerRange 1,255; SetOption59 1; SwitchMode 1
For diffuser control and status:
Rule1 ON TuyaReceived#Data=55AA00070005020400010012 do Power1 0 ENDON ON TuyaReceived#Data=55AA00070005020400010113 do Power1 1 ENDON ON TuyaReceived#Data=55AA00070005020400010214 do Power1 1 ENDON ON TuyaReceived#Data=55AA00070005020400010315 do TuyaSend4 2,1 ENDON ON Power1#State=1 do TuyaSend4 2,1 ENDON ON Power1#State=0 do TuyaSend4 2,0 ENDON
For light control and status:
Rule2 ON Power3#State=1 do backlog Tuyasend4 6,3; publish2 tele/diffuser/STATE {"Light":"ON","LightMode":"color"} ENDON ON Event#light_off do TuyaSend4 6,0 ENDON ON Event#rgb_cycle do TuyaSend4 6,1 ENDON ON Event#white do TuyaSend4 6,2 ENDON ON Event#color do TuyaSend4 6,3 ENDON ON Power3#State=0 do Backlog TuyaSend4 6,0; publish2 tele/diffuser/STATE {"Light":"OFF"} ENDON
Rule3 ON TuyaReceived#Data=55AA00070005060400010319 do Power3 1 ENDON ON TuyaReceived#Data=55AA00070005060400010117 do Publish2 tele/diffuser/STATE {"Light":"ON","LightMode":"rgb_cycle"} ENDON ON TuyaReceived#Data=55AA00070005060400010016 do Power3 0 ENDON ON TuyaReceived#Data=55AA00070005060400010218 do Publish2 tele/diffuser/STATE {"Light":"ON","LightMode":"white"} ENDON
Don’t forget to activate rules
Backlog Rule1 1; Rule2 1; Rule3 1
Label webUI buttons:
Backlog WebButton1 Power; WebButton2 Mist; WebButton3 Light; WebButton4 Error; WebButton5 -
What you get
- fnid11 = Relay1 serves as device power status with the help of Rule1, dummy relay no control
- fnid12 = Relay2 is mist strength status and control
- fnid13 = Relay3 turns light on or off with Rule2 and Rule3
- fnid14 = Relay4 is used for error status (ON = error), no control
- find15 = Relay5 is a dummy relay so the dimmer doesn’t control the other relays if we don’t make one dimmer uses the last relay and would trigger errors
- fnid21 = Dimmer
Light mode and status are reported to mqtt topic tele/diffuser/STATE
and command Event
is used to change light modes using TuyaSend4
command. All this is defined in Rule2
Color can be changed using TuyaSend3 8,RRGGBB64646464
(RR, GG and BB are hex value) only in color mode.
Dimming works using slider and Dimmer
command.
Home Assistant configuration
This implementation is suited to specific needs and does not incorporate all features of the device, mostly to avoid weird situations and wrong states being reported.
Fan is the diffuser. Light component is the device’s RGB light.
Binary sensor uses Relay4 to show when the diffuser is out of water.
configuration.yaml
fan:
- platform: mqtt
name: "Diffuser"
availability_topic: "tele/diffuser/LWT"
payload_available: "Online"
payload_not_available: "Offline"
state_topic: "stat/diffuser/POWER1"
command_topic: "cmnd/diffuser/POWER1"
payload_on: "ON"
payload_off: "OFF"
speed_state_topic: "tele/diffuser/STATE"
speed_value_template: "{{ value_json.POWER2 }}"
speed_command_topic: "cmnd/diffuser/POWER2"
payload_low_speed: "OFF"
payload_high_speed: "ON"
qos: 1
speeds:
- low
- high
binary_sensor:
- platform: mqtt
name: "Diffuser Water"
state_topic: "stat/diffuser/POWER4"
payload_on: "ON"
payload_off: "OFF"
availability_topic: "tele/diffuser/LWT"
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
device_class: problem
light:
- platform: mqtt
name: "Diffuser Lamp"
command_topic: "cmnd/diffuser/POWER3"
state_topic: "tele/diffuser/STATE"
state_value_template: "{% if value_json.Light is defined %}{{ value_json.Light }}{% endif %}"
payload_on: "ON"
payload_off: "OFF"
brightness_command_topic: "cmnd/diffuser/DIMMER"
brightness_state_topic: "tele/diffuser/STATE"
brightness_scale: 100
brightness_value_template: "{{ value_json.Dimmer }}"
effect_command_topic: "cmnd/diffuser/EVENT"
effect_state_topic: "tele/diffuser/STATE"
effect_value_template: "{% if value_json.Light is defined %}{{ value_json.LightMode }}{% endif %}"
effect_list:
- rgb_cycle
- color
- white
availability_topic: "tele/diffuser/LWT"
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
retain: false
rgb_command_topic: "cmnd/diffuser/TUYASEND3"
rgb_command_template: "{% set brightness = state_attr('light.diffuser_lamp','brightness') | int %}{{ '8,%02x%02x%02xffff6464' | format(red, green, blue)}}"
rgb_value_template: "{% if value_json.TuyaReceived is defined and value_json['TuyaReceived'].DpId == 8 %}{{ (value_json['TuyaReceived'].Type3Data[0:2]|int(base=16),value_json['TuyaReceived'].Type3Data[2:4]|int(base=16),value_json['TuyaReceived'].Type3Data[4:6]|int(base=16)) | join(',')}}{% endif %}"
rgb_state_topic: "tele/diffuser/RESULT"
All entities under one card:
Here’s a list of captured serial codes used for debugging:
set wifi led state
55aa000300010306
diffuser off
55AA00060005020400010011
continuous mode
55AA00060005020400010112
intermittent mode
55AA00060005020400010213
countdown mode
55AA00060005020400010314
countdown 1 min
55AA0006000866020004000000017A
countdown 1 hr
55AA00060008660200040000003CB5
countdown 3 hr
55AA0006000866020004000000B42D
high speed
55AA00060005650400010175
low speed
55AA00060005650400010074
dimmer 0%
55AA0006000807020004000000001A
dimmer 100%
55AA0006000807020004000000FF19
light on
55AA00060005060400010318
light off
55AA00060005060400010015
white light
55AA00060005060400010217
rgb cycle
55AA00060005060400010116
color green
55AA000600120803000E31316666303030303734363436345D
color blue
55AA000600120803000E3030313566663030656136343634BC
color yellow
55AA000600120803000E666665363030303033353634363493
color red
55AA000600120803000E666630303039303136353634363465
color purple
55AA000600120803000E6666303065653031333036343634BE