A little bit more elegant is the following substitution: Substitute=".000":""
It is currently October 14th, 2024, 7:54 pm
Weather Skins Not Working
-
- Rainmeter Sage
- Posts: 16658
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Weather Skins Not Working - This is the only allowed thread about this
-
- Posts: 11
- Joined: January 16th, 2020, 5:16 pm
Re: Weather Skins Not Working
Thnxjsmorley wrote: ↑July 29th, 2020, 3:38 pm I'm looking at it. It looks like the format of the JSON code has changed a bit, with some leading and trailing \ characters added to the keys and values.
I don't know how much effort will be involved in fixing this, and I can't be certain yet that this is in fact a real, permanent change. I will be working on it and watching the site today.
EDIT:
Ok, I think I have fully addressed the new issues with the weather.com site.
Please get the .rmskin at: https://forum.rainmeter.net/viewtopic.php?f=118&t=34628#p171501
Alternatively, if you have a skin that YOU wrote that was based on the @Include .inc files that come with this skin, you can simply get this:
@IncludeFiles.zip
And copy all the .inc files from that .zip into the @Resources folder of your skin.
ONE IMPORTANT NOTE!
The new approach of using the API for the weather.com JSON requires a change to how you access a particular location.
All of the location "codes", like USVA0944 or bbd510e73cb5870f973cea9253bb1f9bfe239a129dfc2b89589cbb6d2d46b4bc or 22308 and such are NO LONGER SUPPORTED.
The new approach requires that you provide a Latitude and Longitude in the WeatherComJSONVariables.inc file. See that file for details on how you can get that for your location.
Please read WeatherCOMJSONVariables.inc carefully, it HAS changed.
-
- Posts: 24
- Joined: August 20th, 2020, 8:49 pm
Re: Weather Skins Not Working
As of this afternoon, I'm getting "Wrong format" errors for a bunch of recently-patched weather skins again (e.g. Weatherbox, Lottaweather). Anyone have an idea what the cause is?
-
- Rainmeter Sage
- Posts: 8462
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Weather Skins Not Working
Yeah, I don't think it's something serious, just some minor section name changes in the forecast area (e.g. getSunV3DailyForecastUrlConfig is now getSunV3DailyForecastWithHeadersUrlConfig). The API JSON method doesn't seem to be affected by this, at least for me, but the main page JSON parsing might need some (hopefully) minor tweaks.
-
- Posts: 24
- Joined: August 20th, 2020, 8:49 pm
Re: Weather Skins Not Working
Sorry for the totally noob-ish question, but can you point me in the direction of where to check those section names so I can update the skin I'm using? Thanks!Yincognito wrote: ↑August 20th, 2020, 9:38 pm Yeah, I don't think it's something serious, just some minor section name changes in the forecast area (e.g. getSunV3DailyForecastUrlConfig is now getSunV3DailyForecastWithHeadersUrlConfig). The API JSON method doesn't seem to be affected by this, at least for me, but the main page JSON parsing might need some (hopefully) minor tweaks.
-
- Developer
- Posts: 22856
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather Skins Not Working
The JSON API version of the weather is fine for me. I can't say about any skins parsing the embedded JSON in the HTML, I just don't use that approach anymore.
-
- Rainmeter Sage
- Posts: 8462
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Weather Skins Not Working
Just open the actual URL in the browser (I believe jsmorley's skin here can do that too by clicking on the weather icon, although it's based on the API JSON method nowadays), right click inside the webpage and choose "View Page Source" (that's how it's called in Chrome, it may be named a bit differently in other browsers) from the context menu. A new tab will open with the associated HTML, which you can then copy, save, search into it using CTRL+F, etc.bravo-lemur wrote: ↑August 20th, 2020, 9:48 pm Sorry for the totally noob-ish question, but can you point me in the direction of where to check those section names so I can update the skin I'm using? Thanks!
-
- Developer
- Posts: 22856
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather Skins Not Working
Great.
I don't want to make a big deal out of this, as with Rainmeter, there are always alternative ways to accomplish things, that is one of the big charms of Rainmeter.
However... I pretty strongly feel that everyone who wants to use weather.com should be using the latest @Include .inc files that I provide with the .rmskin in:
https://forum.rainmeter.net/viewtopic.php?f=118&t=34628#p171501
In my view, this the only safe way to get the info for weather.com right now. You just CANNOT depend on parsing an HTML website for the long-term, as the site WILL change, maybe not today, maybe not tomorrow, but soon. It's guaranteed …
In addition, I just don't see any real purpose in having multiple approaches to parsing the JSON API data floating around. While they all may work just fine, it certainly makes answering questions and supporting users a lot more complicated.
I'm not suggesting that everyone use my "skin". Not at all. It works for me, but anyone can build weather skins, based on the same "plug-and-play" .inc files, and have it display and look exactly as they want. All I'm suggesting is that the .inc file approach allows us to separate the data "back-end" from the display "front-end", and I really strongly recommend that we all use the same "back-end". I will certainly keep it absolutely current as the needs arise, and this is one time when it will sure simplify things if we all are singing from the same songsheet.
I don't want to make a big deal out of this, as with Rainmeter, there are always alternative ways to accomplish things, that is one of the big charms of Rainmeter.
However... I pretty strongly feel that everyone who wants to use weather.com should be using the latest @Include .inc files that I provide with the .rmskin in:
https://forum.rainmeter.net/viewtopic.php?f=118&t=34628#p171501
In my view, this the only safe way to get the info for weather.com right now. You just CANNOT depend on parsing an HTML website for the long-term, as the site WILL change, maybe not today, maybe not tomorrow, but soon. It's guaranteed …
In addition, I just don't see any real purpose in having multiple approaches to parsing the JSON API data floating around. While they all may work just fine, it certainly makes answering questions and supporting users a lot more complicated.
I'm not suggesting that everyone use my "skin". Not at all. It works for me, but anyone can build weather skins, based on the same "plug-and-play" .inc files, and have it display and look exactly as they want. All I'm suggesting is that the .inc file approach allows us to separate the data "back-end" from the display "front-end", and I really strongly recommend that we all use the same "back-end". I will certainly keep it absolutely current as the needs arise, and this is one time when it will sure simplify things if we all are singing from the same songsheet.
-
- Posts: 24
- Joined: August 20th, 2020, 8:49 pm
Re: Weather Skins Not Working
I've bitten the bullet - currently re-building my skin based on yours rather than Weatherbox, which was parsing the HTML.jsmorley wrote: ↑August 20th, 2020, 10:44 pm Great.
I don't want to make a big deal out of this, as with Rainmeter, there are always alternative ways to accomplish things, that is one of the big charms of Rainmeter.
However... I pretty strongly feel that everyone who wants to use weather.com should be using the latest @Include .inc files that I provide with the .rmskin in:
https://forum.rainmeter.net/viewtopic.php?f=118&t=34628#p171501
In my view, this the only safe way to get the info for weather.com right now. You just CANNOT depend on parsing an HTML website for the long-term, as the site WILL change, maybe not today, maybe not tomorrow, but soon. It's guaranteed …
In addition, I just don't see any real purpose in having multiple approaches to parsing the JSON API data floating around. While they all may work just fine, it certainly makes answering questions and supporting users a lot more complicated.
I'm not suggesting that everyone use my "skin". Not at all. It works for me, but anyone can build weather skins, based on the same "plug-and-play" .inc files, and have it display and look exactly as they want. All I'm suggesting is that the .inc file approach allows us to separate the data "back-end" from the display "front-end", and I really strongly recommend that we all use the same "back-end". I will certainly keep it absolutely current as the needs arise, and this is one time when it will sure simplify things if we all are singing from the same songsheet.
Is there a way to parse the sunset/sunrise hour and minutes separately? I previously made a little roundline suntrail, but it relies on being able to calculate the difference in time in minutes, so I'm not sure how to do that with the current .inc file measures.
Thank you!
-
- Developer
- Posts: 22856
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather Skins Not Working
bravo-lemur wrote: ↑August 20th, 2020, 11:21 pm I've bitten the bullet - currently re-building my skin based on yours rather than Weatherbox, which was parsing the HTML.
Is there a way to parse the sunset/sunrise hour and minutes separately? I previously made a little roundline suntrail, but it relies on being able to calculate the difference in time in minutes, so I'm not sure how to do that with the current .inc file measures.
Thank you!
Code: Select all
[MeasureSunRiseHourString]
Measure=String
String=[@CurrentSunriseTime]
DynamicVariables=1
RegExpSubstitute=1
Substitute="^(.*):.*$":"\1"
[MeasureSunRiseMinuteString]
Measure=String
String=[@CurrentSunriseTime]
DynamicVariables=1
RegExpSubstitute=1
Substitute="^.*:(.*) .*$":"\1"
[MeasureSunRiseHourNumber]
Measure=Calc
Formula=[MeasureSunRiseHourString]
DynamicVariables=1
[MeasureSunRiseMinuteNumber]
Measure=Calc
Formula=[MeasureSunRiseMinuteString]
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.