I'd like to preface by noting I understand I could just download a different, more common weather skin and follow troubleshooters to eventually figure out how a different weather interface works—but I'm dedicated to figuring this one out. I'm using a catpuccin skin, and have edited a little bit of the code to enter in my API key (weather.com), but I get an 'NA' value for all of the values when I load in the weather skin.
I'm completely new to rainmeter code, let alone skins in general, but I'd greatly appreciate if someone might guide me in the code, and what I might need to edit a bit more! The only files I've seen linked to the skin that could help are 'weatherparser.inc', 'weatherparserdaily.inc', and the 'styles.inc' file. I'll link these. Thanks for any advice!
It is currently September 8th, 2024, 4:36 am
How the fork does this weather skin thing work?
-
- Posts: 2
- Joined: June 25th, 2024, 5:17 pm
How the fork does this weather skin thing work?
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 2734
- Joined: March 23rd, 2015, 5:26 pm
Re: How the fork does this weather skin thing work?
Step 1, throw away all that junk you posted, save for the meters that control the display/appearance.kay1049 wrote: ↑June 25th, 2024, 5:40 pm I'd like to preface by noting I understand I could just download a different, more common weather skin and follow troubleshooters to eventually figure out how a different weather interface works—but I'm dedicated to figuring this one out. I'm using a catpuccin skin, and have edited a little bit of the code to enter in my API key (weather.com), but I get an 'NA' value for all of the values when I load in the weather skin.
I'm completely new to rainmeter code, let alone skins in general, but I'd greatly appreciate if someone might guide me in the code, and what I might need to edit a bit more! The only files I've seen linked to the skin that could help are 'weatherparser.inc', 'weatherparserdaily.inc', and the 'styles.inc' file. I'll link these. Thanks for any advice!
Step 2, read this: Step-by-Step Basic Weather Skin Tutorial.
Step 3, download and install this: Weather.com - Parsing the V3 JSON.
Step 4, with the knowledge you gained in Step 2, and the files from Step 3, use the bits you like from Step 1 and graft them onto the weather.com template. You are done.
-
- Rainmeter Sage
- Posts: 16499
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How the fork does this weather skin thing work?
Unfortunately we can't guide you, because you didn't upload the main .ini file of your skin. The uploaded files are all .inc files, but in order to get a working skin, we need (at least) a .ini file as well. But don't upload those files one by one. Pack the whole config you have (the folder contained into the Skins folder, which includes the uploaded three files, as well as others too) and upload that package here, please. This way we'll have all needed files.
-
- Posts: 2
- Joined: June 25th, 2024, 5:17 pm
Re: How the fork does this weather skin thing work?
Oops, thanks for letting me know. I'll attach the @resources folder with the other files, and the weather folder with the .ini file all in a folder. It would be great if I only had to edit the .ini file, but I can also follow the grafting idea mentioned above if not. Appreciate it!balala wrote: ↑June 25th, 2024, 6:07 pm Unfortunately we can't guide you, because you didn't upload the main .ini file of your skin. The uploaded files are all .inc files, but in order to get a working skin, we need (at least) a .ini file as well. But don't upload those files one by one. Pack the whole config you have (the folder contained into the Skins folder, which includes the uploaded three files, as well as others too) and upload that package here, please. This way we'll have all needed files.
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 16499
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How the fork does this weather skin thing work?
There are more issues with the package. Namely:kay1049 wrote: ↑June 25th, 2024, 7:31 pm Oops, thanks for letting me know. I'll attach the @resources folder with the other files, and the weather folder with the .ini file all in a folder. It would be great if I only had to edit the .ini file, but I can also follow the grafting idea mentioned above if not. Appreciate it!
- The APIKey has to be replaced, but it seems you did this, so this is alright.
- Replace the units=[#WeatherUnits[#WeatherUnits]] element in the URL option of the [mCurrentParent] measure of the catpuccin_weather\@Resources\WeatherData\WeatherParser.inc file by units=[#WeatherUnits]. No need for two embed variables.
- Replace the WeatherUnits=Metric variable stored into the catpuccin_weather\@Resources\styles.inc file, by WeatherUnits=M (or even better WeatherUnits=m). Additionally the possible values of this variable are:
- m - for metric units (temperatures in Celsius degrees, distances in kilometers).
- e (not i, as I previously wrote) - for imperial units (temperatures in Fahrenheit degrees, distances in miles).
- h - for hybrid units (temperatures in Celsius degrees, but distances in miles).
- The biggest problem is related to the [mLocationParent] measure (catpuccin_weather\@Resources\WeatherData\WeatherParser.inc file). This measure should take name of the place for which the skin should get the data and should return, among others, the geographical coordinates. These information should then be used by the [mCurrentParent] measure. But unfortunately the [mLocationParent] measure doesn't work. It probably can be fixed, but this requires more time (will be done later). For now, let's alter little bit the URL option of this last [mCurrentParent] measure, to let it using a geographical coordinates as variables (have to be added, as well). So:
- Add the LocationLat=XX and LocationLon=XX variables to the [Variables] section of the catpuccin_weather\@Resources\WeatherData\WeatherParser.inc file:
Obviously you have to use the proper values. This is just an example, linked to Paris, France, but you have to add the coordinates of the needed place.
Code: Select all
[Variables] ... LocationLat=48.858889 LocationLon=2.320041
- Replace the [&mLocationLat] and [&mLocationLon] parameters of the URL option of the [mCurrentParent] measure (into the same catpuccin_weather\@Resources\WeatherData\WeatherParser.inc file), by #LocationLat# and #LocationLon#. With this last alter, the above URL option will look this way: URL=https://api.weather.com/v3/wx/observations/current?geocode=#LocationLat#,#LocationLon#&units=[#WeatherUnits]&language=#Language#&format=json&apiKey=71f92ea9dd2f4790b92ea9dd2f779061 (note the replaced API Key as well).
- Add the LocationLat=XX and LocationLon=XX variables to the [Variables] section of the catpuccin_weather\@Resources\WeatherData\WeatherParser.inc file:
- Finally one more thing is needed: the above [mCurrentParent] measure has been disabled, which was a normal step while the geographical coordinates has been needed to be get online, but since now those have been replaced by variables, this is not needed anymore. So remove the Disabled=1 option of the above [mCurrentParent] measure (or comment it out, or replace it by Disabled=0).
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: How the fork does this weather skin thing work?
Minor note: the value for imperial units is actually e, not i. Probably comes from their alternative name aka the Exchequer Standard - just a guess.
-
- Rainmeter Sage
- Posts: 16499
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How the fork does this weather skin thing work?
Right, my bad. Imperial is e, not i, as I wrote. However it will work even if the variable is set to i, because i not being a valid value, the default setting is applied, which is imperial. So if a user sets any other value than m or h, imperial units are used.Yincognito wrote: ↑June 26th, 2024, 1:36 am Minor note: the value for imperial units is actually e, not i. Probably comes from their alternative name aka the Exchequer Standard - just a guess.
Sorry for my mistake.
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: How the fork does this weather skin thing work?
Might work in the skin if it indeed defaults to e somehow, didn't test, but if you try using the i in the URL you recommended above, you'll get this:
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 16499
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How the fork does this weather skin thing work?
Most probably not all skins work with i (or for sure most of them are not), so, my bad once again. Didn't check before posted, just posted, so should have to shut up my mouth and not to talk stupidities (as I did twice above).Yincognito wrote: ↑June 26th, 2024, 6:36 pm Might work in the skin if it indeed defaults to e somehow, didn't test, but if you try using the i in the URL you recommended above, you'll get this:
Imperial.jpg
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: How the fork does this weather skin thing work?
Don't be so harsh on yourself, it's no big deal - you're correct the vast majority of time otherwise, anyway. I couldn't check the skin when I first posted, being on my phone, but incidentally I did check the URL with an 'i' (and again on my laptop on my 2nd reply, just to be sure), hence the reply. That being said, I sometimes post without checking things as well, this is when I use words like 'probably', 'not sure', 'might' and 'could' to be on the safe side in case I'm wrong (which can happen to everyone once in a while).
![Wink ;-)](./images/smilies/innuendo.gif)