You want a flow to be triggered if a message is not received after a defined time. For example, you expect to receive a sensor reading every 5 seconds and need to know if it fails to arrive.
Use the Trigger
node to detect when a message has not
arrived after a defined interval.
[{"id":"6ea53ad8.2362a4","type":"debug","z":"ac14500e.2c57d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":450,"y":1160,"wires":[]},{"id":"3da6946e.184a5c","type":"inject","z":"ac14500e.2c57d","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":1160,"wires":[["38caaff4.03f6d","6ea53ad8.2362a4"]]},{"id":"38caaff4.03f6d","type":"trigger","z":"ac14500e.2c57d","op1":"","op2":"timeout","op1type":"nul","op2type":"str","duration":"5","extend":true,"units":"s","reset":"","bytopic":"all","name":"Watchdog","x":270,"y":1200,"wires":[["ae477709.016088"]]},{"id":"ae477709.016088","type":"debug","z":"ac14500e.2c57d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":450,"y":1200,"wires":[]}]
In the example flow, the top branch represents the normal flow of the messages.
They also get passed to the Trigger
node on a second
branch of the flow.
The Trigger
node is configured to initially send nothing,
then to wait for 5 seconds before sending a "timeout"
message. The option to
extend the delay if new messages arrive is also selected. This means as long as
messages continue to arrive, the node will not do anything. Once 5 seconds passes
after the last message to arrive, it will send on the "timeout"
message.
Node-RED: Low-code programming for event-driven applications.
Copyright OpenJS Foundation and Node-RED contributors. All rights reserved. The OpenJS Foundation has registered trademarks and uses trademarks. For a list of trademarks of the OpenJS Foundation, please see our Trademark Policy and Trademark List. Trademarks and logos not indicated on the list of OpenJS Foundation trademarks are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
The OpenJS Foundation | Terms of Use | Privacy Policy | OpenJS Foundation Bylaws | Trademark Policy | Trademark List | Cookie Policy
林俊杰为什么不结婚 | 乳房边缘疼是什么原因 | 香蕉不能和什么一起吃 | 马弁是什么意思 | 瞬移是什么意思 |
身体缺钾会有什么症状 | 梦见黑熊是什么预兆 | 为什么蚊子要吸血 | 角质层是什么 | nt 是什么检查 |
t2是什么意思 | 胃不好的人吃什么好 | 口里有异味是什么原因 | 12月15号是什么星座 | 属猪和什么属相最配 |
梦见水是什么征兆 | 为什么会得鼻炎 | 青少年膝盖痛什么原因 | 囊性病变是什么意思 | 容易口腔溃疡什么原因 |
承情是什么意思hcv9jop7ns5r.cn | 八月底什么星座hcv9jop0ns9r.cn | 梦见摘桃子是什么意思jingluanji.com | 975是什么意思hcv9jop4ns4r.cn | 突然长胖是什么原因造成的hcv8jop9ns2r.cn |
rm是什么币hcv9jop2ns0r.cn | 半月板是什么部位yanzhenzixun.com | 为什么受伤总是我hcv8jop1ns7r.cn | 有口臭去医院挂什么科hcv8jop7ns1r.cn | 梗概什么意思hcv8jop7ns2r.cn |
124是什么意思hcv8jop1ns9r.cn | 县局长是什么级别hcv8jop9ns7r.cn | 命理是什么意思hcv8jop8ns6r.cn | 西瓜适合什么土壤种植kuyehao.com | 哀转久绝的绝什么意思1949doufunao.com |
办理护照需要什么手续hcv9jop4ns4r.cn | 油面筋是什么做的hcv8jop4ns5r.cn | 急性肠胃炎是什么原因引起的hcv7jop5ns4r.cn | 脾肾气虚的症状是什么hcv9jop1ns0r.cn | 一节黑一节白是什么蛇shenchushe.com |