It is currently June 15th, 2024, 8:52 pm

⭐ Weather.com - Parsing the V3 JSON

Our most popular Tips and Tricks from the Rainmeter Team and others
User avatar
Mimi33333
Posts: 8
Joined: June 6th, 2020, 1:00 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by Mimi33333 »

jsmorley wrote: June 9th, 2020, 11:55 am Do you have a link where you got the original skin? I'd like to see what values are actually being displayed when the skin is working.
here it is :

https://www.deviantart.com/injust29/art/LIM-T-1-2-344112531
User avatar
Yincognito
Rainmeter Sage
Posts: 7430
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by Yincognito »

Yeah, the link part is already clear:
Yincognito wrote: June 9th, 2020, 12:02 pm Here, maybe?
But you should clarify what you'd like by answering jsmorley's follow-up question:
jsmorley wrote: June 9th, 2020, 12:10 pmSo now my question to her is, do you want the appearance and functionality from the original skin on deviantART, and just want us to help get the weather portion of it working again, or are there appearance and / or functionality changes you actually intend?
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Mimi33333
Posts: 8
Joined: June 6th, 2020, 1:00 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by Mimi33333 »

jsmorley wrote: June 9th, 2020, 12:10 pm Yeah, that looks like the one.

The .zip that Mimi33333 sent looks like she might have hacked it up some trying to get the weather to work, and good on her for that. So now my question to her is, do you want the appearance and functionality from the original skin on deviantART, and just want us to help get the weather portion of it working again, or are there appearance and / or functionality changes you actually intend?
sorry I didn't see that all of what I want is to help me to to get the weather to work again.
User avatar
jsmorley
Developer
Posts: 22637
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

Mimi33333 wrote: June 9th, 2020, 5:12 pm sorry I didn't see that all of what I want is to help me to to get the weather to work again.
Give this a try...

LIM!T Fix for Weather_June 9, 2020.rmskin

1.jpg


You may want to make a backup copy of your LIM!T folder in ..Rainmeter\Skins before installing this, just in case.

There is one important change I made to this. The original used a geo-location website to try and figure out your weather location code automatically. I removed that capability, as it was just more trouble than I was willing to accept to get that working seamlessly with the new JSON @Include files. So what you have to do is edit the file ..@Resources\WeatherComJSONVariables.inc and set the values you want for the Language and LocationCode variables. How to find them and how to set them is explained in the file.

This is really just going to accept two values for Language. Use en-US to get Fahrenheit, and en-CA to get Celsius.

Note that in the JSON weather, the "conditions" text for future "forecast" days may not be as "terse" as you are used to. As you can see "Scattered Thunderstorms" exceeds the width allowed for the meter. You can play with this in two ways. Change the W (width) value of the meter to be larger, or change the FontSize for those two description fields to be a somewhat smaller font.
You do not have the required permissions to view the files attached to this post.
User avatar
Mimi33333
Posts: 8
Joined: June 6th, 2020, 1:00 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by Mimi33333 »

jsmorley wrote: June 9th, 2020, 7:07 pm Give this a try...


LIM!T Fix for Weather_June 9, 2020.rmskin



1.jpg



You may want to make a backup copy of your LIM!T folder in ..Rainmeter\Skins before installing this, just in case.

There is one important change I made to this. The original used a geo-location website to try and figure out your weather location code automatically. I removed that capability, as it was just more trouble than I was willing to accept to get that working seamlessly with the new JSON @Include files. So what you have to do is edit the file ..@Resources\WeatherComJSONVariables.inc and set the values you want for the Language and LocationCode variables. How to find them and how to set them is explained in the file.

This is really just going to accept two values for Language. Use en-US to get Fahrenheit, and en-CA to get Celsius.

Note that in the JSON weather, the "conditions" text for future "forecast" days may not be as "terse" as you are used to. As you can see "Scattered Thunderstorms" exceeds the width allowed for the meter. You can play with this in two ways. Change the W (width) value of the meter to be larger, or change the FontSize for those two description fields to be a somewhat smaller font.
Thank U I appreciate ur work :rosegift: :rosegift:
User avatar
jsmorley
Developer
Posts: 22637
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

Mimi33333 wrote: June 9th, 2020, 7:29 pm Thank U I appreciate ur work :rosegift: :rosegift:
Glad to help. Did it work ok?
gerryex
Posts: 37
Joined: January 14th, 2018, 8:12 pm

Re: ⭐ Weather.com

Post by gerryex »

SilverAzide wrote: June 10th, 2020, 2:40 am Please update to the latest version of the Gadgets here. There was a glitch in the master JSON template that returned the wrong description for the "current conditions". This version uses the "Weather.com June 7" templates, which is also newer than the one you are using, so you might want to update that one too.
HI,

I downloaded the latest version and indeed it is working again!!!

Back in earlier Windows versions MS supported desktop things I think called Widgets and someone came up with the Gadgets collection. I really liked them as they had a lot of info but didn't take up too much desktop space. When MS dropped Widgets I was very disappointed. I then found out about Rainmeter and ultimately found your version of Gadgets that look exactly like the original Widgets and I've running them ever since. I use the weather, CPU usage (I love having a bar for each processor), network meter, drive meter, calendar and clock. So was worried when the weather meter stopped working.

THANK YOU VERY MUCH for maintaining such a useful set of skins!!!

Gerry
User avatar
SilverAzide
Rainmeter Sage
Posts: 2662
Joined: March 23rd, 2015, 5:26 pm

Re: ⭐ Weather.com

Post by SilverAzide »

gerryex wrote: June 10th, 2020, 3:01 pm HI,

I downloaded the latest version and indeed it is working again!!!

Back in earlier Windows versions MS supported desktop things I think called Widgets and someone came up with the Gadgets collection. I really liked them as they had a lot of info but didn't take up too much desktop space. When MS dropped Widgets I was very disappointed. I then found out about Rainmeter and ultimately found your version of Gadgets that look exactly like the original Widgets and I've running them ever since. I use the weather, CPU usage (I love having a bar for each processor), network meter, drive meter, calendar and clock. So was worried when the weather meter stopped working.

THANK YOU VERY MUCH for maintaining such a useful set of skins!!!

Gerry
You're welcome! They came out with Windows Vista and were called "Sidebar Gadgets"... I liked the addgadgets.com ones too, so when MS killed the whole platform, I rebuilt these in Rainmeter. :thumbup:
Gadgets Wiki GitHub More Gadgets...
bhench
Posts: 5
Joined: June 11th, 2020, 3:15 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by bhench »

Hi,

Thank you for all your work trying to keep up with all the changes. I don't know if it just me but I cannot get the WebParse to come back with anything but Celcius. I made sure the Language was EN-US and I tried RainRegExp to verify. For some reason, it seems the webparser makes weather.com return values in metric, when I view the same URL it is in F. When I did a view source for US1053, it is in F. Any ideas other than having to add calc's to every temp meter?

Thanks. :handtohead:
User avatar
Yincognito
Rainmeter Sage
Posts: 7430
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by Yincognito »

bhench wrote: June 11th, 2020, 3:20 am Hi,

Thank you for all your work trying to keep up with all the changes. I don't know if it just me but I cannot get the WebParse to come back with anything but Celcius. I made sure the Language was EN-US and I tried RainRegExp to verify. For some reason, it seems the webparser makes weather.com return values in metric, when I view the same URL it is in F. When I did a view source for US1053, it is in F. Any ideas other than having to add calc's to every temp meter?

Thanks. :handtohead:
Well, I wrote about the same issue a couple of pages back, and you can see for yourself what the resolution was... :Whistle

Now having said that, what matters here is what is delivered by WebParser, not the browser. Unfortunately, I cannot replicate the issue, just tried jsmorley's skin again and it's returning the correct imperial units. I'm not sure if toggling the other options in the WebParser parent (i.e. ForceReload, UserAgent, etc.) would make a difference, as it didn't for me, the browser and WebParser results continuing being different in terms of units.

Maybe jsmorley can help with more on this - me, that's all I got.

P.S. And for freaking sake, it's Celsius, not Celcius, LOL.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth