These are my current rules:
Set 1: Initialisation and individual watering of 4 lines. After 1 h every opend line shall be closed. This shall help if the closing will be forgotten.
Code: Select all
On System#Boot do
GPIO,4,0
GPIO,5,0
timerSet,8,60 //Set Timer 8 for the next event in 60 seconds
endOn
On Rules#Timer=8 do
Pulse,13,1,200
Pulse,12,1,200
Pulse,0,1,200
Pulse,4,1,200
TaskValueSet,12,1,0 //sets ‘Dauer#Dauer’ to 0
notify 1, "System gestartet oder alle Ventile nach einer Stunde sicherheitshalber geschlossen"
endOn
On Beregnungsstart_1 do
notify 1, "Beregnung 1 startet"
Pulse,15,1,200
timerSet,8,3600 //Set Timer 8 for the next event in 3600 seconds
endOn
On Beregnungsstop_1 do
notify 1, "Beregnung 1 stoppt"
Pulse,13,1,200
endOn
On Beregnungsstart_2 do
notify 1, "Beregnung 2 startet"
Pulse,14,1,200
timerSet,8,3600 //Set Timer 8 for the next event in 3600 seconds
endOn
On Beregnungsstop_2 do
notify 1, "Beregnung 2 stoppt"
Pulse,12,1,200
endOn
On Beregnungsstart_3 do
notify 1, "Beregnung 3 startet"
Pulse,2,1,200
timerSet,8,3600 //Set Timer 8 for the next event in 3600 seconds
endOn
On Beregnungsstop_3 do
notify 1, "Beregnung 3 stoppt"
Pulse,0,1,200
endOn
On Beregnungsstart_4 do
notify 1, "Beregnung 4 startet"
Pulse,5,1,200
timerSet,8,3600 //Set Timer 8 for the next event in 3600 seconds
endOn
On Beregnungsstop_4 do
notify 1, "Beregnung 4 stoppt"
Pulse,4,1,200
endOn
Set 2: Standard watering with variable time (up to now choosable but constant time for all 4 lines) and 5 minutes pause between the single lines.
Code: Select all
On Standardberegnung do
TaskValueSet,12,1,%eventvalue% //sets ‘Dauer#Dauer’ to a number
TaskValueSet,12,2,1 //sets ‘Dauer#aktiv’ to 1
endOn
On Dauer#Dauer do
if [Dauer#aktiv]=1
notify 1, "Standardberegnung 1 startet"
Pulse,15,1,200
TaskValueSet,12,2,0 //sets ‘Dauer#aktiv’ to 0
timerSet,1,[Dauer#Dauer]
endif
endOn
On Rules#Timer=1 do //When Timer1 expires, do
notify 1, "Standardberegnung 1 stoppt"
Pulse,13,1,200
timerSet,2,300
endOn
On Rules#Timer=2 do //When Timer2 expires, do
notify 1, "Standardberegnung 2 startet"
Pulse,14,1,200
timerSet,3,[Dauer#Dauer]
endOn
On Rules#Timer=3 do //When Timer3 expires, do
notify 1, "Standardberegnung 2 stoppt"
Pulse,12,1,200
timerSet,4,300
endOn
On Rules#Timer=4 do //When Timer4 expires, do
notify 1, "Standardberegnung 3 startet"
Pulse,2,1,200
timerSet,5,[Dauer#Dauer]
endOn
On Rules#Timer=5 do //When Timer5 expires, do
notify 1, "Standardberegnung 3 stoppt"
Pulse,0,1,200
timerSet,6,300
endOn
On Rules#Timer=6 do //When Timer6 expires, do
notify 1, "Standardberegnung 4 startet"
Pulse,5,1,200
timerSet,7,[Dauer#Dauer]
endOn
On Rules#Timer=7 do //When Timer7 expires, do
notify 1, "Standardberegnung 4 stoppt"
Pulse,4,1,200
timerSet,8,300
endOn