weather.com won`t work without API key in WeatherComJSONVariables.inc
so i think they trottle all over free limits:
Free Plan:
Current Weather API: 50 requests per day
Hourly Forecast API: 100 requests per day
Daily Forecast API: 50 requests per day
Historical Weather API: 50 requests per day
It is currently September 8th, 2024, 4:39 am
Translation of weather skin
-
- Posts: 7
- Joined: December 10th, 2023, 9:59 pm
-
- Rainmeter Sage
- Posts: 16499
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Translation of weather skin
Good point, which I didn't realize at a first look.Yincognito wrote: ↑December 12th, 2023, 4:34 am In the other variants from that skin though, the Update is set to 30 instead of 1000 for the animations to work, and that's what is driving taking data from weather.com to that insane interval of 600 × 30 = 18000 ms = 18 seconds, which is not only preposterous (weather doesn't change every 18 seconds, not even on the surface of the Sun, if we disregard flares), but could lead the site to ban either such skins or the Rainmeter's WebParser plugin header as a whole from accessing the site or the JSON. Just 1000 users of those variants would make up roughly 5000000 requests per day...
![Thumbs Up :thumbup:](./images/smilies/ay.gif)
Additionally still sustain none of the skins of that package is working. Am I mistaking something? Do those skins work?
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Translation of weather skin
Actually, the system in that skin - and many others - won't work without an API key, since they retrieve data exclusively from the JSON itself. Such a key is not needed if getting data from the webpage as an alternative.aquaxetinez wrote: ↑December 12th, 2023, 5:32 am weather.com won`t work without API key in WeatherComJSONVariables.inc
so i think they trottle all over free limits:
Free Plan:
Current Weather API: 50 requests per day
Hourly Forecast API: 100 requests per day
Daily Forecast API: 50 requests per day
Historical Weather API: 50 requests per day
But that's not the point, updating weather every 18 seconds is and would be considered an abuse and have the very real potential to negatively affect the overwhelming majority of Rainmeter users that grab stuff from weather.com anyway, irrespective of the free limits on paper.
This behavior must be corrected by that skin's designer (and others who might make such probably unintentional mistakes in their skins) so that the rest of us don't have to pay for their mistakes in the future, and it's very easy to do so...
- in each .ini variant of the skin:
Code: Select all
[Variables]
Update=<DesiredUpdate>
@Include...=...WeatherComJSONVariables.inc
...
[Rainmeter]
Update=#Update#
...
Code: Select all
...
UpdateRate=(1000/#Update#*<DesiredUpdateRate>)
...
In other words, if 600 is used for <DesiredUpdateRate> above, then any .ini variant would retrieve weather data once every 10 minutes, irrespective of whether the update of that .ini is 1000, 30 or otherwise - assuming the UpdateRate formula has the above form. It's easy, flexible and light on the source site at the same time and it would be irresponsible not to be implemented in such case.
Do as you wish, but if you're not, folks will probably come here all sad in the future that they can't get data from weather.com anymore, because of a few instances where the code was improperly written to avoid excessive polling of sites, and the answer will most likely be "I told you so".
![Confused :confused:](./images/smilies/bn.gif)
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Translation of weather skin
I only briefly tested an Update=30 variant from that package, but yeah, it didn't work for me either - I mentioned this detail earlier as well. Didn't bother to test the other variants and I wouldn't recommend it to anyone (at least not before it's corrected), given the downright disaster inviting polling for weather data in all but one variant from that skin.
![Uh UH :uhuh:](./images/smilies/bl.gif)
-
- Rainmeter Sage
- Posts: 16499
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Translation of weather skin
Right. However my question / comment related to the not-working skin(s) was addressed to aquaxetinez, who seems to get the skins working.Yincognito wrote: ↑December 12th, 2023, 6:11 pm I only briefly tested an Update=30 variant from that package, but yeah, it didn't work for me either - I mentioned this detail earlier as well. Didn't bother to test the other variants and I wouldn't recommend it to anyone (at least not before it's corrected), given the downright disaster inviting polling for weather data in all but one variant from that skin.![]()
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Translation of weather skin
Ah, alright, my bad, just tried to explain everything everywhere, I often attempt that, lol. Until the OP clarifies how or what is actually working on his end, I guess the answer is going to be a mystery, so we'll just have to wait for him to reveal it...
![Confused :???:](./images/smilies/bw.gif)
-
- Posts: 7
- Joined: December 10th, 2023, 9:59 pm
Re: Translation of weather skin
https://forum.rainmeter.net/viewtopic.php?t=39617
You need to change API key to this one, have no idea where did they get it, but with new API key this weather widget works.
API located in WeatherComJSONVariables.inc
You need to change API key to this one, have no idea where did they get it, but with new API key this weather widget works.
API located in WeatherComJSONVariables.inc
-
- Rainmeter Sage
- Posts: 16499
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Translation of weather skin
Right, now I got it working.aquaxetinez wrote: ↑December 12th, 2023, 7:48 pm You need to change API key to this one, have no idea where did they get it, but with new API key this weather widget works.
Did you try applying SilverAzide's idea?aquaxetinez wrote: ↑December 10th, 2023, 10:02 pm Trying to translate weather status, where i need to put this to work? Already tried all files
-
- Posts: 7
- Joined: December 10th, 2023, 9:59 pm
Re: Translation of weather skin
Trying to implement @CurrentConditionsShort right now, but still work in progress)
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Translation of weather skin
Just so you know, like SilverAzide alluded to as well, the short texts are made of occasional abbreviations and stripping off various letters for that purpose, and they might not always be what you want in a skin, unless for personal use and being familiar with those abbreviations yourself. The medium texts could be a better option if you prefer not having to decipher what stuff means in more extreme cases, but of course, that's up to you.aquaxetinez wrote: ↑December 12th, 2023, 8:12 pm Trying to implement @CurrentConditionsShort right now, but still work in progress)
Even so, these short and medium forms are usually available only for English and might depend on localization. I was confronted with these particularities myself in my skins (where space is at a premium by design), and eventually decided to just use a marquee system and slide the normal texts to make sure things work and are intelligible in every possible scenario that a user would be in. One drawback with doing that would be a slight increase in the CPU usage of the skin, depending on its size and various other factors specific to animating things in a skin.
It's your decision, I just thought you should know this before trying it, just to avoid any surprises going forward.
![Smiler :)](./images/smilies/ab.gif)
Last edited by Yincognito on December 12th, 2023, 8:56 pm, edited 1 time in total.