1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
node-red/packages/node_modules/@node-red/nodes/examples/sequence/batch/02 - Time-based group mode.json

1 line
2.2 KiB
JSON
Raw Normal View History

[{"id":"e3a5c066.16333","type":"batch","z":"17b25d53.90d033","name":"","mode":"interval","count":10,"overlap":0,"interval":"5","allowEmptySequence":false,"topics":[],"x":390,"y":280,"wires":[["9223c119.c5268"]]},{"id":"606bb329.983c9c","type":"comment","z":"17b25d53.90d033","name":"Group messages received within 5s","info":"","x":220,"y":100,"wires":[]},{"id":"9223c119.c5268","type":"join","z":"17b25d53.90d033","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":530,"y":280,"wires":[["e4d07fa1.78c16"]]},{"id":"e4d07fa1.78c16","type":"debug","z":"17b25d53.90d033","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":280,"wires":[]},{"id":"848f59e5.7528d8","type":"comment","z":"17b25d53.90d033","name":"↑ create message sequence received within 5s","info":"","x":520,"y":320,"wires":[]},{"id":"cf1bbb5e.ba3e68","type":"comment","z":"17b25d53.90d033","name":"↓ join sequence to array","info":"","x":580,"y":240,"wires":[]},{"id":"a1e311d5.4dca1","type":"inject","z":"17b25d53.90d033","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":180,"wires":[["97da73f2.ae01e"]]},{"id":"97da73f2.ae01e","type":"function","z":"17b25d53.90d033","name":"send: 0-29","func":"for(var x = 0; x < 30; x++) {\n node.send({payload: x});\n}","outputs":1,"noerr":0,"x":350,"y":180,"wires":[["2776c823.77eba8"]]},{"id":"2776c823.77eba8","type":"delay","z":"17b25d53.90d033","name":"","pauseType":"rate","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":530,"y":180,"wires":[["e3a5c066.16333"]]},{"id":"93520648.6a7988","type":"comment","z":"17b25d53.90d033","name":"↓ send sequence: 0-29","info":"","x":380,"y":140,"wires":[]},{"id":"5842d64f.9fc608","type":"comment","z":"17b25d53.90d033","name":"Example: Time-based Group Mode","info":"*Time-based Group mode* of batch node can be used to create new message sequences from incoming messages received within specified time range. \n","x":180,"y":40,"wires":[]}]