(And the fool continues to bash his head against the wall)
I've read this link (from search) Writing functions
and it is interesting.
I can sort of make it work, but when I try to apply it to the real flow, it doesn't.
This is an extract of the node:
Yeah, messy comments. I'm working on that.
node.warn("TWO");
// It is now given the machine is offline. Clean up stuff.
msg1 = {payload: '<font color = "red" i class="fa fa-bullseye fa-2x"></i>', host: host, topic:device + "/Off-line",device_ID:device, background:"brown"};
msg2 = {topic: device, device_ID: device, state: 4, background:"brown" };
node.warn("Sending only msg2 " + msg2); // This doesn't give me anything useful to check.
//mode.warn(msg2); // this gives errors.
return [[],msg2];
I want to send msg2
out of the second port/output of the node.
The last line works on another simple flow with 5 nodes. But it doesn't seem to want to play the game here.
Where's the elephant?
(NEW)
If I change the line so it is:
msg2 = {payload: "Test"};
and leave the rest as is, it works, as in I get "Test" coming out of the second output.
I am missing something.