Here's my fertigation automation. Very close to LEDgardener 's but, I use hours after lights on rather than a time. That way if I change the lights on time it changes the watering schedule. The flow takes an input number changes it to ms, then switch node changes payload to delay which uses the delay node as a variable time. Seconds can be changes to minutes for flood type setups. I also have one for a repeat cycle timer I use for my aeroponic setup if anyone is interested I can upload it.
Code: Select all
[{"id":"62ea646a.c3e7dc","type":"api-current-state","z":"f52ddd40.ccfcd","name":"Water Duration","server":"e1baff13.0f49d","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"input_number.water_dur","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":380,"y":480,"wires":[["238eb7d0.63e558"]]},{"id":"238eb7d0.63e558","type":"function","z":"f52ddd40.ccfcd","name":"Sec to ms","func":"msg.payload= msg.payload*1000\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":480,"wires":[["c1383100.f84c"]]},{"id":"c1383100.f84c","type":"change","z":"f52ddd40.ccfcd","name":"msg.delay","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":480,"wires":[["aa902090.a31e4"]]},{"id":"aa902090.a31e4","type":"delay","z":"f52ddd40.ccfcd","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":840,"y":480,"wires":[["82d2ec8.01e821"]],"inputLabels":["miliseconds"],"outputLabels":["seconds"]},{"id":"82d2ec8.01e821","type":"api-call-service","z":"f52ddd40.ccfcd","name":"Pump/Zone/script?","server":"e1baff13.0f49d","version":1,"debugenabled":false,"service_domain":"homeassistant","service":"turn_off","entityId":"switch.pump","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1010,"y":480,"wires":[[]]},{"id":"79d5a5b7.581fcc","type":"server-state-changed","z":"f52ddd40.ccfcd","name":"Flower On","server":"e1baff13.0f49d","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.Lights_on","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":80,"y":120,"wires":[["13c05c02.3d5254","c47f68ab.b68f08","d717b471.2ed1a8","46d51334.fa6ddc","a940242d.63ce48","75b5f834.21ac88"],[]]},{"id":"ef92c318.95b71","type":"delay","z":"f52ddd40.ccfcd","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":840,"y":420,"wires":[["3b48b737.b1d7b8"]],"inputLabels":["miliseconds"],"outputLabels":["hours"]},{"id":"3b48b737.b1d7b8","type":"api-call-service","z":"f52ddd40.ccfcd","name":"Pump/Zone/script?","server":"e1baff13.0f49d","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1010,"y":420,"wires":[["62ea646a.c3e7dc"]]},{"id":"5f3a6f18.61a84","type":"delay","z":"f52ddd40.ccfcd","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":840,"y":360,"wires":[["d2bdc56d.cba0f8"]],"inputLabels":["miliseconds"],"outputLabels":["seconds"]},{"id":"d2bdc56d.cba0f8","type":"api-call-service","z":"f52ddd40.ccfcd","name":"Pump/Zone/script?","server":"e1baff13.0f49d","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1010,"y":360,"wires":[["62ea646a.c3e7dc"]]},{"id":"2112695a.09f936","type":"api-call-service","z":"f52ddd40.ccfcd","name":"Pump/Zone/script?","server":"e1baff13.0f49d","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1010,"y":300,"wires":[["62ea646a.c3e7dc"]]},{"id":"abc5c8b1.2874e8","type":"delay","z":"f52ddd40.ccfcd","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":840,"y":300,"wires":[["2112695a.09f936"]],"inputLabels":["miliseconds"],"outputLabels":["seconds"]},{"id":"dd7af0e.f2bf91","type":"delay","z":"f52ddd40.ccfcd","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":840,"y":240,"wires":[["e555fa86.aa4668"]],"inputLabels":["miliseconds"],"outputLabels":["seconds"]},{"id":"e555fa86.aa4668","type":"api-call-service","z":"f52ddd40.ccfcd","name":"Pump/Zone/script?","server":"e1baff13.0f49d","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1010,"y":240,"wires":[[]]},{"id":"6bba2707.0453b8","type":"api-call-service","z":"f52ddd40.ccfcd","name":"Pump/Zone/script?","server":"e1baff13.0f49d","version":1,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1010,"y":180,"wires":[["62ea646a.c3e7dc"]]},{"id":"51ac6dbf.364234","type":"delay","z":"f52ddd40.ccfcd","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":840,"y":180,"wires":[["6bba2707.0453b8"]],"inputLabels":["miliseconds"],"outputLabels":["seconds"]},{"id":"16304259.35fbae","type":"delay","z":"f52ddd40.ccfcd","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":840,"y":120,"wires":[["8ad02d9b.0d733"]],"inputLabels":["miliseconds"],"outputLabels":["seconds"]},{"id":"8ad02d9b.0d733","type":"api-call-service","z":"f52ddd40.ccfcd","name":"Pump/Zone/script?","server":"e1baff13.0f49d","version":1,"debugenabled":false,"service_domain":"homeassistant","service":"turn_on","entityId":"switch.pump","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1010,"y":120,"wires":[["62ea646a.c3e7dc"]]},{"id":"a775f477.8435c8","type":"change","z":"f52ddd40.ccfcd","name":"msg.delay","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":120,"wires":[["16304259.35fbae"]]},{"id":"18f1406b.902db","type":"change","z":"f52ddd40.ccfcd","name":"msg.delay","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":160,"wires":[["51ac6dbf.364234"]]},{"id":"21176f3e.05f25","type":"change","z":"f52ddd40.ccfcd","name":"msg.delay","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":200,"wires":[["dd7af0e.f2bf91"]]},{"id":"4a783ee7.f1a25","type":"change","z":"f52ddd40.ccfcd","name":"msg.delay","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":240,"wires":[["abc5c8b1.2874e8"]]},{"id":"8be275c1.8e40f8","type":"change","z":"f52ddd40.ccfcd","name":"msg.delay","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":280,"wires":[["5f3a6f18.61a84"]]},{"id":"3ae78bf7.c058e4","type":"change","z":"f52ddd40.ccfcd","name":"msg.delay","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":320,"wires":[["ef92c318.95b71"]]},{"id":"e25ac8a6.dc8168","type":"function","z":"f52ddd40.ccfcd","name":"Hrs to ms","func":"msg.payload= msg.payload*3600*1000\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":320,"wires":[["3ae78bf7.c058e4"]]},{"id":"1060b592.aad48a","type":"function","z":"f52ddd40.ccfcd","name":"Hrs to ms","func":"msg.payload= msg.payload*3600*1000\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":280,"wires":[["8be275c1.8e40f8"]]},{"id":"22b16da1.f421a2","type":"function","z":"f52ddd40.ccfcd","name":"Hrs to ms","func":"msg.payload= msg.payload*3600*1000\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":240,"wires":[["4a783ee7.f1a25"]]},{"id":"c8e9cbf4.a72b78","type":"function","z":"f52ddd40.ccfcd","name":"Hrs to ms","func":"msg.payload= msg.payload*3600*1000\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":200,"wires":[["21176f3e.05f25"]]},{"id":"3eb5bd4.6325d42","type":"function","z":"f52ddd40.ccfcd","name":"Hrs to ms","func":"msg.payload= msg.payload*3600*1000\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":160,"wires":[["18f1406b.902db"]]},{"id":"69feb546.8e830c","type":"function","z":"f52ddd40.ccfcd","name":"Hrs to ms","func":"msg.payload= msg.payload*3600*1000\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":120,"wires":[["a775f477.8435c8"]]},{"id":"16da4d7.ef90fb3","type":"api-current-state","z":"f52ddd40.ccfcd","name":"w1","server":"e1baff13.0f49d","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.w1","state_type":"str","state_location":"","override_payload":"none","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":120,"wires":[["69feb546.8e830c"],[]]},{"id":"496ad844.aa9058","type":"api-current-state","z":"f52ddd40.ccfcd","name":"w2","server":"e1baff13.0f49d","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.w2","state_type":"str","state_location":"","override_payload":"none","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":160,"wires":[["3eb5bd4.6325d42"],[]]},{"id":"741b2078.c4d6d","type":"api-current-state","z":"f52ddd40.ccfcd","name":"tw3","server":"e1baff13.0f49d","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.r1tw3","state_type":"str","state_location":"","override_payload":"none","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":200,"wires":[["c8e9cbf4.a72b78"],[]]},{"id":"c3207c.64ca9f88","type":"api-current-state","z":"f52ddd40.ccfcd","name":"w4","server":"e1baff13.0f49d","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.w4","state_type":"str","state_location":"","override_payload":"none","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":240,"wires":[["22b16da1.f421a2"],[]]},{"id":"a60d7ba6.047618","type":"api-current-state","z":"f52ddd40.ccfcd","name":"w5","server":"e1baff13.0f49d","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.w5","state_type":"str","state_location":"","override_payload":"none","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":280,"wires":[["1060b592.aad48a"],[]]},{"id":"ca7304d9.afa588","type":"api-current-state","z":"f52ddd40.ccfcd","name":"w6","server":"e1baff13.0f49d","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.w6","state_type":"str","state_location":"","override_payload":"none","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":320,"wires":[["e25ac8a6.dc8168"],[]]},{"id":"75b5f834.21ac88","type":"api-current-state","z":"f52ddd40.ccfcd","name":"Water6","server":"e1baff13.0f49d","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.water_6","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":220,"y":320,"wires":[["ca7304d9.afa588"]]},{"id":"a940242d.63ce48","type":"api-current-state","z":"f52ddd40.ccfcd","name":"Water5","server":"e1baff13.0f49d","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.water_5","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":220,"y":280,"wires":[["a60d7ba6.047618"]]},{"id":"46d51334.fa6ddc","type":"api-current-state","z":"f52ddd40.ccfcd","name":"Water4","server":"e1baff13.0f49d","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.rwater_4","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":220,"y":240,"wires":[["c3207c.64ca9f88"]]},{"id":"d717b471.2ed1a8","type":"api-current-state","z":"f52ddd40.ccfcd","name":"Water3","server":"e1baff13.0f49d","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.water_3","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":220,"y":200,"wires":[["741b2078.c4d6d"]]},{"id":"c47f68ab.b68f08","type":"api-current-state","z":"f52ddd40.ccfcd","name":"Water2","server":"e1baff13.0f49d","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.water_2","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":220,"y":160,"wires":[["496ad844.aa9058"]]},{"id":"13c05c02.3d5254","type":"api-current-state","z":"f52ddd40.ccfcd","name":"Water1","server":"e1baff13.0f49d","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.water_1","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":220,"y":120,"wires":[["16da4d7.ef90fb3"]]},{"id":"e1baff13.0f49d","type":"server","z":"","name":"Home Assistant","addon":true}]