How to activate-deactivate nodes?

Hi everyone!
I made a flow as shown, and I want to make two buttons. One button has to activate Function1 section and deactivate Function2 section. Another button has to do vice versa. Is it possible to do it? Looks like I'm stuck...

You need a switch node to route messages along one path or the other depending on a context variable set by your buttons.

Or if you sometimes want both functions to execute, two switch nodes and two variables

Or you can use node-red-contrib-simple-gate to block messages to the innapropriate function when necessary. You can join the button node directly to the gate node.

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