BTHome water meter
An ESP-IDF project which counts pulses in ULP unit and sends data encoded in the BTHome format over BLE.
Pulses are counted in Ultra Low Power coprocessor in deep-sleep mode with consumption about 0.00016A. When counter reach 5 pulses, it wakes up main ESP unit, add recently counted pulses to NVS memory and start broadcasting BLE signal (in BTHome standard), after that, it goes deep-sleep again.
Instructions
- Set up platform.io project (you can use VSCode with platform.io extension)
- Run build and upload to your board
- Connect GPIO 4 and GND with your pulse generator
- port GPIO4 is set up as pull-up, so you can connect any pulse generator with high-impedance state
- New BTHome device should appear in home-assistant automatically
References
Improvements
- Battery monitoring
- Solve how to setup initial state