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

New API keys for OpenWeatherMap OneCall do not work with API 2.5 #113000

Closed
mvdnes opened this issue Mar 10, 2024 · 5 comments · Fixed by #116870
Closed

New API keys for OpenWeatherMap OneCall do not work with API 2.5 #113000

mvdnes opened this issue Mar 10, 2024 · 5 comments · Fixed by #116870

Comments

@mvdnes
Copy link

mvdnes commented Mar 10, 2024

The problem

Currently, the OpenWeatherMap integration uses version 2.5 of the OneCall API.

I started using OpenWeatherMap today, and created an account with a subscription to the OneCall API. The tokens I get seem to be limited to version 3.0 of the API, for version 2.5 I get a 401 response.

Please not that this only goes for the OneCall API, my token does support version 2.5 of the regular API.

Examples:

$ curl -I "https://api.openweathermap.org/data/3.0/onecall?lat=33.44&lon=-94.04&appid=$APIKEY"
HTTP/1.1 200 OK
[...]
$ curl -I "https://api.openweathermap.org/data/2.5/onecall?lat=33.44&lon=-94.04&appid=$APIKEY"
HTTP/1.1 401 Unauthorized
[...]
$ curl -I "https://api.openweathermap.org/data/2.5/weather?q=London,uk&APPID=$APIKEY"
HTTP/1.1 200 OK
[...]

As such, I cannot use the OpenWeatherMap integration when set to OneCall mode.

What version of Home Assistant Core has the issue?

core-2024.3.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

OpenWeatherMap

Link to integration documentation on our website

https://www.home-assistant.io/integrations/openweathermap/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-03-10 17:12:19.833 DEBUG (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Finished fetching openweathermap data in 0.181 seconds (success: False)

Additional information

No response

@home-assistant
Copy link

Hey there @fabaff, @freekode, @nzapponi, mind taking a look at this issue as it has been labeled with an integration (openweathermap) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of openweathermap can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign openweathermap Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


openweathermap documentation
openweathermap source
(message by IssueLinks)

@jaamulberry
Copy link

jaamulberry commented Mar 25, 2024

Just as an addition. The One Call API 2.5 will be deprecated April 15,2024. This is unfortunately a very recent change as far as I can tell. On March 14th there was no news of deprecation based on the Wayback Machine.
Source: https://openweathermap.org/api/one-call-api
Wayback: http://web.archive.org/web/diff/20240314071002/20240325011731/https://openweathermap.org/api/one-call-api

Reference for transition: https://openweathermap.org/one-call-transfer

@Tom-Heitbrink
Copy link

Tom-Heitbrink commented Apr 16, 2024

According to mail from openweathermap
We would like to inform you about our plans to complete the migration from One Call 2.5 to One Call 3.0 that started 2 years ago. In line with this, access to One Call 2.5 will be finally closed in June 2024.

Migration info:
https://openweathermap.org/one-call-transfer

@oxc
Copy link

oxc commented Apr 26, 2024

Please note, the One Call API 3.0 subscription requires credit card details. We use your payment card details only for those calls that go beyond the free limit. If you do not want to exceed a free limit you can always set a daily threshold for your account.

This is probably something that should be noted in the documentation for this integration.

@momoz
Copy link

momoz commented May 19, 2024

Same, just signed up and new accounts, integration does not work. Says invalid API key

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