It is currently October 26th, 2021, 12:18 pm

Weather Skins Not Working

Help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 4071
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working - This is the only allowed thread about this

Post by Yincognito »

jsmorley wrote: July 31st, 2020, 1:18 pm Cool... I really hate Daylight Saving Time, it is the devil.
Try this, and you'll get the dateTime section:

Code: Select all

https://api.weather.com/v3/dateTime?geocode=<latitude>,<longitude>&format=json&apiKey=d522aa97197fd864d36b418f39ebb323
It's a bit of a guess work to figure out the names of other sections, by the way. Sometimes they are just like the names in the JSON, otherwise a little bit different...
User avatar
jsmorley
Developer
Posts: 22374
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather Skins Not Working - This is the only allowed thread about this

Post by jsmorley »

Yincognito wrote: July 31st, 2020, 1:29 pm Try this, and you'll get the dateTime section:

Code: Select all

https://api.weather.com/v3/dateTime?geocode=<latitude>,<longitude>&format=json&apiKey=d522aa97197fd864d36b418f39ebb323
It's a bit of a guess work to figure out the names of other sections, by the way. Sometimes they are just like the names in the JSON, otherwise a little bit different...
Nice. I don't mind a tiny parent measure to get that information. Thanks!

{"dateTime":"2020-07-31T09:30:29.116-04:00","ianaTimeZone":"America/New_York","timeZoneAbbreviation":"EDT"}

Yeah, it would be nice to be able to get the other stuff like "air quality" and "pollen" and who knows what else that is there in the embedded JSON. If you stumble on to any of those, could you post about it? It's not critical for a general weather skin, but for those who want to go all-out, I'd like to offer separate .inc files at some point in the future.
anbr07
Posts: 69
Joined: July 17th, 2016, 12:19 pm

Re: Weather Skins Not Working - This is the only allowed thread about this

Post by anbr07 »

Sorry for asking, but i have noe clues about all those tech details. I am using Weather Meter. Is there any code in the numerous code examples in this thread, that could replace the current one to make it work again? I had a brief look into the vast code of this skin, and have no idea, where the relevant REGEX stuff is, where things have to be replaced, so i don't even think about trying. :?
User avatar
jsmorley
Developer
Posts: 22374
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather Skins Not Working - This is the only allowed thread about this

Post by jsmorley »

anbr07 wrote: July 31st, 2020, 1:37 pm Sorry for asking, but i have noe clues about all those tech details. I am using Weather Meter. Is there any code in the numerous code examples in this thread, that could replace the current one to make it work again? I had a brief look into the vast code of this skin, and have no idea, where the relevant REGEX stuff is, where things have to be replaced, so i don't even think about trying. :?
The way this is going to work, starting a bit later today, is:

- If the skin in question is using the @Include .inc files I previously posted (and will be correcting shortly) in ⭐ Weather.com - Parsing the V3 JSON, then you will be able to just replace all .inc files that come with the skin, edit the WeatherComJSONVariables.inc file to set your location and language preferences, and Bob's your uncle.

- If the same as above is true, but you are not comfortable with messing with it, you will have to contact the author of the skin and gently push to get an updated version.

- If you are using a skin that is going after the embedded JSON on the weather.com site, but ISN'T using my .inc file, then yike. You are certainly going to have to contact the author for help, or find an alternative skin.
anbr07
Posts: 69
Joined: July 17th, 2016, 12:19 pm

Re: Weather Skins Not Working - This is the only allowed thread about this

Post by anbr07 »

Thanks for the quick reply. Does "@Include=#@#WeatherComJSONVariables.inc" sound good to you? If so, you could help me with the changes. Otherwise i would use your version from the link, but would prefer to stick to the old one, with sun and moon informations.

:welcome:
User avatar
Yincognito
Rainmeter Sage
Posts: 4071
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working - This is the only allowed thread about this

Post by Yincognito »

jsmorley wrote: July 31st, 2020, 1:33 pm Nice. I don't mind a tiny parent measure to get that information. Thanks!

Yeah, it would be nice to be able to get the other stuff like "air quality" and "pollen" and who knows what else that is there in the embedded JSON. If you stumble on to any of those, could you post about it? It's not critical for a general weather skin, but for those who want to go all-out, I'd like to offer separate .inc files at some point in the future.
It's not about stumbling on them, as such luck is generally very rare, it's about trying different names for it, i.e. the air quality section is called getSunV3GlobalAirQualityUrlConfig in the embedded JSOn, thus the name in the API URL could be v3-wx-global-air-quality, or v3-global-air-quality, or v3-wx-air-quality-global, or v3-wx-globalAirQuality, and so on. It's quite hard to find what works, as they could use any remotely similar permutation or section name format for those. Or, they could be unavailable in the aggregated form and available otherwise, like the dateTime thing.

The same data as this can be obtained using the "old" V2 format, like (notice how the vt1Loc seems to be invalid, another puzzle I've been unable to figure out):

Code: Select all

https://api.weather.com/v2/turbo/vt1Loc;vt1Observation;vt1CurrentDateTime;vt1DailyForecast?geocode=<latitude>,<longitude>&format=json&units=m&language=en-GB&apiKey=d522aa97197fd864d36b418f39ebb323
User avatar
jsmorley
Developer
Posts: 22374
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather Skins Not Working - This is the only allowed thread about this

Post by jsmorley »

anbr07 wrote: July 31st, 2020, 1:55 pm Thanks for the quick reply. Does "@Include=#@#WeatherComJSONVariables.inc" sound good to you? If so, you could help me with the changes. Otherwise i would use your version from the link, but would prefer to stick to the old one, with sun and moon informations.

:welcome:
There is just no help I can offer just yet. I'm still working on the fixes for the .inc files to correct this issue, and while this is likely to be done a bit later today, there is just nothing you can do until then. Patience... ;-)

Once I'm done, the way we will offer help here is like this:

1) You MUST post a link to where you got the skin originally, or attach a .rmskin of the entire skin. We can't help at all if we don't have the skin in question.

2) If the skin in question uses my @Include .inc files, then we should be able to tell you what to "replace" to get things working right.

3) If the skin in question does NOT use my @Inlcude .inc files, then you will simply have to contact the author for help.
User avatar
jsmorley
Developer
Posts: 22374
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather Skins Not Working - This is the only allowed thread about this

Post by jsmorley »

Yincognito wrote: July 31st, 2020, 1:56 pm It's not about stumbling on them, as such luck is generally very rare, it's about trying different names for it, i.e. the air quality section is called getSunV3GlobalAirQualityUrlConfig in the embedded JSOn, thus the name in the API URL could be v3-wx-global-air-quality, or v3-global-air-quality, or v3-wx-air-quality-global, or v3-wx-globalAirQuality, and so on. It's quite hard to find what works, as they could use any remotely similar permutation or section name format for those. Or, they could be unavailable in the aggregated form and available otherwise, like the dateTime thing.

The same data as this can be obtained using the "old" V2 format, like (notice how the vt1Loc seems to be invalid, another puzzle I've been unable to figure out):

Code: Select all

https://api.weather.com/v2/turbo/vt1Loc;vt1Observation;vt1CurrentDateTime;vt1DailyForecast?geocode=<latitude>,<longitude>&format=json&units=m&language=en-GB&apiKey=d522aa97197fd864d36b418f39ebb323
I would give my left arm for a list of all the "sections" that are available in the V3 API... ;-)
User avatar
SilverAzide
Rainmeter Sage
Posts: 1629
Joined: March 23rd, 2015, 5:26 pm

Re: Weather Skins Not Working - This is the only allowed thread about this

Post by SilverAzide »

anbr07 wrote: July 31st, 2020, 1:37 pm Sorry for asking, but i have noe clues about all those tech details. I am using Weather Meter. Is there any code in the numerous code examples in this thread, that could replace the current one to make it work again? I had a brief look into the vast code of this skin, and have no idea, where the relevant REGEX stuff is, where things have to be replaced, so i don't even think about trying. :?
This has been discussed on the main Gadgets thread. Check this link: https://github.com/SilverAzide/Weather-Meter-Patch
Gadgets Wiki GitHub More Gadgets...
User avatar
Yincognito
Rainmeter Sage
Posts: 4071
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working - This is the only allowed thread about this

Post by Yincognito »

jsmorley wrote: July 31st, 2020, 2:05 pm I would give my left arm for a list of all the "sections" that are available in the V3 API... ;-)
LOL, not me. You might be disssapointed to find out that those V3 API sections don't cover all the sections in the embedded V3 JSON... :sly: