This plugin is in beta. It is not published to the Indigo store yet.
This plugin for Indigo extends the Indigo Home Automation system with a smart sprinkler system. It automates the watering of your garden and uses the weather and evapotranspiration information where available to decide how much water is needed.
Weather forecast, rain precipitation, actual rain and evaporation can be retrieved from KNMI (Dutch Royal Weather Service), OpenWeatherMap, Buienradar (Dutch). The plugin can also use any other device state or variable in your Indigo system which contains this information. For instance if you have your own rain meter, you can use that.
This plugin retrieves information from published API’s from above websites in a scheduled manner. This documentation is up to date for version 1.0.0 of the plugin. The plugin is licensed according to the GNU General Public License.
- You will need this plugin from the Indigo plugin store.
- Python 2.7 is needed for Indigo plugins.
- The plugin is tested with Indigodomo Version 7.5.
- An API key from OpenWeatherMap if you want to use that information.
- Indigo controllable sprinkler valves. I am using Rainbird valves which are operated by a Fibaro module. Any other valve which can be turned on and turned off will do.
Way of working
The plugin wakes up every hour and updates its information. It reads the latest rain precipitation, it checks the amount of rain this day and the evapotranspiration of the soil. With that it calculates the amount of time it needs to bring the ground water level up to the desired level again. If the sprinklers did not run yesterday, it takes that into account as well. If the time needed is longer than allowed, it will save the remaining for the future.
Checking and updating every hour is done to update Indigos device and the GUI with the most recent forecasted duration for each sprinkler zone. If you have guests you can delay the schedule for today, or even cancel it.
On the actual run, it uses the most recent calculation of zone running times and it fires your sprinkler zones one by one. Up to eight zones can be defined. If your water source can be turned on and off by Indigo (e.g. a pump with a Z-wave switch), it will switch that source on just before the start of the schedule and switch it off afterwards.
The zone run time is calculated as follows:
|Start the hourly calculation with 0 mm for this zone.|
|Evapotranspiration is the sum of water evaporation and transpiration from a surface area to the atmosphere. Evaporation accounts for the movement of water to the air from sources such as the soil, canopy interception, and water bodies. Transpiration accounts for the movement of water within a plant and the subsequent exit of water as vapor through stomata in its leaves in vascular plants and phyllids in non-vascular plants. Wikipedia has some nice info about this subject. An article in Dutch is available from the KNMI.|
If the evapotranspiration function is switched on the info is retrieved from the KNMI, read from a device state, a variable, or an average theoretical value is used. The value is read in mm (= liters/m2).
Add this to the total for this zone.
|If it did rain yesterday and this function is switched on in the config, this info is retrieved from the KNMI, from OpenWeatherMap, read from a device state or a variable. The value is read in mm (= liters/m2). |
Subtract this from the total for this zone.
|If it did rain today since 00:00 and this function is switched on in the config, this info is retrieved from Buienradar, a device state or a variable. The value is read in mm (= liters/m2). |
Subtract this from the total for this zone.
|If rain is expected soon and this function is switched on in the config , this info is retrieved from Buienradar, OpenWeatherMap, read from a device state or a variable. |
Subtract this from the total for this zone.
|Take into account the surplus or shortage from previous days. On these days the sprinkler was not scheduled or the runtime was longer than the maximum configured or shorter than the minimum configured.|
Add or subtract this amount from the total for this zone.
|Add the manual correction amount is configured. You can use this is your soil type demands more or less water. Or your vegetation has a demanding water need.|
Add or subtract this amount from the total for this zone.
|The total amount from above shows the mm water we want to give to this zone. Since 1 mm = 1 liter/m2 we can multiply the mm water with the zone size to have the amount of liters water we need for this zone. The zone size is configurable in the device configuration.|
By dividing the amount in liters by the source (pump) capacity, we know the amount of minutes this zone needs to run. The pump capacity can be configured in the device configuration.
Not in the table but above but also a configurable item is the Cut-Off Temp. It is not really used in the calculations but it is used before starting the sprinklers. If the current temperature is less than the cut-off temperature, the sprinklers will not work to prevent frost damage.
The picture below shows an example setup where a pump pulls water from 16 meters below ground level. That pump is switched on and off via a Fibaro FGS-211 Z-wave switch. The water flow to the garden is controlled thru three Rainbird valves. These valves are available in different flavours. In this diagram we are using the ones which block the water when they have no power and allow water to flow when a 24V AC current is supplied to the coil of the valve switch. The 24V AC current is controlled by the similar Fibaro Z-Wave switches. The power of the switch is 230V, the current they control is 24V AC. An 230V/24V AC transformer supplies the current for the Rainbird valves.
In this way we can control the water flow in the garden via Indigo. You can do this manual by clicking the buttons in the app, or allow the GardenWater plugin to automate this task.
The plugin setup UI has five topics. Have a look at the screen:
The screen above into five types of information the plugin uses to calculate the amount of water needed. For each type of information there are multiple sources available to retrieve the information. See the table below:
|Type of Info / Source||Nothing||Device State||Variable||KNMI||OpenWeatherMap||BuienRadar||Historic|
|Cutt Off Temp||Y||Y||Y||–||Y||Y||–|
The type of informations are described above in the paragraph “Way of Working”. The information sources described in the column headers in the table above are further explained here:
If you do not need to use evapotranspiration, today’s rain, yesterday’s rain or the expected rain information, set the information source to Nothing – Set Always to “0”. The plugin will not use this information in calculation the amount of water needed furthermore.
If you have your own source for this information and you are able to store it in an Indigo device state, tell the plugin which one. On selecting this option some extra fields will be visible:
Select an existing Indigo Device which holds the desired information. After selecting the device, click the button “Get States”, which allows the plugin to retrieve the device states available for this device. When this is done, select the right device state in the next selection drop down.
The plugin expects a numeric value which describes the information in mm/day in the device state. Ensure that it is updated daily, preferable before 08:00 in the morning. If the information is refreshed later, the plugin will notice this. If your information deviates, use the divider to correct that. Per default the divider is 1.
If you have your own source for this information and you are able to store it in an Indigo variable, tell the plugin which one. The plugin expects a numeric value which describes the information in mm/day in the Indigo variable.
Ensure that it is updated daily, preferable before 08:00 in the morning. If the information is refreshed later, the plugin will notice this. Select the variable name in the dropdown box. If your information deviates, use the divider to correct that. Per default the divider is 1.
This is the acronym for Koninklijk Nederlands Meteorologisch Instituut, the Royal Dutch Meteorological Institute. This department of the ministry of Traffic & Water Management has a large network of sensors in the Netherlands. Every 10 minutes their information is refreshed. This information source is important and accurate but probably only useful if you live in the Netherlands or close to it’s borders.
The plugin uses its API inferface. There is no need for an API key or other authorization. The plugin retrieves Evapotranspiration as well as Yesterday’s rain information.
April 2021: the KNMI APIs are offline and in maintenance. It is unclear at which moment this service will be restored.
The OpenWeatherMap site has also a ton of accurate weather information available. The plugin uses it to retrieve Yesterday’s rain and the precipitation. Weathermap works globally which enables the use of this plugin outside the Netherlands. After selecting this option you will be asked for your OpenWeatherMap API key. I have grayed out mine here in the example for privacy reasons.
You can retrieve a free API key from their site which is enough for the plugin to work properly.
BuienRadar (ShowerRadar) is a Dutch website giving daily rain forecasts and 10-minute updates on the weather statistics. This is mostly useful if you live in the Netherlands. Buienradar is a private company owned by media company RTL News. It is one of the leading Dutch websites on rain precipitation. It is also available in some other European countries.
The plugin uses its API inferface. There is no need for an API key or other authorization. The plugin retrieves todays rain and the rain amount for the next two hours from Buienradar.
If you want to make use of the dynamic behaviour of the evapotranspiration model, but there is no information source available in your country, you can use the builtin model. This is based on last years behaviour. There is no scientific background on this; it is my personal judgement. It is uses a parabolic curve which ensures there is more water in July than in the winter months. It is based on a per week value. In this version of the plugin you cannot adapt these values to your environment unfortunately. This is considered for a future release if demand is there.
Use it if you like it. If you have free sources available for your region let me know, perhaps we can work together to built this is.
Additional plugin configuration
Set the log level at your desired level. In the normal mode the plugin will shut up and only report on errors and other important topics. If you set the plugin to verbose it will shout all information during run time on what it is doing for you. This might be usefull in the first week to understand how it works, our to solve error situations.
Define a water controller device for each independent sprinkler system in your garden. One system has one device which controls the water flow (mostly a pump) and up to eight zones. The device setup show you the following screen (note that only zone 1 is visible on the screen print, zone 2 till zone 8 look exactly the same)
General Controller configuration
Use the schedule start time to set the default time the sprinklers will be activated. Do this whenever you like; for your garden you get the best results when the sun is down. Time must be written down in 24 hour format HH:MM. The plugin will use the minutes as well to run the hourly update. After this configured time the plugin will stop running the hourly updates. That is not useful anymore since the information is no longer relevant.
If you are using an external water source in your system, e.g. a pump to use water ground water, you can have the sprinkler system to switch that device on at the start of the schedule and off at the end of the schedule. Off course there must be a form of control from Indigo towards that pump device available, e.g. via a Z-wave actor or similar. To use this, set the checkbox for Control Pump to true, and select the pump device in the dropdown box.
The sprinkler system determines the amount of time needed for each zone bases on above parameters in the Way of Work paragraph. Another important parameter is the capacity, the amount of water available from your source in liters per hour. Use an integer number here to specify the source capacity.
Next you will find seven checkboxes, one for each day of the week. Set the days of the week in which you allow the sprinkler to work to True. If you do not want to run the sprinkler on Saturday since this is your weekly barbecue night, leave that checkbox empty.
The last parameter in the general section tells the sprinkler system how many zones you have in your installation. You should have at least one zone and no more than eight. This number allows Indigo to show you a section for each zone to configure.
Larger sprinkler installations are divided into zones. The source is most likely not capable of supplying enough water pressure for your complete garden. By creating a system where valves control parts of your garden, zones, you can ensure enough pressure and capacity. After the desired runtime you switch from zone and give your complete garden enough water, zone by zone.
For each zone you will have the following parameters
Give your zone a name so you easily remember for part of your garden this zone will work. Next tell the plugin which Indigo device controls the valve for this zone. This can be e.g. a Z-wave actor or any other Indigo controllable on/off device. Each zone will have a size. Based on the size the runtime for each zone will be adapted. For larger zones, the runtime needs to be longer to allow enough water to flow into that part of the garden.
If you want your zone to run only when there is a minimum duration, or prevent your zone to receive more than a maximum duration, specify it here in minutes. With a maximum you can prevent a whet newspaper if your sprinklers run late at night.
Finally you can decide to have some extra water in mm (liters per m2) added to the running time. This can be handy if the vegetation in that zone differs from the average. You have e.g. of lot of trees there or plants who typically demand a lot of water. Use an integer value. Zero defines no extra water and let your plugin calculate according to the average.
|Change Start Time For Today||If do need to change the start time, e.g. you have guest, you can do |
this via this device action. You can can use this in your GUI for
example. Specify the offset for your change as parameter;
which can be 30, 15, 10 or 5 minutes earlier or later than the
|Toggle Schedule Active||Enable or disable the schedule for today. This status is automatically|
reset at midnight. This action does not require a parameter.
Indigo Sprinkler Commands
The plugin uses the Indigo default sprinkler commands. For more information please see the Indigo Documentation
- Zone On
- All Zones Off
- Run Schedule of Zone Durations
- Run Last Schedule
- Pause Schedule
- Resume Schedule
- Stop Schedule
- Jump to Previous Zone
- Skip to Next Zone
In the Plugin menu (under “Configure”) you’ll find the following options:
|Reset To Do||This will reset the amount of pending water for the garden. This command can come |
in handy at the start of the season, to clear last years memory.
If you enable verbose logging, the plugin will tell you every hour its most recent status. Next to retrieving the weather (if outdated) it will also tell you what it will to with each zone. The acronyms used in the zone info can are explained in the following table
|Prev||Pending water needs in mm from previous run(s)|
|EvaT||Yesterday’s Evapotranspiration in mm|
|Raiy||Rain yesterday in mm|
|RaiT||Rain today until now in mm|
|RaiX||Rain expected the next 2 hours in mm|
|Comp||Compensation set for this zone in mm|
|Size||Zone size in m2|
|Todo||Result of a previous calculation|
There are no known issues at this moment. If you find something please let me know so we can help the community. Remember to active verbose logging in the plugin config if something is not working as expected. It might give you a hint what is wrong.