[App][Pro] OpenWeather

I have no idea what’s wrong. It seems to me OWM is blocking new keys on accessing the older free version of the OneCall API. It looks like they try to push the user to teh subscription for the OneCall API 3.0.

Let’s wait a time to check if the key is getting valid for the API.
If not, I have to check if I can add a switch for selecting the API (2.5 or 3.0). Perhaps users will have to use 3.0 version with subscription in future. OWM would not be the first API doing thsi (Google did it with the Maps API in the past).

Ok, well good to know you can replicate it.
I’ll just have to wait then.

Some very bad news I found…

I seems OWM has deprecated the OneCall API 2.5.
So we all will be forced to subscribe a payment plan with 1000 calls free… :face_vomiting:

1 Like

Oh my, that’s a bummer.
I just wanted to let you know this:

My current API key seems to stay active (but for how long…). It returns weather data via test url and I can create new OWM devices on Homey.

I had two long time disabled API keys, enabled them and ran some tests.
They work as well, but it’s a few hours wait before they’re active.

They don’t seem to work, except for air pollution.
This works
http://api.openweatoermap.org/data/2.5/air_pollution?lat=52.73&lon=4.75&APPID=MyOtherApiKey

AirPollution is on the list of free access. That’s why it’s working.
My old key is still working. The new one not. Perhaps they keep access for active keys. But not for a long time I think.
The ObeCall API 3.0 is technical the same, but with other subscription plan. So OWM feeded their users with the 2.5 version to get them into the trap.
But hey, I only got 1000 calls while testing with short intervals. So we can keep our free version :smiling_imp:
There will be ko way back and we will need the subscription in the future.

Thanks for the heads up. 1000 calls a day is still pretty generous, 1.44 calls a minute.
We’ll see which direction they’re heading concerning no-cost services.

@MVester
I added a new settings parameter for “current weather/location” devices to select the API version.
This can be set in pairing dialog for new devices and in settings dialog for existing devices.

Could you please install the new test version and check if you can use the OneCall 3.0 API with your subscription?

This would be the way for the future to handle a migration to 3.0 API.
So everyone can use the existing and working API key as long as possible and switch to 3.0 if OWM is stopping the 2.5 API.

3 Likes

I ran some tests.

The API selecter works well.
My forementioned ‘old’ API keys are also valid for 2.5, it was just a few hours wait before they’re active again.

All existing API keys fail when I use the OneCall 3.0 option, but that’s to be expected.

1 Like

It works, I am now getting data.
Tried just changing the one I had with error to 3.0 and it started getting data, and also removing that and installing a new, selecting 3.0 during install worked.
So all seems ok now :slight_smile:

1 Like

I have the same issue, I have a new key with version 3.0, it works fine like this: https://api.openweathermap.org/data/3.0/onecall?lat=52.0823259&lon=4.7460844&appid=

Small screenshot:

But from this App/Homey I get the invalid key / 401 error:
Schermafbeelding 2022-08-24 om 15.08.39

I have tested this “test version”, many thanks!!! When I select the 3.0 API with my new key, it works without problems

1 Like

Another uopdate for the OWM API.
This information is for users still using the deprecated devices using the older weather API.
These devices are storing ZIP code or city name in device settings. The API call passes this information to OWM where a built in geocoding engine converts it to lon/lan values. This built in geocoding will be deprecated soon.

That means, that the deperecated Homey devices will not work soon or later.
I have to remove them from the app after OWM has adaptet their API.

So there are some question:

  • Will it be ok for all user to use only the new OneCall API v.3.0 with subscription? That means, you have to st payment information in your OWM account, but still have 1000 calls free each day and you can set a limit to prevent costs.
  • If not, I can only add an new device using the older weather API (like the deprecated current weather device) with the new pairing dialog. This way you can still use the “old” API key but you are limited to current weather data, no forecasts.

Please give me a short feedback using the like button for one (or even both) of the next two posts.
You can compare the provided weather data using the API description provideby OMW using the links in the next posts.

Vote: I will use the API key for OneCall API 3.0 with subscription - weather API is not needed.
https://openweathermap.org/api/one-call-3

5 Likes

Vote: I would be happy to use the old API key with the weather API.
https://openweathermap.org/current

1 Like

I don’t quite understand the location part? how is this arranged in the api 3.0

The old Homey devices are storing the location as city name or zip code:
grafik

Only if you don’t set this options, the Homey location (lan/lot) is used.
But most user will choose the city. So the devices only have a city/zip which is used in the API url.
And that will not be possible in the future. You have to use lan/lot instead.

Changing the existing devices will break their functionality. So it’s better to implement a new driver in teh app and add the deives to homey using a new pairing dialog.

So far the technical details. But the main question is: Are users willing to go for the API 3.0 key (subscription/set payment data) or staying at the old key (free without subscription).

ok i vote for 3.0 i’m going to miss those weather forecast.
knmi is not always accurate at my location.

A new test version is available: 1.3.0

New: Added Current weather device for the free “Current weather” API.

I decided to add a variante of the old “Current weather” device (which is set as deprecated) to keep support for the free API access without subscription. There are still more than twice as many old (deprecated) devices active as new OneCall devices.
The device base has changed to appear like the OneCall devices (pairing dialog, capabilities). This way, the pairing is the same as for the OneCall devices - selecting a city and using the lan/lot values in device settings. This will keep the device compatible with the API (announced stop of built in geocode engine).

The second cause to offer this as a new device instead adaptinng the deprecated one is, that these changes would have broken the existing devices. This way, all users don’t go for the 3.0 API key, can use this device and migrate their flows step by step.

In the medium term the OWM API will get incompatible with the deprecated Homey devices. If this is the case, all users have to migrate to the “Free current weather” API device (with free API key) or to the “OnCall API” device (3.0 API key with subscription).

1 Like

Fortunately, with this test update everything still works. With old apikey even the weather forecast for 3 hours and a day report.

A short summary about the existing devices and the needed API keys:

grafik
API key: Free key without subscription, 1000 call/day free
Data: Current weather data. This is only a basic set of values, no forecast, optional to OneCall API


grafik
API key: Free key without subscription, 1000 call/day free
Data: Air quality: Current data and location (master device); hourly data (child device)


grafik grafik grafik grafik
API key: OneCall 3.0 key with subscription, 1000 call/day free
Data:

  • Current weather data and location (master device)
  • hourly forecaste (child device)
  • daily forecaste (child device)
  • weather warnings(child device)

If you used these devices previously with a free API key, the key seems to be still valid. Perhaps OWM is disabling the access in future and a OneCall 3.0 API key is needed.
Choose the key version in pairing dialog or device settings depending on your key subscription.


Old deprecated devices:
Therer are still three old deprecated devices. These devices can’t be added, but if they are still present in Homey, they can be used. These devices are using the Current weather API, 3hr forecast and daily forecast. If you used these APIs in the past with a free API key, it seem to be still possible, even if some of the forecast APIs are now only accessable with a subscription.
The used API URL will be deprecated soon because a built in geocoding engine is used (calling by city instead of lan/lot).
The support of these devices will stop if OWN is stopping support for these API.
So please switch to one of the current devices if that’s the case.


Links:
OneCall 3.0 key: Pricing - OpenWeatherMap
OneCall 3.0 FAQ: Frequently Asked Questions - OpenWeatherMap
Free API key: Pricing - OpenWeatherMap

3 Likes