Sprinkler

From BITPlan Wiki
Jump to navigation Jump to search

Requirements

  1. The System shall sprinkle if the lawn needs water
  2. The System shall sprinkle in the morning no earlier than configured
  3. The System shall sprinkle in the evening no later than configured
  4. The System shall sprinkle as often per day as configured
  5. The System shall collect rain data from a weather service e.g. Deutscher Wetter Dienst open data server opendata.dwd.de
  6. The System shall operate by simply switching on and off a garden pump at appropriate times
  7. The System shall determine the amount of irrigation needed based on the weather and the configuration data
  8. An Administrator shall be able to configure the system by setting
    1. coordinates of the location where the system is operated lon/lat
    2. l/minute the sprinkler deploys when switched on
    3. earliest time in the morning the system may sprinkle
    4. latest time in the morning the system may sprinkle
    5. number of times the system shall sprinkle if needed
    6. size of are being sprinkled
    7. average l/day beeing evaporated per day by non lawn plants (e.g. trees)
  9. A user shall be able to arm/disarm the system
  10. A user shell be able to see the system operation log
  11. The system operation log shall show the amount of water that has been irrigated as an equivalent mm rain / day and the total liters for the area

Use cases

System context

Weather API alternatives

Open Weather Api

City list: http://bulk.openweathermap.org/sample/city.list.json.gz

Example city Willich

{
    "id": 2808559,
    "name": "Willich",
    "country": "DE",
    "coord": {
      "lon": 6.55,
      "lat": 51.26667
    }
  },

Example weather

https://api.openweathermap.org/data/2.5/weather?q=Willich,DE&appid=0123456789abcdef...&units=metric

{
 "coord":{"lon":6.54,"lat":51.26},
 "weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"base":"stations",
 "main":{"temp":28.84,"pressure":1020,"humidity":37,"temp_min":27,"temp_max":30},"visibility":10000,
 "wind":{"speed":1.5},
 "clouds":{"all":0},"dt":1533138900,
 "sys":{"type":1,"id":4909,"message":0.0046,"country":"DE","sunrise":1533095958,"sunset":1533151198},
 "id":2808559,
 "name":"Willich",
 "cod":200
}

Java Code

DWD Data

Precipitation data:

How to read Radolan data

  1. https://www.hs-rm.de/de/fachbereiche/architektur-und-bauingenieurwesen/forschungsprofil/arbeitsgruppe-starkregen-und-sturzfluten/projekt-klimprax-ap1/radar-software/

Wetter Online

METAR

https://en.wikipedia.org/wiki/METAR Example: Mönchengladbach