It is currently October 15th, 2024, 12:11 am

Open-Meteo Weather API

Weather skins
User avatar
Yincognito
Rainmeter Sage
Posts: 8467
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Open-Meteo Weather API

Post by Yincognito »

yuo wrote: May 2nd, 2024, 11:05 am I am new on Rainmeter in general and I WANT TO MAKE THIS WIDGET WORK. i am still honestly getting a gist of these codes and whatsoever. Can someone help me customize this skin to make it work :-( :-( :-(
The "wxdata" way to retrieve weather data that you have in that skin is obsolete for a long time now, and won't work anymore. Here's a tutorial by eclectic-tech on how to create a weather skin from scratch, which you can easily adapt for an existing skin like yours:
https://forum.rainmeter.net/viewtopic.php?t=36016
Basically, it's just about copying those .inc files to your skin, having the corresponding @include options in the code to use them, and then referencing whatever @SomeMeasure measure you need to get weather data. Such a measure would be one of the measures listed here:
https://forum.rainmeter.net/viewtopic.php?t=34628
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
yuo
Posts: 4
Joined: May 2nd, 2024, 11:02 am

Re: Open-Meteo Weather API

Post by yuo »

I am aiming to use Open-Meteo API, but I still tried to follow the methods u said but It's still not working, plus I spent hours created a weather widgets that displays Letters IM LITERALLY CRYING :? :? help a boy out please good sir :rosegift: :rosegift:
User avatar
Yincognito
Rainmeter Sage
Posts: 8467
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Open-Meteo Weather API

Post by Yincognito »

yuo wrote: May 3rd, 2024, 6:07 am I am aiming to use Open-Meteo API, but I still tried to follow the methods u said but It's still not working, plus I spent hours created a weather widgets that displays Letters IM LITERALLY CRYING :? :? help a boy out please good sir :rosegift: :rosegift:
Sorry about that, was a little tired yesterday when replying and I referred to the WeatherCom API instead of the Open-Meteo one. That being said, you have all the instructions you need to either create or convert a skin to use the Open-Meteo API on the first page of this thread, and they are not that different from the WeatherCom API ones.

So, just extract the contents of the @includeFiles.zip linked on that page to your @Resources folder in your skin, and then use something like this in Mini_weather.ini file:

Code: Select all

[Variables]
@includeVariables=#@#OpenMeteoAPIVariables.inc
@includeTranslation=#@#OpenMeteoAPIEnglish.inc

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

---Measures---

@includeForecast=#@#OpenMeteoAPIMeasures5Day.inc

---Meters---

[LargeShape]
Meter=Shape
Shape=Rectangle 0,0,308,100 | Fill LinearGradient Gradient | StrokeWidth 0
Gradient=90 | 50,50,50,200 ; 0.0 | 100,100,100,150 ; 1.0
Padding=2,2,2,2
AntiAlias=1

[MeterCondition]
Meter=String
MeasureName=@CurrentConditions
ClipString=1
W=200
X=15
Y=25
FontFace=Planer
FontSize=20
FontColor=255,255,255
AntiAlias=1

[MeterLocation]
Meter=String
MeasureName=@LocationName
X=2r
Y=60
FontFace=Planer
FontSize=12
FontColor=255,255,255
AntiAlias=1

[Divider]
Meter=Image
SolidColor=255,255,255,150
X=228
Y=15
H=75
W=2
AntiAlias=1

[Icon]
Meter=Image
MeasureName=@CurrentIcon
ImagePath=#@#Icons
X=16R
Y=15
W=50
AntiAlias=1

[MeterTemp]
Meter=String
StringAlign=Center
MeasureName=@CurrentTemperature
X=([Icon:X] + [Icon:W] / 2)
Y=R
FontFace=Planer
FontSize=16
FontColor=255,255,255
FontWeight=500
Postfix="[\x00B0]"
AntiAlias=1
For some reason, when trying to use @includeForecast=#@#OpenMeteoAPIMeasures.inc, the skin exhibits an abnormally high CPU usage, so I had to use the 5Day variant there. Yes, I know about the slight appearance of "[#]" while weather data is retrieved, but I didn't bother to workaround that, even eclectic-tech uses another string to cover that, in his sample skin from the first page of this thread. As for changing the location and such, you do it by editing the corresponding stuff in the ...\[SkinFolder]\@Resources\OpenMeteoAPIVariables.inc file. In the sample skin posted by eclectic-tech, this setting up process is a bit more user friendly, but the skin you mentioned didn't have that and was made for an entirely different weather source, i.e. the weather.com one.

I guess for more details about the inner workings of his skin structure, eclectic-tech's input would be needed. :D
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
yuo
Posts: 4
Joined: May 2nd, 2024, 11:02 am

Re: Open-Meteo Weather API

Post by yuo »

Thank you so much! I've been wanting to add this widget for a long-time now, may god bless u good sir! :givelove:
User avatar
Yincognito
Rainmeter Sage
Posts: 8467
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Open-Meteo Weather API

Post by Yincognito »

yuo wrote: May 6th, 2024, 8:14 am Thank you so much! I've been wanting to add this widget for a long-time now, may god bless u good sir! :givelove:
You're welcome, I'm glad you're satisfied with the result. Enjoy! :great:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5540
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Open-Meteo Weather API

Post by eclectic-tech »

Updated Open-Meteo Weather to V 1.2024.08.23

Corrected GeoLocation skin to properly access location data
{By updating the 'UserAgent' string in the Webparser measure to comply with Nomination access method}

Download the update package in first post.
emp00
Posts: 118
Joined: October 7th, 2022, 8:08 pm

Re: Open-Meteo Weather API

Post by emp00 »

eclectic-tech wrote: August 24th, 2024, 2:25 am Updated Open-Meteo Weather to V 1.2024.08.23
Corrected GeoLocation skin to properly access location data
{By updating the 'UserAgent' string in the Webparser measure to comply with Nomination access method}
Thanks for the update! Stupid question, can you elaborate a little bit in more detail, what exactly was changed?

I am actually using a modified skin from "Open-Meteo Win10 Widgets Weather_1.2024.01.24.rmskin" and you have not updated this suite? Does this mean, there's no immediate fix required for the "Win10-Widget" Open-Meteo-suite? In case updates are required there as well, could you list exactly which measures need to be updated for the corrections of V 1.2024.08.23 (or maybe I missed this info in your posting)? Thanks for your efforts - this is really a super-great Rainmeter skin!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5540
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Open-Meteo Weather API

Post by eclectic-tech »

emp00 wrote: August 24th, 2024, 11:48 am Thanks for the update! Stupid question, can you elaborate a little bit in more detail, what exactly was changed?

I am actually using a modified skin from "Open-Meteo Win10 Widgets Weather_1.2024.01.24.rmskin" and you have not updated this suite? Does this mean, there's no immediate fix required for the "Win10-Widget" Open-Meteo-suite? In case updates are required there as well, could you list exactly which measures need to be updated for the corrections of V 1.2024.08.23 (or maybe I missed this info in your posting)? Thanks for your efforts - this is really a super-great Rainmeter skin!
The only change made was to the UserAgent value in the skin that searches for your latitude and longitude based on search criteria.
Due to policy enforcement at that web source, the location search was no longer working. Updating the UserAgent was required to abide with their policy.

I will check the other package and update it if needed.
EDIT: The Win10 Widgets Weather package was updated to correct the Location helper skin. Download from the first post.

This only affects the skin that tries to find your location details for you.
You always have the option to manually edit the variables file to set your location.
emp00
Posts: 118
Joined: October 7th, 2022, 8:08 pm

Re: Open-Meteo Weather API

Post by emp00 »

eclectic-tech wrote: August 24th, 2024, 12:49 pm This only affects the skin that tries to find your location details for you. You always have the option to manually edit the variables file to set your location.
Now it's 100% clear, thanks for this explanation. I have my long/lat-coordinates configured and (most probably) have never used the skin you're referring to. Glad "that's it" :-)
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5540
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Open-Meteo Weather API

Post by eclectic-tech »

:thumbup: