Drop incoming messages after first message reac

Is there some straightforward way to allow only the first message and drop subsequent messages and continue doing so until the first message has reached the end of the flow, and then repeat the same.

In this particular application Node Ren runs two python scripts.

The trigger node will do what you require
e,g,

[{"id":"511279040ece5903","type":"inject","z":"da8a6ef0b3c9a5c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":1160,"wires":[["930ea86c5fde848e"]]},{"id":"930ea86c5fde848e","type":"trigger","z":"da8a6ef0b3c9a5c8","name":"","op1":"","op2":"0","op1type":"pay","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":360,"y":1160,"wires":[["0aa962d61db9c679"]]},{"id":"94b693dd48209d51","type":"change","z":"da8a6ef0b3c9a5c8","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":1240,"wires":[["930ea86c5fde848e"]]},{"id":"0aa962d61db9c679","type":"delay","z":"da8a6ef0b3c9a5c8","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":540,"y":1160,"wires":[["217e27fd051a937f","94b693dd48209d51"]]},{"id":"217e27fd051a937f","type":"debug","z":"da8a6ef0b3c9a5c8","name":"debug 118","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":710,"y":1160,"wires":[]}]

Many thanks, this was exactlyt what I was missing! End result is as follows, as per your suggestion.

1 Like

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