Weather Binding "CommonId not found" since upgrad 1.8.0

I switched to Wunderground

I also have wunderground.
What I like to know is wether there is a solution for this or not.
If the answer is no, I will remove the yahoo items.
If the answer is yes, I will wait.

I don’t want to go back to XSLT transforms.
IMO, if the yahoo service is dead or modified, then the binding should change.

It seems Yahoo’s geo.placefinder used to search for latitude/longitude is currently unavailable.
In Weather Binding this URL is used Yahoo Weather with this query:
SELECT * FROM weather.forecast WHERE woeid in (SELECT woeid FROM geo.placefinder WHERE text='[LATITUDE],[LONGITUDE]' and gflags='R'
LATITUDE and LONGITUDE are replaced with openhab.cfg’s entries.

You can verify this on YQL Console.
Click geo.placefinder beyond DATA TABLES on the lower right side. Then the example string
select * from geo.placefinder where text="sfo"
brings the result:
http-status-code=“503” http-status-message=“Service Unavailable”

Yahoo schreibt dazu YQL geo.placefinder is now shutdown

It looks like Yahoo! has discontinued any free service that can receive a latitude,longitude and return a WOEID (Where On Earth ID). It also looks like Flickr, their photo subsidiary, offers a free service to do this, but it requires an individually assigned private app key that is rate limited, so I don’t think that’s an acceptable replacement.

I’ve also seen evidence that Yahoo! continues to allow passing in a place name, like “London, England” and returning a WOEID, if you submit a YQL query like: SELECT * FROM weather.forecast WHERE woeid in (SELECT woeid FROM geo.placefinder WHERE text='[PLACENAME]').

So, assuming all of the above is true…

Should I create a PR against the OH1 weather binding that allows you to provide either:

  • a place name to find your WOEID
  • an indication to use your public IP address to find your place name and then your WOEID, or
  • your preferred WOEID directly

This really ought to be fixed in some way for the 1.8.1 maintenance release, IMHO.

Separately, I’ve opened an issue against Eclipse SmartHome’s Yahooweather binding, which gets (from a different free service) a lat,lon from your public IP address, and then tries (and now fails) to get a WOEID from the lat,lon.

Funny, the place name query worked for me yesterday… OK, so a new config property for openhab.cfg where you have to supply the WOEID directly then if you are using Yahoo for weather?

…I’ve made code changes to the weather binding that explicitly require a new location property woeid to be specified in openhab.cfg along with all current config properties when the provider is Yahoo. This changes the YQL query to no longer try to read from geo.placefinder, but instead uses the WOEID you explicitly had to provide in openhab.cfg. I just tested the change and it works. I found my WOEID by seeing the number at the end of the URL when I went to weather.yahoo.com.

Do anyone want this change to be part of the weather binding in 1.8.1?

Or in the alternative, does anyone know of a reliable, free service that translates lat,lon into a WOEID that can be used with Yahoo! weather?

Submitted PR #3888 to address issue #3860.

If you are interested in testing this change, please download a test JAR here. If you are using the Yahoo provider, you will have to add

 weather:location.<your locationId>.woeid=<your WOEID>

to openhab.cfg.

The latitude and longitude are now optional for the Yahoo weather binding (since they are now unused), but woeid is now required, in the test JAR:

- * #weather:location.<locationId1>.latitude=
- * #weather:location.<locationId1>.longitude=
+ * #weather:location.<locationId1>.latitude=   (not required for Yahoo provider)
+ * #weather:location.<locationId1>.longitude=  (not required for Yahoo provider)
  * #weather:location.<locationId1>.provider=
+ * #weather:location.<locationId1>.woeid=      (required for Yahoo provider)
  * #weather:location.<locationId1>.language=
  * #weather:location.<locationId1>.updateInterval=
1 Like

seems to work fine form me now (I’m only fetching Temp and Humidity)
Thanks for the quick change.

Thank you, Paul! Could you verify one last thing for me? If you comment out the longitude and latitude lines for your Yahoo weather provider in openhab.cfg (by putting a # mark at the beginning of each line) and making sure it’s taken effect, and using a JAR file from the provided link of no more than an hour ago, is your log still error-free?

Or, if you had already commented out or removed the longitude and latitude lines, please just let me know. Just trying to be thorough with field tests before I merge this change (and make an equivalent one for 1.8.1, since the source code has been reformatted meanwhile…).

Thanks very much!

Hi Watou,
I grabbed again the jar from the link in the above email, but I notice that the MD5 (8d49c7bbffc010fe1d90589d8dd25d0e) and SHA1 checksums of the new download are the same as the one I grabbed at 9.47 this morning. So either your change was already done, or the link does not get me a newer fileversion.
I commented out the Lat and Long entries and enabled debug log trace and can see that still all is coming in fine (also the 5 day forcast)
–Paul–

Paul, thanks very much for your diligence! I will make sure this change makes it into 1.8.1, and I will leave my hotfix JAR in place at the above link in the meantime. And once it’s merged, I will update the wiki page.

Thank you for the new org.openhab.binding.weather-1.9.0-SNAPSHOT.jar
…which also works with 1.8.0. :slightly_smiling:

1 Like

Hallo
the new org.openhab.binding.weather-1.9.0-SNAPSHOT.jar also works for me under 1.8.0.

1 Like

confirmed working
for the WOEID i only used the numbers and it works :slight_smile: thnx for the quick support

1 Like

@watou
I’ve copied your weather binding’s jar file to my 1.8 version.
Unfortunately it doesn’t work.

My openhab.cfg has these entries

#weather:location.home.latitude=48.xxxx
#weather:location.home.longitude=9.yyyy
weather:location.home.provider=Yahoo
weather:location.home.language=de
weather:location.home.woeid=70327
weather:location.home.name=Waiblingen
weather:location.home.updateInterval=10

On my HTML page the ${weather:temperature.current(%.1f)}, ${weather:atmosphere.humidity}, ${weather:condition.observationTime(%1$td.%1$tm.%1$tY %1$tH:%1$tM)}, ${weather:atmosphere.pressure(%.1f)} are empty

OpenHAB’s protocol contains these entries at the beginning:

2016-01-27 19:55:06.218 [WARN ] [o.b.w.i.parser.CommonIdHandler] - CommonId not found: CommonIdHandler[provider=YAHOO,id=<null>,icon=<null>]
2016-01-27 19:55:06.233 [WARN ] [o.o.b.w.i.bus.WeatherPublisher] - Weather forecast day 1 not available for locationId 'home', only 0 available
2016-01-27 19:55:06.234 [WARN ] [o.o.b.w.i.bus.WeatherPublisher] - Weather forecast day 2 not available for locationId 'home', only 0 available
2016-01-27 19:55:06.235 [WARN ] [o.o.b.w.i.bus.WeatherPublisher] - Weather forecast day 1 not available for locationId 'home', only 0 available
2016-01-27 19:55:06.236 [WARN ] [o.o.b.w.i.bus.WeatherPublisher] - Weather forecast day 0 not available for locationId 'home', only 0 available
2016-01-27 19:55:06.236 [WARN ] [o.o.b.w.i.bus.WeatherPublisher] - Weather forecast day 4 not available for locationId 'home', only 0 available
2016-01-27 19:55:06.240 [WARN ] [o.o.b.w.i.bus.WeatherPublisher] - Weather forecast day 3 not available for locationId 'home', only 0 available
2016-01-27 19:55:06.241 [WARN ] [o.o.b.w.i.bus.WeatherPublisher] - Weather forecast day 2 not available for locationId 'home', only 0 available
2016-01-27 19:55:06.242 [WARN ] [o.o.b.w.i.bus.WeatherPublisher] - Weather forecast day 4 not available for locationId 'home', only 0 available
2016-01-27 19:55:06.242 [WARN ] [o.o.b.w.i.bus.WeatherPublisher] - Weather forecast day 3 not available for locationId 'home', only 0 available
2016-01-27 19:55:06.255 [WARN ] [o.o.b.w.i.bus.WeatherPublisher] - Weather forecast day 2 not available for locationId 'home', only 0 available
2016-01-27 19:55:06.255 [WARN ] [o.o.b.w.i.bus.WeatherPublisher] - Weather forecast day 1 not available for locationId 'home', only 0 available
2016-01-27 19:55:06.257 [WARN ] [o.o.b.w.i.bus.WeatherPublisher] - Weather forecast day 3 not available for locationId 'home', only 0 available
2016-01-27 19:55:06.258 [WARN ] [o.o.b.w.i.bus.WeatherPublisher] - Weather forecast day 0 not available for locationId 'home', only 0 available
2016-01-27 19:55:06.259 [WARN ] [o.o.b.w.i.bus.WeatherPublisher] - Weather forecast day 4 not available for locationId 'home', only 0 available

For each forecast entry exeptions follow later on.

I made a request manually with my woeid

query.yahooapis.com/v1/public/yql?format=json&q=SELECT * FROM weather.forecast WHERE u%3D'c' AND woeid%3D'703274'

and got a result with forecasts at the end

{"query":{"count":1,"created":"2016-01-27T20:03:10Z","lang":"de","results":{"channel":{"title":"Yahoo! Weather - Waiblingen, DE","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Waiblingen__DE/*http://weather.yahoo.com/forecast/GMXX4501_c.html","description":"Yahoo! Weather for Waiblingen, DE","language":"en-us","lastBuildDate":"Wed, 27 Jan 2016 7:59 pm CET","ttl":"60","location":{"city":"Waiblingen","country":"Germany","region":"BW"},"units":{"distance":"km","pressure":"mb","speed":"km/h","temperature":"C"},"wind":{"chill":"13","direction":"210","speed":"11.27"},"atmosphere":{"humidity":"53","pressure":"1020.3","rising":"0","visibility":""},"astronomy":{"sunrise":"7:58 am","sunset":"5:11 pm"},"image":{"title":"Yahoo! Weather","width":"142","height":"18","link":"http://weather.yahoo.com","url":"http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif"},"item":{"title":"Conditions for Waiblingen, DE at 7:59 pm CET","lat":"48.83","long":"9.31","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Waiblingen__DE/*http://weather.yahoo.com/forecast/GMXX4501_c.html","pubDate":"Wed, 27 Jan 2016 7:59 pm CET","condition":{"code":"26","date":"Wed, 27 Jan 2016 7:59 pm CET","temp":"13","text":"Cloudy"},"description":"\n<img src=\"http://l.yimg.com/a/i/us/we/52/26.gif\"/><br />\n<b>Current Conditions:</b><br />\nCloudy, 13 C<BR />\n<BR /><b>Forecast:</b><BR />\nWed - Cloudy. High: 14 Low: 10<br />\nThu - Light Rain. High: 11 Low: 3<br />\nFri - Partly Cloudy. High: 11 Low: 2<br />\nSat - Mostly Sunny. High: 13 Low: 8<br />\nSun - Light Rain/Wind. High: 12 Low: 11<br />\n<br />\n<a href=\"http://us.rd.yahoo.com/dailynews/rss/weather/Waiblingen__DE/*http://weather.yahoo.com/forecast/GMXX4501_c.html\">Full Forecast at Yahoo! Weather</a><BR/><BR/>\n(provided by <a href=\"http://www.weather.com\" >The Weather Channel</a>)<br/>\n","forecast":[{"code":"26","date":"27 Jan 2016","day":"Wed","high":"14","low":"10","text":"Cloudy"},{"code":"11","date":"28 Jan 2016","day":"Thu","high":"11","low":"3","text":"Light Rain"},{"code":"30","date":"29 Jan 2016","day":"Fri","high":"11","low":"2","text":"Partly Cloudy"},{"code":"34","date":"30 Jan 2016","day":"Sat","high":"13","low":"8","text":"Mostly Sunny"},{"code":"11","date":"31 Jan 2016","day":"Sun","high":"12","low":"11","text":"Light Rain/Wind"}],"guid":{"isPermaLink":"false","content":"GMXX4501_2016_01_31_7_00_CET"}}}}}}

Maybe I’m wrong, but it looks like you used your postal code as woeid … ?
You can look up your woeid f.e. here.

Edit: ahh, okay, now I see: in your manually approach you are using a six digit woeid (looks correct) while in your openhab.cfg you only use 5 digits. Why the difference?

Putting Waiblingen in Yahoo weather, it looks like you missed the digit 4 at the end of your woeid.

@sihui @watou :+1:your eyes are much better than mine.
In every comment in my openhab.cfg the woeid has the correct five digits. But not there where it is really important.
Problem is solved now. Thanx!

Now I see the really bad weather also for the next days

1 Like

Keep warm and dry!

Hallo
Yahoo weather binding doesn’t work, I get this error:
2016-03-24 17:48:48.440 [ERROR] [.w.i.p.AbstractWeatherProvider] - YAHOO[home]: Can’t retreive weather data: HTTP/1.0 400 Bad Request

Openhab 1.8.1 and weather binding 1.9.snapshot

Same problem, started yesterday, First thought that this is only my problem, but it seems to involve more people. So has anyone got any solution already or have to change Yahoo weather for something else?