Example irrigation logic
Maarten Hemker
Administrator
This logic contains 3 separate parts, that can also be used individually.
Part 1) A time counter for visualization purposes
The first part counts the time a component has been active, which is reset every day. The time trigger is set from 23:59 to 00:00, so it will give a reset pulse every day around midnight. The irrigation time component (which is a 4bit numeric value) can be added as a statistic, allowing a graph of how long the irrigation has been active each day.
Part 2) Calculating a set time, based on a percentage value
The second part creates a timer (4bit numeric value) based on the measured ground humidity. To do this, we first invert the percentage so a high measured humidity of say 70% results in the value 30, and a low humidity of say 5% results in the value 95. This is easily done by the math function "a - b" where a = 100 and b = humidity.
Then, the curve alteration is used to map the scale from 0 - 100 to relevant irrigation times in seconds. When the humidity is 70% or higher (value "30"), we will not irrigate, and when the humidity is extremely low (value "100") we will irrigate a maximum of 30 minutes (1800 seconds).
Part 3) Actually controlling the irrigation
In the last part, we will actually control the irrigation. With a time trigger, we will trigger half an hour before sunrise and end it always at sunrise itself. This way, the maximum irrigation time is always 30 minutes.
When the time trigger activates, the irrigation set time is used as a timer for the period of the irrigation. So if the calculated time from part 2 is set to say 900 seconds (15 minutes), the irrigation will run for that time.
To allow manual override, either to stop an active irrigation, or to activate an additional irrigation cycle, a switch is connected to a bit toggle. When the irrigation is currently active, a flick of the switch will turn it off. When the irrigation is currently stopped, a flick of the switch will activate the irrigation timer for the irrigation set time. To make sure this works, the light timer option "allow immediate off" is set to "yes".
Part 1) A time counter for visualization purposes
The first part counts the time a component has been active, which is reset every day. The time trigger is set from 23:59 to 00:00, so it will give a reset pulse every day around midnight. The irrigation time component (which is a 4bit numeric value) can be added as a statistic, allowing a graph of how long the irrigation has been active each day.
Part 2) Calculating a set time, based on a percentage value
The second part creates a timer (4bit numeric value) based on the measured ground humidity. To do this, we first invert the percentage so a high measured humidity of say 70% results in the value 30, and a low humidity of say 5% results in the value 95. This is easily done by the math function "a - b" where a = 100 and b = humidity.
Then, the curve alteration is used to map the scale from 0 - 100 to relevant irrigation times in seconds. When the humidity is 70% or higher (value "30"), we will not irrigate, and when the humidity is extremely low (value "100") we will irrigate a maximum of 30 minutes (1800 seconds).
Part 3) Actually controlling the irrigation
In the last part, we will actually control the irrigation. With a time trigger, we will trigger half an hour before sunrise and end it always at sunrise itself. This way, the maximum irrigation time is always 30 minutes.
When the time trigger activates, the irrigation set time is used as a timer for the period of the irrigation. So if the calculated time from part 2 is set to say 900 seconds (15 minutes), the irrigation will run for that time.
To allow manual override, either to stop an active irrigation, or to activate an additional irrigation cycle, a switch is connected to a bit toggle. When the irrigation is currently active, a flick of the switch will turn it off. When the irrigation is currently stopped, a flick of the switch will activate the irrigation timer for the irrigation set time. To make sure this works, the light timer option "allow immediate off" is set to "yes".
Categorieën
- 361 Alle Categorieën
- 28 Release notes
- 8 Release notes - Pairot
- 20 Release notes - xxter
- 12 Pairot
- 48 Algemeen
- 5 Device
- App
- 1 Project
- 3 Voice assistants
- 10 xxter
- 126 Algemeen
- 47 Algemeen
- 34 Nieuwe functionaliteiten en nieuwe features
- 21 Apps
- 20 Apps algemeen
- 1 Apps Beta release
- 24 Profielen
- 7 Profiel algemeen
- 16 Pagina's en pagina elementen
- 1 Waarschuwingsservice
- 94 Project
- 6 Logica
- 2 Aanwezigheidsdetectie
- 12 Acties
- 3 BREEAM
- 14 Cameras
- 16 Componenten
- 1 Config Tool
- 6 Opdrachten
- 28 Native scripts
- 3 LUA scripts
- 3 Statistieken
- 50 Device
- 42 Device algemeen
- 3 Toegangsrechten en lokale gebruikers
- 4 Aanwezigheidssimulatie / Presence simulation