It is currently June 23rd, 2024, 8:05 pm

⭐ Weather.com - Parsing the V3 JSON

Our most popular Tips and Tricks from the Rainmeter Team and others
EeK
Posts: 12
Joined: January 28th, 2020, 1:26 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by EeK »

jsmorley wrote: June 8th, 2020, 2:44 pm Which weather skin .ini do you use?
Weather_Forecast is the one I'm currently using.

Sorry, I forgot to include that information in my original post and had to edit it afterwards, but you were so fast you didn't even have a chance to see the edit, haha!
User avatar
jsmorley
Developer
Posts: 22640
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

I'm a bit confused as to how you have modified this and what you intend to be displayed.

If we look at an image of the original MiniWeather:


dcwt4uc-605c983e-9ff4-4a48-a819-ddfc8ec53af6.png


What is displayed is:

Top : The current icon and current temperature

Under the divider:

The forecasted icon for Today, or Tonight if it is after a certain hour
The name of the day of the week and the forecasted high temperature for Today, or the low temperature if it is after a certain hour.

To the right of that:

The forecasted icon for Day 2
The name of the day of the week and the forecasted high temperature for Day 2

Under that:

The forecasted icon for Day 3
The name of the day of the week and the forecasted high temperature for Day 3

To the right of that:

The forecasted icon for Day 4
The name of the day of the week and the forecasted high temperature for Day 4

Is there some other approach that you want, and can you explain what values you want in each position?



Unsolicited advice:

I don't want to tell you what your skin should look like, that's up to you of course, but I would suggest that perhaps you want to display both the "high" and the "low" temperature for each forecasted day. Something like this:



1.jpg


I say that because I'm not in love with a temperature that reflects the "high" for half of the day and reflects the "low" the rest of the day, without some indication about the difference. I also would be tempted to say "Today" and "Tonight" for the current day name, rather than "Thursday" in this example. That makes the fact that the value reflects the "day" or "night" values more apparent.

If you would rather though, we can display the "day" icon and "day / high" temperature during the day, and the "night" icon and stay with the historical days "high" during the night. I'm just not sure what value the "high" temperature brings after the sun goes down and it will not be possible for that temperature to happen again that day. In my view, weather is about "making decisions", and really, what decision are you going to make based on how hot it got earlier today?
You do not have the required permissions to view the files attached to this post.
EeK
Posts: 12
Joined: January 28th, 2020, 1:26 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by EeK »

jsmorley wrote: June 8th, 2020, 3:39 pm I'm a bit confused as to how you have modified this and what you intend to be displayed.
If you take a look at the image I linked in my first post, you'll see that it looks the same as the original MiniWeather, in terms of information being displayed (even if mine's currently broken :P).

I only modified that skin to combine it with the modular weather portion of SysDash, and also to change its default icons, so that everything looks cohesive. I don't mind having only one set of temperatures for each day, as it's always warm here, and I'm more concerned about the max temp (and not cluttering the dashboard).

I honestly can't remember what wording I had set up for today/tonight, or if it just displayed the day of the week (even for "day 1"), but I don't mind keeping it the way it is, either, as I already got used to it, haha.

Also, I included one variant that only displays the current weather, as I sometimes change the look of the dashboard and try to fit the weather alongside the GPU/CPU temps. All I need is for the requests to actually work. :D
User avatar
jsmorley
Developer
Posts: 22640
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

EeK wrote: June 8th, 2020, 4:37 pm If you take a look at the image I linked in my first post, you'll see that it looks the same as the original MiniWeather, in terms of information being displayed (even if mine's currently broken :P).

I only modified that skin to combine it with the modular weather portion of SysDash, and also to change its default icons, so that everything looks cohesive. I don't mind having only one set of temperatures for each day, as it's always warm here, and I'm more concerned about the max temp (and not cluttering the dashboard).

I honestly can't remember what wording I had set up for today/tonight, or if it just displayed the day of the week (even for "day 1"), but I don't mind keeping it the way it is, either, as I already got used to it, haha.

Also, I included one variant that only displays the current weather, as I sometimes change the look of the dashboard and try to fit the weather alongside the GPU/CPU temps. All I need is for the requests to actually work. :D
Well, we literally can't display the icon for "today" after weather.com changes to "tonight" at like 3:30pm. We have to display the "night" icon then. What I'm suggesting is that we change the display of the temperatures to:

71° | 54°

So it is always displaying "high" | "low" for the forecasted days.

What do you think?
EeK
Posts: 12
Joined: January 28th, 2020, 1:26 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by EeK »

jsmorley wrote: June 8th, 2020, 4:45 pm Well, we literally can't display the icon for "today" after weather.com changes to "tonight" at like 3:30pm. We have to display the "night" icon then. What I'm suggesting is that we change the display of the temperatures to:

71° | 54°

So it is always displaying "high" | "low" for the forecasted days.

What do you think?
Oh, yeah, there should already be proper icons for day and night. And displaying max/min like that works fine, too. :)
User avatar
jsmorley
Developer
Posts: 22640
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

EeK wrote: June 8th, 2020, 4:59 pm Oh, yeah, there should already be proper icons for day and night. And displaying max/min like that works fine, too. :)
Ok, I'm on it. Give me a little while to get the right measures being referenced and do a little cleanup.
EeK
Posts: 12
Joined: January 28th, 2020, 1:26 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by EeK »

jsmorley wrote: June 8th, 2020, 5:00 pm Ok, I'm on it. Give me a little while to get the right measures being referenced and do a little cleanup.
Thank you! And don't worry, take your time.

The most difficult part (at least for me, coming from a non-technical background) was integrating the MiniWeather skin into SysDash and its various systems. Having the proper menus and actions displayed when right-clicking, for example, being able to change the look of the skin (size, colors, etc.) on the fly, that kind of stuff.

When the first change to how weather skins came around, earlier this year, I went through several of your posts here, but managed to accomplish what I wanted by myself. Not so much this time, haha.
User avatar
jsmorley
Developer
Posts: 22640
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

This look ok?



1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22640
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

Ok, I think I'm done with this skin, and a few changes needed to the "Settings" (General.ini) skin to support it properly.

Modified SysDash.zip

I would make a backup copy of your entire skin folder first, then copy the contents of this .zip file into your skins folder. Refresh Rainmeter.

Check to be sure it works as expected. Let me know.


So this now uses the standard JSON @Include files:

WeatherComJSONVariables.inc
WeatherComJSONMeasures.inc

With the Language and LocationCode variables stored in WeatherComJSONVariables.inc and all the measures you will need created in WeatherComJSONMeasures.inc.

You can use the "Settings" (General.ini) skin to set

#LocationCode# : How to find this for your location is explained in WeatherComJSONVariables.inc
#Language# : The check box will toggle between en-US (English, Imperial units of measure) and en-CA (English, Metric units of measure)
This is how you toggle between F and C.

The file base.ini is no longer used, and can be deleted at your discretion.
You do not have the required permissions to view the files attached to this post.
EeK
Posts: 12
Joined: January 28th, 2020, 1:26 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by EeK »

jsmorley wrote: June 8th, 2020, 6:13 pm Ok, I think I'm done with this skin, and a few changes needed to the "Settings" (General.ini) skin to support it properly.

I would make a backup copy of your entire skin folder first, then copy the contents of this .zip file into your skins folder. Refresh Rainmeter.

Check to be sure it works as expected. Let me know.
Thank you, thank you, thank you! It's working beautifully, including the location and F-C conversion under Settings. Absolutely perfect!

I'm so happy. I really appreciate your taking the time to fix the skin for me, jsmorley. <3

Also, is that a Firewatch wallpaper? I love that game and, especially, the art by the great Olly Moss. :)