Voltage/Current readings from Sonoff POW R2 with Tasmota to Dashboard

Hi All,

I am EXTREMELY new to MQTT, Node Red and this world. But I want to learn and I thought this would be the best place for advise?

I have a MQTT Broker and Node Red set up on a pi and that is running perfectly. I have already created a few timers for items around the house (pool pump and borehole pump). These are running perfectly.

I found the Dashboard yesterday and want to create a gauge and donut for Voltage and Current respectively - and then play around more, but I need to start somewhere.

I have searched high and low but don't know how to "decode" the


message and "convert" or extract the Voltage and Current from this message?

10:25:19 MQT: stat/borehole/STATUS8 = {"StatusSNS":{"Time":"2019-10-06T10:25:19","ENERGY":{"TotalStartTime":"2019-10-03T14:05:46","Total":5.731,"Yesterday":2.616,"Today":2.453,"Power":0.0,"ApparentPower":0.0,"ReactivePower":0.0,"Factor":0.00,"Voltage":236,"Current":0.00}}}

I have seen an example here with putting the MQTT INPUT --> FUNCTION NODE --> DASHBOARD GAUGE and adding this code

var msg1 = {};
var msg2 = {};

msg1.payload = msg.payload.Voltage;
msg1.topic = 'Voltage';
msg2.payload = msg.payload.Current;
msg2.topic = 'Current';

return [msg1, msg2];


When I use a debug node to see the message, the only thing that shows is "Voltage" and "Current" in the 2 debug messages.

I understand that the values need to be read from


From what I understand from searching the web, I think I need to use




to point to the value, but something just isn't tying up for me.

Im really struggling.. Any help will be greatly appreciated.
Im sure I have left some info out that is needed for you all to help :grimacing:

Thanks in advance everyone..

Feed this into a Json node connected to a debug node showing the complete message and you will find the paths to your required values in the debug panel.


Working through this page will give you a better understanding:


Feed this into a Json node

or just change the mqtt node to output json instead.

You can extract this in various ways, using a change node "looks" cleaner



Ah yes, I forgot that option :slight_smile:

@bakman2, that totally worked... Thank you so much...!

You had me puzzled with that long string of code... I was trying to decipher it for a while... Like I said, Im extremely new to this..

But then I looked at it more intently and thought it must be a flow in text format...

And you can, I'm sure, understand the next step..!

Thanks again, really appreciate your help... Love the power of the forums.. Such knowledge and willingness to help others.. :+1::+1::+1: