Advent Of Code 2022 Day 2

Managed to do Part 1 of Day 2 - I've run out of time to do Part 2 today

[{"id":"e12ec0a178524de9","type":"join","z":"ae849d01ff1599e6","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":830,"y":120,"wires":[["0e55ada728b38d5b"]]},{"id":"7d9f01ecb56a21cc","type":"split","z":"ae849d01ff1599e6","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":310,"y":120,"wires":[["c8958621c3ed3c71"]]},{"id":"887b9edc7cdd3b84","type":"inject","z":"ae849d01ff1599e6","name":"input","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":45,"y":120,"wires":[["70704ea7a3ce387e"]],"l":false},{"id":"c8958621c3ed3c71","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"delete","p":"parts","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":120,"wires":[["281e4fe5f64a3e84"]]},{"id":"dc47c02679e1bbf2","type":"debug","z":"ae849d01ff1599e6","name":"debug 50","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1120,"y":340,"wires":[]},{"id":"281e4fe5f64a3e84","type":"split","z":"ae849d01ff1599e6","name":"","splt":" ","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":690,"y":120,"wires":[["e12ec0a178524de9"]]},{"id":"0e55ada728b38d5b","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[0]","propertyType":"msg","rules":[{"t":"eq","v":"A","vt":"str"},{"t":"eq","v":"B","vt":"str"},{"t":"eq","v":"C","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":90,"y":200,"wires":[["828adb4274f767f3"],["14efb91d06184b9e"],["da5164b602e778f8"]]},{"id":"828adb4274f767f3","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[1]","propertyType":"msg","rules":[{"t":"eq","v":"X","vt":"str"},{"t":"eq","v":"Y","vt":"str"},{"t":"eq","v":"Z","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":270,"y":200,"wires":[["63e3e51aa4f2fc9e"],["1d583309f5aa5876"],["7ef83baf34ca639b"]]},{"id":"14efb91d06184b9e","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[1]","propertyType":"msg","rules":[{"t":"eq","v":"X","vt":"str"},{"t":"eq","v":"Y","vt":"str"},{"t":"eq","v":"Z","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":270,"y":340,"wires":[["2f9180ba989fa3ea"],["9d7ac17e8e5caf69"],["7541afbb0cc4fd43"]]},{"id":"da5164b602e778f8","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[1]","propertyType":"msg","rules":[{"t":"eq","v":"X","vt":"str"},{"t":"eq","v":"Y","vt":"str"},{"t":"eq","v":"Z","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":270,"y":460,"wires":[["051f9d97ed1d5b62"],["19010e63c31c1291"],["5ffa776e8b8166e5"]]},{"id":"63e3e51aa4f2fc9e","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"4","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":180,"wires":[["a8403a66dda85268"]]},{"id":"1d583309f5aa5876","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"8","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":220,"wires":[["a8403a66dda85268"]]},{"id":"7ef83baf34ca639b","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":260,"wires":[["a8403a66dda85268"]]},{"id":"2f9180ba989fa3ea","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":320,"wires":[["a8403a66dda85268"]]},{"id":"9d7ac17e8e5caf69","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":360,"wires":[["a8403a66dda85268"]]},{"id":"7541afbb0cc4fd43","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"9","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":400,"wires":[["a8403a66dda85268"]]},{"id":"051f9d97ed1d5b62","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"7","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":460,"wires":[["a8403a66dda85268"]]},{"id":"19010e63c31c1291","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":500,"wires":[["a8403a66dda85268"]]},{"id":"5ffa776e8b8166e5","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"6","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":540,"wires":[["a8403a66dda85268"]]},{"id":"a60eadd2ecbc35ea","type":"join","z":"ae849d01ff1599e6","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"2","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":830,"y":340,"wires":[["51e259145c620b1f"]]},{"id":"51e259145c620b1f","type":"calculator","z":"ae849d01ff1599e6","name":"","inputMsgField":"payload","outputMsgField":"payload","operation":"sum","constant":"","round":false,"decimals":0,"x":970,"y":340,"wires":[["dc47c02679e1bbf2"]]},{"id":"70704ea7a3ce387e","type":"template","z":"ae849d01ff1599e6","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"B X\nA Z\nA Y\nB X\nC Z\nB Y\nB X\nC X\nA Y\nB Y\nB Y\nC Y\nB Y\nC Y\nB X\nA Z\nC Y\nB Z\nC X\nA Y\nB Y\nB Y\nB Y\nB Y\nB X\nB Y\nC Y\nB Y\nB Y\nB Y\nA Y\nB X\nA Y\nA Y\nB X\nB Z\nB Y\nC Y\nA Y\nA Z\nC Y\nA Z\nC Z\nC Y\nB Z\nC X\nA Z\nC Y\nB X\nB X\nC Z\nC Y\nB Y\nA X\nC Z\nB Y\nB X\nA Z\nB Z\nC Y\nC Z\nB X\nB Y\nB Y\nC Y\nB Y\nB Y\nC Y\nB Z\nA Y\nB Y\nC Y\nB Y\nB Y\nB Y\nC Y\nB X\nC X\nC Y\nB X\nB X\nC X\nB Y\nC Z\nB Y\nB Y\nB Y\nC Y\nB X\nA Z\nC Y\nA Z\nB X\nB X\nA Y\nC X\nB Z\nB Y\nB X\nC X\nC X\nB X\nA Z\nA Y\nA Z\nB X\nB X\nB Y\nC Y\nC Z\nB Y\nA Y\nC Y\nA Z\nA X\nA Y\nB X\nB Y\nC Y\nB Y\nB Z\nC X\nB Y\nB Z\nC Y\nC Y\nC Z\nB Y\nC Y\nB Y\nC Y\nA Z\nA Z\nA Z\nB Y\nB Y\nC Z\nB Y\nC Y\nB X\nB X\nA Y\nB X\nB X\nC Y\nC Z\nB Y\nA Z\nA Y\nC Y\nB X\nC Z\nC Y\nB Y\nB Y\nA Z\nB Y\nB Y\nB X\nB Z\nA Z\nC Y\nA Z\nC Z\nB Y\nB Y\nA X\nB X\nA Z\nB Y\nC Z\nA Y\nB Y\nA Z\nC X\nC Y\nB Y\nB Y\nB Y\nC Z\nB X\nC Z\nB Y\nC Y\nC Y\nB Y\n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nB X\nB Y\nC Y\nA Z\nA X\nC X\nB X\nB Y\nB Y\nA Y\nB Y\nC Y\nC Y\nC Z\nB Y\nB Y\nC Y\nC Z\nB Y\nA Z\nA Z\nC X\nB Y\nC Y\nC Z\nC Y\nB X\nC Z\nB X\nB Y\nC X\nB Y\nC Y\nA Z\nA Z\nB X\nB Z\nA X\nA Z\nC X\nA Z\nB Z\nB Y\nC Y\nB X\nB Y\nB Z\nB Y\nB X\nB Y\nC X\nB Y\nB X\nB Y\nC Y\nC X\nB Z\nB Y\nC X\nC X\nB X\nB Y\nB X\nB Y\nB Y\nB Y\nB Y\nB X\nB Y\nA Z\nB Y\nA Y\nB Y\nA Y\nB Y\nA Y\nC Y\nB Y\nC Y\nC Y\nC Y\nC Y\nC Y\nC Y\nA Z\nA Z\nB X\nC X\nC Z\nB Y\nC X\nA Z\nC Z\nC Y\nB Z\nB Y\nB Z\nB Y\nA Z\nB X\nB Y\nB X\nC Y\nB Y\nB X\nA Y\nB Y\nB Y\nB Z\nB X\nC X\nB Y\nB Y\nC Y\nC Y\nB Y\nC Y\nC X\nA X\nC X\nC Y\nB Y\nB Y\nB Y\nB Z\nB Y\nB Z\nB Y\nB X\nA Z\nC Z\nC Y\nC Y\nA Y\nB X\nB Y\nC Z\nA Y\nA Y\nB Y\nB X\nA Z\nB Y\nB Y\nA Y\nC Y\nA Z\nC Y\nB Z\nB Y\nB Y\nC Y\nC Z\nB Y\nB Y\nC Y\nC Y\nB Z\nB Z\nA Y\nC Y\nA Z\nB Z\nB Y\nB Y\nB X\nB Y\nA Z\nA Y\nA Z\nB Y\nB X\nC X\nC Y\nC Z\nB Y\nB Y\nB Y\nA Y\nC Y\nB Y\nC Y\nC Y\nB Y","output":"str","x":160,"y":120,"wires":[["7d9f01ecb56a21cc"]]},{"id":"a8403a66dda85268","type":"junction","z":"ae849d01ff1599e6","x":740,"y":340,"wires":[["a60eadd2ecbc35ea"]]}]

I'd be interested if anyone can come up with a method of counting the number of lines of the multiline text in the template node and sticking the value in a flow context variable (no JS - core or contrib nodes only)

image

Spliting the string will give a count.
e.g.

[{"id":"1400bca7e88f3899","type":"inject","z":"452103ea51141731","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":4120,"wires":[["f866153bad69d3c6"]]},{"id":"f866153bad69d3c6","type":"template","z":"452103ea51141731","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"1\n2\n3\n4\n5","output":"str","x":300,"y":4120,"wires":[["e8d825993d18bd4f"]]},{"id":"e8d825993d18bd4f","type":"split","z":"452103ea51141731","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":370,"y":4060,"wires":[["e1bf808764a30c1e"]]},{"id":"e1bf808764a30c1e","type":"switch","z":"452103ea51141731","name":"","property":"parts.index","propertyType":"msg","rules":[{"t":"lt","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":510,"y":4060,"wires":[["a211a1ec0b2b46a4"]]},{"id":"a211a1ec0b2b46a4","type":"change","z":"452103ea51141731","name":"","rules":[{"t":"set","p":"count","pt":"flow","to":"parts.count","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":4060,"wires":[["a842e0b0a17a6ea9"]]},{"id":"a842e0b0a17a6ea9","type":"debug","z":"452103ea51141731","name":"debug 112","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"parts.count","targetType":"msg","statusVal":"","statusType":"auto","x":650,"y":4120,"wires":[]}]
1 Like

Excellent :slight_smile:
But looking at your code - I think msg.parts.count might be better to use as it gets set to the total straight away after the 1st split message and doesn't change

Improved solution using help from @E1cid :slight_smile:

flow.count gets set to number of lines in the input data and then the counter/switch at the end lets us add in msg.complete when all the lines have been processed :slight_smile:

[{"id":"ae849d01ff1599e6","type":"tab","label":"Day 02","disabled":false,"info":"","env":[]},{"id":"a8403a66dda85268","type":"junction","z":"ae849d01ff1599e6","x":600,"y":360,"wires":[["1e0fcbe8176923fc"]]},{"id":"e12ec0a178524de9","type":"join","z":"ae849d01ff1599e6","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":830,"y":120,"wires":[["0e55ada728b38d5b"]]},{"id":"7d9f01ecb56a21cc","type":"split","z":"ae849d01ff1599e6","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":310,"y":120,"wires":[["c8958621c3ed3c71","4e4196d62ae2813f"]]},{"id":"887b9edc7cdd3b84","type":"inject","z":"ae849d01ff1599e6","name":"input","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":45,"y":120,"wires":[["70704ea7a3ce387e","96e0bbbc2aadbbf3"]],"l":false},{"id":"c8958621c3ed3c71","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"delete","p":"parts","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":120,"wires":[["281e4fe5f64a3e84"]]},{"id":"dc47c02679e1bbf2","type":"debug","z":"ae849d01ff1599e6","name":"debug 50","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1160,"y":480,"wires":[]},{"id":"281e4fe5f64a3e84","type":"split","z":"ae849d01ff1599e6","name":"","splt":" ","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":690,"y":120,"wires":[["e12ec0a178524de9"]]},{"id":"0e55ada728b38d5b","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[0]","propertyType":"msg","rules":[{"t":"eq","v":"A","vt":"str"},{"t":"eq","v":"B","vt":"str"},{"t":"eq","v":"C","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":90,"y":200,"wires":[["828adb4274f767f3"],["14efb91d06184b9e"],["da5164b602e778f8"]]},{"id":"828adb4274f767f3","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[1]","propertyType":"msg","rules":[{"t":"eq","v":"X","vt":"str"},{"t":"eq","v":"Y","vt":"str"},{"t":"eq","v":"Z","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":270,"y":200,"wires":[["63e3e51aa4f2fc9e"],["1d583309f5aa5876"],["7ef83baf34ca639b"]]},{"id":"14efb91d06184b9e","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[1]","propertyType":"msg","rules":[{"t":"eq","v":"X","vt":"str"},{"t":"eq","v":"Y","vt":"str"},{"t":"eq","v":"Z","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":270,"y":340,"wires":[["2f9180ba989fa3ea"],["9d7ac17e8e5caf69"],["7541afbb0cc4fd43"]]},{"id":"da5164b602e778f8","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[1]","propertyType":"msg","rules":[{"t":"eq","v":"X","vt":"str"},{"t":"eq","v":"Y","vt":"str"},{"t":"eq","v":"Z","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":270,"y":460,"wires":[["051f9d97ed1d5b62"],["19010e63c31c1291"],["5ffa776e8b8166e5"]]},{"id":"63e3e51aa4f2fc9e","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"4","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":180,"wires":[["a8403a66dda85268"]]},{"id":"1d583309f5aa5876","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"8","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":220,"wires":[["a8403a66dda85268"]]},{"id":"7ef83baf34ca639b","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":260,"wires":[["a8403a66dda85268"]]},{"id":"2f9180ba989fa3ea","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":320,"wires":[["a8403a66dda85268"]]},{"id":"9d7ac17e8e5caf69","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":360,"wires":[["a8403a66dda85268"]]},{"id":"7541afbb0cc4fd43","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"9","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":400,"wires":[["a8403a66dda85268"]]},{"id":"051f9d97ed1d5b62","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"7","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":460,"wires":[["a8403a66dda85268"]]},{"id":"19010e63c31c1291","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":500,"wires":[["a8403a66dda85268"]]},{"id":"5ffa776e8b8166e5","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"6","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":540,"wires":[["a8403a66dda85268"]]},{"id":"a60eadd2ecbc35ea","type":"join","z":"ae849d01ff1599e6","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1150,"y":360,"wires":[["51e259145c620b1f"]]},{"id":"51e259145c620b1f","type":"calculator","z":"ae849d01ff1599e6","name":"","inputMsgField":"payload","outputMsgField":"payload","operation":"sum","constant":"","round":false,"decimals":0,"x":1150,"y":420,"wires":[["dc47c02679e1bbf2"]]},{"id":"70704ea7a3ce387e","type":"template","z":"ae849d01ff1599e6","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"B X\nA Z\nA Y\nB X\nC Z\nB Y\nB X\nC X\nA Y\nB Y\nB Y\nC Y\nB Y\nC Y\nB X\nA Z\nC Y\nB Z\nC X\nA Y\nB Y\nB Y\nB Y\nB Y\nB X\nB Y\nC Y\nB Y\nB Y\nB Y\nA Y\nB X\nA Y\nA Y\nB X\nB Z\nB Y\nC Y\nA Y\nA Z\nC Y\nA Z\nC Z\nC Y\nB Z\nC X\nA Z\nC Y\nB X\nB X\nC Z\nC Y\nB Y\nA X\nC Z\nB Y\nB X\nA Z\nB Z\nC Y\nC Z\nB X\nB Y\nB Y\nC Y\nB Y\nB Y\nC Y\nB Z\nA Y\nB Y\nC Y\nB Y\nB Y\nB Y\nC Y\nB X\nC X\nC Y\nB X\nB X\nC X\nB Y\nC Z\nB Y\nB Y\nB Y\nC Y\nB X\nA Z\nC Y\nA Z\nB X\nB X\nA Y\nC X\nB Z\nB Y\nB X\nC X\nC X\nB X\nA Z\nA Y\nA Z\nB X\nB X\nB Y\nC Y\nC Z\nB Y\nA Y\nC Y\nA Z\nA X\nA Y\nB X\nB Y\nC Y\nB Y\nB Z\nC X\nB Y\nB Z\nC Y\nC Y\nC Z\nB Y\nC Y\nB Y\nC Y\nA Z\nA Z\nA Z\nB Y\nB Y\nC Z\nB Y\nC Y\nB X\nB X\nA Y\nB X\nB X\nC Y\nC Z\nB Y\nA Z\nA Y\nC Y\nB X\nC Z\nC Y\nB Y\nB Y\nA Z\nB Y\nB Y\nB X\nB Z\nA Z\nC Y\nA Z\nC Z\nB Y\nB Y\nA X\nB X\nA Z\nB Y\nC Z\nA Y\nB Y\nA Z\nC X\nC Y\nB Y\nB Y\nB Y\nC Z\nB X\nC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nA X\nB Y\nC Y\nB X\nC Z\nB X\nB Y\nC Y\nA Z\nA X\nC X\nB X\nB Y\nB Y\nA Y\nB Y\nC Y\nC Y\nC Z\nB Y\nB Y\nC Y\nC Z\nB Y\nA Z\nA Z\nC X\nB Y\nC Y\nC Z\nC Y\nB X\nC Z\nB X\nB Y\nC X\nB Y\nC Y\nA Z\nA Z\nB X\nB Z\nA X\nA Z\nC X\nA Z\nB Z\nB Y\nC Y\nB X\nB Y\nB Z\nB Y\nB X\nB Y\nC X\nB Y\nB X\nB Y\nC Y\nC X\nB Z\nB Y\nC X\nC X\nB X\nB Y\nB X\nB Y\nB Y\nB Y\nB Y\nB X\nB Y\nA Z\nB Y\nA Y\nB Y\nA Y\nB Y\nA Y\nC Y\nB Y\nC Y\nC Y\nC Y\nC Y\nC Y\nC Y\nA Z\nA Z\nB X\nC X\nC Z\nB Y\nC X\nA Z\nC Z\nC Y\nB Z\nB Y\nB Z\nB Y\nA Z\nB X\nB Y\nB X\nC Y\nB Y\nB X\nA Y\nB Y\nB Y\nB Z\nB X\nC X\nB Y\nB Y\nC Y\nC Y\nB Y\nC Y\nC X\nA X\nC X\nC Y\nB Y\nB Y\nB Y\nB Z\nB Y\nB Z\nB Y\nB X\nA Z\nC Z\nC Y\nC Y\nA Y\nB X\nB Y\nC Z\nA Y\nA Y\nB Y\nB X\nA Z\nB Y\nB Y\nA Y\nC Y\nA Z\nC Y\nB Z\nB Y\nB Y\nC Y\nC Z\nB Y\nB Y\nC Y\nC Y\nB Z\nB Z\nA Y\nC Y\nA Z\nB Z\nB Y\nB Y\nB X\nB Y\nA Z\nA Y\nA Z\nB Y\nB X\nC X\nC Y\nC Z\nB Y\nB Y\nB Y\nA Y\nC Y\nB Y\nC Y\nC Y\nB Y","output":"str","x":160,"y":120,"wires":[["7d9f01ecb56a21cc"]]},{"id":"4e4196d62ae2813f","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"count","pt":"flow","to":"parts.count","tot":"msg","dc":true}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":60,"wires":[[]]},{"id":"1e0fcbe8176923fc","type":"counter","z":"ae849d01ff1599e6","name":"","init":"0","step":"1","lower":null,"upper":null,"mode":"increment","outputs":"1","x":720,"y":360,"wires":[["2ea8e9df23f09c98"]]},{"id":"96e0bbbc2aadbbf3","type":"link out","z":"ae849d01ff1599e6","name":"link out 2","mode":"link","links":[],"x":125,"y":60,"wires":[]},{"id":"921d498319b23c7c","type":"link in","z":"ae849d01ff1599e6","name":"link in 4","links":[],"x":645,"y":260,"wires":[["f8214d522576b484"]]},{"id":"f8214d522576b484","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":260,"wires":[["1e0fcbe8176923fc"]]},{"id":"2ea8e9df23f09c98","type":"switch","z":"ae849d01ff1599e6","name":"","property":"count","propertyType":"msg","rules":[{"t":"eq","v":"count","vt":"flow"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":850,"y":360,"wires":[["acda118fe7a43a75"],["a60eadd2ecbc35ea"]]},{"id":"acda118fe7a43a75","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"complete","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":320,"wires":[["a60eadd2ecbc35ea"]]}]

Finished it off :slight_smile:

[{"id":"ae849d01ff1599e6","type":"tab","label":"Day 02","disabled":false,"info":"","env":[]},{"id":"a8403a66dda85268","type":"junction","z":"ae849d01ff1599e6","x":610,"y":320,"wires":[["1e0fcbe8176923fc"]]},{"id":"7f043a5a723a76a7","type":"junction","z":"ae849d01ff1599e6","x":781,"y":703,"wires":[["9b78a72cdb743c1e"]]},{"id":"e12ec0a178524de9","type":"join","z":"ae849d01ff1599e6","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":840,"y":80,"wires":[["0e55ada728b38d5b","a1a39e1abf6dba56"]]},{"id":"7d9f01ecb56a21cc","type":"split","z":"ae849d01ff1599e6","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":320,"y":80,"wires":[["c8958621c3ed3c71","4e4196d62ae2813f"]]},{"id":"887b9edc7cdd3b84","type":"inject","z":"ae849d01ff1599e6","name":"input","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":55,"y":80,"wires":[["70704ea7a3ce387e","96e0bbbc2aadbbf3"]],"l":false},{"id":"c8958621c3ed3c71","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"delete","p":"parts","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":80,"wires":[["281e4fe5f64a3e84"]]},{"id":"dc47c02679e1bbf2","type":"debug","z":"ae849d01ff1599e6","name":"Part 1","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1230,"y":380,"wires":[]},{"id":"281e4fe5f64a3e84","type":"split","z":"ae849d01ff1599e6","name":"","splt":" ","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":700,"y":80,"wires":[["e12ec0a178524de9"]]},{"id":"0e55ada728b38d5b","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[0]","propertyType":"msg","rules":[{"t":"eq","v":"A","vt":"str"},{"t":"eq","v":"B","vt":"str"},{"t":"eq","v":"C","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":90,"y":140,"wires":[["828adb4274f767f3"],["14efb91d06184b9e"],["da5164b602e778f8"]]},{"id":"828adb4274f767f3","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[1]","propertyType":"msg","rules":[{"t":"eq","v":"X","vt":"str"},{"t":"eq","v":"Y","vt":"str"},{"t":"eq","v":"Z","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":290,"y":180,"wires":[["63e3e51aa4f2fc9e"],["1d583309f5aa5876"],["7ef83baf34ca639b"]]},{"id":"14efb91d06184b9e","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[1]","propertyType":"msg","rules":[{"t":"eq","v":"X","vt":"str"},{"t":"eq","v":"Y","vt":"str"},{"t":"eq","v":"Z","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":290,"y":320,"wires":[["2f9180ba989fa3ea"],["9d7ac17e8e5caf69"],["7541afbb0cc4fd43"]]},{"id":"da5164b602e778f8","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[1]","propertyType":"msg","rules":[{"t":"eq","v":"X","vt":"str"},{"t":"eq","v":"Y","vt":"str"},{"t":"eq","v":"Z","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":290,"y":460,"wires":[["051f9d97ed1d5b62"],["19010e63c31c1291"],["5ffa776e8b8166e5"]]},{"id":"63e3e51aa4f2fc9e","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"4","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":140,"wires":[["a8403a66dda85268"]]},{"id":"1d583309f5aa5876","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"8","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":180,"wires":[["a8403a66dda85268"]]},{"id":"7ef83baf34ca639b","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":220,"wires":[["a8403a66dda85268"]]},{"id":"2f9180ba989fa3ea","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":280,"wires":[["a8403a66dda85268"]]},{"id":"9d7ac17e8e5caf69","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":320,"wires":[["a8403a66dda85268"]]},{"id":"7541afbb0cc4fd43","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"9","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":360,"wires":[["a8403a66dda85268"]]},{"id":"051f9d97ed1d5b62","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"7","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":420,"wires":[["a8403a66dda85268"]]},{"id":"19010e63c31c1291","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":460,"wires":[["a8403a66dda85268"]]},{"id":"5ffa776e8b8166e5","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"6","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":500,"wires":[["a8403a66dda85268"]]},{"id":"a60eadd2ecbc35ea","type":"join","z":"ae849d01ff1599e6","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1160,"y":320,"wires":[["51e259145c620b1f"]]},{"id":"51e259145c620b1f","type":"calculator","z":"ae849d01ff1599e6","name":"","inputMsgField":"payload","outputMsgField":"payload","operation":"sum","constant":"","round":false,"decimals":0,"x":1070,"y":380,"wires":[["dc47c02679e1bbf2"]]},{"id":"70704ea7a3ce387e","type":"template","z":"ae849d01ff1599e6","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"B X\nA Z\nA Y\nB X\nC Z\nB Y\nB X\nC X\nA Y\nB Y\nB Y\nC Y\nB Y\nC Y\nB X\nA Z\nC Y\nB Z\nC X\nA Y\nB Y\nB Y\nB Y\nB Y\nB X\nB Y\nC Y\nB Y\nB Y\nB Y\nA Y\nB X\nA Y\nA Y\nB X\nB Z\nB Y\nC Y\nA Y\nA Z\nC Y\nA Z\nC Z\nC Y\nB Z\nC X\nA Z\nC Y\nB X\nB X\nC Z\nC Y\nB Y\nA X\nC Z\nB Y\nB X\nA Z\nB Z\nC Y\nC Z\nB X\nB Y\nB Y\nC Y\nB Y\nB Y\nC Y\nB Z\nA Y\nB Y\nC Y\nB Y\nB Y\nB Y\nC Y\nB X\nC X\nC Y\nB X\nB X\nC X\nB Y\nC Z\nB Y\nB Y\nB Y\nC Y\nB X\nA Z\nC Y\nA Z\nB X\nB X\nA Y\nC X\nB Z\nB Y\nB X\nC X\nC X\nB X\nA Z\nA Y\nA Z\nB X\nB X\nB Y\nC Y\nC Z\nB Y\nA Y\nC Y\nA Z\nA X\nA Y\nB X\nB Y\nC Y\nB Y\nB Z\nC X\nB Y\nB Z\nC Y\nC Y\nC Z\nB Y\nC Y\nB Y\nC Y\nA Z\nA Z\nA Z\nB Y\nB Y\nC Z\nB Y\nC Y\nB X\nB X\nA Y\nB X\nB X\nC Y\nC Z\nB Y\nA Z\nA Y\nC Y\nB X\nC Z\nC Y\nB Y\nB Y\nA Z\nB Y\nB Y\nB X\nB Z\nA Z\nC Y\nA Z\nC Z\nB Y\nB Y\nA X\nB X\nA Z\nB Y\nC Z\nA Y\nB Y\nA Z\nC X\nC Y\nB Y\nB Y\nB Y\nC Z\nB X\nC Z\nB Y\nC Y\nC Y\nB Y\nC Y\nC Z\nB Y\nC Z\nB Y\nB Y\nB Y\nA Y\nA Y\nB X\nC Z\nB Y\nB Z\nC Y\nB Z\nC Y\nB Y\n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z\nB Y\nA Z\nA Z\nC X\nB Y\nC Y\nC Z\nC Y\nB X\nC Z\nB X\nB Y\nC X\nB Y\nC Y\nA Z\nA Z\nB X\nB Z\nA X\nA Z\nC X\nA Z\nB Z\nB Y\nC Y\nB X\nB Y\nB Z\nB Y\nB X\nB Y\nC X\nB Y\nB X\nB Y\nC Y\nC X\nB Z\nB Y\nC X\nC X\nB X\nB Y\nB X\nB Y\nB Y\nB Y\nB Y\nB X\nB Y\nA Z\nB Y\nA Y\nB Y\nA Y\nB Y\nA Y\nC Y\nB Y\nC Y\nC Y\nC Y\nC Y\nC Y\nC Y\nA Z\nA Z\nB X\nC X\nC Z\nB Y\nC X\nA Z\nC Z\nC Y\nB Z\nB Y\nB Z\nB Y\nA Z\nB X\nB Y\nB X\nC Y\nB Y\nB X\nA Y\nB Y\nB Y\nB Z\nB X\nC X\nB Y\nB Y\nC Y\nC Y\nB Y\nC Y\nC X\nA X\nC X\nC Y\nB Y\nB Y\nB Y\nB Z\nB Y\nB Z\nB Y\nB X\nA Z\nC Z\nC Y\nC Y\nA Y\nB X\nB Y\nC Z\nA Y\nA Y\nB Y\nB X\nA Z\nB Y\nB Y\nA Y\nC Y\nA Z\nC Y\nB Z\nB Y\nB Y\nC Y\nC Z\nB Y\nB Y\nC Y\nC Y\nB Z\nB Z\nA Y\nC Y\nA Z\nB Z\nB Y\nB Y\nB X\nB Y\nA Z\nA Y\nA Z\nB Y\nB X\nC X\nC Y\nC Z\nB Y\nB Y\nB Y\nA Y\nC Y\nB Y\nC Y\nC Y\nB Y","output":"str","x":170,"y":80,"wires":[["7d9f01ecb56a21cc"]]},{"id":"4e4196d62ae2813f","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"count","pt":"flow","to":"parts.count","tot":"msg","dc":true}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":40,"wires":[[]]},{"id":"1e0fcbe8176923fc","type":"counter","z":"ae849d01ff1599e6","name":"","init":"0","step":"1","lower":null,"upper":null,"mode":"increment","outputs":"1","x":730,"y":320,"wires":[["2ea8e9df23f09c98"]]},{"id":"96e0bbbc2aadbbf3","type":"link out","z":"ae849d01ff1599e6","name":"reset counter","mode":"link","links":["921d498319b23c7c","497271fbd61612c4"],"x":125,"y":40,"wires":[]},{"id":"921d498319b23c7c","type":"link in","z":"ae849d01ff1599e6","name":"link in 4","links":["96e0bbbc2aadbbf3"],"x":655,"y":220,"wires":[["f8214d522576b484"]]},{"id":"f8214d522576b484","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":770,"y":220,"wires":[["1e0fcbe8176923fc"]]},{"id":"2ea8e9df23f09c98","type":"switch","z":"ae849d01ff1599e6","name":"","property":"count","propertyType":"msg","rules":[{"t":"eq","v":"count","vt":"flow"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":860,"y":320,"wires":[["acda118fe7a43a75"],["a60eadd2ecbc35ea"]]},{"id":"acda118fe7a43a75","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"complete","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":280,"wires":[["a60eadd2ecbc35ea"]]},{"id":"a1a39e1abf6dba56","type":"link out","z":"ae849d01ff1599e6","name":"Part2","mode":"link","links":["dbc62ae6a0a2d74d"],"x":1005,"y":80,"wires":[]},{"id":"dbc62ae6a0a2d74d","type":"link in","z":"ae849d01ff1599e6","name":"link in 5","links":["a1a39e1abf6dba56"],"x":105,"y":700,"wires":[["88f94444ebfc5aca"]]},{"id":"88f94444ebfc5aca","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[1]","propertyType":"msg","rules":[{"t":"eq","v":"X","vt":"str"},{"t":"eq","v":"Y","vt":"str"},{"t":"eq","v":"Z","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":230,"y":700,"wires":[["a17348141157738c"],["26e71a502a2aeddf"],["69ad0b893921c642"]]},{"id":"26e71a502a2aeddf","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[0]","propertyType":"msg","rules":[{"t":"eq","v":"A","vt":"str"},{"t":"eq","v":"B","vt":"str"},{"t":"eq","v":"C","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":450,"y":720,"wires":[["5f57e9af3fbba7ac"],["b02258785c71a04d"],["1a66083690c4a6d4"]]},{"id":"5f57e9af3fbba7ac","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"4","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":680,"wires":[["7f043a5a723a76a7"]]},{"id":"b02258785c71a04d","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":720,"wires":[["7f043a5a723a76a7"]]},{"id":"1a66083690c4a6d4","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"6","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":760,"wires":[["7f043a5a723a76a7"]]},{"id":"5ff7e15803907357","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":540,"wires":[["7f043a5a723a76a7"]]},{"id":"0fae1816812501ab","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":580,"wires":[["7f043a5a723a76a7"]]},{"id":"b05550c4381bf13c","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":620,"wires":[["7f043a5a723a76a7"]]},{"id":"a17348141157738c","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[0]","propertyType":"msg","rules":[{"t":"eq","v":"A","vt":"str"},{"t":"eq","v":"B","vt":"str"},{"t":"eq","v":"C","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":450,"y":580,"wires":[["5ff7e15803907357"],["0fae1816812501ab"],["b05550c4381bf13c"]]},{"id":"aa09d85dc4c61bf7","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"8","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":820,"wires":[["7f043a5a723a76a7"]]},{"id":"c5d2dea21498601d","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"9","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":860,"wires":[["7f043a5a723a76a7"]]},{"id":"f6d28c20b10525d4","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"7","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":900,"wires":[["7f043a5a723a76a7"]]},{"id":"69ad0b893921c642","type":"switch","z":"ae849d01ff1599e6","name":"","property":"payload[0]","propertyType":"msg","rules":[{"t":"eq","v":"A","vt":"str"},{"t":"eq","v":"B","vt":"str"},{"t":"eq","v":"C","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":450,"y":860,"wires":[["aa09d85dc4c61bf7"],["c5d2dea21498601d"],["f6d28c20b10525d4"]]},{"id":"802333714bd8c052","type":"debug","z":"ae849d01ff1599e6","name":"Part 2","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1270,"y":800,"wires":[]},{"id":"b1b90e2db6472b17","type":"join","z":"ae849d01ff1599e6","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1290,"y":720,"wires":[["203be0eab37d400d"]]},{"id":"203be0eab37d400d","type":"calculator","z":"ae849d01ff1599e6","name":"","inputMsgField":"payload","outputMsgField":"payload","operation":"sum","constant":"","round":false,"decimals":0,"x":1110,"y":800,"wires":[["802333714bd8c052"]]},{"id":"9b78a72cdb743c1e","type":"counter","z":"ae849d01ff1599e6","name":"","init":"0","step":"1","lower":null,"upper":null,"mode":"increment","outputs":"1","x":880,"y":700,"wires":[["42f4f131796a9bf5"]]},{"id":"497271fbd61612c4","type":"link in","z":"ae849d01ff1599e6","name":"link in 6","links":["96e0bbbc2aadbbf3"],"x":825,"y":600,"wires":[["c4acd68069b01e98"]]},{"id":"c4acd68069b01e98","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":940,"y":600,"wires":[["9b78a72cdb743c1e"]]},{"id":"42f4f131796a9bf5","type":"switch","z":"ae849d01ff1599e6","name":"","property":"count","propertyType":"msg","rules":[{"t":"eq","v":"count","vt":"flow"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":1010,"y":700,"wires":[["71ededbe0f9bc355"],["b1b90e2db6472b17"]]},{"id":"71ededbe0f9bc355","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"complete","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":660,"wires":[["b1b90e2db6472b17"]]}]

I don't understand that, I suggested you use msg.parts.count

I only set it to flow context because that is what you asked for in you post.

That being said, Hope I helped.

I must have got confused - not an unusual situation :slight_smile:

Hey Simon. Gotta be honest, I can't see what this could be for & was curious as to how you came up with the number 10994. I assume it is academic?

Anyhow, I rose to the challenge of alternative patterns using purely Node-RED nodes (zero contrib nodes) & have some alternatives for you with an interesting twist of using the CSV node to pre-parse the data...

NOTE: while at it, I was disappointed with the performance of (averaging around 6 seconds on a modern i7 laptop) so I added some timings...

  • Original ~6 seconds
  • JSONata in a change node: ~3.9 seconds
  • SPLIT -> Lookup -> JOIN nodes (no JSONata) ~ 770 ms
  • Function node: ~20ms (this is for readers benefit only - I know you dont want a JS solution so I wont provide it)

Original

My attempts...

Here is the flow (minus the JS version)...

[{"id":"9a693308.7ebaf","type":"subflow","name":"flow-timer","info":"","category":"","in":[{"x":80,"y":100,"wires":[{"id":"7fc82258.93e36c"}]}],"out":[{"x":580,"y":80,"wires":[{"id":"cebf40311504c8e9","port":0}]}],"env":[{"name":"name","type":"str","value":"measure","ui":{"icon":"font-awesome/fa-tag","label":{"en-US":"Timer Name"},"type":"input","opts":{"types":["str","env"]}}},{"name":"operation","type":"str","value":"start","ui":{"icon":"font-awesome/fa-cog","label":{"en-US":"Operation"},"type":"select","opts":{"opts":[{"l":{"en-US":"start"},"v":"start"},{"l":{"en-US":"stop"},"v":"stop"},{"l":{"en-US":"msg.topic"},"v":"msg.topic"},{"l":{"en-US":"msg.operation"},"v":"msg.operation"},{"l":{"en-US":"msg.payload"},"v":"msg.payload"}]}}},{"name":"delay","type":"num","value":"500","ui":{"icon":"font-awesome/fa-clock-o","label":{"en-US":"Delay (ms)"},"type":"input","opts":{"types":["num","env"]}}}],"meta":{"module":"node-red-contrib-flow-performance","type":"flow-performance","version":"1.0.2","author":"Steve-Mcl","desc":"Inline flow performance measure node","keywords":"node-red performance","license":"MIT"},"color":"#DAEAAA","icon":"node-red/timer.svg","status":{"x":580,"y":160,"wires":[{"id":"7fc82258.93e36c","port":1}]}},{"id":"7fc82258.93e36c","type":"function","z":"9a693308.7ebaf","name":"do operation","func":"var name = msg.perfName || env.get(\"name\");\nvar operation = msg.perfOperation || env.get(\"operation\");\nvar delay = env.get(\"delay\") || 500;\nvar measures = global.get(\"flow_timers\") || {};\nvar measure = measures[name] || { count: 0, stopNode: null, startNode: null};\n\nfunction doOp(measure, op){\n    if(op === \"start\"){\n        measure.start = Date.now();//change to process.hrtime\n        measure.stop = null;\n        measure.durationMs = null;\n        measure.stopNode && measure.stopNode.send([null, { payload: {text: 'waiting...'} }]);\n    } else if(op === \"stop\") {\n        if (typeof measure.count !== 'number' || isNaN(measure.count) || measure.count < 0) {\n            measure.count = 0\n        }\n        measure.startNode && measure.startNode.send([null, { payload: { text: '' } }]);\n        measure.count++\n        measure.stop = Date.now();//change to process.hrtime\n        measure.durationMs = measure.start ? measure.stop - measure.start : null;\n        msg._performance = measure;\n    }\n}\n\n\nif(operation === \"start\"){\n    measure.startNode = node\n    const opt = {\n        hour: \"2-digit\",\n        minute: \"2-digit\",\n        second: \"2-digit\",\n        fractionalSecondDigits: 3,\n        hour12: false\n    }\n    const tn = (new Date()).toLocaleTimeString('en-GB', opt)\n    node.send([null, { payload: { text: `Started '${name}' @ ${tn}` } }]);\n    doOp(measure, operation);\n} else if(operation === \"stop\") {\n    measure.stopNode = node\n    doOp(measure, operation);\n    node.send([null, { payload: { text: name + \": \" + measure.durationMs + \"ms (count:\" + measure.count + \")\" }}]);\n} else if(operation === \"msg.topic\") {\n    operation = msg.topic;\n    doOp(measure, operation);\n} else if(operation === \"msg.operation\") {\n    operation = msg.operation;\n    doOp(measure, operation);\n} else if(operation === \"msg.payload\") {\n    operation = msg.payload;\n    doOp(measure, operation);\n} else {\n    return [msg, null];\n}\nmeasures[name] = measure;\nglobal.set(\"flow_timers\", measures);\n\nif (typeof delay === 'number' && delay > 0) {\n    setTimeout(function() {\n        measure.start = Date.now();//change to process.hrtime\n        node.send([msg, null])\n    }, delay);\n} else {\n    node.send([msg, null])\n}\n\n","outputs":2,"noerr":0,"initialize":"","finalize":"// Code added here will be run when the\n// node is being stopped or re-deployed.\nvar name = env.get(\"name\");\nvar measures = global.get(\"flow_timers\") || {};\ndelete measures[name]\n","libs":[],"x":250,"y":100,"wires":[["cebf40311504c8e9"],[]]},{"id":"cebf40311504c8e9","type":"delay","z":"9a693308.7ebaf","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":450,"y":80,"wires":[[]]},{"id":"c31c087371b9bec0","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"(\t    $kindmult := function ($kind, $mult) { \t        $count($filter(payload.str, function($v) { \t            $v = $kind\t        })) * $mult\t    };\t    $A_X := $kindmult(\"A X\", 4);\t    $A_Y := $kindmult(\"A Y\", 8);\t    $A_Z := $kindmult(\"A Z\", 3);\t    $B_X := $kindmult(\"B X\", 1);\t    $B_Y := $kindmult(\"B Y\", 5);\t    $B_Z := $kindmult(\"B Z\", 9);\t    $C_X := $kindmult(\"C X\", 7);\t    $C_Y := $kindmult(\"C Y\", 2);\t    $C_Z := $kindmult(\"C Z\", 6);\t    $A_X + $A_Y + $A_Z + $B_X + $B_Y + $B_Z + $C_X + $C_Y + $C_Z\t)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1660,"y":180,"wires":[["d85b02bc87c7b476"]]},{"id":"bd144cb7127f6b2a","type":"csv","z":"ae849d01ff1599e6","name":"","sep":",","hdrin":"","hdrout":"none","multi":"mult","ret":"\\n","temp":"str","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":1830,"y":100,"wires":[["a47f88ee42bf2b81"]]},{"id":"3202c9d836634876","type":"debug","z":"ae849d01ff1599e6","name":"Part 1","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1990,"y":180,"wires":[]},{"id":"f352802ec47ef6dd","type":"split","z":"ae849d01ff1599e6","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":1630,"y":280,"wires":[["f45485720e185828"]]},{"id":"ef6a3d23c0b56d75","type":"join","z":"ae849d01ff1599e6","name":"","mode":"auto","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":1970,"y":280,"wires":[["0538860bb24b2f37"]]},{"id":"0538860bb24b2f37","type":"change","z":"ae849d01ff1599e6","name":"Sum","rules":[{"t":"set","p":"payload","pt":"msg","to":"$sum(payload)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1690,"y":340,"wires":[["a73fd314c4dd36f5"]]},{"id":"eaba690ae4878549","type":"debug","z":"ae849d01ff1599e6","name":"Part 1","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1990,"y":340,"wires":[]},{"id":"70704ea7a3ce387e","type":"template","z":"ae849d01ff1599e6","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"B X\nA Z\nA Y\nB X\nC Z\nB Y\nB X\nC X\nA Y\nB Y\nB Y\nC Y\nB Y\nC Y\nB X\nA Z\nC Y\nB Z\nC X\nA Y\nB Y\nB Y\nB Y\nB Y\nB X\nB Y\nC Y\nB Y\nB Y\nB Y\nA Y\nB X\nA Y\nA Y\nB X\nB Z\nB Y\nC Y\nA Y\nA Z\nC Y\nA Z\nC Z\nC Y\nB Z\nC X\nA Z\nC Y\nB X\nB X\nC Z\nC Y\nB Y\nA X\nC Z\nB Y\nB X\nA Z\nB Z\nC Y\nC Z\nB X\nB Y\nB Y\nC Y\nB Y\nB Y\nC Y\nB Z\nA Y\nB Y\nC Y\nB Y\nB Y\nB Y\nC Y\nB X\nC X\nC Y\nB X\nB X\nC X\nB Y\nC Z\nB Y\nB Y\nB Y\nC Y\nB X\nA Z\nC Y\nA Z\nB X\nB X\nA Y\nC X\nB Z\nB Y\nB X\nC X\nC X\nB X\nA Z\nA Y\nA Z\nB X\nB X\nB Y\nC Y\nC Z\nB Y\nA Y\nC Y\nA Z\nA X\nA Y\nB X\nB Y\nC Y\nB Y\nB Z\nC X\nB Y\nB Z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Y\nC Z\nB Y\nB Y\nC Y\nC Y\nB Z\nB Z\nA Y\nC Y\nA Z\nB Z\nB Y\nB Y\nB X\nB Y\nA Z\nA Y\nA Z\nB Y\nB X\nC X\nC Y\nC Z\nB Y\nB Y\nB Y\nA Y\nC Y\nB Y\nC Y\nC Y\nB Y","output":"str","x":1700,"y":100,"wires":[["bd144cb7127f6b2a"]]},{"id":"887b9edc7cdd3b84","type":"inject","z":"ae849d01ff1599e6","name":"input","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1425,"y":100,"wires":[["0d57e788602bbf80"]],"l":false},{"id":"f45485720e185828","type":"change","z":"ae849d01ff1599e6","name":"Lookup \"str\", get value","rules":[{"t":"set","p":"payload","pt":"msg","to":"lookup[msg.payload.str]","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1800,"y":280,"wires":[["ef6a3d23c0b56d75"]]},{"id":"0d57e788602bbf80","type":"change","z":"ae849d01ff1599e6","name":"","rules":[{"t":"set","p":"#:(localfilesystem)::lookup","pt":"flow","to":"{         \"A X\": 4,         \"A Y\": 8,         \"A Z\": 3,         \"B X\": 1,         \"B Y\": 5,         \"B Z\": 9,         \"C X\": 7,         \"C Y\": 2,         \"C Z\": 6     }","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1540,"y":100,"wires":[["70704ea7a3ce387e"]]},{"id":"407466af5eb3f092","type":"subflow:9a693308.7ebaf","z":"ae849d01ff1599e6","name":"","env":[{"name":"name","value":"SPLIT2","type":"str"}],"x":1535,"y":300,"wires":[["f352802ec47ef6dd"]],"l":false},{"id":"57884eb780ee5eab","type":"subflow:9a693308.7ebaf","z":"ae849d01ff1599e6","name":"","env":[{"name":"name","value":"JSONata","type":"str"}],"x":1535,"y":180,"wires":[["c31c087371b9bec0"]],"l":false},{"id":"cdd66842a31377fe","type":"delay","z":"ae849d01ff1599e6","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1485,"y":180,"wires":[["57884eb780ee5eab"]],"l":false},{"id":"de5f6b3b1c2775eb","type":"delay","z":"ae849d01ff1599e6","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1485,"y":300,"wires":[["407466af5eb3f092"]],"l":false},{"id":"a73fd314c4dd36f5","type":"subflow:9a693308.7ebaf","z":"ae849d01ff1599e6","name":"","env":[{"name":"name","value":"SPLIT2","type":"str"},{"name":"operation","value":"stop","type":"str"}],"x":1785,"y":340,"wires":[["eaba690ae4878549"]],"l":false},{"id":"d85b02bc87c7b476","type":"subflow:9a693308.7ebaf","z":"ae849d01ff1599e6","name":"","env":[{"name":"name","value":"JSONata","type":"str"},{"name":"operation","value":"stop","type":"str"}],"x":1785,"y":180,"wires":[["3202c9d836634876"]],"l":false},{"id":"a47f88ee42bf2b81","type":"junction","z":"ae849d01ff1599e6","x":1400,"y":180,"wires":[["cdd66842a31377fe","de5f6b3b1c2775eb","32d1af7a0a226906"]]}]

Just for info, you can get a faster JSONata result if you use a better expression

$sum($$.payload.str.($lookup($flowContext("lookup"), $)))


[edit] updated screen shot as had the last two running at 5 seconds not 5 and 10.

Yeah. I suspected as much. I really really struggle with jsonata. It just doesn't click for me. I typically use it for simple things only.

Each person signed up[ for Advent of Code gets their own unique puzzle input
So this is just the result I get for my data - other data gives different answers and it prevents someone from getting stars just by copy/pasting someone's result :slight_smile:

Eeek!!! :frowning:
Mine is ~ 1 sec on a 1 year old bog standard Win 11 PC HP desktop

6 secs seems really, really slow - I suspect some issue somewhere

Also no JSONata :slight_smile:

Does that mean no reduced sequence in a join node?

I'd say yes- no reduced sequence as it uses JSONata expressions

Ok here is another route to solve the problem, I cheated and ended with a jsonata to sum, but you can add a contrib node to do that, I don't want to add any nodes I do not require.
This ran in under 40ms and only requires 3 nodes
e.g.

[{"id":"75607d694329c137","type":"inject","z":"edbf92277c2a065b","name":"input","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":105,"y":440,"wires":[["207af9431b929214"]],"l":false},{"id":"207af9431b929214","type":"template","z":"edbf92277c2a065b","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"B X\nA Z\nA Y\nB X\nC Z\nB Y\nB X\nC X\nA Y\nB Y\nB Y\nC Y\nB Y\nC Y\nB X\nA Z\nC Y\nB Z\nC X\nA Y\nB Y\nB Y\nB Y\nB Y\nB X\nB Y\nC Y\nB Y\nB Y\nB Y\nA Y\nB X\nA Y\nA Y\nB X\nB Z\nB Y\nC Y\nA Y\nA Z\nC Y\nA Z\nC Z\nC Y\nB Z\nC X\nA Z\nC Y\nB X\nB X\nC Z\nC Y\nB Y\nA X\nC Z\nB Y\nB X\nA Z\nB Z\nC Y\nC Z\nB X\nB Y\nB Y\nC Y\nB Y\nB Y\nC Y\nB Z\nA Y\nB Y\nC Y\nB Y\nB Y\nB Y\nC Y\nB X\nC X\nC Y\nB X\nB X\nC X\nB Y\nC Z\nB Y\nB Y\nB Y\nC Y\nB X\nA Z\nC Y\nA Z\nB X\nB X\nA Y\nC X\nB Z\nB Y\nB X\nC X\nC X\nB X\nA Z\nA Y\nA Z\nB X\nB X\nB Y\nC Y\nC Z\nB Y\nA Y\nC Y\nA Z\nA X\nA Y\nB X\nB Y\nC Y\nB Y\nB Z\nC X\nB Y\nB Z\nC Y\nC Y\nC Z\nB Y\nC Y\nB Y\nC Y\nA Z\nA Z\nA Z\nB Y\nB Y\nC Z\nB Y\nC Y\nB X\nB X\nA Y\nB X\nB X\nC Y\nC Z\nB Y\nA Z\nA Y\nC Y\nB X\nC Z\nC Y\nB Y\nB Y\nA Z\nB Y\nB Y\nB X\nB Z\nA Z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["a386d0ebff1628cf"]]},{"id":"a386d0ebff1628cf","type":"change","z":"edbf92277c2a065b","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"A X","fromt":"str","to":"4,","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"A Y","fromt":"str","to":"8,","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"A Z","fromt":"str","to":"3,","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"B X","fromt":"str","to":"1,","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"B Y","fromt":"str","to":"5,","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"B Z","fromt":"str","to":"9,","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"C X","fromt":"str","to":"7,","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"C Y","fromt":"str","to":"2,","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"C Z","fromt":"str","to":"6,","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"\\n","fromt":"re","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":440,"wires":[["f9f67b7da7f3feab"]]},{"id":"f9f67b7da7f3feab","type":"template","z":"edbf92277c2a065b","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"[\n{{{payload}}}\n0\n]","output":"json","x":540,"y":440,"wires":[["8434420e051d6950"]]},{"id":"8434420e051d6950","type":"change","z":"edbf92277c2a065b","name":"chnage for contrib node","rules":[{"t":"set","p":"payload","pt":"msg","to":"$sum($$.payload)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":440,"wires":[["fc5503a3fda8aba3"]]},{"id":"fc5503a3fda8aba3","type":"debug","z":"edbf92277c2a065b","name":"debug 113","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":930,"y":440,"wires":[]}]

Very nice :slight_smile:
What's the second template doing - I'm confused by it?
image

Creating a text array literal, and then converting it to a parsed object.

what's the 0 for?

To handle the last comma in msg.payload

aah - clever :slight_smile: