It is currently April 25th, 2024, 5:29 am

Weather Skins Not Working

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 7157
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

anbr07 wrote: January 11th, 2022, 1:31 am Sorry, i just can't find any link to the updated version anywhere. Is this the right code (it's from WeatherComJSONVariables.inc)?
If so, i have no idea where that API code would be, that i should repace.

Code: Select all

[Variables]

; If another language or unit(s) of measures are desired the correct code can be found at:

; https://admin.rainmeter.net/LanguageCodes.php

; For example, French as used in France would be Language=fr-FR
; The unit(s) of measure are automatic, based on the language.
; For instance, you cannot have the language be French, but the units be F imperial.

; Note however, that simply changing from imperial F to metric C units of measure while keeping the 
; language as English can be done by using en-GB as the Language.
 
Language=#LocaleName#

; How often to update the weather information. Default and recommended is 600, which would be 10 minutes.

UpdateRate=#WxUpdateInterval#

; Date and time formats you desire.
; See https://docs.rainmeter.net/manual/measures/time/#FormatCodes 
; For formatting codes to use.

DateFormat=#FmtDate#
TimeFormat=#FmtTime#

; Getting and setting your LocationCode can be done one of several ways.
; 
; The EASIEST and likely BEST way is to right-click the skin and select "Choose Location"
;
; This will allow you to search for and use the weather.com Location ID.
; This uses the database described at https://forum.rainmeter.net/viewtopic.php?f=118&t=34714
; Example : LocationCode=USVA0944
;
; Search for your Country and Location, then just click the Location ID that you want.
; Your LocationCode will be set, and your skin will be refreshed to use it. Done...
; Note: You can click the Location Name, to go to Google Maps and confirm your choice.
; 
; More manual alternatives are:
; 
; Go to https://weather.com/
; Search for your city until you get the location you want.
; Use the long Canonical ID number at the end of the resulting URL, for example:
; https://weather.com/weather/today/l/1665d9e3052c3448be48dafc1587318a27ee85516e97e0b5376043cd41a4f0e8

; Copy and enter that as the value for the LocationCode.
; Example : LocationCode=1665d9e3052c3448be48dafc1587318a27ee85516e97e0b5376043cd41a4f0e8
;
; You can also use your Latitude,Longitude retrieved from https://google.com/maps in this format:
; Example : LocationCode=38.7230934,-77.0690415

; In the USA, you can simply use your ZipCode as the LocationCode.
; Example : LocationCode=22308

LocationCode=#Location#

; Don't change any below here.

CommonSubstitute='"':"","^null$":"","\\u002F":"/","\\u005C":"\","\\u003C":"<","\\u003E":">"
URLSite=https://weather.com/#Language#/weather/today/l/#LocationCode#
I don't have that, but instead:

Code: Select all

[Variables]

; NOTE that Location Codes like USVA0944 or other types of codes are no longer supported.

; You must use location Latitude and Longitude.

Latitude=#WxLatitude#
Longitude=#WxLongitude#

; Language used for string values returned in the data.
; If another language is desired the correct code can be found at:
; https://admin.rainmeter.net/LanguageCodes.php
; For example, French as used in France would be Language=fr-FR

Language=#LocaleName#

; Units of measure. This must be one of the following lower case letters:
; e		This is "Imperial", using Fahrenheit for temperatures.
; m		This is "Metric", using Celsius for temperatures.
; h		This is "Hybrid", used primarily in the UK. Celsius for temperatures, but miles for distances.

Units=#WxUnits#

; How often to update the weather information. Default and recommended is 600, which would be 10 minutes.

UpdateRate=#WxUpdateInterval#

; Date and time formats you desire.
; See https://docs.rainmeter.net/manual/measures/time/#FormatCodes 
; For formatting codes to use.

DateFormat=#FmtDate#
TimeFormat=#FmtTime#

; Don't change any below here.

APIKey=21d8a80b3d6b444998a80b3d6b1449d3

CommonSubstitute='"':"","^null$":"","\\u002F":"/","\\u005C":"\","\\u003C":"<","\\u003E":">"
URLSite=https://api.weather.com/v3/aggcommon/v3-wx-observations-current;v3-wx-forecast-daily-15day;v3alertsHeadlines;v3-location-point?format=json&geocode=#Latitude#,#Longitude#&units=#Units#&language=#Language#&apiKey=#APIKey#
Maybe yours is an older version of the Gadgets, I don't know. To download the updated version of the Gadgets, just click here (the simplest way that I could think of), then double click the downloaded file.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

Re: Weather Skins Not Working

Post by anbr07 »

Great, thanks, almost there! The only thing left is to change the weather module from Fahrenheit to °C. There is no option in the wrench setting. Any hint appreciated. :welcome:

Edit, i have "Use Windows Regional Settings" turned on, but i'm behind a VPN, so that`s maybe the reason?

Ok, got it. i found it in the country settings. Thanks a lot, guys! 8-)
User avatar
Yincognito
Rainmeter Sage
Posts: 7157
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

anbr07 wrote: January 11th, 2022, 1:53 am Great, thanks, almost there! The only thing left is to change the weather module from Fahrenheit to °C. There is no option in the wrench setting. Any hint appreciated. :welcome:

Edit, i have "Use Windows Regional Settings" turned on, but i'm behind a VPN, so that`s maybe the reason?

Ok, got it. i found it in the country settings. Thanks a lot, guys! 8-)
Well, it appears we'll have another 'Rainmeter expert' here soon, eh? :sly: Good job! :thumbup:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
dethknite
Posts: 15
Joined: May 7th, 2021, 3:19 pm

Re: Weather Skins Not Working

Post by dethknite »

Thanks for all the quick responses and help on a fix. Great community here! :D
SCR
Posts: 60
Joined: April 15th, 2015, 11:13 pm

Re: Weather Skins Not Working

Post by SCR »

jsmorley wrote: January 10th, 2022, 8:48 pm I think you will find that if you change the API Key to 21d8a80b3d6b444998a80b3d6b1449d3, it will begin to work again.
Thanks for the Quick and Easy Fix, Perfect!
User avatar
virtual-adam
Posts: 12
Joined: February 11th, 2017, 9:32 pm
Location: UK

Re: Weather Skins Not Working

Post by virtual-adam »

jsmorley wrote: January 10th, 2022, 8:48 pm I think you will find that if you change the API Key to 21d8a80b3d6b444998a80b3d6b1449d3, it will begin to work again.
Nice one :thumbup:
User avatar
virtual-adam
Posts: 12
Joined: February 11th, 2017, 9:32 pm
Location: UK

Re: Weather Skins Not Working

Post by virtual-adam »

Yincognito wrote: January 10th, 2022, 9:00 pm The speed of replies was higher than the speed of my email alerts, LOL. But yeah, jsmorley is correct, the new key is the one he mentioned. There is also an older key that works as well (but that is not the key used to display the normal webpage to users, not that it would make a difference).

For future instances where this would be an issue (if, say, weather.com is changing its default key once every year or once every couple of years), assuming the structure of the weather.com's webpage stays the same, you'd want to CTRL+F (i.e. Find) the "V3" API Key in the page source. When looking for "Key" in the current webpage source, it is the 5th occurrence, so nothing beyond anyone's level. ;-)
Very useful to know, thanks for this post.
User avatar
Novadestin
Posts: 21
Joined: August 18th, 2016, 11:36 pm

Re: Weather Skins Not Working

Post by Novadestin »

Thanks very much jsmorley and Yincognito. I've passed on the info to the subreddit, so hopefully we won't get flooded with "weather is broke!" posts ...hey, I can at least hope, right? lol :p
User avatar
Yincognito
Rainmeter Sage
Posts: 7157
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

Well, flooding subreddits and other means of distributing information is not something I would worry to hope against, since even a single small piece of information is easy to access nowadays if one really wants to find it. As always, the hope is rather for weather.com's changes to be minimal (with all that this means). Adaptive and non-adaptive skins can handle information, if there's a way of getting it in the first place. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
sesco
Posts: 8
Joined: January 10th, 2022, 10:37 pm

Re: Weather Skins Not Working

Post by sesco »

Yincognito wrote: January 10th, 2022, 11:00 pm Change the value of the APIKey variable from [YourSkin]\@Resources\WeatherComJSONVariables.inc file (you should typically have such a file included in your skin). I might write a little skin that does that on a mouse click later on, if anyone would be interested.
It works! Thank you soo much, I appreciate it :D :D