Open Ryuno-Ki opened 7 months ago
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).
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?
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.
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.
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.
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
:
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.
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).
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.
Hey there :wave:
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.