gastimeter is a simple tool to obtain readings from a gas meter by means of OCR (Optical Character Regonition). As OCR is not 100% accurate, the tool effectively provides a guestimate of the gas meter reading - hence the name.
Clone the repository and install gastimeter using pip - optionally in a virtually environment.
git clone https://github.com/gkunz/gastimeter.git
cd gastimeter
pip3 install .
gastimeter uses OpenCV to capture images from a connected camera. If running gastimeter on a RaspberryPi on Debian Bullseye (or higher), note that OpenCV does not work (yet) with the new libcamera subsystem. There are two possible workarounds:
Switch to the old camera subsystem using the following:
sudo raspi-config- Select
Interface Options - Select
Legacy Camera
Note that this camera subsystem is deprecated and will be removed in the future.
Use libcamera-jpeg to capture an image and feed this into gastimeter using the --image option.
Gastimator is licensed under the MIT license.