WiFi door and window sensors were my next esp project. I’ve ordered 4 and will have a go at reverse engineering them and seeing if I can get them working with esphomeyaml.
I’m messing with the ESP32 deep sleep mode at the moment. I can get it down to 7uA sleeping and 300-400mA when awake. I can connect and update a few MQTT sensors in less than 40 seconds.
So…
The battery is 3.V x 850mAh = 2.55Wh
Lets say my door opens an average of 4 times a day, = 160 sec active = 0.353160/60/60 = 47mWh / day
The energy used asleep is orders of magnitude less than this at 0.5 mWh/day.
2.55Wh / 47.5 mWh/day = 54 days.
At $3.50 AUD per battery, that’s an annoying 6 non rechargeable battery changes a year at a total cost of $24 AUD - per door.
To last two years the device would have to draw 3.5mWh a day. That would require the door to be opened only once per day and to be able to wake and transmit the MQTT message in 10 seconds. Sending only one mqtt message this might be possible.
BUT the ESP2866 sleep current is 3 times as large (20uA).
Hmmm. Not sure how they can claim “Battery life: 2 years”.
And let’s not forget that batteries self-discharge, and also, their voltage drops when it gets cold. Door/Windows sensors are meant to be attached to the coldest part of the room - the door/window.
I gave up trying to reflash them in the end. I could get them into programming mode but couldn’t flash them. There must be something interfering with the chip on the PCB.
Bit of an update. I totally failed to get tuya convert to discover them. Also failed using this (ignore the title it works with the Neo Coolcam door window sensors as well):
I could get it into boot mode but not flash it with the esphome flash tool. If you can do that the bin file generated from ESPhome should work.