Bodmer/OpenWeather

Closure of OpenWeather's One Call 2.5 API?

mattblovell opened this issue · 9 comments

Any update plans given the (apparent) closure of OpenWeather's One Call API 2.5 occurring in June 2024?

How to transfer from One Call API 2.5 to the One Call API 3.0
https://openweathermap.org/one-call-transfer

I don't immediately see anything that significant between API 2.5 and API 3.0. Perhaps it is as simple as updating the root of the URL that gets composed?

@mattblovell I just tried that simple one call with the 2.5 changed to 3.0 and got an error message. I have a subscription (free) but there's more changes they've made obviously. So something they don't like about the URL.

{"cod":401, "message": "Please note that using One Call 3.0 requires a separate subscription to the One Call by Call plan. Learn more here https://openweathermap.org/price. If you have a valid subscription to the One Call by Call plan, but still receive this error, then please see https://openweathermap.org/faq#error401 for more info."}

I believe one has to explicitly add One Call 3.0 access, even for an existing key. (Note that you can place a self-imposed limit on the number of One Call 3.0 API invocations that get processed, such that you definitely stay below the threshold where charges start.)

I went ahead and added One Call 3.0 to my existing account (and key, presumably), but I've not yet tried accessing it.

@mattblovell thanks for that nugget, I just read someone else had said the same thing, that even if you had a subscription, you had to resubscribe to get 3.0 access. Perhaps that's their way of cleaning out all the unused 2.5 accounts in their database.

Did you resubscribe or simply add a new API key in your existing account? I didn't find any concise info on adding a OneCall 3.0 to my account, or my eyes are too blurry from reading all the stuff...sigh...

Did you resubscribe or simply add a new API key in your existing account?

I just added the new API to my existing account.

I just have the one pre-existing key but, as noted, I've noted yet tried any accesses, so I don't know if that will work or if a new key is needed. I think OpenWeather provides a nice way of trying accesses, so I guess that will be my next step.

@mattblovell thanks! I tried that first with the 2.5 change to 3.0 and the new API key but I wondered if there was a propagation delay with enabling the new API key. Going to try it again...Sure make it easy don't they..LOL

Update: just added a new API key, tried to use it with the older 2.5 URL and it said it didn't know me. Tried it with the 3.0 URL and got the same error. Going to leave it in the system for a while and see if it updates.

Just checked and their web site says after 2hrs the key will activate.

I added the 3.0 API access several days ago. Trying "raw" in Firefox just now with the representative example of

https://api.openweathermap.org/data/3.0/onecall?lat={lat}&lon={lon}&exclude={part}&appid=[{API key}]

it appears to have worked! I'll try the modifying my little weather widget itself over the weekend.

@mattblovell awesome! I was trying the Safari URL for access the same as you did and got the error. So now I have added an API key and I have also resubscribed with a different email. Which was interesting because the confirming email that just showed up has the 2.5 URL in it...had me laughing a little...

Going to wait a few hours and see what havoc it bestows on me. I've become dependent on this little weather station...:-)

I was able to indeed have the existing OpenWeather code work fine just changing "2.5" to "3.0" within the URL.

It took a while to get to that state, since the desktop I'm working on did not have the Arduino IDE installed. Grabbing the latest one, there were different hoops to jump through than previously to get LittleFS support working. I also did not immediately notice the change in the most recent libraries that require passing the LittleFS handle to loadFont() calls! Once I got all of that straightened out, though, everything still worked with the 2.5 -> 3.0 transition.

@mattblovell after much reading, I subscribed with a credit card and then waited 12 hrs.

Changed the 2.5 to 3.0 and it worked!

I'm using the older Arduino 1.8.9 IDE (cause it complains less about stuff than the new "improved one"..LOL), ESP8266 and 2.8" TFT. I've modified the original display code a fair bit so the main display also rotates between the moon/sunrise/etc and a 6 hr forecast for POP%, Temp and Dew Point.

I also coded in BigDataCloud to turn long/lat into locations for the display. Added a switch so I can toggle between two locations.

Like you, I had to change the SPIFFS to LittleFS but that was easier than I'd thought it was going to be so fairly painless.

Be nice if there was a way to see usage on the OpenWeatherOneCall site but darned if I can find any "counter"...

Anyway, thanks for the help, hints and great we got it working!

Monosnap 2024-04-27 19-54-03