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
- Host: GitHub
- URL: https://github.com/sandervandevelde/analog-gauge-reader
- Owner: sandervandevelde
- License: mit
- Created: 2025-12-20T22:15:25.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-12-22T14:26:56.000Z (6 months ago)
- Last Synced: 2025-12-22T21:11:22.944Z (6 months ago)
- Topics: analog, azure, cv, docker, edge, gauge, iot, mqtt, operations, python
- Language: Python
- Homepage: https://sandervandevelde.wordpress.com/
- Size: 14.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
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.