Multiple Output From Node Red Function
In this Post , I will step through on how to output multiple variable from node-red function to multiple message.
Node Components that you will need
- 1 x Inject Node
- 1 x Function Node
- 3 x Debug Node
Step 1
Add a New flow
Step 2
Drag out an inject Node and Configure as below
Step 3
Drag Out the Function Node , double click on the function node, provide a Name to your function, in my case i name it as ” Multiple Output” , when done click on the Setup tab , at the Outputs text box input “3” . Meaning the Function will produce 3 Outputs.
Step 4
At your function node click the ” On Message Tab ” and write the Code Below into the text Box Area.
Step 5
Drag out 3 Debug node , and provide it a name . In my Case i name it msg 1 / msg 2 / msg 3, and configure it as below
Step 6
Joint All the Node Together and Click Deploy . Observe the output Message
Output Message
Leave a Reply