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.
So the tl;dr answer to @watou’s question is if you are using XSLT transform you use this. If you are using the Weather Binding you need to wait for a fix.
If I understood the docs online correctly, late last night, Yahoo requires oAuth usage as of March 15th, 2016. This would require a change in the binding with more params, etc.
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.
It would appear that Yahoo has changed the service yet again because the suggested “NEW” URL, to xml.weather.yahoo.com/forecastrss, no longer works (tested today 2016-04-21).
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!
At least until Yahoo changes things yet again, the solution presented here may work for you. It uses Yahoo Query Language. The URL must be urlencoded and all % characters must be escaped.
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.
edit 1:
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.
edit 2:
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
fi
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.
I just saw that I forgot to update this thread. I ended up slightly modifying the URL, but still using Apache to simply proxy the URL for OpenHAB.
To answer your question, Knallfrosch, see Rikoshak’s post:
So the tl;dr answer to @watou’s question is if you are using XSLT transform you use this. If you are using the Weather Binding you need to wait for a fix.