HomeGenie Forum
General Category => Troubleshooting and Support => Topic started by: mchias13 on August 22, 2016, 03:37:23 AM
-
For some reason, my sunset and sunrise times have not been updating. The WU app shows the correct sunset time for 19:38, but the schedule shows the sunset time as 20:08. It's like it hasn't updated in almost a month. I'm on r252. The sunrise is showing similar issues.
-
I had a similar problem. I switched to Edge and JKUTILS for timing. I gave up on WU. BTW Thank you for all your help to me in the past.
-
are you able to use jkutils with the new scheduler? I tried linking it like I did with @Sunrise and it didn't work. I tried @Evening.Sunset.Start and no go.
-
If you're using build 525, use @SolarTimes.Sunrise and @SolarTimes.Sunset. These variables are now built right into the scheduler. No need for jkutils or for a Weather Underground API key.
-
Thanks. @SolarTimes worked.
-
Hello, I am trying to use @SolarTimes.Sunset in my C# code.
I see this error from the compiler
Error
×
Line 20, Column 34 (Code):
An object reference is required to access non-static member `Innovative.SolarCalculator.SolarTimes.Sunrise'
can anyone decipher this ? Thanks!!! :)
-
Post a code snippet. Perhaps it's just an error in the code?
-
Here ya go :)
if (module.Is("BackPorchMotion"))
{
[email protected];
[email protected];
if (DateTime.Compare(DateTime.Now, time_sunrise)<0 || DateTime.Compare(DateTime.Now, time_sunset)>0)
{
Night = true;
//Log("Night");
}
else
{
Night = false;
//Log("Day");
}
-
I don't think you can use that declaration for time_sunset. For my Advanced Smart Lights code, I use a different approach.
time_sunrise = DateTime.ParseExact(Program.WithName("jkUtils - Solar Altitude").Parameter("jkUtils.SolarAltitude.Morning.Sunrise.Start").Value, "H:mm", System.Globalization.CultureInfo.InvariantCulture);
time_sunset = DateTime.ParseExact(Program.WithName("jkUtils - Solar Altitude").Parameter("jkUtils.SolarAltitude.Evening.Sunset.End").Value, "H:mm", System.Globalization.CultureInfo.InvariantCulture);
The important part is that I use ".Parameter("jkUtils.SolarAltitude.Morning.Sunrise.Start").Value". You might be able to use your "@SolarTimes.Sunrise" assignment, but I think you will need to use quotes at a minimum.