# Reading analog gauge values in NodeRED

**URL:** <https://discourse.nodered.org/t/reading-analog-gauge-values-in-nodered/57779>\
**Category:** Hardware\
**Created:** [4 February 2022 17:31 UTC](https://discourse.nodered.org/t/reading-analog-gauge-values-in-nodered/57779 "2022-02-04T17:31:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wolfred](https://avatars.discourse-cdn.com/v4/letter/w/838e76/32.png) [@wolfred](https://discourse.nodered.org/u/wolfred)\
**Post date:** [4 February 2022 17:31 UTC](https://discourse.nodered.org/t/reading-analog-gauge-values-in-nodered/57779/1 "2022-02-04T17:31:56Z")

</div>

I need to get the numeric value every 5 minutes from an analog gauge. The gauge looks like this:

![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/c/1cadf6bae2bf1179db98630e9ff7482817bbab86.jpeg)

I looked in this topic some years ago and asked a question on Stack Exchange: [image recognition - Reading a value of a real gauge - Artificial Intelligence Stack Exchange](https://ai.stackexchange.com/q/4415/10586)

My assumption was, that reading a simple value of a gauge should be feasible with a Raspberry Pi or cheaper hardware, some software and little configuration. But it seems we are deep in AI here.  
Training various needle positions is not possible since I cannot unplug the gauge an make image calibrations with specified analog values.

I'm still interested in a noninvasive solution for reading analog Gauges without installing sensors / additional hardware. Of course postprocessing is done with NodeRED! Ideas are welcome.

Any ideas how to proceed?

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [4 February 2022 17:46 UTC](https://discourse.nodered.org/t/reading-analog-gauge-values-in-nodered/57779/2 "2022-02-04T17:46:08Z")

</div>

Hi @wolfred,

What a coincidence. That gauge looks pretty much like mine at home 😉

I find your question fascinating, because like you say it is a "_noninvasive_" approach. So no changes required to the plumbing, no corrosion of the sensor, ...

For example [this](https://github.com/jomjol/AI-on-the-edge-device) Github project might be interesting for you: actively maintained, lots of contributors, lots of stars, ...

I have not studied it into detail. E.g. I don't know whether you can train it for another gauge...

Bart

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [4 February 2022 17:52 UTC](https://discourse.nodered.org/t/reading-analog-gauge-values-in-nodered/57779/3 "2022-02-04T17:52:39Z")

</div>

BTW it runs on a cheap esp32, and it can publish the numerical output to an MQTT server (see [wiki](https://github.com/jomjol/AI-on-the-edge-device/wiki/Configuration#6-mqtt)). So you can easily integrate this into e.g. Node-RED.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [4 February 2022 18:02 UTC](https://discourse.nodered.org/t/reading-analog-gauge-values-in-nodered/57779/4 "2022-02-04T18:02:49Z")

</div>

> [@BartButenaers](#):
>
> don't know whether you can train it for another gauge

It seems to me (see [here](https://github.com/jomjol/AI-on-the-edge-device/wiki/Graphical-configuration#2a-create-reference-image)) that you can do it all via a nice web interface (hosted on the esp32): capture a snapshot reference image from the cam, and draw your regions of interest...

Now it is up to you :-).  
Please keep us updated!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [5 April 2022 18:02 UTC](https://discourse.nodered.org/t/reading-analog-gauge-values-in-nodered/57779/5 "2022-04-05T18:02:58Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
