An API key is required to use the OpenWeatherMap API.
The API key can be downloaded free of charge from https://openweathermap.org/api.
1000 calls per day are permitted per API key.
OWM has deprecated the OneCallAPI 2.5. So new user with a new API key will need a subscription for OneCallAPI 3.0. You have to set a payment option but you still have 1000 calls a day free. You can set a limit to 1000 calls in the OWM profile.
While adding the current weather/location device, choose the API version 3.0.
Migration to the OneCall API:
The previous Homey devices use an older API version that will no longer be supported by OWM in the future or is only available in subscriptions.
These devices are marked as [deprecated]. They still continue to work but they can’t be added anomore.
As long as the API calls are still possible, these devices can continue to be used.
However, it is recommended to replace these devices with the new devices and adjust the flows.
Known breaking changes:
The migration to the SDK3 will break a flow trigger “measure_rain_changed”. You have to replace the trigger card in your flows.
Support app development with a small donation via PayPal. Many thanks
Current weather (location)
First, you need a location for which you want to get weather data.
So add a new device and select the device type “Current weather (location)”:
In the next step you can set the device properties:
The OWM API key
A city name. Leave blank to use Homeys location.
A polling interval in minutes. Take a interval to keep below 1000 API calls a day. Every current weather device is calling the API at this interval.
The next step displays a list of found cities:
Select your city and the device gets added.
You can change the device settings at any time:
A forecast device is a “child” device of a “Current weather” device.
If you add a forecast device it’s connected to a early added current weahter device (the location). The main device is calling the API, which includes current data and forecasts, and forwards the forecast data to its child device. This way you can save many API calls and you can add as many forecast devices as you want.
If you delete a main device, all depending forecast devices will get unavailable and mus be deleted, too.
To add a forecast device, just use a hourly or daily forecast device type:
You can set now the time offset of your forecast.
Iy you set “0” hours/days, you get the forecast of the current time. If you set “12” hours, you will get the forecast 12 hours ahead.
I get the message this device will soon stop working. Do i have to do something?
No, you don’t need to do something. Your devices will work as long as OWM is supporting the used API.
In pairing dialog, only the new devices are available using the OneCallAIP. That’s the current API for free use. So just contiune with your devices and try the new ones (with additional data and real hourly forecast) in addition. If you like the new ones, you can adjust your flows and delete the old devices.
Can I add a single forecast device?
You need a “Current weather” device. This device contains the location setting, API key and reds the weather data. The forecast devie only displays the forecast for a set timeslice.
I registeres a new API key (since 08/2022) and I get a device unavailable error “invalid API key”?
OWM has deprecated the OneCallAPI 2.5. So new user with a new API key will need a subscription for OneCallAPI 3.0. You have to set a payment option at OWM but you still have 1000 calls a day free. You can set a limit to 1000 calls in the OWM profile.
While adding the current weather/location device, choose the API version 3.0. You can change this API version for existing devices in device settings if you are upgrading to the 3.0 subscription.
To which times refer the daily forecast temperatures for morning, day, evening and night?
1.0.4 / 1.0.5
Added device setting to show wind speed in m/s
Added air pollution devices
Small changes for description and icons
Added dew point
Re-arranged capabilities. To take effect, a device have to be added again
Activated Insights for all numeric capabilities
Fixesd some errors raised with 7.4rc
Added “Fog” as weather condition.
Some minor conditions like smoke, dust, haze, sand are still not included to keep the condition list simple. I will add missing conditions if they are used by OWM. I will see it in app crash reports
Changed date/time localization based on NodeJS version of 7.4rc
Added ‘Haze’ to weather conditions
Changed date/time localization based on NodeJS version of 7.4rc for air quality devices
Added option to deactivate polling.
Added flow action for individual polling update.
Timezone handling for sunrise/sunset
Fix for deprecated devices: min/max temperature for hourly forecast, wind direction for hourly/daily forecast.
Fixed SO2 trigger. Please repair the flows because the trigger name has changed.
Added specific weather condition to ‘highlighted trigger cards’. Simplified descriptions af weather condition capability and trigger.
Added weather alerts. Add a warning device to a location and receive warnings in difficult weather conditions.
1.2.1 - 1.2.2
Added capability for weather condition description for use as global flow tag.
Small bugfiy for async device init.
Adjusted Beaufort scale. Fixed ‘alarm has changed’ trigger.
you don’t need to to something. Your devices will continue to work as long as OWM is supporting this API. The current weather and hourly forecast (3h interval) is currently supported, but the daily forecast is only available for paid subscription.
The message appears, because the devices are “deprecated”. They are still working but are not available for pairing. For new paired devices, only the new ones with OnCallAPI access are available, because that’s the new default API for free use.
You can keep all like it is - and test the new devices with some more weather information, a real hourly forecast and a daily forecast up to 7 days. Using this API, only the “Current weather” device is requesting the API. Assigned forecast devices don’t need API request. So you can use shorter intervals with your 1000 API request a day.
PS: I added this question/answer to the FAQ (post #4)
What values is OWM providing?
“description”: “light rain”,
Here you can see the “description” (text in requested language), the “id” (condition detail) and the “main” value (condition).
In the app, these fixed values are defined as enum list for the capability. At this point, the translation is done by Homey for the sensor view:
But inside, the enum values are used, because they are unique.
In the flows, you will see a list of possible values (with description) where you can select one entry. Inside, the enum value is used to check or compare the device values with the flow tag (for flow conditions).
thanks for the suggestion in your review. A device setting to show windspeed in m/s is now included. It can be activated for each device.
Forecast devices are refreshed with the next interval.
This change only affects the new devices using OneCallAPI.
You could try the new test version 1.0.4 and check if all is working right. Many thanks.
I’ve published a new test version with a optimized logic for changes between m/s and km/h (or mph). Especially the capability changes are reduced on changes of device settings because they have a heavy impact on performance.
If someone is using imperial units, it would be nice if a feedback is postet to know all is correct for mph values, too.