Hello NodeRed User
i am new here and i need some help.
I am not an expert in coding (Not Programmer) but i understand how works Node-Red.
I have a JSON String like this
{"_timestamp": 1551212773, "Temp": 22.80, "Pressure": 1015, "Humidity": 80}
I made a function example with this code :
var temp = "30";
var hum = "80";
var press = "1050"
var msg1 = { payload: "user DG8RAD pass XXXX" };
var msg2 = { payload: "DG8RAD-1>APRS,TCPIP*:!4808.30N/01125.75E_000/000g003t030r000p000P000h80b09900wRSW" };
var msg3 = { payload: "DG8RAD-1>APRS,TCPIP*:>Maker Themen, LoraWAN, Arduino, Raspberry, SmartHome und AFU" };
var msg4 = { payload: "File delete" };
return [ [ msg1, msg2, msg3 ], msg4 ]
I need exactly this syntax because is Part of APRS Protocol for Ham Radio.
How can add Temp / Pressure / Hum into this String of "var msg2"
I was thinking like in this form :
var msg2 = { payload: "DG8RAD-1>APRS,TCPIP*:!4808.30N/01125.75E_000"+temp"/000g003t030r000p000P000h80b09900wRSW" };
But it doesn't work properly.
Have anyone any idea how can implement this values ?
Best regards Joachim