Comprehensive Wunderground using HTTP Binding Example

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).
:exclamation: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:

  1. Login to wunderground
  2. go to your Profile
  3. choose “Member Settings” - “Page Preferences”
  4. 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. :wink:

Thanks for posting, great information!

http://www.metric4us.com/

SCNR :wink:

3 Likes