An open API service indexing awesome lists of open source software.

https://github.com/sandervandevelde/analog-gauge-reader

Demonstration on how to use Python and CV to get values from an analog gauge
https://github.com/sandervandevelde/analog-gauge-reader

analog azure cv docker edge gauge iot mqtt operations python

Last synced: 6 months ago
JSON representation

Demonstration on how to use Python and CV to get values from an analog gauge

Awesome Lists containing this project

README

          

# Gauge reader

## Introduction

This Docker module shows how analog gauge images from an IP camera can be read, transformed, and forwarded over MQTT.

Read the full story about this repository in this [blog post](https://sandervandevelde.wordpress.com/2025/12/22/azure-iot-operations-deploying-custom-vision/)

## Credits

This blog post is co-created with my colleague [Liam Huinck](https://www.linkedin.com/in/liam-huinck/). He wrote the [Python/OpenCV](https://github.com/LiamHuinck/AnalogueGaugeReader) heart of the solution.

## Environment variables

Several environment variables are needed to make this work.

### Obligated

The following two variables will certainly need attention from your side.

```
rtspUri = "rtsp://NAME:PASSWORD@IPADDRESS/stream1"
brokerAddress = "127.0.0.1"
```

### Optional

If the following default values are good enough for you, you can keep these:

```
brokerPort = 31883
deviceId = "vision01"
topic = "vision/gauge/hygro/"
frameSkipInterval = 10
angleCorrectionDegrees = 247.5
```

*Note*: The MQTT broker access works without credentials.

The MQTT topic is a concatenation of both the topic and the device id.

## Credits

This repo is the result of the work done by Liam Huinck & Sander van de Velde.

If you like this repo, please give it a star or even fork it.

## Disclaimer

This repo is showing how values from an analog gauge can be read.

It is not intended to be used in production as-is.

## Contribute

If you see something that could be better, feel free to contribute.

We accept pull requests.