This device now comes with a Wi-Fi module incompatible with Tasmota
Please read TuyaMCU article to understand the terminology and configuration process.
This is a Tuya/Smart Life battery powered contact (Water Leak) sensor. Runs on two AAA batteries (not supplied with the device).
There’s an unofficial binary, compiled from current development release. Flash at your own risk.
To flash the device solder directly to TYWE3S TX, RX, GPIO0, VCC and GND pins (optionally solder GPIO0 to GND but you only need to connect it to GND during boot). You also need to disable the MCU by connecting RST to GND, otherwise you will be unable to flash.
If you’re using battery power you need to prevent the device from going to sleep by actuating the reed switch constantly (approximately every 5 seconds) during the configuration or use the serial message.
You can use
shortly after boot to put the device into wi-fi search mode (rapidly blinking red LED) which will keep it powered on for around 60 seconds.
Change device to a TuyaMCU module (or apply the provided template, result is the same)
Disable multipress button options to prevent a device reset or Wi-Fi AP config mode, disable Power Cycle recovery, turn on TuyaReceived publish to MQTT and set switchmode to follow instead of toggle
Backlog SetOption1 1; SetOption65 1; SetOption66 1; SwitchMode 1
Switch the device to battery powered sensor mode (fnId 51):
TuyaMCU for the following configuration:
Rule1 ON TuyaReceived#Data=55AA0002000001 DO publish2 stat/%topic%/STATUS OPEN ENDON ON TuyaReceived#Data=55AA00050005010400010110 DO publish2 stat/%topic%/STATUS CLOSED ENDON
Optionally: If OPEN/CLOSED seems inverted, one may also try the following alternative
Rule1 ON TuyaReceived#Data=55AA0002000001 DO publish2 stat/%topic%/STATUS CLOSED ENDON ON TuyaReceived#Data=55AA00050005010400010110 DO publish2 stat/%topic%/STATUS OPEN ENDON ON TuyaReceived#Data=55AA0005000501040001000F DO publish2 stat/%topic%/STATUS CLOSED ENDON
Rule2 ON TuyaReceived#Data=55AA00050005030400010213 DO publish2 stat/%topic%/BATT high ENDON ON TuyaReceived#Data=55AA00050005030400010114 DO publish2 stat/%topic%/BATT medium ENDON ON TuyaReceived#Data=55AA00050005030400010015 DO publish2 stat/%topic%/BATT low ENDON
Don’t forget to turn on the rule:
Backlog Rule1 1; Rule2 1
setup MQTT Sensors :
- platform: mqtt name: Water Leak Wifi Sensor state_topic: stat/water_leak_wifi/STATUS value_template: '' - platform: mqtt name: Water Leak Wifi Sensor Battery state_topic: stat/water_leak_wifi/BATT value_template: '' icon: 'mdi:battery'