Logic Machine Forum
Irrigation scheduled script - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Irrigation scheduled script (/showthread.php?tid=4299)



Irrigation scheduled script - benanderson_475 - 16.10.2022

i have some irrigation to controll with feedback from som moisture sensor, 

i want to run a scheduled script in the am at say 5:00 to check if moisture is below a setpoint then switch on irrigation for 2 hour if required each day

at 5am when script runs 
if is dry then switch on 0/5/1 (bool)

how is the best way to manage the switch off later?, make another scheduled script for 7:00am with switch off?
i also need a way to include some offset so i don't over water etc 
or maybe there is a better way like make the off command an event script form the moisture sensor?


RE: Irrigation scheduled script - admin - 17.10.2022

You can have both scheduled and event script for this. Scheduled script guarantees that the irrigation is turned off after 2 hours. Event script can turn it off earlier if the moisture level becomes high enough.