Wonderground weather icon integration


can’t imagine that none has tried to integrate the weather icons provided from wunderground.

“icon”: “partlycloudy”,
“icon_url”: “http://icons-ak.wxug.com/i/c/k/partlycloudy.gif”,

is there any “binding” or integration available??? I didn’t find something related or didn’t search the right words??


I think you will have to use a string item like

String Condition "Condition [%s]" {weather="locationId=home, type=condition, property=text"}

To use it as an icon, you will have to convert all icons to png (or svg for openHAB2) and rename it to wunweather-<condition>.png or something similar.
You would then be able to set the icon for the String item:

Text item=Condition icon="wunweather"

The way OH icons work, if there is an icon file named with the following pattern:


Then when you supply and Item with <name> it will choose the icon that matches the Item’s current state. For example, expanding on @Udo_Hartmann’s example:

If you are using the Weather Binding the Condition ID returned is a Number. If you are pulling the icon from the the XML or JSON returned by the API directly (this is what I’ve switched to) there is an “icon” element.

So if you download the icons and name them something along the lines of “wunderground-1.png”, “wunderground-2.png” (yes, you will have to convert them to png format and wunderground forces you to download them individually) and you make sure to use the appropriate number code returned by the Weather Binding for the icon, then voila you will be using Wunderground Icons.

It is admittedly a lot of work but it is the only way to do it I know of. There is no way to build a binding to do this for you.

Awhile back I posted my full weather setup which uses Yahoo but I’ve since moved to just parsing the values out of the XML myself since the binding doesn’t support precipitation today which is one of the three main numbers I care about.