Handy node-red rate limiter function

Thought I’d post this handy little function I stumbled across (not my work, but glad someone did it). Have a chatty device that’s giving you too many details WAY too often? Don’t care if you throw away a bunch of those messages? Answer yes to both, and this function can help. I used it to slow down the pace of power reports coming from my Centralite 3200 plug to 1/min, which is fine for me. I don’t care about averaging or smoothing or anything fancy… I just want a periodic peek at where things are now.

https://flows.nodered.org/flow/9410e4cebcc4b68fae73

Side note: turns out this plug has a config parameter that lets me set the reporting rate. Nevertheless, the function may find use elsewhere in my flows…

1 Like

The built-in Delay node has a rate-limiting option in it.

image

3 Likes

I used that one to limit messages being propagated to Google Home for a device that I have that I send colour change messages to every second. Very handy node to have included out of the box.