Water meter reading with a cheap webcam and Dialeye
My house has an analogue water meter reader with dials, so the only way to read it is using an image and getting the reading from it.
A cheap usb webcam with LED lights was used.
Application used to take images is fswebcam (apt-get install fswebcam)
The test run looked like this
Running the Dialeye python command turns out as a number like this
Every five minutes a cronjob is run that takes a photo, reads the image with DialEye and stores the results in a file. It is then uploaded to Openhab with curl using the REST API.
The old result is stored each time so a cumulative and a 5 minute average is read.
This results in Openhab with a total litres (according to the meter) and a 5 minute average.
Finally I configured the Cacti to read the Openhab REST API and draw Graphs from the data.
This is done similarly as in this post
Below are live graphs of water consumption and the webcam image of the water meter.