Logo
WF-CS01 Curtain Switch
EU
WF-CS01

Available from:
Amazon.de
Aliexpress.com






GPIO #Component
GPIO00 Unknown
GPIO01 Unknown
GPIO02 Unknown
GPIO03 Relay6i
GPIO04 Unknown
GPIO05 Relay5i
GPIO09 None
GPIO10 None
GPIO12 Relay4i
GPIO13 Unknown
GPIO14 Unknown
GPIO15 Unknown
GPIO16 Unknown
GPIO013 None
FLAG None
Configuration (old version)
{"NAME":"ShutterSwitch","GPIO":[544,227,289,34,226,33,0,0,32,224,290,225,288,0],"FLAG":0,"BASE":18,"CMND":"Rule1 1"}
Requires configuring shutter support.

Added a rule to get it working properly:

Rule1 
	on Power1#State=0 do LEDPower1 0 endon 
	on Power1#State=1 do LEDPower1 1 endon 
	on Power2#State=0 do LEDPower2 0 endon 
	on Power2#State=1 do LEDPower2 1 endon

This combines to:

Rule1 on Power1#State=0 do LEDPower1 0 endon on Power1#State=1 do LEDPower1 1 endon on Power2#State=0 do LEDPower2 0 endon on Power2#State=1 do LEDPower2 1 endon

Added some commands too:

InterLock 1,2,3 # lock the relays, only one relay can be on
InterLock    on # switch interlocking on
PowerOnState  0 # keep relay(s) OFF after power up
PowerRetain   0 # don't retain states
SetOption1    1 # restrict button-multipress to single, double and hold actions
LedPower 0	# disables power LED
SetOption31 1	# optional, prevents LED from flashing if WiFi or MQTT are disconnected
SetOption80 1	# enable ShutterMode
Pulsetime3 1 	# this button is used to stop the relays. It can be turned off immediatly

This rule will allow you to toggle the LEDs by long-pressing the middle button:

Backlog Rule2 ON button3#state=3 DO power4 2 ENDON; Rule2 1

Now you must configure the durations : doc here

This module is based on the Tuya TYWE3S and TuyaConvert isn’t working anymore (but one can always try..) 20190918_122058

The inside of this module looks like this: 20190918_121854 20190918_122039

And the processor boards: 20190918_122039 20190918_122129

The device has a separate MCU on board which connects to the TYWE3s module via Rx and Tx. 20190918_122059

To be able to flash the device one needs to make 5 connections and CUT the RxD0 line Important: Cutting the Line in my model resulted in the middle button not working afterwards, so after the flash I had to resolder the cut connection: 20190918_121926

Flashing can be done in several ways: Arduino IDE, VSCode, Platformio, ESP8266Flasher, etc.

!!! BE CAREFUL: always use 3,3 volts for power, NOT 5 volts, and DISCONNECT THE MAINS COMPLETELY while working on the device !!!

The WF-WS01/02/03 have the same boards inside and can be flashed the same way. 

Alternate flash method

Unsolder the chip using a heat gun and use this CP210X based board to flash using NodeMCU PyFlasher. Heat the chip sides and push it upwards gently from underneath using tweezers on the label. Had a single problem using this method, one GPIO did not resolder correctly and one LED stayed red. Heated again and applied some solder.

!!! BE CAREFUL: do not tear the contact pads from the board. It will be really hard to make the board work again afterwards.