Is it possible to have node.send
use an output other then 1? As example I find the following does nothing.
msg = {payload: "Hello World"};
node.send(null, msg);
Is it possible to have node.send
use an output other then 1? As example I find the following does nothing.
msg = {payload: "Hello World"};
node.send(null, msg);
Yes if you use an array
node.send([null, msg]);
The docs for the Function node are here: Writing Functions : Node-RED
Where it describes sending multiple messages by returning an array, can also be applied to using node.send()
by passing it an array.
E1cid
interesting. I thought that'd send 2 msgs on output 1. Thanks.
knolleary
thank you. If anyone has some spare time in future (I know, who does?) my ask would be for a search capability on that site.
Thanks to you both for your help.
EDIT: BTW, is there a listing or doc of valid node commands anywhere?
Has that now been explained by looking at the docs?
Just so you know, if you edit a reply then people who have already read your original reply won't know you've asked a new question.
I provided a link to the docs in my reply. At the bottom of that page is the API reference for the Function node - Writing Functions : Node-RED
Ok. Thanks. I'm still learning and appreciate the help.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.