Share signal over some flows

I want to share a signal / status / command over more than one flows.

I can use global.get(signal) and global.set(signal,signal_status). But this list may become very long and confusing.

Are there other possibilities to get signals from one flow to the next?
Thank you!

It depends on who wants to use it.

And how many flows.

Though a bit messy, what you could do is something like this:

In a changed node set the names to the desired values to flow context.
(Hang on!)

But rather than connect the node directly to the output of the previous node, use a link out and link in node.

So it would look something like this (example)

Now, the blue rectangle....

Select those two nodes. COPY them.
Go to the other flows and PASTE them there.
Do that to how ever many flows needed.

Not perfect, but....

Thank you for the fast answer.
That's exactly I need!!!!

1 Like

(Gee two people I have helped.)


I followed your learning curve for some weeks!

Just now my learning curve is flat. :frowning: :wink:

But you asked a lot questions I also had :smile:
So, thank you!

1 Like

That is exactly why I avoid flow and global context wherever possible. Instead I do it the node-red way which is to pass data to where it is needed using messages. Sometimes this means I need to use Join nodes to merge data from multiple messages together, but I think this is a small price to pay.

Thank you.

could you supply an example?
There is no node "messages" or so.

each node sends a message. But I think this is not meant.

I didn't mean a particular node, I just meant to use node-red wires and pass messages containing the information required. You said you wanted to use a signal in various flows and to do that you save the value in context. Instead of saving it in context I would just wire it to wherever it is needed. One big advantage of that can be that you get automatically informed when it changes and can take appropriate action.

Perhaps you can give a specific example, preferably one that is not too complex, so I can consider how I would solve it myself.

Ok, I think we both mean the same thing.

Of course I wire the messages between nodes. But until Share signal over some flows - #2 by Trying_to_learn showed "linkin -linkout" I didn't get the information to different flows.
Is there a different possibility beside to linkin -linkout ?

My global variables I normaly use are only for asyncronious using.

Sorry, yes, I misinterpreted your question completely. I concentrated on the sentence about context vars, but that was not the question.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.