# Dashboard - Countdown Timer

**URL:** <https://discourse.nodered.org/t/dashboard-countdown-timer/29988>\
**Category:** Dashboard\
**Created:** [13 July 2020 10:32 UTC](https://discourse.nodered.org/t/dashboard-countdown-timer/29988 "2020-07-13T10:32:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oncdastan](https://avatars.discourse-cdn.com/v4/letter/o/34f0e0/32.png) [@oncdastan](https://discourse.nodered.org/u/oncdastan)\
**Post date:** [13 July 2020 10:32 UTC](https://discourse.nodered.org/t/dashboard-countdown-timer/29988/1 "2020-07-13T10:32:38Z")

</div>

Hi. I want to add a countdown timer to my dashboard UI. I am going to use it as an alarm, using a buzzer connected to a GPIO pin on the Pi. The user must have fixed, different times. Imagine a dropdown with options of 15, 30, 45, and 60 minutes. Then, the user will click on the Alarm switch.

The problem is, I put the dropdown first, then the switch, and a text output to the end, but I am not able to carry the value from the dropdown to the text output. If I could do that, I could use a switch (not the button one, the one which can be used as if-else) to get the value and make it countdown according to the value. I don't know how to get that value from the dropdown, and how to make it count in seconds. Never written a js code before, and timers I found were complex. So, I decided to do it this way. Lastly, the 2nd press on the alarm switch will set it back to the default value.

I am open to any advice or help. Specially, if you think there is a better option than dropdown in terms of cool looks, while still being easy to use.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [13 July 2020 11:13 UTC](https://discourse.nodered.org/t/dashboard-countdown-timer/29988/2 "2020-07-13T11:13:02Z")

</div>

> [@oncdastan](#):
>
> Hi. I want to add a countdown timer to my dashboard UI.

take a look at node-red-contrib-mytimeout

> [@oncdastan](#):
>
> Imagine a dropbox with options of 15, 30, 45, and 60 minutes

Do you mean a dropdown:  
 ![Screen Shot 2020-07-13 at 7.12.35 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/8/98013ec449401b30ccb8513e32da1ebe702a338f.png)

---

<div class="post-metadata">

**Author:** ![oncdastan](https://avatars.discourse-cdn.com/v4/letter/o/34f0e0/32.png) [@oncdastan](https://discourse.nodered.org/u/oncdastan)\
**Post date:** [13 July 2020 11:21 UTC](https://discourse.nodered.org/t/dashboard-countdown-timer/29988/3 "2020-07-13T11:21:28Z")

</div>

Yes, I meant dropdown. Edited it. Thanks.

I'll take a look at that. Thanks.

---

<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:** [12 August 2020 11:21 UTC](https://discourse.nodered.org/t/dashboard-countdown-timer/29988/4 "2020-08-12T11:21:29Z")

</div>

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