It is currently May 4th, 2024, 3:12 pm

Weather not working?

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather not working?

Post by jsmorley »

The way I do it in my skin is to use the "forecast" temperature for "today" as the "high" while it is still "today", and when it becomes "tonight", I switch to using MaxSince7am, but slightly grey it out, so I know this is not a "forecast" anymore, but something that already happened. In one sense, the "high" temperature for "today" is sorta pointless at some point, as it's never going to be that temperature again today. It's just not a forecast. However, I concede that knowing how high the temperature "was" today is of some interest, so I work it in.

Code: Select all

[MeasureToggleAtNight]
Measure=String
Group=Weather
String=[@ForecastTodayDayShort]
DynamicVariables=1
IfMatch=^$
IfMatchAction=[!SetOption MeterTodayIcon MeasureName "@ForecastTodayNightIcon"][!SetOption MeterTodayName MeasureName "@ForecastTodayNightShort"][!SetOption MeterTodayHighLow MeasureName "@CurrentTemperatureMaxSince7AM"][!SetOption MeterTodayPrecipitation MeasureName "@ForecastTodayNightPrecipitationPercent"][!SetOption MeterTodayHighLow InlineSetting "Color | 160,160,160,255"]
IfNotMatchAction=[!SetOption MeterTodayIcon MeasureName "@ForecastTodayDayIcon"][!SetOption MeterTodayName MeasureName "@ForecastTodayDayShort"][!SetOption MeterTodayHighLow MeasureName "@ForecastTodayDayTemperature"][!SetOption MeterTodayPrecipitation MeasureName "@ForecastTodayDayPrecipitationPercent"][!SetOption MeterTodayHighLow InlineSetting "None"]

1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7198
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather not working?

Post by Yincognito »

dvo wrote: March 8th, 2020, 2:40 pm this a really old version 2 steps back ... but you got the moon working.... :D i made the things 4 nothing :P
If you're referring to my post, then yeah, as I said, maybe the moon "not working" was because of that messy syntax (and missing characters) in the translation .inc files. Better recheck those, if you still encounter such problems.
jsmorley wrote: March 8th, 2020, 2:50 pmThe way that it works with weather.com is that there are two kinds of information it returns. The "current" information, and the "forecasted" information. The word "forecast" implies "future", and simply can't logically be used once the time frame being referenced is in the past. You can't forecast what you had for breakfast this morning, you can only remember what you had. That is the role the MaxSince7am plays in this. After some point in the afternoon, it is how weather.com "remembers" what the high temperature was during the day. it has the additional charm of being accurate. Any "forecast" is a guess. Keeping track and returning what actually "happened" is always going to be more reliable.
Indeed, you're right. As I said in another thread, my approach (i.e. Daytime+Nighttime instead of High+Low or Max+Min) makes this (normal) weather.com behavior a non-issue (the weekday name is slightly greyed out in my case as well, as for night time).
Nighttime Weather.jpg
It will be an "issue" for the High+Low or Max+Min folks - a minor issue, of course, but an issue nonetheless.
jsmorley wrote: March 8th, 2020, 2:55 pmThe way I do it in my skin is to use the "forecast" temperature for "today" as the "high" while it is still "today", and when it becomes "tonight", I switch to using MaxSince7am, but slightly grey it out, so I know this is not a "forecast" anymore, but something that already happened.
Yes, that's a smart "workaround", true that. Lucky for you (and whoever approaches this the same way), a field like MaxSince7am exists. But if it didn't ... well, you could still find a workaround, just not that suitable. :D
You do not have the required permissions to view the files attached to this post.
Last edited by Yincognito on March 8th, 2020, 3:16 pm, edited 2 times in total.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7198
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather not working?

Post by Yincognito »

dvo wrote: March 8th, 2020, 3:13 pm no i was helping him but he started not from the things i already fixed but with the 1.0 version ... so that one doesn't include a total translation of all the lang's in for dutch : nl-NL < i took this and used it to translate the bottom part ... so it auto translate for en-BG or the en-US ect ...

ps i use the one JSmorley made and works fine with all high's and low's
my version is the blue one https://forum.rainmeter.net/viewtopic.php?f=5&t=23003&start=220
Oh, I see - all good then. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather not working?

Post by jsmorley »

In one sense, the "high" temperature for "today" is sorta pointless at some point, as it's never going to be that temperature again today. It's just not a forecast, it's a memory. However, I concede that knowing how high the temperature "was" today is of some interest, so I work it in. weather.com takes the more strict and literal view, and just won't return anything as a "forecast" that isn't in the "future". That's why MaxSince7am is in the @Current section, not the @Forecast section.
User avatar
Yincognito
Rainmeter Sage
Posts: 7198
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather not working?

Post by Yincognito »

jsmorley wrote: March 8th, 2020, 3:34 pm In one sense, the "high" temperature for "today" is sorta pointless at some point, as it's never going to be that temperature again today. It's just not a forecast, it's a memory. However, I concede that knowing how high the temperature "was" today is of some interest, so I work it in. weather.com takes the more strict and literal view, and just won't return anything as a "forecast" that isn't in the "future". That's why MaxSince7am is in the @Current section, not the @Forecast section.
Yep, I suppose they have to take the literal view on it, as their data is all about precise measurements and info (even if it's about forecasts).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
dasxardas
Posts: 25
Joined: March 6th, 2020, 9:38 am

Re: Weather not working?

Post by dasxardas »

jsmorley wrote: March 8th, 2020, 3:34 pm In one sense, the "high" temperature for "today" is sorta pointless at some point, as it's never going to be that temperature again today. It's just not a forecast, it's a memory. However, I concede that knowing how high the temperature "was" today is of some interest, so I work it in. weather.com takes the more strict and literal view, and just won't return anything as a "forecast" that isn't in the "future". That's why MaxSince7am is in the @Current section, not the @Forecast section.
Thank you for explain. I think that the easiest way will be simply deleted Max temp or replace it by "-" and keep only those two functioning parameters which are the same as on page weather.com, so It should be correct.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather not working?

Post by jsmorley »

Yincognito wrote: March 8th, 2020, 3:41 pm Yep, I suppose they have to take the literal view on it, as their data is all about precise measurements and info (even if it's about forecasts).
I can't say that I entirely love the methodology that weather.com uses, as while I generally accept that the forecast temperature for "today" will be the high, and the forecast temperature for "tonight" will be the low, I don't think that is entirely set in stone. I expect that there is some possibility, no matter how remote, that a warm front could come sweeping in during the evening, and the "night" could actually be warmer than the "day" was. I think I would have preferred an approach where the forecasted "high" and "low" for both parts of the day was just always returned, no matter what the time of day. While not strictly logical, it would certainly be easier to deal with. Also, note that weather.com can't tell you what the "high" will be for "tonight", or what the "low" will be for "today". I could envision those being of some interest.

But, it is what it is. Once you wrap your head around the logic of it all, and decide how you want to deal with it, it all works pretty well.
dasxardas
Posts: 25
Joined: March 6th, 2020, 9:38 am

Re: Weather not working?

Post by dasxardas »

Actually I'm trying to translate "Tonight" in green circle and also add description. I have translated Tonight in lang files, but it is still Tonight
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7198
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather not working?

Post by Yincognito »

jsmorley wrote: March 8th, 2020, 3:47 pm I can't say that I entirely love the methodology that weather.com uses, as while I generally accept that the forecast temperature for "today" will be the high, and the forecast temperature for "tonight" will be the low, I don't think that is entirely set in stone. I expect that there is some possibility, no matter how remote, that a warm front could come sweeping in during the evening, and the "night" could actually be warmer than the "day" was. I think I would have preferred an approach where the forecasted "high" and "low" for both parts of the day was just always returned, no matter what the time of day. While not strictly logical, it would certainly be easier to deal with. Also, note that weather.com can't tell you what the "high" will be for "tonight", or what the "low" will be for "today". I could envision those being of some interest.

But, it is what it is. Once you wrap your head around the logic of it all, and decide how you want to deal with it, it all works pretty well.
I'm not exactly in love with that methodology as well, as I too was used to high/low and max/min from the TV and such, but I took the decision to distribute those temps into the daytime / nighttime sections ever since the wxdata days - although back then the temps belonged to the "whole" forecasted day. My skins are scroll based, meaning they don't show both daytime and nighttime conditions, so distributing the temps this way perfectly suited my design (otherwise, I would have had either the daytime or the nighttime part of my skins displaying 2 temps while the other was left with none).

Incidentally (and interestingly), nowadays weather.com directly distributes them the same way I do, at least internally, where one temp belongs to the "day" (or better said "daytime") section and the other to the "night" (i.e. "nighttime") one. :lol: I guess they too figured out that, while not exactly "by the book", this distribution alleviated the "confusion" where you have dozens of conditions (e.g. wind, precip, UV index, icons, humidity and so on) specific to daytime and nighttime periods while the temps were the only ones excluded from this type of "structure". Of course, on the surface (i.e. on display on the main site) they are still labeled High / Low and Max / Min, but from a structural point of view this distribution makes just as much sense as the one displayed. As I already said, it isn't rocket science for the user to figure out which is which (i.e. high≈max≈daytime, low≈min≈nighttime)...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
dasxardas
Posts: 25
Joined: March 6th, 2020, 9:38 am

Re: Weather not working?

Post by dasxardas »

I found some collisions between Variables and *Language* files. If you want to translate all 6 days, moon phases are gone, if you set lang in Variables to en-GB, you!ll get moon phases but 1st day and night is in english independent which language you choose. Also if you change language in Variable, it rewrites or has higher priority short days of the week from server instead of those in language file. I try to look at it tomorrow, but 100% there are some interferences, this is main reason of missing moon phases in translations.

If i change code below to language which is set in Variables for example cs-CZ so moon phases are working again.

MeasureMoonPhaseIcon]
Measure=String
String=[@MoonDay1PhaseName]
DynamicVariables=1
Substitute="*Nový (language in Variables.imc)":"#@#MoonPhaseIcons\0.png", ....

So I need that parameter below was every time in correct language, because server is returning data from language in Variables.

Substitute="New":"#@#MoonPhaseIcons\0.png","Waxing Crescent":"#@#MoonPhaseIcons\1.png",
Last edited by dasxardas on March 9th, 2020, 5:44 pm, edited 1 time in total.