BeoCode/Weather
Archived
6
0
Fork
You've already forked Weather
11

OpenWeather reports "extensive use" [CRITICAL BUG] #42

Closed
opened 2022年08月14日 20:04:29 +02:00 by strider72 · 41 comments

Summary

OpenWeather is cutting off my data due to "extensive use".

I have been receiving emails from OpenWeather that say:

We have noticed that your account is currently using One Call API quite intensively and exceed the account limit of 1000 calls per day.

They want me to upgrade to a paid plan because of so much data use, and I'm now no longer loading new data.

BeoWeather (with widgets) on a single device is the only app I have using my API code. I have two Weather widgets running.

Environment data

Pixel 4A running CalyxOS. All OS and app updates are current.

cc @Beowulf

### Summary OpenWeather is cutting off my data due to "extensive use". - I have been receiving emails from OpenWeather that say: > We have noticed that your account is currently using One Call API quite intensively and exceed the account limit of 1000 calls per day. They want me to upgrade to a paid plan because of so much data use, and I'm now no longer loading new data. BeoWeather (with widgets) on a single device is the only app I have using my API code. I have two Weather widgets running. ### Environment data Pixel 4A running CalyxOS. All OS and app updates are current. cc @Beowulf

Hello,

first of all, I recommend that you create a new API key via the OWM web interface and deactivate the old one.

Weather makes more than 1000 requests per day is (/should be) impossible (for one person).
The app makes one request each time it is started and when you have widgets at the specified interval (the default is 15 minutes (I think)), whereby the widgets are only updated when the screen is on.
The app also only makes one request for all widgets together.

Kind regards
Beowulf

Hello, first of all, I recommend that you create a new API key via the OWM web interface and deactivate the old one. Weather makes more than 1000 requests per day is (/should be) impossible (for one person). The app makes one request each time it is started and when you have widgets at the specified interval (the default is 15 minutes (I think)), whereby the widgets are only updated when the screen is on. The app also only makes one request for all widgets together. Kind regards Beowulf

I just got this email from the Openweathermap.org people today. I believe this is the only app using my API key, but I will disable the key and create a new one when they unblock me and see if they send me another nastygram.

  • Android 13
  • Pixel 5
  • One widget
  • Pear launcher
I just got this email from the Openweathermap.org people today. I believe this is the only app using my API key, but I will disable the key and create a new one when they unblock me and see if they send me another nastygram. - Android 13 - Pixel 5 - One widget - Pear launcher

To be on the safe side, I will look at it in the next few days and also contact OWM to see if they have lowered the limit significantly.

To be on the safe side, I will look at it in the next few days and also contact OWM to see if they have lowered the limit significantly.

I got the same issue. Allready created an new token and deleted the old, still I get the issue fomr time to time (serveral days a month).

I got the same issue. Allready created an new token and deleted the old, still I get the issue fomr time to time (serveral days a month).

I've just had the same email from OWM, that I've been making over 1000 API calls per day.
I've been using the Weather app and this API key since Sept 2021, and never had an issue before.

Is there a way to check whether the (presumably) hundreds of API calls are in fact being made from my device?
This could help spot whether the issue is local (ie the app) or on the OMW end.

Only one widget, but with 4 locations (Cities) enabled in Global.
Android 10
Fairphone 2
Nova Launcher

I've just had the same email from OWM, that I've been making over 1000 API calls per day. I've been using the Weather app and this API key since Sept 2021, and never had an issue before. Is there a way to check whether the (presumably) hundreds of API calls are in fact being made from my device? This could help spot whether the issue is local (ie the app) or on the OMW end. Only one widget, but with 4 locations (Cities) enabled in Global. Android 10 Fairphone 2 Nova Launcher

Hello, unfortunately I can't test it at the moment because I don't have a mobile phone.

But it should be possible to test it with Netguard, for example, if you activate request logging there.

The city list runs via a different API and does not count towards the limit.

However, as soon as I have a mobile phone again, I will check if it is maybe related to the change of the widgets with user-defined update interval.

Hello, unfortunately I can't test it at the moment because I don't have a mobile phone. But it should be possible to test it with Netguard, for example, if you activate request logging there. The city list runs via a different API and does not count towards the limit. However, as soon as I have a mobile phone again, I will check if it is maybe related to the change of the widgets with user-defined update interval.

Same problem on Samsung S9 plus
android 10
cpl launcher

Same problem on Samsung S9 plus android 10 cpl launcher

Don't know if it can help, but I notice that Openweathermap email is jsut before 7:00 pm
From midnight to 7pm:
19h * 60 = 1140

Does the app refresh data every minute ? And when the screen is on ?
Is there a way to reduce refreshing time ?

JeLeB

Don't know if it can help, but I notice that Openweathermap email is jsut before 7:00 pm From midnight to 7pm: 19h * 60 = 1140 Does the app refresh data every minute ? And when the screen is on ? Is there a way to reduce refreshing time ? JeLeB

May be another interesting information: It seems that when I'm not connected to wifi during the day, the limit of 1000 calls is later (today 8:30pm)
Perhaps the wifi and not wifi refreshing delay is not the same ?

May be another interesting information: It seems that when I'm not connected to wifi during the day, the limit of 1000 calls is later (today 8:30pm) Perhaps the wifi and not wifi refreshing delay is not the same ?

Here is a detailed breakdown of when the app did/should do updates:
There are two situations.

  1. no widgets:
    The app only updates when you open the app or the app is open in the foreground for more than 30 min.
  2. X widgets:
    Here it gets a bit more complicated.
    First, everything from point 1 applies, but in addition it also applies:
    • You can set the update interval when placing a widget. This applies to all widgets.
    • In this interval, all widgets are updated, BUT only if the display is switched on, otherwise the update is simply skipped.
Here is a detailed breakdown of when the app did/should do updates: There are two situations. 1. **no widgets:** The app only updates when you open the app or the app is open in the foreground for more than 30 min. 2. **X widgets:** Here it gets a bit more complicated. First, everything from point 1 applies, but in addition it also applies: - You can set the update interval when placing a widget. This applies to all widgets. - In this interval, all widgets are updated, BUT only if the display is switched on, otherwise the update is simply skipped.

I have not yet found an error that may have crept in. However, I will be investigating the problem in detail over the next week, although I still think that it is coming from OWM, as I share my key with someone else, for example, and we both have widgets on and have no problems...

I have not yet found an error that may have crept in. However, I will be investigating the problem in detail over the next week, although I still think that it is coming from OWM, as I share my key with someone else, for example, and we both have widgets on and have no problems...

I'm sorry that there is no information here, but I don't have this problem (A12 Stock, A13 Stock, A13 CalyxOS, A12 LineageOS) - and cannot reproduce it.
As an example, I have now created 3 widgets and set the update interval to 2 minutes and it behaves exactly as expected - one request is made for all widgets every 2 minutes.
Will add the "not reproducible" tag for now.

I'm sorry that there is no information here, but I don't have this problem (A12 Stock, A13 Stock, A13 CalyxOS, A12 LineageOS) - and cannot reproduce it. As an example, I have now created 3 widgets and set the update interval to 2 minutes and it behaves exactly as expected - one request is made for all widgets every 2 minutes. Will add the "not reproducible" tag for now.

Additional question: Did you set the update interval manually and if so, what did you set it to?

Additional question: Did you set the update interval manually and if so, what did you set it to?

Same issue here. Various LOS versions. App version 3.19.1. Single device, one widget (the one with the clock). On at least my 3rd API key now (deactivated the rest). Update interval was on 60 minutes.

Same issue here. Various LOS versions. App version 3.19.1. Single device, one widget (the one with the clock). On at least my 3rd API key now (deactivated the rest). Update interval was on 60 minutes.

How do you set the update interval ?
I don't have it in UI

How do you set the update interval ? I don't have it in UI

Since a few versions, the interval can be set when placing a widget or editing an existing one.

Since a few versions, the interval can be set when placing a widget or editing an existing one.

I have one widget with interval 15. I made an API key a few months ago and connected nothing to it. I got no emails from OpenWeather during that time. A couple of days ago I reinstalled the app and added one widget with a 15 minute interval and got a usage alert from OWM just now. I'm using Pear launcher on GrapheneOS, which is Android 13.

I have one widget with interval 15. I made an API key a few months ago and connected nothing to it. I got no emails from OpenWeather during that time. A couple of days ago I reinstalled the app and added one widget with a 15 minute interval and got a usage alert from OWM just now. I'm using Pear launcher on GrapheneOS, which is Android 13.

Meanwhile, I think OWM just wants to push all the people away from the (old) free plan.
Especially because the last update was (unfortunately) 6 months ago and most reports came notably later than this release.

Meanwhile, I think OWM just wants to push all the people away from the (old) free plan. Especially because the last update was (unfortunately) 6 months ago and most reports came notably later than this release.

Just some stats; I received Call service usage alerts on the following dates:
2022年06月30日
2022年07月13日
2022年07月15日
2022年07月17日
2022年12月28日
2022年12月31日
2023年01月22日

I probably updated to 3.19 on or a day after 2022年07月09日.

Just some stats; I received Call service usage alerts on the following dates: 2022年06月30日 2022年07月13日 2022年07月15日 2022年07月17日 2022年12月28日 2022年12月31日 2023年01月22日 I probably updated to 3.19 on or a day after 2022年07月09日.

I am closing the ticket now and mark it as "external bug", because I see the problem at OWM.
However, you are welcome to send new messages here if there is something new...

I am closing the ticket now and mark it as "external bug", because I see the problem at OWM. However, you are welcome to send new messages here if there is something new...

A shame. My app last updated on the 19th, so clearly no longer useful so long as this persists. No issue with Geometric Weather, which I believe uses the same data source.

FYI, I was getting the notices for quite a while before I reported it. it didn't start six months ago.

At any rate, it's a great app other than this. Sorry OWM are pulling the rug out

A shame. My app last updated on the 19th, so clearly no longer useful so long as this persists. No issue with Geometric Weather, which I believe uses the same data source. FYI, I was getting the notices for quite a while before I reported it. it didn't start six months ago. At any rate, it's a great app other than this. Sorry OWM are pulling the rug out

Yes, I think OWM calculates a certain factor on the requests. If you disable all widgets, or enter an extremely high update interval there, then it should hopefully stay under the limit even with the "factor".

I'll try to start the rewrite in the middle/end of next month (after the exam period). I'll try to do it "fast" to get a first alpha/beta version out quickly, which will then use new APIs (and also support several).
Feel free to suggest APIs here if you know any.

Yes, I think OWM calculates a certain factor on the requests. If you disable all widgets, or enter an extremely high update interval there, then it should hopefully stay under the limit even with the "factor". I'll try to start the rewrite in the middle/end of next month (after the exam period). I'll try to do it "fast" to get a first alpha/beta version out quickly, which will then use new APIs (and also support several). Feel free to suggest APIs [here](https://codeberg.org/BeoCode/Weather/issues/46) if you know any.

I noticed that the email from OpenWeather always arrives after I restart the phone.

I am no expert in Kotlin, but it seems to me that WidgetConfigurationActivity.kt thinks that parameter "widget-update" is in minutes (line 66 onwards), while WidgetProvider.kt expects milliseconds (line 121). Can this be related?

I noticed that the email from OpenWeather always arrives after I restart the phone. I am no expert in Kotlin, but it seems to me that WidgetConfigurationActivity.kt thinks that parameter "widget-update" is in _minutes_ (line 66 onwards), while WidgetProvider.kt expects _milliseconds_ (line 121). Can this be related?

@oldnomad In line 131, the minutes are converted to milliseconds and then processed further...

@oldnomad In line [131](https://codeberg.org/BeoCode/Weather/src/branch/main/app/src/main/java/de/beowulf/wetter/widget/WidgetConfigurationActivity.kt#L131), the minutes are converted to milliseconds and then processed further...

@oldnomad In line 131, the minutes are converted to milliseconds and then processed further...

Yes, of course. But in WidgetProvider there's no conversion, it simply expects the parameter to be in milliseconds.

> @oldnomad In line [131](https://codeberg.org/BeoCode/Weather/src/branch/main/app/src/main/java/de/beowulf/wetter/widget/WidgetConfigurationActivity.kt#L131), the minutes are converted to milliseconds and then processed further... Yes, of course. But in [WidgetProvider](https://codeberg.org/BeoCode/Weather/src/branch/main/app/src/main/java/de/beowulf/wetter/widget/WidgetProvider.kt#L121) there's no conversion, it simply expects the parameter to be in milliseconds.

Mmh, your correct. I need to take a closer look, when the enabled function is called. It's e.g. called, when a new widget is placed, but then I overwrite the value again anyway.
For the moment I will open the ticket again...

Mmh, your correct. I need to take a closer look, when the enabled function is called. It's e.g. called, when a new widget is placed, but then I overwrite the value again anyway. For the moment I will open the ticket again...
Beowulf 2023年02月05日 21:19:28 +01:00
  • reopened this issue
  • added the
    to do
    label

Don't know if it help: I removed all the towns I configured, then I didn't have any mails from OWM...

Don't know if it help: I removed all the towns I configured, then I didn't have any mails from OWM...

@jeleb Do you mean the cities in the multi-city view?

@jeleb Do you mean the cities in the multi-city view?

@Beowulf yes
please excuse my poor english 😓

@Beowulf yes please excuse my poor english 😓

No problem, I don't speak english native either.
And exactly after you have removed the cities, the warnings have surely disappeared? Well, that makes no sense at all, because a completely different API is used for the city list, which does not count towards the limits.

No problem, I don't speak english native either. And exactly after you have removed the cities, the warnings have surely disappeared? Well, that makes no sense at all, because a completely different API is used for the city list, which does not count towards the limits.

exact ! I had 5 cities in the list.
The last email from owm was january the 5th.
But, when I saw the city list, all data from each city were up to date, no ?

exact ! I had 5 cities in the list. The last email from owm was january the 5th. But, when I saw the city list, all data from each city were up to date, no ?

Yes, this should be the case even if the main city does not load because the limit has been exceeded.

Yes, this should be the case even if the main city does not load because the limit has been exceeded.
Beowulf added this to the 3.20 milestone 2023年02月08日 23:39:54 +01:00

Released a beta version.
I would be happy if you could test it (you can get it as an update from my F-Droid repo (https://fdroid.beocode.eu/) - soon also here on Codeberg, if you have installed the app before from PlayStore, Codeberg or my repo, otherwise there should be a pre-release in F-Droid in a few days).

Released a beta version. I would be happy if you could test it (you can get it as an update from my F-Droid repo (https://fdroid.beocode.eu/) - soon also here on Codeberg, if you have installed the app before from PlayStore, Codeberg or my repo, otherwise there should be a pre-release in F-Droid in a few days).

@Beowulf i've been using the beta for several days. so far no emails from openweather.

@Beowulf i've been using the beta for several days. so far no emails from openweather.

Thank you, sorry for the delay put it now in stable...

Thank you, sorry for the delay put it now in stable...

still no nastygrams from openweathermap, tyvm 😊 not to backseat code but i always get units mixed up when using bare quantities so i like to use duration types and such

still no nastygrams from openweathermap, tyvm 😊 not to backseat code but i always get units mixed up when using bare quantities so i like to use duration types and such

What do you mean with "i always get units mixed up when using bare quantities so i like to use duration types and such" - Will the units you set be reset? Then please open a new ticket.

What do you mean with "i always get units mixed up when using bare quantities so i like to use duration types and such" - Will the units you set be reset? Then please open a new ticket.

apologies for the confusion, i was writing about coding, not the ui of your app. i was just saying i like to use types like Duration rather than bare numbers with implied units because i always forget the unit across api boundaries

apologies for the confusion, i was writing about coding, not the ui of your app. i was just saying i like to use types like Duration rather than bare numbers with implied units because i always forget the unit across api boundaries

Yes, hopefully everything will be better in the new app 😄

Yes, hopefully everything will be better in the new app 😄

Sadly OWM cut off my API key, so no more data for me :-(

Sadly OWM cut off my API key, so no more data for me :-(

Try sending them an email. In the past they usually reactivated it.

Try sending them an email. In the past they usually reactivated it.
Commenting is not possible because the repository is archived.
No Branch/Tag specified
main
translation
3.21-pre1
3.20
3.20-pre2
3.20-pre1
3.19.1
3.19
3.18.1
3.18
3.17
3.17-pre2
3.17-pre1
3.16
3.16-pre1
3.15
3.15-pre1
3.14
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
8 participants Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BeoCode/Weather#42
Reference in a new issue
BeoCode/Weather
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?