How do extract specific topic from payload.msg and display in a dial on the DASHBOARD

I have a feed as follows:-

solarmd/energy/outputEnergy/bank1 : msg.payload : Object
sniu: false
serialNumber: null
deviceID: null
lastUpdate: 1676979049723
voltageV: 54.425
currentA: 1.836
powerW: 99.88758
capacityP: 99.98902469135803
capacityAh: 143.98419555555554
ratedCapacityAh: 144
ratedVoltageV: 51.2
ratedChargeCurrentC: 0.6940000000000001
ratedDischargeCurrentC: 0.6940000000000001
storageName: "bank1"
remainingTimeSign: 0
dcConnected: true
available: true
dcConnectedDevice: 1

I am able to show the value of only the "msg.payload.capacityP" in the debug window.

The issue I have is I am unable to use that value in say the "gauge" on the "Dashboard"

the msg.payload

The gauge properties:

Useless gauge...

Where the payload only had one topic it was rather easy for me to set-up.
Multiple topics and I cannot do it.

Anyone that can help me please?

It looks like capacityP is a string. The gauge node needs a number.

Thanks for the pointer.
How do I convert it so I can test it?

I suppose I will have to put a node before the gauge display node to do the conversion.

@jw_te_r The gauge node will accept a string as long as it parses to a number

You can set the gauge value format field to {{msg.payload.capacityP | number : 2}} which will round the values to 2 decimal places also. Angularjs filter

1 Like


Thanks @E1cid

Problem SOLVED!!


Sorry to bother you again.

I have added a "Gauge" to indicate Battery charge / Battery discharge
To check my number I added a text node above the gauge (Will remove at a later stage)

This is what I see:

And this is my gauge node properties

Just got a discharge as well

When the battery charges I would like it to show green and to the plus side.
When the battery discharges I would like the gauge to show red on the negative side
I was considering using a BAR with positive and negative Max and Min.

The issue here is where do I enter the Value Format Code you sent earlier

Using a bar chart you would send a payload formated like these examples node-red-dashboard/ at master · node-red/node-red-dashboard · GitHub

but if you update your dashboard node to latest

you can use the gauge and fill from center


Thank you so much for your QUICK responses and expert assistance.
I really appreciate it very much.

I now have a gauge that shows me in which direction the electricity flows!!!!
AWESOME Thank you!


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