Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

I've noticed that for the past few weeks my Photo Frame has been reporting odd weather. Instead of Brisbane, Australia it was giving me weather for Whitby, GB. I didn't pay much attention to it at first but then it got to me, I checked the configuration and that hasn't changed so I figured there must be something odd going on with OpenWeatherMap and turns out I was right.

This is what I was seeing...Whitby, GB is nowhere near Brisbane either!
owm21.png


I dug into my code and saw that the results returned from owmClient were always the same no matter which city I requested.

Doing a bit more debugging I found that the request URL looked up by owmClient is something like this...
 URL
http://api.openweathermap.org/data/2.1/forecast/city?q=Brisbane,AU&type=json&units=metric


Opening that in a browser does return results and always for Whitby, GB! Doesn't matter which city you put in. It also looks like the other parameters in the URL have no effect. Effectively the OWM 2.1 API is now crippled and unusable.



The 2.1 API is quite old and isn't even documented by OpenWeatherMap any more. The focus is on the 2.5 version of the API which requires an API key so is a little more work to use.

Incidentally I did try the 2.5 version of the URL, which is something like...
 URL
http://api.openweathermap.org/data/2.5/weather?q=Brisbane,AU&appid=<your_api_key>


That worked and returned data for the city I requested!

This means that projects like owmClient that haven't switched over to the new API are more or less unusable now. I'll be updating my code for jPhotoFrame shortly to remedy this issue, perhaps it's time to go back to Yahoo! Weather now that it is working again.

I raised a support ticket with OpenWeatherMap several days ago and haven't heard back yet so perhaps this crippling of the 2.1 API was intentional on their end to force the use of the 2.5 version.

-i

Please leave your comments or feedback below!
comments powered by Disqus
Other posts you may like...
Hi! You can search my blog here ⤵
Or browse the recent top tags...

Recent Blog Posts

How to stop macOS adding shadows to window screenshots

How to run Atari Lynx games on the SNES Classic Mini

Maven dependency scopes with relation to WAR file packaging and the WEB-INF/lib directory

Hacking the Sonoff B1 WiFi LED bulb to run custom firmware

What does an idle WebLogic server run on the hour to cause a CPU spike

How to open the Sonoff B1 wifi LED bulb to access its internal circuitry

Australian release SNES mini classic unboxing and a quick play through

Troubleshooting high CPU usage for JVM threads

How to fix WebLogic high CPU usage due to a corrupted file store

Mini review of the Sonoff B1 WiFi light bulb

Recent Galleries

Atari Lynx repair - Part 5 - McWill LED screen mod installation

Atari Lynx repair - Part 4 - screen cover replacement

Atari Lynx repair - Part 2 - re-capping the motherboard

Atari Lynx repair - Part 3 - broken speaker replacement

Atari Lynx repair - Part 1 - introduction and case disassembly

Building a custom Atari Lynx game box storage shelf unit in a day

Protecting old Atari Lynx game boxes with snug fit plastic sleeves

Monument Valley 2 is released and does not disappoint

Space Food - Chocolate Ice Cream with Chocolate Chips

Legeod Star Wars AT-DP kit

Blogs and Friends

Matt Moores Blog
Georgi's FlatPress Guide
Perplexing Permutations
The Security Sleuth
Ilia Rogatchevski
Travelling Fairy

Blog Activity

Blog Activity