Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenWeatherMap API 2.5 deprecation #442

Open
Ryuno-Ki opened this issue Apr 24, 2024 · 9 comments
Open

OpenWeatherMap API 2.5 deprecation #442

Ryuno-Ki opened this issue Apr 24, 2024 · 9 comments

Comments

@Ryuno-Ki
Copy link
Contributor

Hey there 👋

I recently received an e-mail by OpenWeatherMap that they are going to sundown API 2.5 in June this year.

They were so kind to link to https://openweathermap.org/one-call-transfer for an upgrade path.

Since I'm using OpenWeatherMap myself I was wondering whether you would be open to a PR upgrading to the new API?
How can we communicate that a new API token will be required? I couldn't come up with a good way for this myself.

Ryuno-Ki added a commit to Ryuno-Ki/awesome-wm-widgets that referenced this issue Jun 17, 2024
When I looked into OpenWeatherMap 3.0 API they demanded credit card
information even for their free tier. Therefore I decided to move to
another provider with a generous tier.

In a first step I rewrote the current weather report (i.e. no forecast)
to use it.

I haven't received any commentary on streetturtle#442 so I don't know where your
mind was going. If OpenWeatherMap phases out its 2.5 API and nobody else
intends to use their 3.0 one, I offer to take this implementation
instead.

Signed-off-by: André Jaenisch <[email protected]>
@Ryuno-Ki
Copy link
Contributor Author

I've opened #448 in case someone else is relying on Weather reporting as well. No forecast yet (as I wrapped my head around how to get the current weather rendered in Lua).

@Ryuno-Ki
Copy link
Contributor Author

FWIW I just spotted #394 which uses another service.
I could imagine allowing the awesome people to choose which service they want to use as WeatherAPI is also requiring an API key (but does not need a change in its API in rc.lua).

Opinions?

@streetturtle
Copy link
Owner

The widget in #394 is visually different from this one, I'll ask the maintainer if they would be ok to move it in this repo. I think it would be too much work to make theese widgets look the same, as the data those two APIs (OWM and wttr) return could be different.

@streetturtle
Copy link
Owner

Hey @Ryuno-Ki, thank you for starting this migration!
I think the best way to proceed with migration to the weatherapi.com would be to create a new widget (we can call it weather-api-widget for example) and add a deprecation notice to this one's readme. New users will definitely check the readme, and hopefully existing will check it, when the OWM API stops working.
What do you think?
If you ok with it, please add a new widget, and I'll take care of the deprecation notice in the readme.

@Ryuno-Ki
Copy link
Contributor Author

Hey @streetturtle,

sounds fine with me. I'll set aside some time this week to rework my PR. I marked it as a WIP in the meantime.

For the record: Last weekend I received an e-mail by OpenWeatherMap informing me that 2.5 is sundowned. Apparently one of my API keys was moved to the Free Tier (haven't logged in yet to verify).
I don't know yet whether I can test the 3.0 API with it, but if it does, I can update both widgets.

duxedo pushed a commit to duxedo/awesome-wm-widgets that referenced this issue Aug 29, 2024
When I looked into OpenWeatherMap 3.0 API they demanded credit card
information even for their free tier. Therefore I decided to move to
another provider with a generous tier.

In a first step I rewrote the current weather report (i.e. no forecast)
to use it.

I haven't received any commentary on streetturtle#442 so I don't know where your
mind was going. If OpenWeatherMap phases out its 2.5 API and nobody else
intends to use their 3.0 one, I offer to take this implementation
instead.

Signed-off-by: André Jaenisch <[email protected]>
@xfzv
Copy link

xfzv commented Sep 19, 2024

Not sure if this is related but the widget stopped fetching data today on my end. I'm using a free tier API key.

% curl "https://api.openweathermap.org/data/2.5/onecall?lat=redacted&lon=redacted&appid=my_api_key&units=metric&exclude=minutely&lang=en"
{"cod":401, "message": "Invalid API key. Please see https://openweathermap.org/faq#error401 for more info."}%

Replacing onecall with forecast or weather works with curl but doesn't when replaced in weather.lua:

('https://api.openweathermap.org/data/2.5/onecall' ..

Anyone else?


Edit: I guess I won't be able to use 2.5 anymore. Quoting OpenWeatherMap website:

Please note, the One Call API 3.0 subscription requires credit card details.

I don't want to add a credit card so I guess the best option is to switch to weather-api-widget with weatherapi key.

@Ryuno-Ki Thank you for this! Hope to see forecast added in the future. For now I think I'll have wttr.in opening in a terminal window when left clicking the widget.

@Ryuno-Ki
Copy link
Contributor Author

Thank you for this! Hope to see forecast added in the future. For now I think I'll have wttr.in opening in a terminal window when left clicking the widget.

You're welcome. I'm in the process of exams, so might have to wait until end of year / early next year until I get around.
Do you have a preference on hourly or daily? (Maybe I can get one of those with little effort in, but it would help me focus on one).

@streetturtle

I'll take care of the deprecation notice in the readme

Sounds it is about time for this (and closing this issue subsequently).

@xfzv
Copy link

xfzv commented Sep 23, 2024

You're welcome. I'm in the process of exams, so might have to wait until end of year / early next year until I get around.

No worries, wttr.in forecast in terminal window is good enough for the time being. Good luck for your exams!

Do you have a preference on hourly or daily? (Maybe I can get one of those with little effort in, but it would help me focus on one).

I used to have both enabled with Weather widget but if I had to keep only one I'd say daily.

@Ryuno-Ki
Copy link
Contributor Author

@xfzv #454 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants