Re: Weather Skins Not Working
Posted: August 20th, 2020, 11:33 pm
If it's easier for your calculations, you can also use the actual "timestamps" for Sunrise / Sunset from the measures.
That seems to work, thank you! The only thing I noticed is that if the minutes is 00 in the string, it gets converted to 0 in the number. So if the sunrise time is 6:00, it displays as 6:0 instead.jsmorley wrote: ↑August 20th, 2020, 11:28 pmCode: 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
Code: Select all
[MeasureCurrentHourString]
Measure=String
String=[@CurrentObservationTime]
StringIndex=44
Group=Weather
DynamicVariables=1
RegExpSubstitute=1
Substitute="^(.*):.*$":"\1"
[MeasureCurrentMinuteString]
Measure=String
String=[@CurrentObservationTime]
StringIndex=45
Group=Weather
DynamicVariables=1
RegExpSubstitute=1
Substitute="^.*:(.*) .*$":"\1"
[MeasureCurrentHourNumber]
Measure=Calc
Formula=[MeasureCurrentHourString]
DynamicVariables=1
[MeasureCurrentMinuteNumber]
Measure=Calc
Formula=[MeasureCurrentMinuteString]
DynamicVariables=1
[MeasureSunRiseHourString]
Measure=String
String=[@CurrentSunriseTime]
StringIndex=46
Group=Weather
DynamicVariables=1
RegExpSubstitute=1
Substitute="^(.*):.*$":"\1"
[MeasureSunRiseMinuteString]
Measure=String
String=[@CurrentSunriseTime]
StringIndex=47
Group=Weather
DynamicVariables=1
RegExpSubstitute=1
Substitute="^.*:(.*) .*$":"\1"
[MeasureSunRiseHourNumber]
Measure=Calc
Formula=[MeasureSunRiseHourString]
DynamicVariables=1
[MeasureSunRiseMinuteNumber]
Measure=Calc
Formula=[MeasureSunRiseMinuteString]
DynamicVariables=1
[MeasureSunsetHourString]
Measure=String
String=[@CurrentSunsetTime]
StringIndex=48
Group=Weather
DynamicVariables=1
RegExpSubstitute=1
Substitute="^(.*):.*$":"\1"
[MeasureSunsetMinuteString]
Measure=String
String=[@CurrentSunsetTime]
StringIndex=49
Group=Weather
DynamicVariables=1
RegExpSubstitute=1
Substitute="^.*:(.*) .*$":"\1"
[MeasureSunsetHourNumber]
Measure=Calc
Formula=[MeasureSunsetHourString]
DynamicVariables=1
[MeasureSunsetMinuteNumber]
Measure=Calc
Formula=[MeasureSunsetMinuteString]
DynamicVariables=1
[MeasureDifferenceMin]
Measure=Calc
Formula=(MeasureSunsetHourNumber*60+MeasureSunsetMinuteNumber)-(MeasureSunRiseHourNumber*60+MeasureSunRiseMinuteNumber)
Group=Weather
DynamicVariables=1
[MeasurePosition1]
Measure=Calc
Formula=((MeasureCurrentHourNumber*60+MeasureCurrentMinuteNumber)-(MeasureSunRiseHourNumber*60+MeasureSunsetMinuteNumber))/(MeasureDifferenceMin=0?1:MeasureDifferenceMin)
Group=Weather
DynamicVariables=1
[MeasurePosition2]
Measure=Calc
Formula=MeasurePosition1 < 0 ? 0 : (MeasurePosition1 < 1 ? MeasurePosition1 : 1)
Group=Weather
DynamicVariables=1
Yeah, I wouldn't use the "number" value to display the minutes. You are going to want the "string" value from the String measure, which will display the minutes as "00". Use the "number" value for calculations. "00" is not a valid number. That is why I used String measures to extract the values, and Calc measures to turn that into actual numbers.bravo-lemur wrote: ↑August 20th, 2020, 11:43 pm That seems to work, thank you! The only thing I noticed is that if the minutes is 00 in the string, it gets converted to 0 in the number. So if the sunrise time is 6:00, it displays as 6:0 instead.
I've currently got the following code, which seems to be working for the roundline suntrail (Meter=Roundline, MeasureName=MeasurePosition2), although I'll double check tomorrow during the day!
Code: Select all
[MeasureCurrentHourString] Measure=String String=[@CurrentObservationTime] StringIndex=44 Group=Weather DynamicVariables=1 RegExpSubstitute=1 Substitute="^(.*):.*$":"\1" [MeasureCurrentMinuteString] Measure=String String=[@CurrentObservationTime] StringIndex=45 Group=Weather DynamicVariables=1 RegExpSubstitute=1 Substitute="^.*:(.*) .*$":"\1" [MeasureCurrentHourNumber] Measure=Calc Formula=[MeasureCurrentHourString] DynamicVariables=1 [MeasureCurrentMinuteNumber] Measure=Calc Formula=[MeasureCurrentMinuteString] DynamicVariables=1 [MeasureSunRiseHourString] Measure=String String=[@CurrentSunriseTime] StringIndex=46 Group=Weather DynamicVariables=1 RegExpSubstitute=1 Substitute="^(.*):.*$":"\1" [MeasureSunRiseMinuteString] Measure=String String=[@CurrentSunriseTime] StringIndex=47 Group=Weather DynamicVariables=1 RegExpSubstitute=1 Substitute="^.*:(.*) .*$":"\1" [MeasureSunRiseHourNumber] Measure=Calc Formula=[MeasureSunRiseHourString] DynamicVariables=1 [MeasureSunRiseMinuteNumber] Measure=Calc Formula=[MeasureSunRiseMinuteString] DynamicVariables=1 [MeasureSunsetHourString] Measure=String String=[@CurrentSunsetTime] StringIndex=48 Group=Weather DynamicVariables=1 RegExpSubstitute=1 Substitute="^(.*):.*$":"\1" [MeasureSunsetMinuteString] Measure=String String=[@CurrentSunsetTime] StringIndex=49 Group=Weather DynamicVariables=1 RegExpSubstitute=1 Substitute="^.*:(.*) .*$":"\1" [MeasureSunsetHourNumber] Measure=Calc Formula=[MeasureSunsetHourString] DynamicVariables=1 [MeasureSunsetMinuteNumber] Measure=Calc Formula=[MeasureSunsetMinuteString] DynamicVariables=1 [MeasureDifferenceMin] Measure=Calc Formula=(MeasureSunsetHourNumber*60+MeasureSunsetMinuteNumber)-(MeasureSunRiseHourNumber*60+MeasureSunRiseMinuteNumber) Group=Weather DynamicVariables=1 [MeasurePosition1] Measure=Calc Formula=((MeasureCurrentHourNumber*60+MeasureCurrentMinuteNumber)-(MeasureSunRiseHourNumber*60+MeasureSunsetMinuteNumber))/(MeasureDifferenceMin=0?1:MeasureDifferenceMin) Group=Weather DynamicVariables=1 [MeasurePosition2] Measure=Calc Formula=MeasurePosition1 < 0 ? 0 : (MeasurePosition1 < 1 ? MeasurePosition1 : 1) Group=Weather DynamicVariables=1
Code: Select all
[Rainmeter]
AccurateText=1
Update=1000
Group=Sephi
[Metadata]
Name=Weather
Author=Sephirotess
Information=Weather. A large portion of code is taken from JSMorley.
Version=1.1
License=Creative Commons Attribution-Noncommercial-Share Alike 4.0 License
@include=#@#Measures\Divers\Weather.inc
katastrofa wrote: ↑August 21st, 2020, 9:11 amhello, my english is not the best
can someone tell me where to insert the code for my city
Although sephirotess usually reuses the code and only builds a different visual appearance for each of his skin suites so it's a bit difficult to identify the skin we're talking about, I believe this could be this skin. The text matches the one posted above, it's even a higher version (i.e. 1.2), judging from the Version string, but still uses the old wxdata. In other words, if version 1.2 used wxdata, then for sure version 1.1 did as well, so no jsmorley's .inc files for this, I suppose. The skin will probably have to be entirely rewritten to be up to date with the changes...ikarus1969 wrote: ↑August 21st, 2020, 9:38 am As i can see the skin is/was made by sephirotess. This user once posted a lot of skins but did not post anything recently. It's unclear if the skin you use is already updated to reflect the latest changes in the used weather-site(s).
So please post a link where you downloaded the skin so we can have a look at it?
https://visualskins.com/skin/botanicula-vr11ikarus1969 wrote: ↑August 21st, 2020, 9:38 am As i can see the skin is/was made by sephirotess. This user once posted a lot of skins but did not post anything recently. It's unclear if the skin you use is already updated to reflect the latest changes in the used weather-site(s).
So please post a link where you downloaded the skin so we can have a look at it?
Yep, this works with the now defunct wxdata.com, so the effort of converting it is probably bigger than the gain. Take a look here or here. The skin from the last link (by jsmorley) works for sure, as it uses the API JSON and not the main site one. Even the other skins should work in theory, as long as you copy jsmorley's .INC files in order to update the code that parses the JSON.katastrofa wrote: ↑August 21st, 2020, 10:20 am https://visualskins.com/skin/botanicula-vr11
If it can't work, recommend one that can