Treatlife Smart Ceiling Fan and Light Dimmer Switch

Ok, I figured out that using Node-RED at least, I can set the individual fan speeds using this JSON in the data attributes field of a call service node, when turning on the fan entity:

{
    "percentage": 50
}

Where fan speed 1 in the app is 25, speed 2 is 50, speed 3 is 75 and speed 4 is 100.

1 Like

Mine looks a lot like yours @1Gunn, but what I realized in setting the brightness/speed, click on the name, then click on the “Sliders Menu” top right to see the controls. Not sure why they’re like that?

Slider Menu icon after you click on the entity names, top right:
image

When you click that, you’ll see the speed/brightness sliders:


Hope that helps.

1 Like

Awesome, thanks! I see the same. I think I’m all set, thanks for the help!

1 Like

Kind of an old post, and Tasmota is great! But, flashing is not for the faint of heart… I’ve flashed a couple of these, but wanted to share that I got the latest one I bought working with the localtuya integration. It is relatively easy to set up, and doesn’t require opening up the switch.

2 Likes

Just tipping in to say that these are still being sold with the TYWE3S chips on them, so if you get lucky and know your way around a soldering iron it’s really not a hard task to flash Tasmota. I got one running today with this method and it’s working well so far!

So Eventually… after adding and re-configuring and deleting several times I got this working perfectly via local Tuya. If you don’t have your integration setup to take advantage of the cloud api adding, then you won’t be able to do this. It’s worth the effort to get that setup.

The Datapoints for the fan are 1 for on off, 3 for fan speed. Make sure to set your max speed to 4.
The DPS for the light are 9 for on off, 10 for brightness.

Has anybody else ordered these recently and can confirm which chips they included? The Tasmota page indicates that the newer revisions ‘…now comes with a Wi-Fi module incompatible with Tasmota’ but IguaneFabuleux indicate in November that maybe some units were still compatible so maybe it would be worth the gamble?

Hacking this using Tasmota seems to be overwhelming is there any way to use this without the need to go through the Tuya and IoT integration? My Basic subscription has reached the max API calls and now I can no longer use the devices from my HA :neutral_face:

Do you mind sharing the model you purchased and instructions to replicate?

I’d like to thank the folks who figured this out. It is a bit labor intensive, but that’s ok. Doing the first one takes the greatest amount of time.

I’ve been using Wemo switches and can not find any 3-way switches. So, I decided to switch to Treatlife because they are readily available. For those asking about the which models to use, I would guess the ones with the depressed light on the toggle as in the picture, below.

I believe these are the newest fan switches. The light dimmers use a combination of the push buttons and the toggle with the depressed light.


@Puree Tofu, the work flow in this thread requires installing local Tuya and creating a Tuya account to get the keys. The video in the link below is a year old. Things have changed a bit in HA and on the Tuya site. But, the information is there and you will need to do a bit of digging.

This video will get you started and this thread will help you getting a basic card set up.

1 Like

Are you adding these as a Ceiling fan in Tuya? I don’t see a fan/light combo.

I’m posting this in hopes of helping someone out with the issue i faced with the Treatlife DS03 Fan/Light Combo.

I’ve been using localtuya with other devices but struggled to get the DS03 added, it even takes a while for discovery after a HA restart. I resorted to using Homebridge and homebridge-tuya module and they work perfectly fine.

This weekend, I decided to tackle the localtuya and DS03 problem and be on a single unified platform (HA).

I have 3 of these DS03 switches, 2 of them were from a 2-pack and other was bought separately. The ones from the 2-pack gets discovered but i was unable to add with an error along the lines of no datapoints being returned. The single switch did not have the problem and was able to be added and worked fine, with manual DPs settings described in this thread.

Comparing all 3 switches in Smartlife revealed the 2-pack switches had different main and MCU versions than the single switch. The single has MCU version 5.1.1 while the 2-pack switches have 3.3.16, all considered latest versions. I chalked it up to different hardware and potentially different capabilities.

From another thread, I read some of these switches cannot be controlled by multiple sources, which in my case was Homebridge. I removed them from Homebridge, and was able to add one of switches from the 2-pack, but the other one was stubborn. I ended up resetting it, and now all 3 are added and working perfectly in HA.

Thank you all for being such a great resource and I hope my experience can help others!

Whew, I finally have it 90% working. I just bought the Treatlife DS03, installed localtuya and got that working but the DPS was a little different than what was posted here.

Name: fan light switch
Host: automatically filled in (but DIFFERENT than what is in IoT Tuya!)
Local key: [from IoT Tuya]
Protocol 3.4
Enable debugging: not checked
Scan interval: not set
Manual DPS: LEAVE BLANK
Dpid to send: LEAVE BLANK

Entities: I started with light
Configure entity DP101(state false as the physical switch was off) with type light
Friendly name: living room light
Brightness: 6(value 396 as I had adjusted on the physical switch)
Brightness lower value: 1 (lowered from 100)
Brightness upper value: left at default 1000
Minimum color temperature: left at default 2700
Maximum color temperature: left at default 6500

Configure entity dp1 with type fan
Friendly name: living room fan
Fan speed: 3(value: 1)
Forward dps string: forward
Reverse dpw string: reverse
Minimum fan speed: 1
Maximum fan speed: 4
Fan speed modes list: enabled
Dp value type: str

This should have given me 1 device with 2 entities, however even though I unchecked add another entity, HA forced me to setup 6 more devices, which I just left as switches. (DPS 3 again, (though it had been used already), DPS 6 again, DPS 105 (value of 20, not sure what this is), DPS 108, and DPS 196 (value of mode 3, which is something in the Tuya Smart app).

Now while the Fan (finally!) works great, it has on/off, and speeds 1-4. BUT the dimmer is busted. And oddly it is busted in HA, in the Tuya Smart app, and on the physical switch itself. It can turn on/off, but the brightness is maxed out. I wonder if something physically burned out in the switch, and I need a new switch.

Any of you have the physical switch buttons stop working?
Edit: next day I figured it out. Turns out if you cut power to the switch it resets it. Not that I needed to add it again, but it did start working. So I just needed to flip the breaker back and forth.

2 Likes

Thank you thank you thank you. The missing piece for me was DP 101. For some reason I thought the light needed to be DP 3.

DP 1 = Fan Switch (true,false)
DP 3 = Fan Speed (1,2,3,4)
DP 9 = Light (true,false)
DP 10 = bright_value
DP 101 = fan_countdown
DP 103 = light_count_down
DP 105 = lowest_brightness
DP 106 = light_mode

Fan & Light Setup

Light and Fan work great and way faster then the cloud. Shows as 1 device with 2 entities

Correction on Fan

Wait, @xyipher , what is the model # your fan/light switch?

And you are using localtuya, yes? Or is it something else?

I’m having to start over with localtuya and my Treatlife switches. I’m sure this is due to user error, but at this point, that doesn’t matter.

I am trying to configure DS02F (fan), DS02S (single pole dimmer) and DS03 (fan and light dimmer) switches. For now, I would like to focus on the DSO3 fan/light combo switch/

DS03 is on the following firmware:
Main Module: V3.1.4
MCU Module: V3.4.3

I am a novice and have limited knowledge and vocabulary.

If I try to configure a DS03 and select protocol version 3.4, I get an error that “no datapoints could be found”.

If I use protocol version 3.3 and discover device entities automatically, I get these:

The light dimmer works properly. The fan speed control, does not work at all, in spite of it appearing to do so. If I set speed at 100% on the wall switch, the “slider” has no affect on fan speed.

If I use protocol version 3.3 and configure entities manually, I’ve not had any luck getting some sort of slider controls for speed or dimming like in the OP’s images.

Try these settings for the fan

1 Like

About 2 hours ago I started from scratch having never touched any of this, so it’s doable. but it did take some trial and error to figure out how to get this all to work. I figured I would type it all out in one big post since I couldn’t find that as I worked through it. But certainly what has been posted is helpful.

  1. You start by creating the Tuya Dev account mentioned above (following the posted video - Thank Brian Wermeyer). This is followed by installing Tuya app to your phone and creating a new Tuya App Account (I made one separate from the Tuya Dev account).

  2. Then you reset each device (I have 3 DS03 devices) so they can be rediscovered by the Tuya app. The interface basically matches the TreatLife app and it still works in that app after the HA setup is worked out.

  3. Next you are back to the Tuya Dev account and you choose “Devices” and then “Link Tuya App Account”. You will need to scan the QR from within the Tuya App by tapping the “+” in the upper right corner.

  4. Once linked there is a UserID (UID), note that for later.

  5. Now in HA you add the Local Tuya integration from HACS. Once that is installed, you restart HA and configure the integration. This is where you need the Client ID and Secret from the Tuya Dev Cloud Project you created, but also the UID from the Linked App Account mentioned previously. This makes little sense and I saw lots of users (myself included) get hung up here on what to enter as the User ID. I saw lots of people mention a password, but I see no box asking for a password and I didn’t enter one. The Client and Secret are the authentication method.

  6. It should now connect to the Tuya Cloud API and you can add Devices.

  7. When you click “Configure” in Local Tuya and choose Add Device you should see your devices in a list and you can choose one. I used the settings below for my Celiing fan switches. For whatever reason it took me a bit to get the settings right. the ID is the most crucial part, and I saw different options for the Fan Speed Mode List both here and Reddit.

Settings
Name: fan light switch
Host: [auto-populated local ip, set static in router]
Local key: [auto-populated from tuya]
Protocol 3.3
Enable debugging: not checked
Scan interval: not set
Manual DPS: not set
Dpid to send: not set

Entities:
9: light
1: fan

Configure entity DP9 with type light
Friendly name: living room light
Brightness: 10(value 10)
Brightness lower value: 10
Brightness upper value: 1000
Minimum color temperature: 2700
Maximum color temperature: 6500

Configure entity dp1 with type fan
Friendly name: living room fan
Fan speed: 3(value: 1)
Forward dps string: forward
Reverse dpw string: reverse
Minimum fan speed: 1
Maximum fan speed: 4
Fan speed modes list: disabled
Dp value type: str

1 Like