Variables to Emoncms

Hello all,

I need a little help with signals from my battery monitor. There are variables voltage values e.g. 48456 in mV from MQTT. I see the values in Nodered.


Now I have to give this value a name as this sequence: Name:value --> BattMinU:value
I tried for my experiance all, but not the solution.

Then I can include this value to my Emoncms logging.

It works with signals from my SPS with this view, but this are fix values and not variables.

Can somebody give me little help, please
BR Herbert

Do you mean you want msg.payload to contain the object {BattMinU: 48456}, where 48456 is the value from MQTT?
If so then use Change node set to Move msg.payload To msg.payload.BattMinU

If, for some reason, you want to set the payload to the string "BattMinU: 48456" then you can use JSONata like this:

image

Thank you very much. That's the solution with the second version