# How can press button then delay 5S that can press again?

**URL:** https://discourse.nodered.org/t/how-can-press-button-then-delay-5s-that-can-press-again/47925
**Category:** General
**Created:** [2 July 2021 02:18 UTC](https://discourse.nodered.org/t/how-can-press-button-then-delay-5s-that-can-press-again/47925 "2021-07-02T02:18:40Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jlian168](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jlian168/32/43737_2.png) [@jlian168](https://discourse.nodered.org/u/jlian168)
#### Post date: [2 July 2021 02:18 UTC](https://discourse.nodered.org/t/how-can-press-button-then-delay-5s-that-can-press-again/47925/1 "2021-07-02T02:18:40Z")

</div>

Dear All :

Look at pic and below :

1. How to do press button then delay 5S that can press again? Or in 5S press button is ignore?
2. The delay node can turn 180 degree? And how?

Thank u?

 ![螢幕擷取畫面 2021-07-02 101419](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/2/8241611606005020752f25847393e1621f2b8222.jpeg)

---

<div class="post-metadata">

### Author: ![jlian168](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jlian168/32/43737_2.png) [@jlian168](https://discourse.nodered.org/u/jlian168)
#### Post date: [2 July 2021 09:30 UTC](https://discourse.nodered.org/t/how-can-press-button-then-delay-5s-that-can-press-again/47925/2 "2021-07-02T09:30:31Z")

</div>

Dear All :

Look at pic and below :

1. Is the dialog to use.
2. I use delay or trigger.
3. use msg.enabled=false;
4. use msg.enabled=true;

but it just have disable and no enable, why?

Thank u.

 ![螢幕擷取畫面 2021-07-02 172415](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/5/05767fe2d660ae66f22bef8caa437be709295efc.jpeg)

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [2 July 2021 09:51 UTC](https://discourse.nodered.org/t/how-can-press-button-then-delay-5s-that-can-press-again/47925/3 "2021-07-02T09:51:21Z")

</div>

A simple example, once button is pressed it is diabled for 5 seconds, after 5 seconds it is enabled again.

```auto
[{"id":"81d5fa20.7db83","type":"ui_button","z":"c74669a0.6a34f8","name":"","group":"8b5cde76.edd58","order":6,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"num","topic":"topic","topicType":"msg","x":230,"y":2180,"wires":[["7245af5f.dbbb08"]]},{"id":"7245af5f.dbbb08","type":"trigger","z":"c74669a0.6a34f8","name":"","op1":"","op2":"","op1type":"pay","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":370,"y":2180,"wires":[["5e85ba7b.93843c","2c2b4174.0aa20e"],["fc0c5794.cd3948"]]},{"id":"2c2b4174.0aa20e","type":"change","z":"c74669a0.6a34f8","name":"","rules":[{"t":"set","p":"enabled","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":2120,"wires":[["81d5fa20.7db83"]]},{"id":"fc0c5794.cd3948","type":"change","z":"c74669a0.6a34f8","name":"","rules":[{"t":"set","p":"enabled","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":2240,"wires":[["81d5fa20.7db83"]]},{"id":"5e85ba7b.93843c","type":"debug","z":"c74669a0.6a34f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":620,"y":2180,"wires":[]},{"id":"8b5cde76.edd58","type":"ui_group","name":"","tab":"8f03e639.85956","order":1,"disp":true,"width":"12","collapse":false},{"id":"8f03e639.85956","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

### Author: ![jlian168](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jlian168/32/43737_2.png) [@jlian168](https://discourse.nodered.org/u/jlian168)
#### Post date: [2 July 2021 10:01 UTC](https://discourse.nodered.org/t/how-can-press-button-then-delay-5s-that-can-press-again/47925/4 "2021-07-02T10:01:20Z")

</div>

Dear E1cid :

I will understand it first and try it at saturday or sunday.

Thank u very much.

---

<div class="post-metadata">

### Author: ![jlian168](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jlian168/32/43737_2.png) [@jlian168](https://discourse.nodered.org/u/jlian168)
#### Post date: [3 July 2021 04:07 UTC](https://discourse.nodered.org/t/how-can-press-button-then-delay-5s-that-can-press-again/47925/5 "2021-07-03T04:07:01Z")

</div>

Dear E1cid :

Its ok that I want.

Thank u very much again.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [17 July 2021 04:07 UTC](https://discourse.nodered.org/t/how-can-press-button-then-delay-5s-that-can-press-again/47925/6 "2021-07-17T04:07:25Z")

</div>

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