# Gauge not working

**URL:** <https://discourse.nodered.org/t/gauge-not-working/22174>\
**Category:** Dashboard\
**Created:** [24 February 2020 09:07 UTC](https://discourse.nodered.org/t/gauge-not-working/22174 "2020-02-24T09:07:56Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaguar](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jaguar](https://discourse.nodered.org/u/jaguar)\
**Post date:** [24 February 2020 09:07 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/1 "2020-02-24T09:07:56Z")

</div>

Struggling to get gauge working (node-red dashboard).

I have a node-red function which returns temperature in degrees C, the ouput of this function has 2 connections, one to a debug node which shows the ouput is msg.payload:number (and the temperature i.e. 21.3, 19.6 etc) and the other connects to a gauge node.

Irrespective of what I put in 'Value Format' for the gauge (i.e. {{msg.payload}} or {{msg.payload:number}} or {{value}} or {{value | number:1}}C ) the gauge is always 'grey' and shows no value despite the debug output fromn the previous function showing the temperature changing every 2 secs.

Do I have to convert the numerical value to a string or something before sending to gauge, or group some nodes together or is some other magical process required (the gauge should update when the input does).

Silly me, I thought you could just send numerical values to gauge and it would display something.

Any assistance appreciated.

Regards Ralph

---

<div class="post-metadata">

**Author:** ![Jude.Robise](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jude.robise/32/13970_2.png) [@Jude.Robise](https://discourse.nodered.org/u/Jude.Robise)\
**Post date:** [24 February 2020 09:17 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/2 "2020-02-24T09:17:08Z")

</div>

Just try to send payload as a type of Number. Then try to configure the gauge as following picture.

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/5/a58259df6c2732ada3243abd480218be0e1bb8a8.jpeg)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [24 February 2020 09:22 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/3 "2020-02-24T09:22:04Z")

</div>

> [@jaguar](#):
>
> a debug node which shows the ouput is msg.payload:number

Can you post a screen shot showing that?

---

<div class="post-metadata">

**Author:** ![jaguar](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jaguar](https://discourse.nodered.org/u/jaguar)\
**Post date:** [24 February 2020 09:23 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/4 "2020-02-24T09:23:17Z")

</div>

Thanks Jude, but the result is the same, the donut is grey and shows 0.

Does the previous function and the donut / gauge need to be grouped together somehow?

---

<div class="post-metadata">

**Author:** ![Jude.Robise](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jude.robise/32/13970_2.png) [@Jude.Robise](https://discourse.nodered.org/u/Jude.Robise)\
**Post date:** [24 February 2020 09:25 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/5 "2020-02-24T09:25:49Z")

</div>

No need to be in the same group as far as I know. just try to send a simple **number** (type: number) like this. ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/2/62b7cc7aedb778bff50bf835bdf9607c2c0fc726.jpeg)

If not please update the node red version. It can solve perhaps.

---

<div class="post-metadata">

**Author:** ![jaguar](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jaguar](https://discourse.nodered.org/u/jaguar)\
**Post date:** [24 February 2020 09:28 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/6 "2020-02-24T09:28:54Z")

</div>

Thanks, running the latest version, here a screenshot showing the debug output

 ![Debug Output](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/e/de5913814e0cd621cc6a86d5a0f68db7c692bba8.jpeg)

---

<div class="post-metadata">

**Author:** ![jaguar](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jaguar](https://discourse.nodered.org/u/jaguar)\
**Post date:** [24 February 2020 09:30 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/7 "2020-02-24T09:30:21Z")

</div>

And the resulting Gauge ![Gauge](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/0/106595654e175540f333a92276b05b98983f0adf.jpeg)

---

<div class="post-metadata">

**Author:** ![Jude.Robise](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jude.robise/32/13970_2.png) [@Jude.Robise](https://discourse.nodered.org/u/Jude.Robise)\
**Post date:** [24 February 2020 09:31 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/8 "2020-02-24T09:31:21Z")

</div>

I think problem is inside the function node. please try to simply feed data from an **inject node**. if it works, then the problem is with the function node.

---

<div class="post-metadata">

**Author:** ![Jude.Robise](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jude.robise/32/13970_2.png) [@Jude.Robise](https://discourse.nodered.org/u/Jude.Robise)\
**Post date:** [24 February 2020 09:32 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/9 "2020-02-24T09:32:38Z")

</div>

i meant try like this. so directly...

---

<div class="post-metadata">

**Author:** ![jaguar](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jaguar](https://discourse.nodered.org/u/jaguar)\
**Post date:** [24 February 2020 09:34 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/10 "2020-02-24T09:34:57Z")

</div>

Thanks all, its something to do with having 2 outputs on the function, if I conect the gauge to the first output (and disconnects the debig node) the gauge works, otherwise not.

So. how do I direct the same value to both outputs of the function?

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [24 February 2020 09:35 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/11 "2020-02-24T09:35:54Z")

</div>

Share the flow or the content of function node

---

<div class="post-metadata">

**Author:** ![jaguar](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jaguar](https://discourse.nodered.org/u/jaguar)\
**Post date:** [24 February 2020 09:37 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/12 "2020-02-24T09:37:58Z")

</div>

![Function](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/d/ada7f02b2ac4b0ec45135acd1f9085b43092dad6.jpeg)

---

<div class="post-metadata">

**Author:** ![jaguar](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jaguar](https://discourse.nodered.org/u/jaguar)\
**Post date:** [24 February 2020 09:41 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/14 "2020-02-24T09:41:14Z")

</div>

Hello Jude

it seems that only output 1 of the function node is outputting anything, the other output outputs nothing (confirmed if I connect the debug node to output 2)

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [24 February 2020 09:49 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/15 "2020-02-24T09:49:29Z")

</div>

> [@jaguar](#):
>
> So. how do I direct the same value to both outputs of the function?

No need to do such thing. You can connect many wires to one output.  
If you have multiple different values generated with function then you'll maybe need to send them out from different outputs.

---

<div class="post-metadata">

**Author:** ![jaguar](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jaguar](https://discourse.nodered.org/u/jaguar)\
**Post date:** [24 February 2020 09:52 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/16 "2020-02-24T09:52:59Z")

</div>

Thanks hotNipi

I only just realised you could connect multiple wires to one output, silly me.

Another way is to write the function out to an array, so return msg; becomes return [msg,msg];

Appreciate everybody's help, thank goodness for such forums!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [24 February 2020 09:57 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/17 "2020-02-24T09:57:31Z")

</div>

Just change the number of outputs to 1 and wire that to the debug node and the gauge.

---

<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:** [9 March 2020 09:57 UTC](https://discourse.nodered.org/t/gauge-not-working/22174/18 "2020-03-09T09:57:33Z")

</div>

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