Warnung vorab: die Lösung ist vielleicht etwas aufgebläht, lässt sich dafür aber auf beliebig viele Bewässerungskreise erweitern.
Code: Alles auswählen
[{"id":"3345fb6e.bb480c","type":"debug","z":"f48abf30.643098","name":"pump on","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":340,"y":2520,"wires":[]},{"id":"c3ef4890.37faf","type":"inject","z":"f48abf30.643098","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"do","payload":"true","payloadType":"bool","x":170,"y":2400,"wires":[["c2523672.9898b8","3345fb6e.bb480c"]]},{"id":"aeb3b25.58449d","type":"change","z":"f48abf30.643098","name":"preJoin 1","rules":[{"t":"set","p":"parts.id","pt":"msg","to":"parts._msgid","tot":"flow"},{"t":"set","p":"parts.type","pt":"msg","to":"parts.type","tot":"flow"},{"t":"set","p":"parts.count","pt":"msg","to":"parts.count","tot":"flow"},{"t":"set","p":"parts.len","pt":"msg","to":"parts.len","tot":"flow"},{"t":"set","p":"parts.index","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":2340,"wires":[["a0f12b1e.a9abb"]]},{"id":"5da4d05a.9fbc68","type":"debug","z":"f48abf30.643098","name":"pump off","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1300,"y":2300,"wires":[]},{"id":"a0f12b1e.a9abb","type":"join","z":"f48abf30.643098","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":1130,"y":2300,"wires":[["5da4d05a.9fbc68"]]},{"id":"14db268e.953c71","type":"change","z":"f48abf30.643098","name":"preJoin 0","rules":[{"t":"set","p":"parts.id","pt":"msg","to":"parts._msgid","tot":"flow"},{"t":"set","p":"parts.type","pt":"msg","to":"parts.type","tot":"flow"},{"t":"set","p":"parts.count","pt":"msg","to":"parts.count","tot":"flow"},{"t":"set","p":"parts.len","pt":"msg","to":"parts.len","tot":"flow"},{"t":"set","p":"parts.index","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":2300,"wires":[["a0f12b1e.a9abb"]]},{"id":"c2523672.9898b8","type":"change","z":"f48abf30.643098","name":"setParts","rules":[{"t":"set","p":"parts","pt":"flow","to":"$","tot":"jsonata"},{"t":"set","p":"parts.type","pt":"flow","to":"array","tot":"str"},{"t":"set","p":"parts.count","pt":"flow","to":"5","tot":"num"},{"t":"set","p":"parts.len","pt":"flow","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":2300,"wires":[["71af2e26.03c75","55fdfc7d.02aa24","a88abb01.9270c","2ea26133.de8846","c32bcb68.29405"]]},{"id":"a790c8df.5cc3e8","type":"change","z":"f48abf30.643098","name":"preJoin 2","rules":[{"t":"set","p":"parts.id","pt":"msg","to":"parts._msgid","tot":"flow"},{"t":"set","p":"parts.type","pt":"msg","to":"parts.type","tot":"flow"},{"t":"set","p":"parts.count","pt":"msg","to":"parts.count","tot":"flow"},{"t":"set","p":"parts.len","pt":"msg","to":"parts.len","tot":"flow"},{"t":"set","p":"parts.index","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":2380,"wires":[["a0f12b1e.a9abb"]]},{"id":"eff29999.29ea38","type":"change","z":"f48abf30.643098","name":"preJoin 3","rules":[{"t":"set","p":"parts.id","pt":"msg","to":"parts._msgid","tot":"flow"},{"t":"set","p":"parts.type","pt":"msg","to":"parts.type","tot":"flow"},{"t":"set","p":"parts.count","pt":"msg","to":"parts.count","tot":"flow"},{"t":"set","p":"parts.len","pt":"msg","to":"parts.len","tot":"flow"},{"t":"set","p":"parts.index","pt":"msg","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":2420,"wires":[["a0f12b1e.a9abb"]]},{"id":"35ec3697.9ba052","type":"change","z":"f48abf30.643098","name":"preJoin 4","rules":[{"t":"set","p":"parts.id","pt":"msg","to":"parts._msgid","tot":"flow"},{"t":"set","p":"parts.type","pt":"msg","to":"parts.type","tot":"flow"},{"t":"set","p":"parts.count","pt":"msg","to":"parts.count","tot":"flow"},{"t":"set","p":"parts.len","pt":"msg","to":"parts.len","tot":"flow"},{"t":"set","p":"parts.index","pt":"msg","to":"4","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":2460,"wires":[["a0f12b1e.a9abb"]]},{"id":"74c98d99.a2d6ec","type":"comment","z":"f48abf30.643098","name":"{count} anpassen","info":"","x":360,"y":2260,"wires":[]},{"id":"2f896ede.fa2682","type":"debug","z":"f48abf30.643098","name":"do 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":2340,"wires":[]},{"id":"a7ff9565.0fca6","type":"inject","z":"f48abf30.643098","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"done","payload":"true","payloadType":"bool","x":800,"y":2340,"wires":[["aeb3b25.58449d"]]},{"id":"e74cacd1.8665f8","type":"debug","z":"f48abf30.643098","name":"do 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":2380,"wires":[]},{"id":"cda3eb55.58a4f8","type":"inject","z":"f48abf30.643098","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"done","payload":"true","payloadType":"bool","x":800,"y":2380,"wires":[["a790c8df.5cc3e8"]]},{"id":"ef7c7e36.98de78","type":"debug","z":"f48abf30.643098","name":"do 4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":2420,"wires":[]},{"id":"aeab2dbe.10a55","type":"inject","z":"f48abf30.643098","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"done","payload":"true","payloadType":"bool","x":800,"y":2420,"wires":[["eff29999.29ea38"]]},{"id":"e4696462.cc7c18","type":"debug","z":"f48abf30.643098","name":"do 5","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":2460,"wires":[]},{"id":"57ed731e.c49384","type":"inject","z":"f48abf30.643098","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"done","payload":"true","payloadType":"bool","x":800,"y":2460,"wires":[["35ec3697.9ba052"]]},{"id":"71af2e26.03c75","type":"delay","z":"f48abf30.643098","name":"delay","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":510,"y":2340,"wires":[["2f896ede.fa2682"]]},{"id":"55fdfc7d.02aa24","type":"delay","z":"f48abf30.643098","name":"delay","pauseType":"delay","timeout":"4","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":510,"y":2380,"wires":[["e74cacd1.8665f8"]]},{"id":"a88abb01.9270c","type":"delay","z":"f48abf30.643098","name":"delay","pauseType":"delay","timeout":"6","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":510,"y":2420,"wires":[["ef7c7e36.98de78"]]},{"id":"2ea26133.de8846","type":"delay","z":"f48abf30.643098","name":"delay","pauseType":"delay","timeout":"8","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":510,"y":2460,"wires":[["e4696462.cc7c18"]]},{"id":"c32bcb68.29405","type":"debug","z":"f48abf30.643098","name":"do 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":2300,"wires":[]},{"id":"2d10d1f9.dfa52e","type":"inject","z":"f48abf30.643098","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"done","payload":"true","payloadType":"bool","x":800,"y":2300,"wires":[["14db268e.953c71"]]},{"id":"82f7bf69.c4eb2","type":"comment","z":"f48abf30.643098","name":"Starte {count} Kreise","info":"","x":710,"y":2260,"wires":[]},{"id":"4a8bb46.1c65b4c","type":"comment","z":"f48abf30.643098","name":"warte auf alle Ergebnisse","info":"","x":1050,"y":2260,"wires":[]}]