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.
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.
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?
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.