I’m sure most of you who are affected have been receiving the emails but I’m just posting this in case someone misses it. OWM is closing down their 2.5 API in June and requiring everyone to migrate to the 3.0 API. Luckily for us the 3.0 API is supported by the openHAB binding.
Once you resubscribe to the 3.0 API (it requires a separate subscription) you simply need to switch to the 3.0 API in the Open Weather Map Account Thing. I didn’t need to change the API key. YMMV.
No, I don’t use text .things files. But here is the YAML for my Thing (API key redacted of course). The property names are the same between the YAML and .things files.
UID: openweathermap:weather-api:owm_account
label: OpenWeatherMap Account
thingTypeUID: openweathermap:weather-api
configuration:
language: en
apiVersion: "3.0"
apikey: USEYOUROWNKEY
refreshInterval: 10
location: Global
It’s also worth mentioning that you can set a limit on the service so it will refuse calls instead of getting to where it starts charging you. Log in to OpenWeatherMap and click on “Billing plans”
You’ve not activated the OneCall API 3.0. It should show "“activated” under “Status” and the button at the end should show “Unsubscribe”, just like my screen shot above. Your screen shots shows a “Subscribe” button showing you have not subscribed to the 3.0 API yet.
You will have to enter payment information but you can set the calls per day to 1000 so they will never charge you.
2024-04-29 16:44:13.797 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'openweathermap:onecall:api:local' changed from UNKNOWN to OFFLINE (CONFIGURATION_ERROR): Ungültiger API Schlüssel. Mehr Infos unter https://openweathermap.org/faq#error401.
2024-04-29 16:44:13.827 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'openweathermap:onecall-history:api:local-history' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR): Ungültiger API Schlüssel. Mehr Infos unter https://openweathermap.org/faq#error401.
2024-04-29 16:44:13.828 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'openweathermap:weather-api:api' changed from UNKNOWN to OFFLINE
Using my old/existing apikey, as also on a new one I generated.
At this point I don’t have anything else to offer. It worked for me. I didn’t need to create a new API key after subscribing to the 3.0 API. Once the subscription was set up the next time the OWM binding polled the API it just worked.
Hmm, strange enough, I just switched the apikey once more forth and back, et voilá:
2024-04-29 16:52:27.033 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'openweathermap:onecall:api:local' changed from OFFLINE (CONFIGURATION_ERROR): Ungültiger API Schlüssel. Mehr Infos unter https://openweathermap.org/faq#error401. to ONLINE
2024-04-29 16:52:27.096 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'openweathermap:onecall-history:api:local-history' changed from OFFLINE (CONFIGURATION_ERROR): Ungültiger API Schlüssel. Mehr Infos unter https://openweathermap.org/faq#error401. to ONLINE
2024-04-29 16:52:27.098 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'openweathermap:weather-api:api' changed from UNKNOWN to ONLINE
Maybe it took a moment on openweathermap to reflect changes to the keys …
I’m back now on my / the old original apikey I configured years ago.
A couple of thoughts to add to Rich’s instructions.
When you subscribe to the 3.0 API, the billing page (where you enter your credit card) might be a bit confusing since it doesn’t mention the free 1000 calls per day.
However, the free 1000 calls show up on the Billing Plan page after you subscribe.
I lowered mine to 600, which is still more than twice what I need since I’m only refreshing data every 10 minutes (288 times a day).
When I updated my bridge to 3.0 and saved, the thing went offline. I paused/restarted the thing to reinitialize, and it came back online immediately. I didn’t need to to generate a new API key.
don´t judge me but here is a OpenHab 2.4 still running (very fine!!).
I added the Openweather thing via the PaperUI in the past (at my first steps with OH)
What about that “old” System ? Can i use the new 3.0 API also ?
Is it right that this change is required only if you use things provided by the binding relying on OneCall API ?
For other things not using the OneCall API, the binding will continue working without any change?
I don’t know for sure but I think the non-OneCall API stuff is actually an even older API and is likely to be closed down too. I don’t actually see those API end points offered any more either in their account page.
If you’ve been getting emails from OWM I’d take that as an indication you need to change.
No. It’s a whole new API. Everything is different. It’s not just a matter of changing some String. The dbinding has to acutally implement the new API. The 2.4 binding doesn’t implement the 3.0 API, it couldn’t. The 3.0 OWM OneCall API didn’t exist five years ago when OH 2.4 was released.
hmm… so i added the , apiVersion=“3.0” to the bridge, then thing was offline, restartet couple of times and for me it’s working again.
But maybe just as fallback to version 2.x ? how to check that?
At least i did not put any pay information to openweathermap…