The water counter on ESP32 esp-idf
You need to use mosquitto server, mqttwarn, perl and sqlite3. Utils and doc get from https://github.com/slacky1965/watermeter
A mini wifi board on ESP32 - Wemos D32 pro https://www.wemos.cc/en/latest/d32/d32_pro.html
Resistor 12kOm 0.125W for external power control - VBUS and GPIO15.
Lithium (LiPo) Battery 18650 2600mAh 3.7V - https://github.com/slacky1965/watermeter/blob/master/doc/images/battery.jpg