# Node-red-contrib-loop-processing // false positives

**URL:** https://discourse.nodered.org/t/node-red-contrib-loop-processing-false-positives/44002
**Category:** General
**Created:** [11 April 2021 18:58 UTC](https://discourse.nodered.org/t/node-red-contrib-loop-processing-false-positives/44002 "2021-04-11T18:58:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![zimb86](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zimb86/32/26925_2.png) [@zimb86](https://discourse.nodered.org/u/zimb86)
#### Post date: [11 April 2021 18:58 UTC](https://discourse.nodered.org/t/node-red-contrib-loop-processing-false-positives/44002/1 "2021-04-11T18:58:38Z")

</div>

Hi,  
i´m using node-red-contrib-loop-processing ([node-red-contrib-loop-processing (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-loop-processing)) to achieve the following:

Start a while loop at 3pm / 15:00 to close shutters when global.brightness falls below a defined LUX value. As described in the docs I created:

- a inject daily at 3pm
- a while loop with condition expression "global.get("brightness") \> 600"
- a delay for 10 Minutes  
=\> While loop goes TRUE when brightness is above 600, into delay 10min, check again.

After brightness falls below 600, FALSE action triggered, exits loop and shutters go down (link out).  
However the delay is still active, so the FALSE action is triggered twice. (As you can see in the screenshot the loop is already exited, however the delay is still active and will trigger the loop again in \<10 min.

What am I doing wrong here? I did a log about TRUE and FALSE exits today:

 ![114279237-ede2b780-9a33-11eb-97d5-5033e172bcc2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/a/4ac55bb3996b5380363f7d62e4727c54706ce10a.png)

```auto
15:00:00;TRUE
15:10:00;TRUE
15:20:00;TRUE
15:30:00;TRUE
15:40:00;TRUE
15:50:00;TRUE
16:00:00;TRUE
16:10:00;TRUE
16:20:00;TRUE
16:30:00;TRUE
16:40:00;TRUE
16:50:00;TRUE
17:00:00;TRUE
17:10:00;TRUE
17:20:00;TRUE
17:30:00;TRUE
17:40:00;TRUE
17:50:00;TRUE
18:00:00;FALSE
18:06:59;FALSE

```

---

<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: [11 April 2021 19:37 UTC](https://discourse.nodered.org/t/node-red-contrib-loop-processing-false-positives/44002/2 "2021-04-11T19:37:33Z")

</div>

You will need to add `msg.reset` set to `true` to the last message cancel the delay node.

---

<div class="post-metadata">

### Author: ![zimb86](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zimb86/32/26925_2.png) [@zimb86](https://discourse.nodered.org/u/zimb86)
#### Post date: [14 April 2021 08:05 UTC](https://discourse.nodered.org/t/node-red-contrib-loop-processing-false-positives/44002/3 "2021-04-14T08:05:13Z")

</div>

I ended up removing the wile loop and use normal switches. No more false positives. Sometimes it can be so simple.. however I´m still at the point that [Node-red-contrib-loop-processing] is doing sth. wrong here.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/0/20f1559505d23ee14320bd95a52e4134db401ef1.png)

---

<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: [13 June 2021 08:06 UTC](https://discourse.nodered.org/t/node-red-contrib-loop-processing-false-positives/44002/4 "2021-06-13T08:06:01Z")

</div>

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