-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weather module (yr) stops after a while #3296
Comments
as you already suggests "error response from YR" this sounds like problems on their side or they may restrict access if there are to many requests. You can try with an increased update interval. @rejas is it possible to improve the code so that the weather module starts working again after such errors? |
other weather providers and calendar module have the same problem. limited error recovery |
probably :-) but since I am still recovering from surgery I dont think I can cook something up until the next release. |
Yes, I agree it's from their side. Their API says they reply with a 429 error message if they feel like you're sending too often. I already tried limiting my api calls by lowering the forecast api calls ( |
@Jessendelft your delay is only 120 seconds the delay is milliseconds 5 or 10 minutes might be better 10 * 60 * 1000 |
Well I'll be damned... That was supposed to be 10 and ~20 minutes. Forgot a 0, and that should hopefully fix my issue of too many requests. I'll let you know. |
no, tested this, all other providers and calendar will recover with next update interval if there were fetch problems. The yr provider is special, it caches data in local storage in the browser. I deactivated my internet connection and even after browser restart (cached) yr data is displayed. Will not look deeper into this, its a nightmare to debug. |
Just to confirm, the error still pops up even with my intended delays of 10 and ~20 minutes for my two weather modules. So it's still an issue, and I'd appreciate a fix that recovers from an empty response. |
Running the latest MM v2.25.00 with the YR weather fix from #3227
I have 2 weather modules, 1 which shows the current weather and 1 that shows the forecast with the following config:
// Weather now { module: "weather", position: "top_right", config: { weatherProvider: "yr", type: "current", initialLoadDelay: 1000, updateInterval: 60000, appendLocationNameToHeader: false, onlyTemp: false, showWindDirection: false, showSun: false, lat: xx.xxxx, lon: xx.xxxx, altitude: 111 } }, // Daily forecast { module: "weather", position: "top_right", config: { weatherProvider: "yr", type: "daily", initialLoadDelay: 3000, updateInterval: 120630, appendLocationNameToHeader: false, maxNumberOfDays: 7, fade: true, fadepoint: 0.25, lat: xx.xxxx, lon: xx.xxxx, altitude: 111 }, },
After the module starts it stalls after a while, unsure how long after but within the same day.
I looked at the dev_tools, and this is the error log:
For some reason it gets an error response from YR, which causes the module to stop updating.
The text was updated successfully, but these errors were encountered: