It is currently March 28th, 2024, 7:25 pm

Info: Weather.com Location Codes Have Changed

General topics related to Rainmeter.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Info: Weather.com Location Codes Have Changed

Post by SilverAzide »

This is a public service announcement to the Rainmeter community. Skin authors might start seeing an increasing influx of "weather skin not working" posts.

It appears that sometime over the last several days, weather.com has made a change to their weather codes. Most instructions for weather skins (including on the forums) suggest going to the main weather.com site, searching for a location, and grabbing a section of the resulting URL from the browser's address bar to use for the location code. THIS NO LONGER WORKS if your location is outside the US. There are exceptions if your force your location so that weather.com uses US-specific URLs or if the site cannot determine your location. Here is an example:

If you search for London (UK), you used to get a URL like:
https://weather.com/weather/today/l/UKXX0085:1:UK
Now you MIGHT get:
https://weather.com/weather/today/l/7517a52d4d1815e639ae1001edb8c5fdb44090e972e19bfd190e468fa1130909

I say "might get" because it is dependent on the search and whether the site is aware of your location, or if you have set it specifically.

The important points are these:
  • The new-style location codes do NOT work with the XML feed at this time.
  • This appears mostly to be a documentation issue... so far.

Skins that include their own search functionality (as in http://wxdata.weather.com/wxdata/search/search?where=xxx) do not appear to be affected at this time, as the API is still returning old-style location codes. Skin authors may want to add search functionality to their skins or direct users to the weather.codes site instead of weather.com. The weather.com site itself seems to be backward compatible with the old-style codes. ...For now.
Gadgets Wiki GitHub More Gadgets...
LyleVertigo
Posts: 1
Joined: June 6th, 2018, 1:48 pm

Re: Info: Weather.com Location Codes Have Changed

Post by LyleVertigo »

My weather feed has stopped working as well with Weather.com.

It seems that they changed the old code to the 5 digit area code of the area.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: Info: Weather.com Location Codes Have Changed

Post by SilverAzide »

LyleVertigo wrote:My weather feed has stopped working as well with Weather.com.

It seems that they changed the old code to the 5 digit area code of the area.
5 digit zip codes are valid (for US locations) and should not affect anything. This post is strictly about the new 64-character codes, and the fact that they don't work with the XML feed.
Gadgets Wiki GitHub More Gadgets...
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Info: Weather.com Location Codes Have Changed

Post by fonpaolo »

I don't know if things behave differently in "my" side of the world... but if I type London (UK) I still have the "old" UKXX0085:1:UK. :???:
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: Info: Weather.com Location Codes Have Changed

Post by SilverAzide »

fonpaolo wrote:I don't know if things behave differently in "my" side of the world... but if I type London (UK) I still have the "old" UKXX0085:1:UK. :???:
Actually, as far as I can tell, "your" side of the world is where the problem happens most often, LOL. It is very confusing, which is why I stated you "might get" those 64-character locations. I most easily notice it when I use the weather.com menu to select a language other than my own.

For example, by default when I search, get this:
https://weather.com/weather/today/l/ITXX0067:1:IT

But if I change my language to Italian, I get this when I do the exact same search:
https://weather.com/it-IT/tempo/oggi/l/3e7c0c6c84209b8f6581334a158d073b2b4c5cb13a817832a5d0ddafded28193

If you set the language to US English, you will get the normal "old-style" codes. If you set it to UK English (or anything else apparently), you'll get the new codes.
Gadgets Wiki GitHub More Gadgets...
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Info: Weather.com Location Codes Have Changed

Post by fonpaolo »

SilverAzide wrote:...
If you set the language to US English, you will get the normal "old-style" codes. If you set it to UK English (or anything else apparently), you'll get the new codes.
Strange... I'm using Italian as default language of the site and I still have the "old" location code.
I tried some other locations and in all cases I still have the old location code. :confused:

There's only a reason I can think of, it's that it's related to IP, more than to the language used.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Info: Weather.com Location Codes Have Changed

Post by balala »

fonpaolo wrote:I tried some other locations and in all cases I still have the old location code. :confused:
Me too.
But my weather skin is working well with the old code.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Info: Weather.com Location Codes Have Changed

Post by fonpaolo »

balala wrote:Me too.
But my weather skin is working well with the old code.
Mine too, just a few small problems, but they may occur from time to time.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Info: Weather.com Location Codes Have Changed

Post by jsmorley »

I haven't had any issue with my weather skin, and so far, when I go to the site and search for a city, it is always the same format location code as it ever was. I'll keep an eye on this.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Info: Weather.com Location Codes Have Changed

Post by balala »

jsmorley wrote:I haven't had any issue with my weather skin, and so far, when I go to the site and search for a city, it is always the same format location code as it ever was. I'll keep an eye on this.
So, the old format for US, too?