How to filter out "flapping" status

So use a trigger node in combination.
e.g.

[{"id":"9b66cd38.78f058","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload.dir","v":"in","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":140,"y":720,"wires":[["9ca474fb.4174a"]]},{"id":"9ca474fb.4174a","type":"trigger","z":"c791cbc0.84f648","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"10","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":310,"y":740,"wires":[["396b845e.94655c"]]},{"id":"863c799c.8656b","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload.dir","v":"out","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":140,"y":780,"wires":[["9ca474fb.4174a"]]},{"id":"396b845e.94655c","type":"rbe","z":"c791cbc0.84f648","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload.dir","x":480,"y":740,"wires":[["407d1344.82c8ac"]]},{"id":"407d1344.82c8ac","type":"debug","z":"c791cbc0.84f648","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":660,"y":740,"wires":[]}]

the trigger node will pass the latest msg received within 10 seconds

1 Like