Gauge not working

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

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

Can you post a screen shot showing that?

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?

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

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

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

And the resulting GaugeGauge

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.

i meant try like this. so directly...

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?

Share the flow or the content of function node


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)

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.

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!

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

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