It is currently April 27th, 2024, 3:51 pm

Open-Meteo Weather API

Weather skins
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Open-Meteo Weather API

Post by eclectic-tech »

@Yincognito That's more than I wanted to do ;-), and is how it should have been coded originally. :thumbup:
User avatar
Yincognito
Rainmeter Sage
Posts: 7177
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Open-Meteo Weather API

Post by Yincognito »

eclectic-tech wrote: January 23rd, 2024, 2:56 pm @Yincognito That's more than I wanted to do ;-), and is how it should have been coded originally. :thumbup:
Sure thing - I sometimes have the same approach. The info you provided was in any case more than enough to give a suggestion about what the user (or the original developer of the skin) should have done to solve this. It certainly helped me in posting the above, without having to "scan" all the lines in the code. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
ravv3
Posts: 47
Joined: January 23rd, 2024, 12:55 am
Location: London

Re: Open-Meteo Weather API

Post by ravv3 »

Yincognito wrote: January 23rd, 2024, 2:49 pm Yeah, looking at the code, I think that is the problem: it gives the max temp for the current day, when the user normally expects the current temperature. Just tested the skin myself and it is indeed off because of that. The solution would be to change:

Code: Select all

RegExp=(?siU)"cloudCoverPhrase":"(.*)".*{"calendarDayTemperatureMax":\[(.*),.*"city":"(.*)".*
in [MeasureWeather] to:

Code: Select all

RegExp=(?siU)"cloudCoverPhrase":"(.*)".*"temperature":(.*),.*"city":"(.*)".*
Thanks yes, that has sorted out the temp to current temp. I have also changed this value in [MeasureWeather]:

Code: Select all

UpdateRate=100
from 600 to see if it updates quicker (or at all).
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Open-Meteo Weather API

Post by eclectic-tech »

ravv3 wrote: January 23rd, 2024, 4:55 pm {clip}I have also changed this value in [MeasureWeather]:

Code: Select all

UpdateRate=100
from 600 to see if it updates quicker (or at all).
The source (weather.com) updates their data every 15 minutes so setting this to check every ~2 minutes is not needed.
I would leave it at UpdateRate=600 so it checks every 10 minutes.
User avatar
Yincognito
Rainmeter Sage
Posts: 7177
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Open-Meteo Weather API

Post by Yincognito »

ravv3 wrote: January 23rd, 2024, 4:55 pm Thanks yes, that has sorted out the temp to current temp. I have also changed this value in [MeasureWeather]:

Code: Select all

UpdateRate=100
from 600 to see if it updates quicker (or at all).
Excellent! Just be sure to set back that update to a reasonable value once you find out if it updates. There's no point in updating every less than 2 minutes unless you're boiling water nearby and want to know when you'll get burned, lol. If everyone was setting their updates to such (or even worse) frequencies, I'm pretty sure Rainmeter users wouldn't enjoy retrieving the weather from various sources for too long before such services become unavailable for us, if you get what I mean - same for Nominatim that provides the geolocation...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
ravv3
Posts: 47
Joined: January 23rd, 2024, 12:55 am
Location: London

Re: Open-Meteo Weather API

Post by ravv3 »

eclectic-tech wrote: January 23rd, 2024, 5:01 pm The source (weather.com) updates their data every 15 minutes so setting this to check every ~2 minutes is not needed.
I would leave it at UpdateRate=600 so it checks every 10 minutes.
Yincognito wrote: January 23rd, 2024, 5:10 pm Excellent! Just be sure to set back that update to a reasonable value once you find out if it updates. There's no point in updating every less than 2 minutes unless you're boiling water nearby and want to know when you'll get burned, lol. If everyone was setting their updates to such (or even worse) frequencies, I'm pretty sure Rainmeter users wouldn't enjoy retrieving the weather from various sources for too long before such services become unavailable for us, if you get what I mean...
Will do, i'm just setting it back to 600 now. :thumbup:
User avatar
ravv3
Posts: 47
Joined: January 23rd, 2024, 12:55 am
Location: London

Re: Open-Meteo Weather API

Post by ravv3 »

I can confirm it now works properly! I've compared it to another installed skin with a weather widget, I think that grabs info from the same source.

Thanks guys! :great:
User avatar
Yincognito
Rainmeter Sage
Posts: 7177
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Open-Meteo Weather API

Post by Yincognito »

ravv3 wrote: January 23rd, 2024, 5:14 pm Will do, i'm just setting it back to 600 now. :thumbup:
ravv3 wrote: January 23rd, 2024, 5:28 pm I can confirm it now works properly! I've compared it to another installed skin with a weather widget, I think that grabs info from the same source.

Thanks guys! :great:
Thanks for letting us know. Always glad to help! :great:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Open-Meteo Weather API

Post by eclectic-tech »

DITTO :FingerUp
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Open-Meteo Weather API

Post by eclectic-tech »

UPDATE: V1.2024.01.24

Updated Open-Meteo Weather rmskin package, updated Open-Meteo Win10 Weather rmskin package, and updated the @includeFiles.zip to correct for missing "Snow Flurries" icon substitution.

Download the updated files from the first post.