Thanks @5iver using http://api.wunderground.com/api/xxxxxxx/conditions/forecast/q/pws:TOWNXX.json
gives me a perfect JSON with both the current conditions and the forecast
Updated that in my http.cfg and it seems that was all that was necessary. no need to alter my json parsing
some finetuning from my side (forgive me, if that already was mentioned someplace elseâŠ)
If using Wunderground with HTTP binding, you can also get some more tuned Information for your Special Location.
Localized Content
just put /lang:XX in the API-Call, e.g.
weatherForecast.url=http://api.wunderground.com/api/7cffc35ff04afd7c/forecast/lang:FR/q/France/Paris.json
in that case, the returning texts all come in french (no need to transform them into your language).
note: Wunderground doesnât use the ISO for countries, so Germany is DL (see https://www.wunderground.com/weather/api/d/docs?d=resources/country-to-iso-matching)
Metric Information in localized Content
If youâre wondering, why you choose a non-imperial language as reference, but still get those funny imperial Units:
- Login to wunderground
- go to your Profile
- choose âMember Settingsâ - âPage Preferencesâ
- Change language and Units to your choosing
you should now get all texts in your chosen language and you should receive texts with units in it in two Attributes one in imperial units and one in the real measurement:
{
"response": {
"version":"0.1",
"termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
"features": {
"forecast": 1
}
}
,
"forecast":{
"txt_forecast": {
"date":"10:28 CET",
"forecastday": [
{
"period":0,
"icon":"cloudy",
"icon_url":"http://icons.wxug.com/i/c/k/cloudy.gif",
"title":"Dienstag",
"fcttext":"Bedeckt. Höchsttemperatur 42F. Wind aus SSO und wechselhaft.",
"fcttext_metric":"Bedeckt. Höchsttemperatur 6C. Wind aus SSO und wechselhaft.",
"pop":"0"
...
hereâs my example in german and metric units.
getting the Icons
goto https://www.wunderground.com/weather/api/d/docs?d=resources/icon-sets and you can just chose and download from 10 different sets
Imperial measurements are real too.
Thanks for posting, great information!