Skip to content

Add German Weather Service (DWD) as new weather ION

Emily Ehlert requested to merge (removed):add_dwd_ion into master

This Commit adds a new ion for the weather dataengine. Uses the Deutschen Wetterdienst (DWD) as data source. Has seven day forecast, warnings and, if available, current measurements.

For getting the available stations it downloads a file containing all the stations, parses and filters it. The parsing is quite basic. In every line it jumps to the relevant bytes. If the ever change the format of the file, this could break the whole search. Perhaps it would be better to implement a more sophisticated parsing? Also the file contains a lot of station, some of them do not work with the APIs I use. I decided to radically remove a lot of stations and only keep some. This should remove all non working stations, but also removes a lot of station which are working. The stations that remain seem to always have a forecast and current measurements. I couldn't find a way to quickly determine if a station is working or not. The question is: do we want to supply less stations with all (probably) working or do we want to return more stations, but some not working at all?

The forecast and current measurements use different APIs. Not all stations have current measurements. The first API is documented here: https://dwd.api.bund.dev/. This is the official API to access weather information. The second API is used by the official weather app made by DWD. The documentation I found is a blog post, which basically reverse engineered the weather app. However this API is public and also the official documentation links to this blog post. I'm wondering if we should continue using the API. The copyright text contains the following text: "As laid down in the Ordinance Setting the Terms of Use for the Provision of Federal Spatial Data (GeoNutzV), all spatial data and spatial data services available for free access may be used without any restrictions provided that the source is acknowledged. When speaking of spatial data, this also includes any location-related weather and climate information presented on our open web pages." https://www.dwd.de/EN/service/copyright/copyright_node.html

Screenshot: DWD_ION

Edited by Emily Ehlert

Merge request reports