Logo
Treatlife Ceiling Fan Switch
US
Model reference: DS02F
Treatlife Ceiling

Available from:
Amazon.com






Install method:
Replace module

GPIO #Component
GPIO00 None
GPIO01 Tuya Tx
GPIO02 None
GPIO03 Tuya Rx
GPIO04 None
GPIO05 None
GPIO09 None
GPIO10 None
GPIO12 None
GPIO13 None
GPIO14 None
GPIO15 None
GPIO16 None
GPIO17 None
Configuration
{"NAME":"DS02F","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54,"CMND":"TuyaMCU 11,1|SO97 1|SO68 0"}
This device uses WB3S module which needs to be replaced with ESP-12 or ESP-07 module. Besides the module, this process will require a heat gun, soldering tools and moderate soldering skill.

This is not for the feint of heart, this device comes with a custom Tuya chip, which is not ESP based. Luckily, the main board has the appropriate footprint for an ESP-12F. Instructions for a similar device can be found here

These commands are applied together with the template:

backlog SetOption97 1; tuyamcu 11,1; SetOption59 1; SetOption68 0

These commands set the baud rate to 115200, bind the Tasmota software to the appropriate channel for control of the switch, set PWM to a single light, and adds an additional topic for state. More information can be found in the Tasmota TuyaMCU guide.

Set up a rule to report speed state based on information from the TuyaMCU

Backlog Rule1 on tuyareceived#dptype4id3 do publish stat/%topic%/speed %value% endon; Rule1 1

This will monitor TuyaMCU messages for changes to the speed of the fan and publish them to MQTT. Additional information can be found in the TuyaMCU Guide as well as the DS02S guide.

Home Assistant

Using speed percentage

fan:
  - platform: mqtt
    name: "TreatLife Fan"
    state_topic: "stat/%topic%/RESULT"
    state_value_template: "{{ value_json.POWER1 }}"
    command_topic: "cmnd/%topic%/POWER1"
    payload_on: "ON"
    payload_off: "OFF"
    percentage_state_topic: "stat/%topic%/speed"
    percentage_command_topic: "cmnd/%topic%/tuyasend4"
    percentage_command_template: "3,{{ value }}"
    speed_range_max: 2
    availability_topic: "tele/%topic%/LWT"
    payload_available: Online
    payload_not_available: Offline

Using presets

fan:
  - platform: mqtt
    name: "TreatLife Fan"
    state_topic: "stat/%topic%/RESULT"
    state_value_template: "{{ value_json.POWER1 }}"
    command_topic: "cmnd/%topic%/POWER1"
    payload_on: "ON"
    payload_off: "OFF"
    preset_mode_state_topic: "stat/%topic%/speed"
    preset_mode_command_topic: "cmnd/%topic%/TuyaSend4"
    preset_mode_command_template: "3,{% if value == 'low' %}1{% elif value == 'medium' %}2{% elif value == 'high' %}3{% endif %}"
    preset_mode_value_template: "{% if value == '1' %}low{% elif value == '2' %}medium{% elif value == '3' %}high{% endif %}"
    preset_modes:
      - "low"
      - "medium"
      - "high"
    availability_topic: "tele/%topic%/LWT"
    payload_available: Online
    payload_not_available: Offline