It is currently December 10th, 2018, 8:52 pm

Info: Weather.com Location Codes Have Changed

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

Info: Weather.com Location Codes Have Changed

SilverAzide » June 3rd, 2018, 8:05 pm

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.
DeviantArt Gadgets More...
LyleVertigo
Posts: 1
Joined: June 6th, 2018, 1:48 pm

Re: Info: Weather.com Location Codes Have Changed

LyleVertigo » June 6th, 2018, 1:50 pm

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
Posts: 502
Joined: March 23rd, 2015, 5:26 pm

Re: Info: Weather.com Location Codes Have Changed

SilverAzide » June 6th, 2018, 3:56 pm

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.
DeviantArt Gadgets More...
User avatar
fonpaolo
Moderator
Posts: 1351
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Info: Weather.com Location Codes Have Changed

fonpaolo » June 6th, 2018, 5:47 pm

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
Posts: 502
Joined: March 23rd, 2015, 5:26 pm

Re: Info: Weather.com Location Codes Have Changed

SilverAzide » June 6th, 2018, 11:04 pm

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.
DeviantArt Gadgets More...
User avatar
fonpaolo
Moderator
Posts: 1351
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Info: Weather.com Location Codes Have Changed

fonpaolo » June 7th, 2018, 12:02 pm

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: 7152
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Info: Weather.com Location Codes Have Changed

balala » June 7th, 2018, 1:02 pm

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: 1351
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Info: Weather.com Location Codes Have Changed

fonpaolo » June 7th, 2018, 1:12 pm

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: 18445
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Info: Weather.com Location Codes Have Changed

jsmorley » June 7th, 2018, 1:13 pm

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: 7152
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Info: Weather.com Location Codes Have Changed

balala » June 7th, 2018, 1:18 pm

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?