Water meter digitizer - Version 2 - all-in-device - including MQTT

Hello everybody,
I would like to introduce DYI second version of my water meter digitizer for the consumption monitoring. It works for water meter, as well as power or gas meters.
In the second version it is an easy to use all-in-one device with a graphical user and administration interface. As an interface to the house automation, there is a MQTT client included.

The working principle is still bases on a very cheap ESP32-CAM modul, which takes a picture that is digitizes by neural network support.

The hardware is published in Thingiverse and the software in GitHub. There is also a Wiki on the installation, configuration and some background infos:

Looking forward to your feedback and additional ideas.

Best regards and have fun in rebuilding it.


P.S.: The software backbone is very flexible, so it can be easily adjusted for new applications, looking also forward to your ideas!


Hi, thanks for sharing.
This is great, i’m gonna try this, just ordered my esp-cam.
I guess it will work with this aswell:

Could this be upgraded to read text, temperatures or other infos from displays of unconnected appliances?


Hi Yves,
I should work with your water meter in principle. LCD-digits are not part of the CNN-training, yet. So if you can collect some (2-3 per digit is enough) after your system is up and running I can incorporate them pretty easy - if I find some others, I will make an intermediate run - let you know.

To the second question: the background structure of the system is very flexible, so you can use CNN for different types of informations. I have one comercially running, which digitizes a count down bar. Text is also possible, would need more effort in the CNN.
I’m happy to support further ideas. This is used pretty much for water, gas or electric meters. There is a strong community in Germany.

Best regards,

Hi Yves,
I have created a new version of the digital CNN-Network now also including some first LCD digits in the training: https://github.com/jomjol/neural-network-digital-counter-readout

It is version 7.0.0 and you can exchange the CNN tflite file manually for your water meter for a first try. In future version I will update it also in the AI-on-the-edge software itself.

Best regards,


Thank you works like a Charme!

Awesome work @jojmjol - have devoured your whole thread in the ioBroker-forum and know the complete history of the development process now :stuck_out_tongue: - very interesting and admirable to see your commitment on this project.

Got it working and only have to dust off my old 3D-printer now and getting this thing attached to the water meter.

As I’m not familiar with water-meters in general and living in a rented appartment, you might able to help me with one more general question…

There is a wireless module (WFZ166.MO) attached to my water-meter - so theres only the number counter for m³ visible, as you see in the picture below. Is it even worth, to use this system then, as I think it would be bring only little information, am I right?!

Alternatively I’m sure I’ll find another use-case for this piece of tech, but measuring the water-comsumption would be the nicest.

Thanks again!

Hi Rainer,

I think it is totally valuable to do this. The system will work with no problem with “digit only system”. It can handle a shift of the decimal separator to the right positiona and as you have 3 digits below the decimal separator, you can go down to a resolution of 1 litre. This should be totally sufficient, I guess.
Best regards,

1 Like

You could also try to read the data from the wireless module.

1 Like

Oha, nice to know - thank you! I’ll do some research, if this would be possible for my specific meter and check if there are any legal problems with doing that. :stuck_out_tongue:

As I read in the thread and the datasheet, it only sends the data out 3-times a day and not on sundays - so it gives me only a rough estimation of the consumption.

I hope to get it much more frequent with the AI soloution from above - and obviously just wanna try it out for the fun of tinkering. :slight_smile:

Thanks again for the hint!

Hi Christoph,
yes this is technically possible. Never the less, currently quite some read/write operations are needed and this would be quite some change in code necessary. Not planned at the moment.
Best regards,

You can adjust the readout frequency up to about every 3 minutes. This is the limit, that is given by the calculation time.

Hello @jomjol,

is it possible to set the right time region in the config? My watermeter is one houre befor my regional time.

Thank you for your effort.

Hi Johannes,
currently the timezone is a fix setting and even does not take European summertime into account. You could put an issue with a feature request in GitHub, so this idea will not be lost.
Best regards,

Thank you for all you effort?
An other question or problem:

My problem is, that the watermeter have often the problem with the last digit which is, after it was fully there and recognized, e.g. only half displayed or less, not recognized (represented by N). But I think it could be possible that the watermeter can check with old values that there has to be a number. The problem is that the openhab item do not recognize the value with N inside as number item and for this reason I receive no updated values anymore.
Do you have any hint to improve something on my side or is there an other solution (rule or something like that) or something to improve on watermeter side?

Hello Johannes,
the server can handle the N and replace it with the previous number. Therefore you have to enable this in the configuration and wait until it has recognized one time all digits in one run or set a prevalue.
The configuration is:

PreValueUse = True
PreValueAgeStartup = 720

Is set with PreValueAgeStartup = 30, I think that is the default value and I had set a value at start of metering.

Wow, this looks so cool … finally will find a proper use for my esp32-cam which was tossing around:)
I’m interested to put it on my heat-meter
MADDALENA-MicroClima5-300x300 … just need to await it back from verification.

Flashed the fw and it seems to be working fine. Just need the meter back to understand how the config/read tmplatepositioning works.

Oh, and will have to figure out some mounting - so the camera can see it, but also facility guy can read on his monthly visit.

decided to not despise the efforts of Josef and give it a try with watermeter - at least some chance of recognizing analog dials :slight_smile: Dunno where, but my esp32-cam had totally lost the focus … took me a while to realize you can adjust it manually (I was not able to turn mine neither by hand, nor 3d printed wrench … had to take small pliers), but result looks good. Will need to play a little with reflection (looks like slight re-positioniong on flash can improve/brake it). Can’t await to get it powered up on the actual meter!

Hi @jomjol,
The last 1000 liters everything works fine. Thank you again for your effort.
Actually I have the problem that the metering device does not send a new value. The read value is not completely right but it must be logical to switch the last number to 6, the proof gives a negativ result and the device send the old value again. Find attached the foto:

It seems to me, that the metering device has a problem when the last number changed. When I remember my last problem I had, I think it was the same constellation. Please can you give me a hint to handle this problem?

Thank you in advanced!

Hi @johannesbonn,
which version are you running? There was a problem with handling the change of a zero crossing (“Nulldurchgang”), while a “N” was read especially in the last digit (as here). In the current version this is solved.
Best regards,

I use version: master - v3.1.0 - 2020-10-26