Replaces original Tuya firmware on door sensors with battery and ESP8266 wifi module. The firmware is tested with following device:
The sensor can be purchased on AliExpress for example
http://192.168.4.1/config
. Otherwise it will connect to the existing Wifi, web interface can be called for configuration via http://<your_IP>/config
.
To install the firmware, follow instructions here:
https://github.com/klausahrenberg/WDoorSensor/blob/master/Flashing.md
After installation/flashing of firmware, disconnect all connections from programmer and insert the batteries:
http://192.168.4.1
After the installation of this firmware, any newer version can be installed over the air:
http://<your_IP>/config
. {
"idx":"doorsensor",
"ip":"192.168.x.x",
"firmware":"x.xx",
"open":true|false,
"battery":"low|medium|high"
}
For build from sources you can use the Arduino-IDE, Atom IDE or other. All sources needed are inside the folder 'WDoorSensor' and my other library: https://github.com/klausahrenberg/WAdapter. Additionally you will need some other libraries: DNSServer, EEPROM (for esp8266), ESP8266HTTPClient, ESP8266mDNS, ESP8266WebServer, ESP8266WiFi, Hash, NTPClient, Time - It's all available via board and library manager inside of ArduinoIDE