Digitizing a Gas Meter with Google Vision AI

This is a system integration project to run a complex analysis with simple tools.

The energy crisis forced me to find a solution for the granular analysis of gas consumption in our family house. The solution extended my earlier analysis of insulation efficiency in order to understand the flow of our daily gas consumption and how it is impacted by the weather and our heating habits.

I combined my IoT temperature meter with the hourly log of gas usage. The key challenge was the digitization of the classic analog gas meter that the utility company is deploying these days in Hungary. While the available smart metering solutions are based on impulse counting and thus limited to specific models of gas meters, I tried to find a simple and general solution that is suitable for a one-time analysis. Regular smart distance metering was out of my scope.




My solution is actually using optical character recognition (OCR) to digitize the counter display of the gas meter. The image is sent to the Vision AI service of Google Cloud and the resulted text is cleaned up and logged in Python. In order to simplify the data cleaning task I covered those parts of the meter display that are not relevant for the OCR. Currently I am using Google Sheets to consolidate the logs of temperature and gas usage.

The chart shows a single day of gas usage in our family house related to the external temperature and also to the temperature measured in the attick, above the insulation. The later is needed to display the heat loss. The gas usage shows morning and evening peaks one the hand because our hot water boiler is also gas powered and the hot water is circulated in the morning and evening and on the other hand the thermostats are set to higher temperature in the morning and evening hours. (The gas usage is displayed in cubic meter multiplied by 10 for sake of visibility.)

It took me a couple of experiments to find the most realable and most cost efficient solution. Here is my recipie:

As for the IoT environment see the details in my other post.

The chart was produced by manual upload to Google Sheets and I did some data tweaking there. In the next phase of the project I will move this to Python data visualization.