I have a pretty solid flow for my home automation. However, I am still going through a testing phase and there will be times I am away from home.
I would like to kill the node red flow if say 20 commands are triggered within a short time frame, as this would be a bug in the flow and if I am not home, the lights for example may keep flickering on/off and burn out.
That is a bit like using a sledgehammer to crack a nut IMO
Instead, you could add delay nodes (set to rate limit mode) inline?
Or you could add a counter that is reset every 60 seconds. If the counter gets above 20, then set a context flag (e.g. global.inhibit) then use switch nodes inline that test global.inhibit is false.
You could even have an inject set to reset global.inhibit every 30 minutes so things start working again after a cool down period.
There are a ton of other ways you could be smarter about this.
thanks for the reply. I've managed to setup a timer to look for the bug if it happens. I need to restart nodered if this occurs, is there a way to do that within the flow without resorting to command line?