Jump to content

API Error: Version Discrepancy (2.5 vs 3.0)


Go to solution Solved by bpwwer,

Recommended Posts

Hello everyone,

I've just installed the OpenWeather node server and waited for the API to activate, which it has successfully done.

However, I seem to be encountering an issue where although I am connected, no data is flowing through.

It appears that there might be a versioning issue. When testing the API using the URL method, version 2.5 returns an API error, while version 3.0 returns the expected data:

http://api.openweathermap.org/data/2.5/onecall?exclude=minutely,hourly&…………………..

I've extracted the truncated (for privacy) link above from the NS logs.

All the documentation from OpenWeather specifies using version 3.0 in their URL. Interestingly, when replacing the "2.5" in the NS error link above with "3.0", it successfully returns data.

Has anyone else encountered a similar version discrepancy with this API? Any insights or suggestions on how to resolve this issue would be greatly appreciated.

Thanks for your assistance!

Link to comment
Posted (edited)

Thanks Bob, however I have bad news for new 2.5 users.  
 

I still could not get it to work so I submitted a ticket; here is the response from Openweather:

 

”One Call 1.0 (2.5) is deprecated for all new free and startup users. We recommend using One Call 3.0 as a modern and updated version.”

Edited by Tommy James
Link to comment
  • Solution
5 hours ago, Tommy James said:

”One Call 1.0 (2.5) is deprecated for all new free and startup users. We recommend using One Call 3.0 as a modern and updated version.”

I didn't know that.  It seems like that's a recent thing as I believe it was working just last month.  I'll update the plug-in shortly.

Link to comment

I've looked into this more and it's not so simple. 

If I switch the plug-in to use the 3.0 API version, the API keys for my existing subscription don't work.  I have to get a new 3.0 subscription.  So releasing this would cause all existing user's installation to break and they would need to get a new subscription.  

I don't have a good way to notify existing users that an upgrade of the plug-in will break their installation so I'm very hesitant to do this.

My subscription is the free professional collection plan.  Generating a new key for that subscription still works with the existing version.

Are you sure an API key for a professional collection plan isn't working for you?  They do say it can take a few hours for the API key to become active.

Link to comment
  • 4 weeks later...

The One Call 2.5 API being closed has no effect on the OpenWeatherMap plug-in.   The Plug-in is using the current weather/forecast API from the their Professional Collection of API's.

image.png.51e1c678e9cf79d105efcaa0ed28c2d6.png

  • Like 1
Link to comment

@bpwwer I am trying to migrate from PG2 to PG3 so I am just now creating an Open Weather account (basically this makes me a new user). As a new user I cannot create an API Key that works with 2.5 as far as I can tell. I contacted their support trying to get them to give me an API key that will work with 2.5 and they so far have not been able to help me. They just keep telling me 2.5 is deprecated. So maybe new users cannot use OpenWeatherMap plugin?

Link to comment

The One Call 2.5 API doesn't exist and the plug-in does NOT use the One Call 2.5 or the newer One Call 3.0 API.

It uses the Professional Collections API as shown in the screen capture I posted above.  If you're subscribed to one of the Professional Collection plans, you should see the following under your account/my services:

image.png.551b4e31b7a98165b6935641c78c1114.png

I'm subscribed to the "free" plan as shown above.  I'm able to generate new API keys for this plan and have them work with the plug-in.  

NOTE: that it can take between 1 and 48 hours for an API key to become active after it has been generated.  

Link to comment

@bpwwer The log file from the plugin appears to indicate that it is using onecall (see log snippet below). I ask because I still can't get the plugin to actually populate with data. My API key is a week or more old now and still not working.

 

2024-04-22 07:17:00,828 Thread-4 udi_interface DEBUG query:_get_weather_data: request = http://api.openweathermap.org/data/2.5/onecall?exclude=minutely,hourly&lat=38.75&lon=-121.29&units=imperial&appid=<myapikey>
...
2024-04-22 07:17:00,910 Thread-4 udi_interface DEBUG query:_get_weather_data: {'cod': 401, 'message': 'Invalid API key. Please see https://openweathermap.org/faq#error401 for more info.'}
2024-04-22 07:17:00,912 Thread-4 udi_interface ERROR query:query_onecall: Onecall data query failed
Link to comment

Hey guys,

I did some research on this back when I first posted but haven't really look at it since.  The assumption is it is still the same.  As alizer has pointed out, the URL from our logs has a 2.5 in it and the documentation from OpenWeather wants a 3.0 in it.

@alixer if you replace the 2.5 with a 3.0 in your link and submit via your browser you will get a set of results.  

Hope this helps @bpwwer

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...