# A node that can be pressed to start/stop messages flow....?

**URL:** https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164
**Category:** General
**Created:** [16 July 2025 09:22 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164 "2025-07-16T09:22:43Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![dougle03](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dougle03/32/32979_2.png) [@dougle03](https://discourse.nodered.org/u/dougle03)
#### Post date: [16 July 2025 09:22 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/1 "2025-07-16T09:22:43Z")

</div>

Hi,  
I spend a lot of time in NodeRed find it time consuming to manually disable a node temporally when debugging.

Is there a node that allows you to drop it into a flow and tap it to open or close the link it's on? A bit like the inject node with it's 'inject once' button press...

I've tried searching for 'switch' or 'pause' but not coming up with anything.

Any ideas? Ta

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [16 July 2025 10:04 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/2 "2025-07-16T10:04:59Z")

</div>

No, but you can do it with switch node and have it route based on a context variable that can be toggled with 2 inject nodes and a change node.

```flows
[
    {
        "id": "cceba20d74756a69",
        "type": "switch",
        "z": "333c7c68.2b3d34",
        "name": "flow.tap",
        "property": "tap",
        "propertyType": "flow",
        "rules": [
            {
                "t": "true"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 460,
        "y": 740,
        "wires": [
            [
                "1f4583f12a69ac9c"
            ]
        ]
    },
    {
        "id": "ae2e908b5fd530f3",
        "type": "inject",
        "z": "333c7c68.2b3d34",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 330,
        "y": 620,
        "wires": [
            [
                "41b5cc5087da24d2"
            ]
        ]
    },
    {
        "id": "97b0c1500d7ea79c",
        "type": "inject",
        "z": "333c7c68.2b3d34",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "false",
        "payloadType": "bool",
        "x": 330,
        "y": 660,
        "wires": [
            [
                "41b5cc5087da24d2"
            ]
        ]
    },
    {
        "id": "41b5cc5087da24d2",
        "type": "change",
        "z": "333c7c68.2b3d34",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "tap",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 490,
        "y": 640,
        "wires": [
            []
        ]
    },
    {
        "id": "631c7ed8fd16575b",
        "type": "inject",
        "z": "333c7c68.2b3d34",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 300,
        "y": 740,
        "wires": [
            [
                "cceba20d74756a69"
            ]
        ]
    },
    {
        "id": "1f4583f12a69ac9c",
        "type": "debug",
        "z": "333c7c68.2b3d34",
        "name": "debug 34",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 620,
        "y": 740,
        "wires": []
    }
]

```

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [16 July 2025 10:21 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/3 "2025-07-16T10:21:55Z")

</div>

You can disable a node via the (right click) context menu.  
Right click | Show action list | Disable selected nodes.

Unfortunately there is no keyboard shortcut for this action and I don't think you can specify your own, so it's no easier than using the node config dialog.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [16 July 2025 10:50 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/4 "2025-07-16T10:50:09Z")

</div>

> [@jbudd](#):
>
> Unfortunately there is no keyboard shortcut for this action

There is no default, but you can bind your own

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/c/8c9bc698fd707f85039d85fa099a91c710489e11.png)

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [16 July 2025 11:07 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/5 "2025-07-16T11:07:40Z")

</div>

Ah yes, thanks. I tried that but nothing happened.  
Turns out you have to press the tick button.

So as an experiment I defined shortcuts

- alt-d = disable selected nodes (was browser URL box recent searches dropdown )
- alt-e = enable selected nodes (was browser edit menu)

Now I can click a node to select it then alt-d to disable it.  
👍

---

<div class="post-metadata">

### Author: ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)
#### Post date: [16 July 2025 11:29 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/6 "2025-07-16T11:29:04Z")

</div>

I can recommend `ctrl-shift-e` and `ctrl-shift-d`.  
I've been using those for ages without any clashes with other shortcuts in both Firefox and Chrome.

---

<div class="post-metadata">

### Author: ![dougle03](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dougle03/32/32979_2.png) [@dougle03](https://discourse.nodered.org/u/dougle03)
#### Post date: [16 July 2025 11:42 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/7 "2025-07-16T11:42:31Z")

</div>

Thanks for all the responses, does anyone with the skills fancy writing a node to do this? is it even possible...?

Thanks

---

<div class="post-metadata">

### Author: ![dougle03](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dougle03/32/32979_2.png) [@dougle03](https://discourse.nodered.org/u/dougle03)
#### Post date: [16 July 2025 11:44 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/8 "2025-07-16T11:44:33Z")

</div>

Thanks, I did think about the 'switch' node, but that would be even more time spent setting it up, especially where I might want a dozen or so switches...  
Shame there isn't a simple node to drop onto a line?  
P

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [16 July 2025 11:47 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/9 "2025-07-16T11:47:27Z")

</div>

Try a 'gate' node, something like node-red-contrib-flowgate seems to fit your requirements, as it's just one node that is dropped into your flow, written by @gmag11  
(I don't have a use, so haven't used it)

> **[node-red-contrib-flowgate](https://flows.nodered.org/node/node-red-contrib-flowgate)**
>
> A Node-RED node that allows messages to pass through based on a toggle button.

---

<div class="post-metadata">

### Author: ![dougle03](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dougle03/32/32979_2.png) [@dougle03](https://discourse.nodered.org/u/dougle03)
#### Post date: [16 July 2025 11:58 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/10 "2025-07-16T11:58:14Z")

</div>

Perfect! Many thanks...

---

<div class="post-metadata">

### Author: ![Mrb32](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@Mrb32](https://discourse.nodered.org/u/Mrb32)
#### Post date: [18 July 2025 09:02 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/11 "2025-07-18T09:02:30Z")

</div>

I have been using this gate node to trigger events from my application. It has many queuing and triage options which I use to trigger events on demand from buttons on the dashboard. Pretty neat...

> **[node-red-contrib-queue-gate](https://flows.nodered.org/node/node-red-contrib-queue-gate)**
>
> A gate node (with queueing) for node-RED

---

<div class="post-metadata">

### Author: ![no\_mpimpi](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@no\_mpimpi](https://discourse.nodered.org/u/no_mpimpi)
#### Post date: [21 July 2025 16:47 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/12 "2025-07-21T16:47:13Z")

</div>

Hi @Mrb32,

If you wouldn't mind, could you post a little piece of what you use it for? Your use case sounds fascinating, and I would like to understand it better.

---

<div class="post-metadata">

### Author: ![Mrb32](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@Mrb32](https://discourse.nodered.org/u/Mrb32)
#### Post date: [21 July 2025 21:25 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/14 "2025-07-21T21:25:44Z")

</div>

Pretty simple...

I use tasmota ESP8266 devices and nodered to control my model railway.  
In the simplest use case, q-gates each hold a payload containing a list (array) of devices and commands corresponding to a route trains should follow.  
A dashboard button is used to open the gate (either flush or peek), the payload is then processed by a flow that will send distinct messages to each device, setting turnouts and/or signals in the process.  
The original payload is then sent back to, or retained by, the gate, so that it is ready for the next time I need it.

There are a couple of more complex uses but the post would turn into war and peace...

May be not so fascinating after all...  
Cheers.

---

<div class="post-metadata">

### Author: ![no\_mpimpi](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@no\_mpimpi](https://discourse.nodered.org/u/no_mpimpi)
#### Post date: [22 July 2025 03:43 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/15 "2025-07-22T03:43:57Z")

</div>

Hi @Mrb32,

Thank you for that description. Super interesting to me, because you're describing something I haven't done, nor had really considered doing.

From my not-having-used-this-yet postion, what you've described seems to me to be a very dynamic way of (essentially) scripting complex events. The idea seems a bit like the "scenes" concept in home automation: given x input, do all of these things with all of these otherwise tangentially related systems.

You use it for model railways (which is a cool use case). I might use it to trigger events in an irrigation system for a small farm.

I thank you. You've given me a lot to think about, which is always the best bit.

Cheers.

---

<div class="post-metadata">

### Author: ![Mrb32](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@Mrb32](https://discourse.nodered.org/u/Mrb32)
#### Post date: [22 July 2025 09:14 UTC](https://discourse.nodered.org/t/a-node-that-can-be-pressed-to-start-stop-messages-flow/98164/16 "2025-07-22T09:14:06Z")

</div>

If you fancy seeing the railways in action, you can have a look at my youtube channel. I don't go into the nodered aspect much, but every movement (start/stop, diversion, other automatism...) is done using nodered and tasmota.

Here is a link to the latest video:

[![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/5/f5339d306dd19c11e99c0e59688371f9c48ff0e2.jpeg "Märklin Nohab/AFB Classics - Roundnose Summer Festival") ](https://www.youtube.com/watch?v=-68XuxrF1eM)
