just a heads up; the Yahoo RSS weather feed(s) have changed. The API now reports that it requires oAuth. After some initial digging around the excruciatingly slow Yahoo developer pages, I found that you can simply change the URL of the rest to get the functionality back:
it is (or was, when I started using OpenHAB) included in the demo sitemap, items, rules and transforms. I’ve never needed another weather data provider, so I’ve been using this Yahoo example (but extended to include stuff like the wind direction, visibility distance, etc) for years.
Well, seemingly the weather binding (I’ve never really used it) is using the ‘proper’ Yahoo API for weather data. The method that the demo and I use is simply based on the HTTP binding and parses an RSS feed (see the new URL in my initial post).
So, the weather binding may need oAuth support in the future, and the HTTP binding method can still be used, just with an updated URL.
Ack, Confirm. It was flaky at best over the last week roughly, but it now it really appears dead and gone. I’ll have a little hunt around and see whether I can find another URL. Obviously, I’ll post it here if I do!
This is anonymously (without API key) and metric/Celsius.
The hourly? daily? call limit probably is a sufficient maximum of 2 000 requests per IP.
Apologies for the euphoric post — this feed seems not to be reliably available or I do not understand their call limits (requesting both from dynamic and static IP). @Knallfrosch: I use XSLT transformations to extract various values.
When re-requesting the Yahoo RSS/XML file (with a hardcoded woeid just to avoid ambiguities), the file intermittently is nearly empty (~750 bytes) or with the expected payload (~ 4600 bytes). For both scenarios, the http response code is 200 (OK). So as a dirty workaround, on a web server, I run a cron.05minly wget, save the file named weather.rss.bak and then check file size; if it is larger than 2 048 bytes, copy it onto a real weather.rss that is then consumed by OpenHAB and others:
wget "your_yahoo_url" -O /path/to/weather.rss.bak -o /path/to/weather.log
if [[ $(find /path/to/weather.rss.bak -type f -size +2048c 2>/dev/null) ]]; then
cp /path/to/weather.rss.bak /path/to/weather.rss
There is the danger to confuse outdated values with current ones. That could lead to a “data obsolete” similar to the “battery low” notification mechanism.