Disable when a certain message arrives

HI,

I have a Node-RED flow deployed looking like below

On the HTTP input node I receives triggers from my video surveillance system (motion detection) and to notify activity via pushover or email depending on the query parameter received.
In some cases, like when outdoor lights are switched on/off this triggers the video to detect a motion.

I control the lights via home automation and I would like to send a HTTP request to this node before the lights turns ON/OFF and ignore the other HTTP requests for e.g. 10 sec and hence avoid the false notifications.

How can this be done with Node-RED?

/ Joacim

Have a look at node-red-contrib-simple-gate which can be used to block messages, then use a Trigger node to send the block message to the gate, then the release message a defined time later.

1 Like

Thanks @Colin will check that out

I have tried out the node-red-contrib-simple-gate and can close the gate for 10 sec via three ways:

  1. A http request to "Stop Video Notification"
  2. A dashboard button
  3. After an video event occured
    The gate starts after 10 sec via trigger nodes.

The flow looks like:

However I think the switch isn't working all the time (calling all outputs that fulfills the statement.
The switch node has the following statements:

Do you see any "mistakes" in my thinking of the flow?

(a few extra debug nodes now)

Maybe the values in the switch should be numerical and not strings?

Thanks, I have changed to that and will see if that works better.
/ Joacim - a newbie on Node-RED