I was trying to figure out, how to use the weather binding (version 1.7.1 and 1.8.0) with Yahoo as weather provider. This was unsuccessfully and I even would like to warn to use the Yahoo weather at all!
A bug inside OpenHAB is logged in openhab.log with Yahoo Weather provider:
2015-11-22 03:13:41.513 [WARN ] [.b.w.i.p.AbstractWeatherParser] - YAHOO: Error setting property 'query.results.channel.item.forecast.date' with value '10 Nov 2015' and converter SIMPLE_DATE
2015-11-22 06:33:41.499 [WARN ] [.b.w.i.p.AbstractWeatherParser] - YAHOO: Error setting property 'query.results.channel.lastBuildDate' with value 'Sun, 22 Nov 2015 5:50 am CET' and converter FULL_UTC_DATE
This bug is found in both versions of the binding: 1.7.1 and 1.8.0
The Yahoo weather API is tricky and may deliver old data! This is not alone problem of OpenHAB, but more a big problem of the Yahoo geolocation API. The Yahoo API requires a geographic identification called “woeid”. If this “woeid” is unknown a search may be initiated using geographical coordinates – and this is, what OpenHAB tries to do. All in all this leads to an API request, which can be entered manually to observe the effect. The Yahoo weather API can be accessed here. Then enter a YQL query string as it is generated by the OpenHAB binding:
select * from weather.forecast where u='c' and woeid in (select woeid from geo.placefinder where text="52.489810,13.253070" and gflags='R')
The location is Berlin, Germany, somewhere in the “Grunewald”.
And this happens: Query was executed just now (22. Nov.), but data returned is several days too old (17. Nov. or sometimes eves 12. Nov.)! Now the fun part starts: on the web page there is a “Test” button just below of the YQL Query string. Press this button several times and you will get several (different!) datasets.
The problem is: Although the current method used by the OpenHAB binding is documented on several web pages (even on the Yahoo developer pages…), it just does not work reliable with the weather API!
My personal conclusion: do not use the Yahoo weather API anymore…
Update: You can even check the problem by just going to the Yahoo API web page above, select any of the example queries on this page and press the “Test” button several times.You will get various different answers for each button press – impressive how fast the wind changes in Chicago… This is just unusable!