Yep, knew the alerts thing, but I didn't use it, so I shared what I used. By the way, if you find out how to get the datetime in this aggregate form (because when not aggregated it can be added with no issues), let me know.SilverAzide wrote: ↑July 29th, 2020, 10:51 pm To get weather alerts, add "v3alertsHeadlines" into the URL, as in:
This is a Las Vegas query, currently (as of this minute) under a excessive heat warning.Code: Select all
https://api.weather.com/v3/aggcommon/v3-wx-observations-current;v3-wx-forecast-daily-15day;v3alertsHeadlines;v3-location-point?format=json&geocode=36.172,-115.13&units=e&language=en-US&apiKey=6532d6454b8aa370768e63d6ba5a832e
It is currently September 28th, 2024, 10:44 pm
Weather Skins Not Working
-
- Rainmeter Sage
- Posts: 8257
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Weather Skins Not Working - This is the only allowed thread about this
-
- Posts: 13
- Joined: May 22nd, 2020, 6:10 am
Re: Weather Skins Not Working - This is the only allowed thread about this
Does weather.com make changes all the time like this? Since I installed Rainmeter about 4-5 months ago, they've changed something that broke my app on about 4 occassions. You guys are doing great work and are very responsive, it's just a bit of a pain to have to update so often. Maybe they've just been changing things lately?
-
- Rainmeter Sage
- Posts: 8257
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Weather Skins Not Working - This is the only allowed thread about this
Well, we use weather.com as a source only from 4-5 months ago, as wxdata.com was available before that, so I suppose we don't know for sure. Maybe they are in a process of adjusting things on their site this year...nbtc971 wrote: ↑July 29th, 2020, 11:12 pm Does weather.com make changes all the time like this? Since I installed Rainmeter about 4-5 months ago, they've changed something that broke my app on about 4 occassions. You guys are doing great work and are very responsive, it's just a bit of a pain to have to update so often. Maybe they've just been changing things lately?
-
- Posts: 13
- Joined: May 22nd, 2020, 6:10 am
Re: Weather Skins Not Working - This is the only allowed thread about this
Gotcha. Thanks for the info.Yincognito wrote: ↑July 29th, 2020, 11:15 pm Well, we use weather.com as a source only from 4-5 months ago, as wxdata.com was available before that, so I suppose we don't know for sure. Maybe they are in a process of adjusting things on their site this year...
-
- Rainmeter Sage
- Posts: 8257
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
-
- Posts: 3
- Joined: July 29th, 2020, 11:40 pm
Re: Weather Skins Not Working - This is the only allowed thread about this
You guys have been so amazing as developers over the years with this almost neverending weather nonsense.
With so many skins tied in so many ways needing to be updated over and over again due to the whims of one website or another, is this the time to create a "weather" feature/dll of Rainmeter, where the skins poll Rainmeter for the weather info it needs but Rainmeter handles the core website handshaking?
I know that this means that Rainmeter would need a hotfix update whenever this happens. But that seems to be about once a year or so and you're already making changes on a much faster turnaround than that anyway.
I very much hate to ask this, because this isn't your fault and your program is just so phenomenally well-coded and supported. But weather is a real killer app of Rainmeter and, for noob users, just updating Rainmeter to fix this kind of problem seems much easier and cleaner than trying to hunt down replacement skins every time the weather data goes down.
Either way, thanks for listening as you always do.
With so many skins tied in so many ways needing to be updated over and over again due to the whims of one website or another, is this the time to create a "weather" feature/dll of Rainmeter, where the skins poll Rainmeter for the weather info it needs but Rainmeter handles the core website handshaking?
I know that this means that Rainmeter would need a hotfix update whenever this happens. But that seems to be about once a year or so and you're already making changes on a much faster turnaround than that anyway.
I very much hate to ask this, because this isn't your fault and your program is just so phenomenally well-coded and supported. But weather is a real killer app of Rainmeter and, for noob users, just updating Rainmeter to fix this kind of problem seems much easier and cleaner than trying to hunt down replacement skins every time the weather data goes down.
Either way, thanks for listening as you always do.
-
- Rainmeter Sage
- Posts: 8257
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Weather Skins Not Working - This is the only allowed thread about this
Ok, new "version" of the automated substitute you can use to "decode" all the \uNumber character references in the weather.com source page, so you can see the local language characters properly (in case you go for the main site, that is):
Preview:
This version only self-updates the measure during decimal to hexadecimal conversion, but uses instead the fast update rate of the skin to repeat adding substitute pairs to the main substitute. Therefore, unlike the previous version, this one doesn't consume resources or close Rainmeter when bigger Number to NumberMax intervals are chosen. Basically, it can work forever.
P.S. For this to work, you should have a (preferably UCS-2 LE BOM encoded) UnicodeSubstitute.inc file in the Resource folder of the skin.
Code: Select all
[Variables]
Number=256
NumberMax=1000
Quotient=(#Number#)
Result=""
Substitute=""
Base=16
Iteration=0
[Rainmeter]
Update=25
DynamicWindowSize=1
AccurateText=1
---Measures---
[MeasureConvert]
Disabled=1
Group=SubstituteGroup
Measure=Calc
Formula=(#Quotient#%#Base#)
RegExpSubstitute=1
Substitute="^10$":"A","^11$":"B","^12$":"C","^13$":"D","^14$":"E","^15$":"F","^16$":"G","^17$":"H","^18$":"I","^19$":"J","^20$":"K","^21$":"L","^22$":"M","^23$":"N","^24$":"O","^25$":"P","^26$":"Q","^27$":"R","^28$":"S","^29$":"T","^30$":"U","^31$":"V","^32$":"W","^33$":"X","^34$":"Y","^35$":"Z"
IfCondition=(#Iteration#<4)
IfTrueAction=[!SetVariable Result "[MeasureConvert]#Result#"][!SetVariable Quotient (Trunc(#Quotient#/#Base#))][!SetVariable Iteration (#Iteration#+1)][!UpdateMeasure "MeasureConvert"]
IfFalseAction=[!SetOption MeterShowProgress Text """Substitute Number = #Number##CRLF#Substitute Pair = "\\u#Result#":"[\x#Result#]","""][!SetVariable Substitute """#Substitute#"\\u#Result#":"[\x#Result#]","""][!SetVariable Iteration 0][!SetVariable Number (#Number#+1)][!SetVariable Quotient (#Number#+1)][!SetVariable Result ""]
IfCondition2=(#Iteration#>=4) && (#Number#<#NumberMax#)
IfFalseAction2=[!WriteKeyValue Variables Substitute """#Substitute#""" "#@#UnicodeSubstitute.inc"][!DisableMeasure "MeasureConvert"]
IfConditionMode=1
DynamicVariables=1
---Meter---
[MeterConvert]
Meter=STRING
X=5
Y=5
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
FontSize=16
AntiAlias=1
Text="● Click To Build The Substitute ●"
LeftMouseUpAction=[!EnableMeasure "MeasureConvert"]
DynamicVariables=1
[MeterShowProgress]
Meter=STRING
X=5
Y=0R
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
FontSize=16
AntiAlias=1
Text=Substitute Pair = #Number##CRLF#Substitute Pair = "\\u#Result#":"[\x#Result#]",
DynamicVariables=1
[MeterSeeResults]
Meter=STRING
X=5
Y=0R
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
FontSize=16
AntiAlias=1
Text="● Click To See The Results File ●"
LeftMouseUpAction=["#@#UnicodeSubstitute.inc"]
DynamicVariables=1
P.S. For this to work, you should have a (preferably UCS-2 LE BOM encoded) UnicodeSubstitute.inc file in the Resource folder of the skin.
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 2742
- Joined: March 23rd, 2015, 5:26 pm
Re: Weather Skins Not Working - This is the only allowed thread about this
Yeah, this has been discussed way back when weather.com killed the wxdata feed. The problem with your idea is that weather data isn't free anymore. For Rainmeter to poll weather sites, it would need a paid-for API key, and that costs huge dollars. The only free -- and legal --way these days to get weather data is to scrape websites like Foreca, weather.com, Yahoo, etc., which means any time the site changes the skins will break. There are a few freebie sites left in the world (especially country-specific ones), but they are no comparison to weather.com. Do a search for "wxdata" on this site and you'll see what all the folks have been banging their heads against a wall about for the last 4-5 months.excalpius wrote: ↑July 29th, 2020, 11:48 pm With so many skins tied in so many ways needing to be updated over and over again due to the whims of one website or another, is this the time to create a "weather" feature/dll of Rainmeter, where the skins poll Rainmeter for the weather info it needs but Rainmeter handles the core website handshaking?
I know that this means that Rainmeter would need a hotfix update whenever this happens. But that seems to be about once a year or so and you're already making changes on a much faster turnaround than that anyway.
I very much hate to ask this, because this isn't your fault and your program is just so phenomenally well-coded and supported. But weather is a real killer app of Rainmeter and, for noob users, just updating Rainmeter to fix this kind of problem seems much easier and cleaner than trying to hunt down replacement skins every time the weather data goes down.
Either way, thanks for listening as you always do.
-
- Posts: 60
- Joined: April 15th, 2015, 11:13 pm
Re: Weather Skins Not Working
For what it's worth...
I tried the above on WeatherComJSONMeasures5Day.inc and ended up with a few problems. I then tried it on WeatherComJSONMoon7Day.inc and that didn't work at all. I'm using my old Moon data source for now.
The main problem I had with WeatherComJSONMeasures5Day.inc is that [@ForecastDay2DayShort] through [@ForecastDay5DayShort] All showed up as Mon. Taking a wild guess I commented out Disabled=1 in the measures 2 through 5 and it worked as expected. The Measure [@CurrentObservationTime] was also not working but the the commenting out of Disabled=1 made it work. I don't know why and I'm already way over my head because I can't figure out how it becomes enabled normally. Wait.. I just found it FinishAction=[!EnableMeasureGroup \\"Times\\"] but I don't know how to fix it.
The next problem is the boat load of errors in the log. I don't use the Units Measures. I do use the Forecast Days short as previously explained. I think it has something to do with [@ForecastDay2DateString] through [@ForecastDay5DateString] . I'm just taking a wild guess.
With the exception of the errors everything is working as it should, except the previously mentioned 7 day moon measures. So I will leave it alone till the experts finish their work, at least my weather skin is working again albeit with errors. I doubt this will be helpful as I probably broke something to cause the errors. But here it is nonetheless.
My thanks to all of you brilliant folks that give your time and effort to this project. I for one truly appreciate what you do...
You do not have the required permissions to view the files attached to this post.
-
- Developer
- Posts: 22783
- 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
So nobody has any idea how to use the old style Location Code (USVA0944) in the URL for the API?
I hope we can figure that out, as that Substitute just causes Rainmeter to eat its own face. It's just way too many substitute pairs on that huge amount of data.
The only other alternative that makes sense to me is to force users to find their Lat / Long and use that, then parse the JSON through the API. I suppose some skin, sorta like the one I have now to turn "Fort Hunt, VA" into "USVA0944" could be written to perhaps turn "Fort Hunt, VA" into "38.733,-77.058" for use in the URL. I'll have to find it, but there is some geocode lookup site that I think we can use.
I really think we might have to go with the API approach, as I just can't see trying to turn the thousands of possible HTML Unicode values into characters on a site that is just gigantic. This was working fine when the JSON was just "embedded" as vanilla JSON code in the middle of the HTML, but with them changing it to somehow "mix" the HTML and the JSON formatting, it's really getting unreasonable to parse since we don't have their Javascript code.
I hope we can figure that out, as that Substitute just causes Rainmeter to eat its own face. It's just way too many substitute pairs on that huge amount of data.
The only other alternative that makes sense to me is to force users to find their Lat / Long and use that, then parse the JSON through the API. I suppose some skin, sorta like the one I have now to turn "Fort Hunt, VA" into "USVA0944" could be written to perhaps turn "Fort Hunt, VA" into "38.733,-77.058" for use in the URL. I'll have to find it, but there is some geocode lookup site that I think we can use.
I really think we might have to go with the API approach, as I just can't see trying to turn the thousands of possible HTML Unicode values into characters on a site that is just gigantic. This was working fine when the JSON was just "embedded" as vanilla JSON code in the middle of the HTML, but with them changing it to somehow "mix" the HTML and the JSON formatting, it's really getting unreasonable to parse since we don't have their Javascript code.