This is a handy little node that you can use if you are seeing (or more so: not seeing) the right thing in your flow/s.
The situation rises where you are trying to see what is going on but while doing that, other messages are coming through/past and confusing you.
Yes, as you get better with Node-Red you may be able to ignore these. But for new people, it can be annoying.
This node goes in the flow and you press the button to allow only one message to pass.
That way you can see what is set and what is doing what.
[{"id":"4f54da14.06347c","type":"inject","z":"b756f41c.b00438","name":"ONE ONLY","topic":"GATE","payload":"open","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":630,"y":160,"wires":[["a944357d.84422"]]},{"id":"a944357d.84422","type":"function","z":"b756f41c.b00438","name":"One only.","func":"if (msg.topic == \"GATE\")\n{\n context.set(\"ALLOW\",1);\n node.status({fill: \"green\",text:\"ONE\"});\n return;\n}\nif (context.get(\"ALLOW\") == 1)\n{\n //\n context.set(\"ALLOW\",0);\n node.status({});\n return msg;\n}","outputs":1,"noerr":0,"x":620,"y":220,"wires":[[]]},{"id":"5fc647fe.bc1c9","type":"comment","z":"b756f41c.b00438","name":"Signal coming from here","info":"","x":410,"y":220,"wires":[]},{"id":"b9a3f35b.549678","type":"comment","z":"b756f41c.b00438","name":"The rest of the flow","info":"","x":800,"y":220,"wires":[]}]
This is basically how/where it fits in the flow: