
Available from:
Aliexpress.com
Banggood.com
Manufacturer:
Szneo.com
Flashed with:
Tuya-Convert
GPIO # | Component |
---|---|
GPIO00 | User |
GPIO01 | Tuya Tx |
GPIO02 | User |
GPIO03 | Tuya Rx |
GPIO04 | User |
GPIO05 | User |
GPIO09 | None |
GPIO10 | None |
GPIO12 | User |
GPIO13 | User |
GPIO14 | User |
GPIO15 | User |
GPIO16 | User |
FLAG | None |
{"NAME":"Neo Mouse Trap","GPIO":[255,107,255,108,255,255,0,0,255,255,255,255,255],"FLAG":0,"BASE":54}
This is a Tuya electric mouse trap. Runs on 4 1.5v AA batteries.
Identified with MCU Product ID: {"p":"ymf4oruxqx0xlogp","v":"1.0.1","m":0}
.
Flashing
Once you disassemble the top case and unscrew the PCB from it there are labelled pads for all needed GPIO’s on the under side of the board. Disconnect all cabled from the PCB and power the ESP8266 chip using its 3V3 pad. Follow standard flashing procedure.
Configuration
Please read TuyaMCU article to understand the terminology and configuration process.
Disable Power Cycle recovery, turn on TuyaReceived publish to MQTT and change device to a TuyaMCU module
Backlog SetOption65 1; SetOption66 1; SetOption36 0; Module 54
Switch device to battery power mode
Backlog TuyaMCU 51,51; TuyaMCU 99,1
This rule is required to shut down Tasmota after a successful boot and empty mouse trap.
backlog rule1 on tuyareceived#data=55AA00050005650100010070 do backlog delay 300; serialsend5 55AA000500010005 endon; rule1 1
When the trap is triggered it will stay turned on until reset.
Functions
- dpid 101 -
1
reports trap triggered - dpid 102 - battery
0
- 100%1
- 75%2
- 50%3
- 25% - low
Home Assistant configuration
Only works on SetOption19 1
Add these rules to console, your mouse trap will be autodiscovered on reboot.
rule2
on tuyareceived#data=55AA00050005650100010171 do publish2 stat/%topic%/trap ON endon
on tuyareceived#data=55AA00050005650100010070 do publish2 stat/%topic%/trap OFF endon
on tuyareceived#data=55AA00050005660400010074 do publish2 stat/%topic%/battery 100 endon
on tuyareceived#data=55AA00050005660400010175 do publish2 stat/%topic%/battery 75 endon
on tuyareceived#data=55AA00050005660400010276 do publish2 stat/%topic%/battery 50 endon
on tuyareceived#data=55AA00050005660400010377 do publish2 stat/%topic%/battery 25 endon
rule3
on system#boot do publish2 homeassistant/binary_sensor/%deviceid%_trap/config {"name":"%topic% alert","state_topic":"stat/%topic%/trap","value_template":"{{value}}","unique_id":"%deviceid%_trap","device":{"identifiers":["%deviceid%"],"name":"%topic%","model":"NAS-MA01W","sw_version":"Tasmota","manufacturer":"Tasmota"}} endon
on system#boot do publish2 homeassistant/sensor/%deviceid%_battery/config {"name":"%topic% battery","state_topic":"stat/%topic%/battery","value_template":"{{value}}","device_class":"battery","unit_of_measurement":"%","unique_id":"%deviceid%_battery","device":{"identifiers":["%deviceid%"],"name":"%topic%","model":"NAS-MA01W","sw_version":"Tasmota","manufacturer":"Tasmota"}} endon
Enable the rules:
backlog rule2 1; rule3 1