CannySprinkler - Economical Rain Tank Sprinkling

This API is for economically sprinkling your lawn or trees with a water tank pump, that can be turned on or off (e.g. Gardena 400/1 with a wifi switch).

Usage

Endpoints:

/SprinkleNow

Checks, if it rains today, rained yesterday or will rain tomorrow for a given latitude and longitude and tells you if your lawn should be sprinkled. If you have values for soil moisture you can add them too.

Return boolean. Parameters are:

  1. lat: Latitude of location in decimal
  2. long: Longitude of location in decimal
  3. soilm: Optional Soilmoisture in percent

Exmaple: https://cannysprinkler.smartapis.de/sprinkleNow/52.463/13.469

/SprinkeTime

Get the calculated sprinkle time in seconds. The calculation is based on the tank or barrel volume available, the pump power and the days until the next rain. Parameters are:

  1. lat: Latitude of location in decimal
  2. long: Longitude of location in decimal
  3. barrelv: Volume of the rain tank barrel in l
  4. pumpo: Pump power of the rainwater pump in l/h
  5. soilm: Optional Soilmoisture in percent

Exmaple: https://cannysprinkler.smartapis.de/sprinkleTime/52.463/13.469/300/4000

Code

The Code of the calculation is open source: CannySprinkler on GitHub