Project-Idea by Michael Dworkin: https://esp8266-server.de/Reedkontakt.html
Here you will find all the files you need to build an ESP8266-based window sensor whose battery will last for several years.
Have a look at my video on Youtube:
https://youtu.be/vxbuO1zWo3w
Here you can find the code (ArduinoIDE/PlatformIO) for the microcontroller, the Gerber files for PCB ordering, the circuit simulation for CircuitJS and additional information.
1x ESP-12F
1x 1000 uF Electrolytic Capacitor
2x 100 nF Capacitor
4x 10k Resistor (SMD 0805)
1x 1M Resistor (SMD 0805)
2x Switch Buttons (SMD 0805)
1x HT7333 (SMD)
1x Pin Header
1x Reed Switch NO (normally open)
1x 74HC86 (THT)
1x TP4056
1x Li-Ion 18650
1x Magnet
1x 3D-printed case (https://www.thingiverse.com/thing:5019573)
KiCAD:
https://www.kicad.org/
CircuitJS:
http://www.falstad.com/circuit/