[Weather] Can´t get weather "condition/icon=clear-day" from forecastio

Hi there,

i just started to setup my weather binding and already got some values in my sitemap.
But i can´t get the icon information from forecastio.

Config:

weather:apikey.ForecastIo=XYZ
#weather:location.HER.name=
weather:location.HER.latitude=51.530920
weather:location.HER.longitude=7.221899
#weather:location.HER.woeid=
weather:location.HER.provider=ForecastIo
weather:location.HER.language=de
weather:location.HER.updateInterval=2

Item:

Number wTemp_Icon "Info [%s]" <weather> {weather="locationId=HER, type=condition, property=icon"}

Sitemap:

Text item=wTemp_Icon

Collected Infos:
(i put " around the needed information)

Temperature[current=21.74,min=<null>,max=<null>,feel=26.721098243767123,dewpoint=16.71]
Atmosphere[humidity=73,visibility=<null>,pressure=1021.97,pressureTrend=down,ozone=319,uvIndex=<null>]
Clouds[percent=8]
"Condition"[text=Heiter,lastUpdate=Mon Jul 18 11:04:00 CEST 2016,observationTime=Mon Jul 18 11:04:00 CEST 2016,id=<null>,"icon=clear-day",commonId=sunny]
Precipitation[rain=0.0,snow=0.0,probability=0,total=<null>]
Wind[speed=11.69999999064,direction=W,degree=265,gust=<null>,chill=<null>]
Station[name=<null>,id=<null>,latitude=<null>,longitude=<null>],<null>]

So the information were collected from forecastio but isn´t displayed in OpenHAB.

Cheers
Michael

If this is OH 1, you need to make sure that you have a `weather_<condition_id>.png" file for each possible value that wTemp_Icon can become. For example, if the wTemp_Icon can be a number between 1 and 30 you would need a weather_1.png, weather_2.png, and so on.

These icons need to be in your webapps/images folder.

The sitemap will choose the correct icon based on the state of vTemp_Icon.

Hi Rich,

it´s not about the icon, it´s about the text.
forecastio just named it “icon” for services like OpenHAB to easily map this value to an real icon file.

As you can see in the collected infos, i get the type condition with the property icon and the value “clear-day”.
So OpenHAB should show this text in my sitemap.

Mappings and items will follow once this is running, i´m doing it step by step to find possible problems like this.

Cheers
Michael

For one, if the value you need to get is text, not a number you need to define wTemp_Icon as a String, not a Number.

If this full JSON formatted line of text is what your Item is being set to you will need to add a transform or a rule to extract the icon field, though I thought that is what the weather binding is supposed to do for you. At least that is what it does for Yahoo and Wunderground.

Yeah, that´s what happening when you just copy Items from a guide …
I´m sitting here and starting to setup everything in OpenHAB that i did with the Telekom Qivicon system before.
Set it up as String and now it shows the right informationen.

Now i´m going to setup the icons und mappings.

Cheers
Michael

See this example for how to download and rename the icons for proper display on your sitemap. You should be able to use the same overall approach for forecastio. the key is in the naming of the icon files.

In the interest of the community I wrote DarkSky (forecast.io) asking about them potentially developing directly for OH as as addon. Their Android and iOS apps are polished with several options and $3 annual subscription is something I’m sure several folks would be willing to pay if that meant getting reliable information. Looking forward to hearing back from them.