Battery powered water meter using ESP32 and BTHome

Hi HA community,
I would like to share my project with you - a water meter that is battery-powered. I wanted to monitor my water consumption, but unfortunately, I don’t have access to electricity near the water meter. So, I was looking for a solution that would be fully functional using only batteries. I have EMBRA water meter and they offer module for reading pulses, so I needed to get those pulses to HA.

ESPHome can count pulses, but as far as I know, it doesn’t do so in the ULP (ultra-low power) module, which means the battery life would be short. An alternative would be to connect a door sensor and count the pulses directly in Home Assistant. However, this solution might theoretically miss a few pulses if Home Assistant happens to restart.

That’s why I wrote my own firmware that counts pulses in ULP mode (operating in deep-sleep) and wakes up the main unit periodically (every 10 pulses). It then sends information about the counted pulses using the BT (BTHome protocol) and goes back to sleep. ESP32 is powered by 4xAA rechargeable batteries, and it has been running accurately for 20 days so far. The estimated battery life is 360 days.

If anyone is facing a similar problem, you can give my solution a try. :slight_smile:

6 Likes