I do get pretty accurate MQTT data from my weather station via MQTT but need to format all this content into a string. That's where I am failing.
i do have a payload looking like this:
21.4.2019, 22:37:55node: Raw messages
/home/aussen/wetterstation : msg : Object
time: "2019-04-21 22:37:54"
model: "Fine Offset Electronics WH1080/WH3080 Weather Station"
I need to convert this into a string which should look like this and the values behind the = should be the value from the payload above.
I createad a function node to store the values into variables. var TEMP = msg.payload.temperature_C
var ID = msg.payload.id
var HUM = msg.payload.humidity
var WINDIR = msg.payload.direction_str
var WINGS = msg.payload.direction_deg
var WINSP = msg.payload.speed
var RAIN = msg.payload.rain
var BATT = msg.payload.battery
I started with a CHANGE NODE to change the current msg.payload into the beginning of the requested string "20;DC;" . Working like a charm.
But the next function node is killing me as I do not get the variables from above concatenated with a string like "TEMP=" and the value of the TEMP add a ";" and go ahead with the HUM... and so on.