Skip to content

Instantly share code, notes, and snippets.

@ignisf
Last active December 7, 2022 09:36
Show Gist options
  • Save ignisf/ed4691de467e6125fa1f77d915b3d3cd to your computer and use it in GitHub Desktop.
Save ignisf/ed4691de467e6125fa1f77d915b3d3cd to your computer and use it in GitHub Desktop.
Tasmota Nedis WIFIDW10WT

Credit goes to https://github.com/uspass/Tuya-Water-Leak-Sensor

Initial configuration:

Module 54
TuyaMCU 51,21

Backlog SetOption1 1; SetOption65 1; SetOption36 0; SwitchMode 1

Enable publishing to MQTT:

Rule1
  ON TuyaReceived#Data$|6501000101 DO publish2 stat/%topic%/WATER ON ENDON
  ON TuyaReceived#Data$|6501000100 DO publish2 stat/%topic%/WATER OFF ENDON

Rule2
  ON TuyaReceived#Data$|6604000100 DO publish2 stat/%topic%/BATT 100 ENDON
  ON TuyaReceived#Data$|6604000101 DO publish2 stat/%topic%/BATT 75 ENDON
  ON TuyaReceived#Data$|6604000102 DO publish2 stat/%topic%/BATT 50 ENDON
  ON TuyaReceived#Data$|6604000103 DO publish2 stat/%topic%/BATT 1 ENDON
  
Backlog Rule1 1; Rule2 1

Enable Home Assistant integration:

Rule3
  ON system#boot do publish2 homeassistant/binary_sensor/%macaddr%_fire/config {"name":"Kitchen Water Leak","state_topic":"stat/%topic%/WATER","device_class":"moisture","unique_id":"%macaddr%_water","device":{"connections":[["mac","%macaddr%"]]}} ENDON
  ON system#boot do publish2 homeassistant/sensor/%macaddr%_battery/config {"name":"Kitchen Water Leak Alarm Battery","state_topic":"stat/%topic%/BATT","device_class":"battery","unique_id":"%macaddr%_batt","device":{"connections":[["mac","%macaddr%"]]}} ENDON

Rule3 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment