# Buzzer turns off after 5s

**URL:** https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390
**Category:** General
**Created:** [25 March 2019 08:00 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390 "2019-03-25T08:00:58Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![anon4382222](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anon4382222](https://discourse.nodered.org/u/anon4382222)
#### Post date: [25 March 2019 08:00 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/1 "2019-03-25T08:00:58Z")

</div>

Hey!  
I am trying to turn the buzzer in my flow on untill I turn it back off.  
Right now it stays on for 5s and after that it stops, any idea how i can do this?

 ![InkedScreenshot_2_LI](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/f74a3df861f6d6874a5eb42a38448b715a3db104.jpeg)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [25 March 2019 08:40 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/2 "2019-03-25T08:40:24Z")

</div>

You could put a Switch node (not a ui-switch) in the path to the buzzer and set it to pass on only messages switching it on. Then have a button on the dashboard configured to send the Off state when you press it, and connect that to the buzzer too. Then your existing path will only switch it on, and the button will switch it off.

---

<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: [25 March 2019 09:33 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/3 "2019-03-25T09:33:19Z")

</div>

@anon4382222 how ofter do messages come in from telegraph?

---

<div class="post-metadata">

### Author: ![anon4382222](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anon4382222](https://discourse.nodered.org/u/anon4382222)
#### Post date: [25 March 2019 09:50 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/4 "2019-03-25T09:50:59Z")

</div>

Just once

---

<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: [25 March 2019 11:13 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/5 "2019-03-25T11:13:22Z")

</div>

Ahh but if one of the PIR's sends a 0, your function probably sends that to the buzzer to shut it off. And I seem to remember that 5 seconds is about the time a PIR takes to reset.

---

<div class="post-metadata">

### Author: ![anon4382222](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anon4382222](https://discourse.nodered.org/u/anon4382222)
#### Post date: [26 March 2019 07:31 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/6 "2019-03-26T07:31:29Z")

</div>

How should I fix this?  
 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/a/a7593db8a1faed2a434796d508a68ea3899c018c.png)

---

<div class="post-metadata">

### Author: ![anon4382222](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anon4382222](https://discourse.nodered.org/u/anon4382222)
#### Post date: [26 March 2019 07:39 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/7 "2019-03-26T07:39:29Z")

</div>

It keeps saying invalid input but it used to work and now it doesn't anymore..

 ![Capture1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/b9e1ae209fb035be2540aa13083c4f6bd70de901.png) ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/4cbe1c9597a924c48e39777b6751aabfc335bb16.png)  
Also, when I turn my flow on, the led jumps on. This shouldn't happen, it should only happen when movement is detected and should also stay on untill I turn it off, like the buzzer.

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [26 March 2019 08:01 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/8 "2019-03-26T08:01:32Z")

</div>

turn on your debug nodes and see what message you are sending

---

<div class="post-metadata">

### Author: ![anon4382222](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anon4382222](https://discourse.nodered.org/u/anon4382222)
#### Post date: [26 March 2019 08:09 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/9 "2019-03-26T08:09:27Z")

</div>

I keep getting the "Invalid input" message, but it used to work and I didnt change anything so thats strange..  
 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/4cbe1c9597a924c48e39777b6751aabfc335bb16.png)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [26 March 2019 08:29 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/10 "2019-03-26T08:29:09Z")

</div>

As suggested, enable the debug node and look at what you are sending to the outputs.

Also check the settings in the buzzer node. You said you have not changed anything but I suspect you have, possibly accidentally. The clue is in the error message.

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [26 March 2019 08:37 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/11 "2019-03-26T08:37:23Z")

</div>

That’s the same image again and doesn’t show the output of the debug node

---

<div class="post-metadata">

### Author: ![anon4382222](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anon4382222](https://discourse.nodered.org/u/anon4382222)
#### Post date: [26 March 2019 08:43 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/12 "2019-03-26T08:43:13Z")

</div>

Im not sure what you mean then.. what other output of the debug node is there?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [26 March 2019 09:03 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/13 "2019-03-26T09:03:39Z")

</div>

None of those messages are from the debug node you have in the flow image you posted. Click the button at the right hand side of it to enable it, then you will see the data you are sending to the buzzer.

---

<div class="post-metadata">

### Author: ![anon4382222](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anon4382222](https://discourse.nodered.org/u/anon4382222)
#### Post date: [26 March 2019 09:07 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/14 "2019-03-26T09:07:59Z")

</div>

Now i have disabled all the debug nodes except the one I need, so now the error should appear in the debug window right?  
I get the message (msg.payload : number 155387...) and still the same result.

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [26 March 2019 09:09 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/15 "2019-03-26T09:09:52Z")

</div>

As @Colin said none of the message you posted come from a debug node.  
They are error messages from different nodes.  
You can see which node on the first line eg node: LED or node: buzzer

---

<div class="post-metadata">

### Author: ![anon4382222](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anon4382222](https://discourse.nodered.org/u/anon4382222)
#### Post date: [26 March 2019 09:13 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/16 "2019-03-26T09:13:22Z")

</div>

Isn't this one from my debug node? ![Capture2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/7/71f0d95a271a00d9bd1c21c0cd0526922fa4e56b.png)

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [26 March 2019 09:29 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/17 "2019-03-26T09:29:21Z")

</div>

Yes, but that isn't on the image you posted???

But if that is what you are sending to turn your LED on or off what would you expect it to do?  
I would have expected your PIR to send a 1 or 0 and your buzzer to work on a 1 or 0.

So I would start by putting some other debug nodes in your flow to understand what messages are being sent

---

<div class="post-metadata">

### Author: ![anon4382222](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@anon4382222](https://discourse.nodered.org/u/anon4382222)
#### Post date: [26 March 2019 09:32 UTC](https://discourse.nodered.org/t/buzzer-turns-off-after-5s/9390/18 "2019-03-26T09:32:21Z")

</div>

I changed the name of the debug node so it wasn't on the picture, i will try to find the problem using multiple debug nodes, thanks 🙂
