libgweather/weather-yrno.c will soon stop working
Hi,
this is from the Norwegian Meteorological Institute. Would like to inform the developers of some forthcoming changes to the API, which means the weather-yrno
plugin will soon be non-functional.
New version of locationforecast
Version 1.9 (which you are using) have been deprecated and will be removed soon. The new version 2.0 defaults to a new (and hopefully easier) JSON format; however there is a legacy XML version too which means not everything has to be rewritten (new features will not be included in the XML version though). We recommend you start implementing this change within the year.
New weather symbols
The old symbols (which are hardcoded into the weather-yrno.c
code) has been replaced by a new set of symbols and corresponding codes. One advantage of the new version is that the API now automatically calculates the correct version for night/day/polar twilight. The icons are supplied as a tar.gz file which you can include in your application.
Traffic limits
The Terms of Service limits each user/application to a max of 20 reqs/sec without further agreement. Currently the libgweather plugin is using three times that amount, and is now the second largest consumer of API data. To avoid being throttled, we would ask you to implement the following changes:
-
Audit the code to minimize the number of requests per location. The forecast is only updated once per hour in the Nordic countries (minus Iceland), and every 6th hour in the rest of the world. More frequent requests than this is just a waste of bandwidth.
-
Limit your geolocation coordinates to max 4 decimals, to maximize caching in the proxy. There is no need to ask for weather forecasts on a subatomic scale.
-
Please follow the guidelines on how to optimize your traffic and handle errors. Pay particular attention to the section on caching headers and using the
If-Modified-Since
header.
-
To monitor your traffic in real time, we would require you (as we do for all high-volume clients) to register a custom subdomain to use for all your traffic. For this we would need contact details (name, email) for a designated technical responsible. Sorry, but we can't be required to open accounts on bug tracking systems in order to notify of TOS violations; the only other alternative is throttling or blacklisting.
-
We would also recommend that you subscribe to our mailing list to get updates on the API. We require all holders of custom subdomains to either subscribe to the mailing list or the changes RSS feed to get updates.
Use of the YR name
Please replace all references to Yr with MET Norway in the plugin (e.g. Yr.no -> met.no
). The Yr API is now officially discontinued, and the Yr is now trademarked for the website and mobile apps only. The plugin should also be renamed "metno" instead of "yrno" as use of the Yr API was removed from the code years ago.
For more information, including how to contact us, please see our support page.
Best regards,
Geir Aalberg
developer api.met.no