This commit is contained in:
gongwenxin
2025-08-28 16:20:24 +08:00
parent 61e533cddf
commit 73e887ebf4
1539 changed files with 360926 additions and 0 deletions
@@ -0,0 +1 @@
[{"id":"74853568.22b87c","type":"batch","z":"703dac02.e61e64","name":"","mode":"count","count":"5","overlap":0,"interval":"5","allowEmptySequence":false,"topics":[],"x":410,"y":260,"wires":[["8f4f683.99d1998"]]},{"id":"3d208473.f31e1c","type":"comment","z":"703dac02.e61e64","name":"Group 5 consecutive messages","info":"","x":210,"y":88,"wires":[]},{"id":"8f4f683.99d1998","type":"join","z":"703dac02.e61e64","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":550,"y":260,"wires":[["6c47ccb3.bb0184"]]},{"id":"6c47ccb3.bb0184","type":"debug","z":"703dac02.e61e64","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":710,"y":260,"wires":[]},{"id":"49c2ac1.59a9354","type":"comment","z":"703dac02.e61e64","name":"↑ create message sequence with 5 messages","info":"","x":530,"y":300,"wires":[]},{"id":"311dd6b4.5aeb7a","type":"comment","z":"703dac02.e61e64","name":"↓ join sequence to array","info":"","x":600,"y":220,"wires":[]},{"id":"e27c55b0.18e9c8","type":"inject","z":"703dac02.e61e64","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":180,"wires":[["9e65f29a.69ca2"]]},{"id":"9e65f29a.69ca2","type":"function","z":"703dac02.e61e64","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":[["74853568.22b87c"]]},{"id":"817acbfb.452af8","type":"comment","z":"703dac02.e61e64","name":"↓ send sequence: 0-29","info":"","x":380,"y":140,"wires":[]},{"id":"53645699.a35c48","type":"batch","z":"703dac02.e61e64","name":"","mode":"count","count":"5","overlap":"1","interval":"5","allowEmptySequence":false,"topics":[],"x":410,"y":528,"wires":[["4cb873e6.f9996c"]]},{"id":"ecff527d.d64cb","type":"comment","z":"703dac02.e61e64","name":"Group 5 consecutive messages with overlap of 1 msg","info":"","x":280,"y":356,"wires":[]},{"id":"4cb873e6.f9996c","type":"join","z":"703dac02.e61e64","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":550,"y":528,"wires":[["51089be3.4ecbf4"]]},{"id":"51089be3.4ecbf4","type":"debug","z":"703dac02.e61e64","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":710,"y":528,"wires":[]},{"id":"84c34533.6284a8","type":"comment","z":"703dac02.e61e64","name":"↑ create message sequence with 5 messages with overlap of 1 msg","info":"","x":600,"y":568,"wires":[]},{"id":"c7241026.18245","type":"comment","z":"703dac02.e61e64","name":"↓ join sequence to array","info":"","x":600,"y":488,"wires":[]},{"id":"67d24449.028eec","type":"inject","z":"703dac02.e61e64","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":448,"wires":[["5d909bfb.6faf44"]]},{"id":"5d909bfb.6faf44","type":"function","z":"703dac02.e61e64","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":448,"wires":[["53645699.a35c48"]]},{"id":"e7af9fbb.f30ad","type":"comment","z":"703dac02.e61e64","name":"↓ send sequence: 0-29","info":"","x":380,"y":408,"wires":[]},{"id":"f4a38f7b.8d62f","type":"comment","z":"703dac02.e61e64","name":"Example: Number-based Group Mode","info":"*Number-based Group mode* of batch node can be used to create new message sequences from incoming messages. Recently received *N*-messages are grouped to a sequence. Creating message sequences that has overwrap with adjacent message group is possible.\n","x":190,"y":40,"wires":[]}]
@@ -0,0 +1 @@
[{"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":[]}]
@@ -0,0 +1 @@
[{"id":"cf1fd796.197678","type":"inject","z":"e6e2a04b.1fb51","name":"","topic":"SEQ","payload":"[1,2,3,4,5]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":140,"wires":[["d1c8ddf0.99b4e"]]},{"id":"d1c8ddf0.99b4e","type":"split","z":"e6e2a04b.1fb51","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":370,"y":140,"wires":[["f727a5d3.ea1a28"]]},{"id":"f727a5d3.ea1a28","type":"batch","z":"e6e2a04b.1fb51","name":"","mode":"concat","count":10,"overlap":0,"interval":10,"allowEmptySequence":false,"topics":[{"topic":"SEQ"},{"topic":"SEQ"}],"x":510,"y":140,"wires":[["f4d6dba4.7e8ab8"]]},{"id":"f4d6dba4.7e8ab8","type":"join","z":"e6e2a04b.1fb51","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":650,"y":140,"wires":[["31b81865.611788"]]},{"id":"31b81865.611788","type":"debug","z":"e6e2a04b.1fb51","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":810,"y":140,"wires":[]},{"id":"8ad6b9c.7ee8548","type":"comment","z":"e6e2a04b.1fb51","name":"Duplicate","info":"","x":140,"y":100,"wires":[]},{"id":"5137b2d0.f4838c","type":"inject","z":"e6e2a04b.1fb51","name":"","topic":"SEQ","payload":"[1,-6,-8,7,2,-3]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":260,"wires":[["408f3032.eafc1"]]},{"id":"408f3032.eafc1","type":"split","z":"e6e2a04b.1fb51","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":370,"y":260,"wires":[["dbd6e8b8.cbf2b8"]]},{"id":"c70a7fad.9ee08","type":"comment","z":"e6e2a04b.1fb51","name":"Filter & Concat","info":"","x":160,"y":220,"wires":[]},{"id":"dbd6e8b8.cbf2b8","type":"switch","z":"e6e2a04b.1fb51","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"},{"t":"else"}],"checkall":"true","repair":true,"outputs":2,"x":430,"y":320,"wires":[["c11e5c5f.876d6"],["e99c703b.f404"]]},{"id":"356c8654.2ad1aa","type":"comment","z":"e6e2a04b.1fb51","name":"↑ Duplicate SEQ","info":"","x":540,"y":180,"wires":[]},{"id":"c11e5c5f.876d6","type":"change","z":"e6e2a04b.1fb51","name":"Topic←POS","rules":[{"t":"set","p":"topic","pt":"msg","to":"POS","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":280,"wires":[["3412e439.eda55c"]]},{"id":"e99c703b.f404","type":"change","z":"e6e2a04b.1fb51","name":"Topic←NEG","rules":[{"t":"set","p":"topic","pt":"msg","to":"NEG","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":340,"wires":[["3412e439.eda55c"]]},{"id":"3412e439.eda55c","type":"batch","z":"e6e2a04b.1fb51","name":"","mode":"concat","count":10,"overlap":0,"interval":10,"allowEmptySequence":false,"topics":[{"topic":"NEG"},{"topic":"POS"}],"x":750,"y":320,"wires":[["7f1ce95c.7ddbc8"]]},{"id":"e6f01877.16d558","type":"debug","z":"e6e2a04b.1fb51","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":970,"y":260,"wires":[]},{"id":"7f1ce95c.7ddbc8","type":"join","z":"e6e2a04b.1fb51","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":810,"y":260,"wires":[["e6f01877.16d558"]]},{"id":"c548f2c.641141","type":"comment","z":"e6e2a04b.1fb51","name":"↑ Order sequence: negative→positive","info":"","x":850,"y":360,"wires":[]},{"id":"c571b56c.ae63b8","type":"comment","z":"e6e2a04b.1fb51","name":"Filter pos/neg and make separate sequence↑ (but not a simple sort) ","info":"","x":360,"y":380,"wires":[]},{"id":"c851c021.a9688","type":"comment","z":"e6e2a04b.1fb51","name":"Example: Concatenate Mode","info":"*Concatenate mode* of batch node can be used to combine input message sequences to create a new message sequence. Order of the sequences can be specified using message topic assigned to each message in a sequence. Message sequence can be specified multiple times.\n","x":160,"y":40,"wires":[]}]
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
[{"id":"f94ffc33.76f83","type":"comment","z":"e5679299.d9792","name":"Example: Split Message Payload","info":"Split node can be used to split message payload into multiple messages.","x":190,"y":60,"wires":[]},{"id":"657bb57c.a3f98c","type":"split","z":"e5679299.d9792","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":510,"y":160,"wires":[["14228ff.ae24f7"]]},{"id":"2afece55.b87de2","type":"inject","z":"e5679299.d9792","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":160,"wires":[["cfca3863.d961d8"]]},{"id":"cfca3863.d961d8","type":"template","z":"e5679299.d9792","name":"data","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"Apple\nOrange\nBanana","output":"str","x":370,"y":160,"wires":[["657bb57c.a3f98c"]]},{"id":"14228ff.ae24f7","type":"debug","z":"e5679299.d9792","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":660,"y":160,"wires":[]},{"id":"9a3c9494.b5d178","type":"comment","z":"e5679299.d9792","name":"Split input text by specified string","info":"","x":230,"y":120,"wires":[]},{"id":"38c873c.5ae718c","type":"comment","z":"e5679299.d9792","name":"↑ split by newline (\\\\n)","info":"","x":560,"y":200,"wires":[]},{"id":"bdfa12b9.3fbbc","type":"split","z":"e5679299.d9792","name":"","splt":"4","spltType":"len","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":510,"y":280,"wires":[["debf23bb.c0245"]]},{"id":"7c0948db.e35d38","type":"inject","z":"e5679299.d9792","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":280,"wires":[["7f791b7d.94cad4"]]},{"id":"7f791b7d.94cad4","type":"template","z":"e5679299.d9792","name":"data","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"Apple\nOrange\nBanana","output":"str","x":370,"y":280,"wires":[["bdfa12b9.3fbbc"]]},{"id":"debf23bb.c0245","type":"debug","z":"e5679299.d9792","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":660,"y":280,"wires":[]},{"id":"f05e98a3.4182c8","type":"comment","z":"e5679299.d9792","name":"Split input text by specified number of characters","info":"","x":280,"y":240,"wires":[]},{"id":"86b52b51.2258d8","type":"comment","z":"e5679299.d9792","name":"↑ split by four characters","info":"","x":570,"y":320,"wires":[]},{"id":"71d7c0e0.c0316","type":"split","z":"e5679299.d9792","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":510,"y":420,"wires":[["bee5b6a2.a955a8"]]},{"id":"1cdc2df9.bebdd2","type":"inject","z":"e5679299.d9792","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":420,"wires":[["f30df13c.19475"]]},{"id":"f30df13c.19475","type":"template","z":"e5679299.d9792","name":"data","field":"payload","fieldType":"msg","format":"json","syntax":"plain","template":"[ \n \"Apple\",\n \"Orange\",\n \"Banana\"\n]","output":"json","x":370,"y":420,"wires":[["71d7c0e0.c0316"]]},{"id":"bee5b6a2.a955a8","type":"debug","z":"e5679299.d9792","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":660,"y":420,"wires":[]},{"id":"b2c731fe.abda4","type":"comment","z":"e5679299.d9792","name":"Split input array","info":"","x":180,"y":380,"wires":[]},{"id":"1f557227.d0910e","type":"comment","z":"e5679299.d9792","name":"↑ split array","info":"","x":530,"y":460,"wires":[]},{"id":"c0d43ff4.291d8","type":"split","z":"e5679299.d9792","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":510,"y":540,"wires":[["fc9fe458.50fd18"]]},{"id":"6d52ce8a.0c715","type":"inject","z":"e5679299.d9792","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":540,"wires":[["bdeb8c21.1c6b7"]]},{"id":"bdeb8c21.1c6b7","type":"template","z":"e5679299.d9792","name":"data","field":"payload","fieldType":"msg","format":"json","syntax":"plain","template":"{ \n \"Apple\": 80,\n \"Orange\": 100,\n \"Banana\": 50\n}","output":"json","x":370,"y":540,"wires":[["c0d43ff4.291d8"]]},{"id":"fc9fe458.50fd18","type":"debug","z":"e5679299.d9792","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":640,"y":540,"wires":[]},{"id":"48956e14.79b86","type":"comment","z":"e5679299.d9792","name":"Split object to key/value pairs","info":"","x":220,"y":500,"wires":[]},{"id":"d528c2c2.6efc7","type":"comment","z":"e5679299.d9792","name":"↑ split object","info":"","x":530,"y":580,"wires":[]}]