Hi community,
I have this diagram which shows below.
I want this data, which is drawn in red color from the Antena_1 function node output, to be sent to the input of the antena1_sat function node.
How I can do it?
Hi community,
I have this diagram which shows below.
Welcome to the forums @pcwortex
Lets assume the array index NEVER changes:
in Antena_1
msg.payload = msg.payload[7]
return msg
Then connect Antena_1
to Antena1_sat
The msg.payload
in Antena1_sat
will then inndeed be that date
All you are doing is passing an object along - so manipulate that object, as it travels...
I do suggest using the change
node for this (between Antena_1
& Antena1_sat
) - but still, it should hopefully make sense
Note: I removed this from Dashboard - as it doesn't seem related
My function antena1_sat has code like this
var tema = msg.topic;
var zinute = msg.payload;
var eilute = msg.payload;
var rezultatai = eilute.match(/\$GPGSA,([A]),(\d+),([0-9,.-]+),(\d+\.\d+),(\d+\.\d+),(\d+\.\d+)\*([0-9A-F]{2})/);
if (rezultatai) {
msg.payload = [zinute,rezultatai[3]]
} else {
msg.payload = "Nerasta atitikimo";
}
msg.topic = "INSERT INTO Antena1_sat(Message,Satelites) VALUES (?,?)";
return msg;
I want take data from function Antena_1 msg.payload[7]
and put to antena1_sat msg.topic = "INSERT INTO Antena1_sat(Antena_1_msg.payload[7],Message,Satelites) VALUES (?,?,?)";
But how do that I don't image.
I can connect Antena_1
to Antena1_sat
. Then, I receive two messages simultaneously, but the function runs twice: once when receiving data from the switch mode and another time when receiving data from Antena_1 msg.payload[7]
if the issue is just two identical messages there is a core node called filter you can set to block messages unless the msg changes
Look I solved problem I am using join node
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.