# \[App\]\[Pro\] OpenWeather

**URL:** <https://community.homey.app/t/app-pro-openweather/61482>\
**Category:** Apps\
**Tags:** app, tools, weather, homey-pro\
**Created:** [March 8, 2022, 5:55pm UTC](https://community.homey.app/t/app-pro-openweather/61482 "2022-03-08T17:55:16Z")\
**Posts on this page:** 20\
**Page:** 16

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [August 22, 2023, 9:48pm UTC](https://community.homey.app/t/app-pro-openweather/61482/303 "2023-08-22T21:48:17Z")

</div>

Hi, seems I forgot to adapt a piece of code. I’ll fix this asap and provide a new version.  
Btw. what device did not work? OneCall current weather?

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [August 23, 2023, 4:26am UTC](https://community.homey.app/t/app-pro-openweather/61482/304 "2023-08-23T04:26:11Z")

</div>

New **live version 1.4.4**

- versions 1.4.2 to 1.4.4 are bugfixes (device availability, pair view error)

@DuMees  
the pair process is fixed in new live version 1.4.4

---

<div class="post-metadata">

**Author:** ![wayupnorthguy](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wayupnorthguy/32/82880_2.png) [@wayupnorthguy](https://community.homey.app/u/wayupnorthguy)\
**Post date:** [September 13, 2023, 4:46pm UTC](https://community.homey.app/t/app-pro-openweather/61482/305 "2023-09-13T16:46:09Z")

</div>

I get “enter a valid API Key” error. This appears to be due to the location. I leave the location blank and I get the error…I put in Anchorage (Alaska) and it doesn’t pull up any location. If I use some random location that is available it works fine. Can’t get Anchorage Alaska to work

Is there a way to enter a lat/long instead of a city so that it makes the proper call to OpenWeather?

I can pull this directly and it returns data for America/Anchorage  
[https://api.openweathermap.org/data/3.0/onecall?lat=61.2181&lon=-149.9003&appid=MYKEYHERE](https://api.openweathermap.org/data/3.0/onecall?lat=61.2181&lon=-149.9003&appid=MYKEYHERE)

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [September 13, 2023, 5:07pm UTC](https://community.homey.app/t/app-pro-openweather/61482/308 "2023-09-13T17:07:32Z")

</div>

Hi,  
I assume…

- we are talking about the OneCall-API,
- you already created an OneCall API key that’s already active (needs some hours)
- and you are trying to add this device?  
 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/b/2ba838590974e0294c5723d64f13ce24073002e2.png)

Insert you key and leave the location empty. Then the device uses your Homey Lan/Lot position (from Homey settings):

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/d/7d7ba0d7870406712b4aff045e656424eb8eec7e.png)

![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/d/fdf74784a10bfc734a8032ce6ff72ba6ea62fe75.png)

You can change the Lan/Lot in device settings afterwards.

I get the following entries:  
 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/f/dfe5e72afe9130529a24e8778505c7c4dc848c55.png)

Problem: OWM only returns 5(!) entries as result. If there are more than 5 cities with the same name, only the first 5 are displayed.

Using this search phrase, the autocomplete field doen’t show a result, but going forward in pair view you get a list of canadian cities:

![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/8/f87d9a397d1417c25132fc687c3c3548f8f220ea.png)

![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/7/8724f85b4627fe67ad060f1323aa5edc6f0b6719.png)

I hope it’s shown in this list now 🙂

…I’ll check why the autocomplete list doesn’t show these cities searching for “Anchorage,CA”…

---

<div class="post-metadata">

**Author:** ![wayupnorthguy](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wayupnorthguy/32/82880_2.png) [@wayupnorthguy](https://community.homey.app/u/wayupnorthguy)\
**Post date:** [September 13, 2023, 5:13pm UTC](https://community.homey.app/t/app-pro-openweather/61482/309 "2023-09-13T17:13:17Z")

</div>

Yes, Exactly that process but Anchorage wasn’t bringing up any locations…now it is and the station is added. The URL call worked so I knew the API was active. Strange…  
Anyway…It’s working now.  
Thanks

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [September 22, 2023, 9:40am UTC](https://community.homey.app/t/app-pro-openweather/61482/310 "2023-09-22T09:40:34Z")

</div>

New **test version 1.5.0** :

- Added new device for **historical data (and 4 day forecast) with daily summary**.  
Use this device to check amount of rain for the last days.
- Added instuctions to pair view.

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/9/3992f2fff695418dc4ec629b200129d001e28c18.png)

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/f/df2b74fb43fb6d9899f5199570d0b10a636be67a.png)

> **[OpenWeather](https://homey.app/en-us/app/nu.baretta.openweathermap/OpenWeather/)**
>
> Get current weather data and forecasts from openweathermap.org

Some hints for daily summary device:

- It uses OneCall API 3.0. You need a OneCall API key with subscription to use this device.
- To prevent unneccessary API calls you can change the period in device settings to a larger period (60min). Or you can deactivate auto update in device settings and request new data once a day using the device flow action.
- The historical data is currently limited in the app to -365 days. If there are needs to request older data, please let me know.
- Based on the API description also forecasts are allowed (up to 4 days). This should allow to read estimated rain amount (for the whole day) for upcoming days.
- Some values like rain are daily summations, other values like temperature or wind speed are maximum values.

Please keep in mind, that every added device where you have inserted an API key in pair view or device settings is calling the API in the period defined in device settings.  
If you are adding 5 devices for daily summary, every device is calling the API itself. Using a period of 5min this results in 288 calls for every device.  
If you are using several devices, increase the period or deactivate auto update and use flow actions for daily updates.

---

<div class="post-metadata">

**Author:** ![schmucke](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/schmucke/32/79913_2.png) [@schmucke](https://community.homey.app/u/schmucke)\
**Post date:** [September 22, 2023, 5:58pm UTC](https://community.homey.app/t/app-pro-openweather/61482/311 "2023-09-22T17:58:54Z")

</div>

i got a suscribtion, an i generate a new key - but it will not work:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/5/953450423c64de80686c95c480b6122ffcc52660.png)

---

<div class="post-metadata">

**Author:** ![schmucke](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/schmucke/32/79913_2.png) [@schmucke](https://community.homey.app/u/schmucke)\
**Post date:** [September 22, 2023, 6:03pm UTC](https://community.homey.app/t/app-pro-openweather/61482/312 "2023-09-22T18:03:04Z")

</div>

Ok, after a restart of the app an delete the old one, i can use this Device.

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [September 22, 2023, 6:20pm UTC](https://community.homey.app/t/app-pro-openweather/61482/313 "2023-09-22T18:20:41Z")

</div>

It can take some hours until a new key gets activated.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [September 27, 2023, 8:34am UTC](https://community.homey.app/t/app-pro-openweather/61482/314 "2023-09-27T08:34:21Z")

</div>

Is it possible to use 2 different API-Keys? F.e. the _ **OneCall 2.5** _ for current weather, hourly and daily forecast, and the _ **OneCall 3.0** _ only for historical weather?  
Because I generated a _ **OneCall 3.0** _ API key and I’m not able to add the “daily summary” device. A info is shown “Please enter a valid API key.”.

Or does it have something to do with that?

> [@RonnyW](#):
>
> It can take some hours until a new key gets activated.

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [September 27, 2023, 1:25pm UTC](https://community.homey.app/t/app-pro-openweather/61482/315 "2023-09-27T13:25:36Z")

</div>

> [@DirkG](#):
>
> Is it possible to use 2 different API-Keys?

Yes, you can. You cal also use a unique key for each device that needs a key.

I also use an old 2.5 OneCall key for the current weather and a new 3.0 for histirical data. If you use separate eMails, then the amount of calls is counted seperately. If you have several keys in your account it’s summated (as far as I read in OWM description).

Have you added your subscription data for the 3.0 key?  
If yes, than it seems it needs some time to activate the key.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [September 27, 2023, 4:01pm UTC](https://community.homey.app/t/app-pro-openweather/61482/316 "2023-09-27T16:01:44Z")

</div>

Now it works with 2 API keys. I guess the key wasn’t activated this morning.

> [@RonnyW](#):
>
> If you have several keys in your account it’s summated (as far as I read in OWM description).

Yes, that’s correct. But isn’t the _ **OneCall 2.5** _ for free?

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [September 27, 2023, 4:48pm UTC](https://community.homey.app/t/app-pro-openweather/61482/317 "2023-09-27T16:48:02Z")

</div>

> [@DirkG](#):
>
> Yes, that’s correct. But isn’t the _ **OneCall 2.5** _ for free?

Yes, but I don’t know how OWM counts in case of two OneCall keys in one account (2.5 and 3.0). I would assume 2.5 has its own 1000 calls free and then gets rate limited, and the 3.0 has also 1000 calls and gets billed then. But I haven’t tried this combination.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [September 30, 2023, 10:38am UTC](https://community.homey.app/t/app-pro-openweather/61482/318 "2023-09-30T10:38:24Z")

</div>

Hi @RonnyW, this “Last 24 hours” insights screenshot shows the rainfall in mm from yesterday:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/a/fa7f16bf11695577db21d2451180721e2c2d35f8.png)

That the rainfall amount from yesterday is displayed today, is absolutely clear. But why drops the amount from 5.60 mm to 1.74 mm at 4 am?  
In my opinion the yesterdays rainfall amount with about 5.60 mm has to be displayed the complete day, so from midnight to midnight.

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [September 30, 2023, 11:23am UTC](https://community.homey.app/t/app-pro-openweather/61482/319 "2023-09-30T11:23:15Z")

</div>

Yes, you are right. I would expect the same value for 24h.  
OWM only uses the date as request parameter, not an UTC timestamp like used in other requests.  
I try to log the value and the date to compare these values. The first capability in device details should change at 00:00h and shouldn’t change until the next day.  
If that’s the case it seems OWM adjusted the value during the day (like for daily forecast with offset of 0 days).

Then it could be best to deactivate the auto update and do a single update via flow at 01:00 for example.

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [October 6, 2023, 12:41pm UTC](https://community.homey.app/t/app-pro-openweather/61482/320 "2023-10-06T12:41:52Z")

</div>

I logged the OWM data updates during the last days and it seems OWM updates the data at 0:00 and 4:00. But I don’t know which data is correct (no rain the last days).

 ![Screenshot_20231006_143623_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/f/df6103df6b794f6782c118ac3bfb17db7a929b33.jpeg)

The date for data request is the local date (changes at local tom 0:00). I thought perhaps it’s something with timezone differences, but in this case the difference should be 2h and not 4h. 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [October 7, 2023, 7:35am UTC](https://community.homey.app/t/app-pro-openweather/61482/321 "2023-10-07T07:35:53Z")

</div>

Interesting. In my case the amount of rain between 0:00 - 4:00 should be right, so about 5.6 mm. Because I measured approximately the same amount with my Netatmo Rain Sensor. It was about 5.4 mm ([Link](https://community.homey.app/t/automatisierte-bewasserung-mit-advanced-flows/89407/25)).  
That means, that the value after 4:00 isn’t correct. The question is: Why?

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [October 7, 2023, 8:17am UTC](https://community.homey.app/t/app-pro-openweather/61482/322 "2023-10-07T08:17:34Z")

</div>

Yes, the value available from 0:00 to 4:00 is correct.  
So best would be to deactivate auto update for this device and update once a day from a flow.

I wonder if it’s caused by DWD data or if it’s general OWM issue.  
Means: Is is working right in other countries with different weather provider?

---

<div class="post-metadata">

**Author:** ![Ostys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ostys/32/71829_2.png) [@Ostys](https://community.homey.app/u/Ostys)\
**Post date:** [October 22, 2023, 3:20pm UTC](https://community.homey.app/t/app-pro-openweather/61482/324 "2023-10-22T15:20:49Z")

</div>

At first: Yes, I’ve an API-Key for the “one call Api 3.0” and activated it.

But I’ve an issue with the hourly forecast for some parameters. Temperature, description and some other are running fine. But the value i need, cloudiness, shows the same value for the next 23 hours (shown at the “status indicator”). And that can’t be correct, cause the description is changing.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/4/74690785b92254bcf8b9f906404db8793bac28a3.png)

I tried it by updating with the auto-update / polling active/interval and also / only with a flow. Nothing works.

Any ideas why I’m not able to get the correct values for the hourly forecast? Thanks a lot!

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [October 22, 2023, 4:26pm UTC](https://community.homey.app/t/app-pro-openweather/61482/325 "2023-10-22T16:26:01Z")

</div>

Thanks for reporting. Could be a bug caused by the code cleanup some weeks ago. I will check this and give you a feedback.

[Previous page](https://community.homey.app/t/app-pro-openweather/61482.md?page=15)

[Next page](https://community.homey.app/t/app-pro-openweather/61482.md?page=17)
