Difference between revisions of "Sprinkler"
Jump to navigation
Jump to search
Line 18: | Line 18: | ||
== Open Weather Api == | == Open Weather Api == | ||
City list: http://bulk.openweathermap.org/sample/city.list.json.gz | City list: http://bulk.openweathermap.org/sample/city.list.json.gz | ||
− | Example city | + | === Example city Willich === |
<source lang='json'> | <source lang='json'> | ||
{ | { | ||
Line 29: | Line 29: | ||
} | } | ||
}, | }, | ||
+ | </source> | ||
+ | === Example weather === | ||
+ | <source lang='json'> | ||
+ | {"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} | ||
</source> | </source> | ||
Revision as of 17:41, 1 August 2018
Requirements
- The System shall sprinkle if the lawn needs water
- The System shall sprinkle in the morning no earlier then 6:30 pm
- The System shall collect rain data from a weather service e.g. Deutscher Wetter Dienst open data server opendata.dwd.de
Use cases
System context
Weather API alternatives
- http://www.programmieren-optimieren.de/php/google-wetter-api-eingestellt-die-alternativen/
- https://stackoverflow.com/questions/12461730/find-weather-using-java
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
{"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}
DWD Data
Precipitation data:
- https://www.dwd.de/DE/leistungen/radolan/radolan.html
- Adjusted 1h total precipitation [mm/h] (Radolan), 1km x 1km, Runlength format raa01-rw_10000-[yyMMddhhmm]-dwd---bin
- https://www.dwd.de/EN/ourservices/surface_weather_observations/surface_weather_observations.html
How to read Radolan data
Wetter Online
METAR
https://en.wikipedia.org/wiki/METAR Example: Mönchengladbach