This is a fairly involved process as it seems that no one currently makes a pre-made product that measures water usage from a household meter.
It took quite a while to set up due to WiFi issues and the flow rate code still needs some work as the output is semi-random at the moment.
If you get stuck anywhere I'm happy to answer questions provided this doesn't go viral 😂
- DFRobot Beetle ESP32 microcontroller (https://www.littlebird.com.au/products/beetle-esp32-microcontroller)
- Water meter pulse probe for the specific meter model (https://www.aquatrip.com.au/accessories is one of the only places I've found that sells them)
- 2 core wire to connect probe to microcontroller
- Project box, heatshrink and other miscellaneous tools and components to clean up the build
Basically all that needs to happen is that the output of the pulse probe is connected between A GND
and D7
on the ESP32.
I did this by cutting off the probe wire from the plug as supplied by Aquatrip, then soldering on an extension wire and sealing the joint in heatshrink.
The wire can then be run from the water meter to inside and into the ESP32.
The attached Arduino sketch can be uploaded to the board with the Arduino IDE, after following the DFRobot instructions to install the Beetle board.
Before uploading the sketch, you'll need to substitute your WiFi details, and also the timezone if you aren't in Sydney. The required format for the timezone is a bit convoluted, but there's a reference here.
Upon powering up, the board will briefly turn on the green led, then turn it back off until a WiFi connection is made. This specific board seems to have fairly poor reception so close proximity to an access point is necessary.
Once working, the board will be waiting for http connections on port 80 and will serve the litres used today and current flowrate in Prometheus text exposition format, along with a couple of debug headers.
Depending on how your water meter sends pulses, you may also need to change the volPerPulse
variable to ensure an accurate reading. You can do this by checking the change in the reported water usage before and after filling up a bucket with a known capacity.
Once it's working, you can add a job to prometheus with something like this:
scrape_configs:
- job_name: 'water'
scrape_interval: 30s
static_configs:
- targets: ['ESP32_IP_ADDRESS']
Then onto Grafana dashboard design.
Hi bro i need your help regarding my final years project,iam building an indoor air quality using bme280,esp32 DFRobot,c02 sensor DFRobot monitoring every thing is completed only help needed is in the Prometheus and grafana part i am unable to see any data of Prometheus data source in grafana no metrics found
Help is really needed 🙏🙏🙏
I am just a beginner to contact me pls refer my email [email protected]