Page 22 of 38

Re: SunTracker - with moving ghost

Posted: Fri Dec 07, 2012 2:46 am
by rdgerken
Thanks for the explanation guys. I totally forgot that installing an update would overwrite the base plugins, including ones that I may have updated on my own.

Re: SunTracker - with moving ghost

Posted: Wed Jan 02, 2013 4:07 am
by Saxtus
I've decided to start using the "GetSunStatusWeatherCompensated" function like below and put it on a "Main.Weather Condition:" trigger to check what is happening every minute:

Code: Select all

bSunStatus = eg.plugins.Suntracker.GetSunStatusWeatherCompensated(60)
print bSunStatus
But I am getting a weird behavior every day:
It returns false, as expected, when sun goes down, but every night, from 23:30 until 00:30 sharp, it returns true.

Now, I've checked out of the window and the sun didn't suddenly came out half hour before midnight for an hour and gone back to hiding after that. :)
On top of that, "IsSunDown" function agrees with my "out of the window" observation, so I guess that there must be something wrong with GetSunStatusWeatherCompensated one or I am doing something terribly wrong.

Is it happening only with me?
Any ideas?

Also I am interested to know if the sunrise/sunset times, take into consideration the daylight savings time difference each summer.
Thanks in advance.

Re: SunTracker - with moving ghost

Posted: Wed Jan 02, 2013 8:31 pm
by krambriw

Code: Select all

But I am getting a weird behavior every day
You might have found a bug, I will have test myself...
Also I am interested to know if the sunrise/sunset times, take into consideration the daylight savings time difference each summer.
Yes it does, it considers daylight savings (or shall...if it works correct)

BestR Walter

Re: SunTracker - with moving ghost

Posted: Thu Jan 03, 2013 8:31 am
by krambriw
Unfortunately, it works here as expected when I run the same script as you (see the sample log from below where i have added some additional print statements inside the plugin code to see the values of some variables). I do not get any 'True' at all during the time interval as you get.

Are you running the latest version?

BestR Walter

Code: Select all

2013-01-02 23:56:00  ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Fair'
2013-01-02 23:56:00           Fair 0
2013-01-02 23:56:00           2356 1501
2013-01-02 23:56:00           2356 0842
2013-01-02 23:56:00           False
2013-01-02 23:56:34  EVENT: TellStickDuo.oregon.1A2D.230.Temperature: '22.6'
2013-01-02 23:57:00  ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Fair'
2013-01-02 23:57:00           Fair 0
2013-01-02 23:57:00           2357 1501
2013-01-02 23:57:00           2357 0842
2013-01-02 23:57:00           False
2013-01-02 23:57:27  EVENT: TellStickDuo.mandolyn.temperaturehumidity.11.Temperature: '-0.8'
2013-01-02 23:57:33  EVENT: TellStickDuo.mandolyn.temperaturehumidity.81.Temperature: '-0.8'
2013-01-02 23:58:00  ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Fair'
2013-01-02 23:58:00           Fair 0
2013-01-02 23:58:00           2358 1501
2013-01-02 23:58:00           2358 0842
2013-01-02 23:58:00           False

.
.
.

2013-01-03 00:24:00  ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Fair'
2013-01-03 00:24:00           Fair 0
2013-01-03 00:24:00           0024 1502
2013-01-03 00:24:00           0024 0842
2013-01-03 00:24:00           False
2013-01-03 00:25:00  ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Fair'
2013-01-03 00:25:00           Fair 0
2013-01-03 00:25:00           0025 1502
2013-01-03 00:25:00           0025 0842
2013-01-03 00:25:00           False
2013-01-03 00:25:27  EVENT: TellStickDuo.mandolyn.temperaturehumidity.11.Temperature: '-1.0'
2013-01-03 00:26:00  ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Fair'
2013-01-03 00:26:00           Fair 0
2013-01-03 00:26:00           0026 1502
2013-01-03 00:26:00           0026 0842
2013-01-03 00:26:00           False
2013-01-03 00:27:00  ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Fair'
2013-01-03 00:27:00           Fair 0
2013-01-03 00:27:00           0027 1502
2013-01-03 00:27:00           0027 0842
2013-01-03 00:27:00           False



Re: SunTracker - with moving ghost

Posted: Thu Jan 03, 2013 9:10 am
by Saxtus
krambriw wrote:Are you running the latest version?
I've copied over the files from the SunTracker_15.09.2012.zip archive, overwriting the old ones (some .pyc files was already there, I didn't touched them).
It say v1.4.5 at EventGhost. Is this the latest?

Re: SunTracker - with moving ghost

Posted: Thu Jan 03, 2013 9:45 am
by krambriw
Yep, should be ok versions...

Re: SunTracker - with moving ghost

Posted: Thu Jan 03, 2013 10:03 am
by Saxtus
Is there a way to help you debug this?
Any info, log file or settings I can share with you?
(it happened again last night, as every night)

Re: SunTracker - with moving ghost

Posted: Thu Jan 03, 2013 12:48 pm
by krambriw
Hi, try to run this attached version. It will give more print statements and hopefully give a hint of what could be wrong

BestR Walter
__init__.py
(159.92 KiB) Downloaded 306 times

Re: SunTracker - with moving ghost

Posted: Thu Jan 03, 2013 6:55 pm
by Saxtus
Got it installed.
EventGhost reports it as v1.4.7 test 0.1, but I don't see any new output.
Maybe I need to utilize a function?

Re: SunTracker - with moving ghost

Posted: Thu Jan 03, 2013 7:06 pm
by krambriw
You should just run your script as earlier and every minute you should see something like below printed in the log:

Code: Select all

20:04:00   Main.Weather Condition: 'Partly Cloudy'
20:04:00   Partly Cloudy -30
20:04:00   2034 1502
20:04:00   1934 0842
20:04:00   False

Re: SunTracker - with moving ghost

Posted: Thu Jan 03, 2013 7:13 pm
by Saxtus
Ah, I was blind or something.

Here is what I got:

Code: Select all

21:10:00   Main.Weather Condition: 'Mostly Cloudy'
21:10:00            Mostly Cloudy -30
21:10:00            2140 1654
21:10:00            2040 0610
21:10:00            False
Hopefully what it will say after 23:30 it will help you.
Soon we will know :)

EDIT: I had messed up my print script a bit, restored it as before and edited the code above to match it.

Re: SunTracker - with moving ghost

Posted: Thu Jan 03, 2013 9:38 pm
by Saxtus
Here we go:

Code: Select all

23:29:00   Main.Weather Condition: 'Partly Cloudy'
23:29:00            Partly Cloudy -30
23:29:00            2359 1654
23:29:00            2259 0610
23:29:00            False
23:30:00   Main.Weather Condition: 'Partly Cloudy'
23:30:00            Partly Cloudy -30
23:30:00            0000 1654
23:30:00            2300 0610
23:30:00            True
23:31:00   Main.Weather Condition: 'Partly Cloudy'
23:31:00            Partly Cloudy -30
23:31:00            0001 1654
23:31:00            2301 0610
23:31:00            True
EDIT:
I've tried with different "xx" on "GetSunStatusWeatherCompensated(xx)" and depending on how high the number is, returns True (wrong) or False (correct).
at 23:44 the maximum "xx" to return correct value was "32".
at 23:45 was "29".
at 23:46 was "26".

Re: SunTracker - with moving ghost

Posted: Thu Jan 03, 2013 10:44 pm
by Saxtus
And now the "back to normality" period:

Code: Select all

00:29:00   Main.Weather Condition: 'Partly Cloudy'
00:29:00            Partly Cloudy -30
00:29:00            0059 1654
00:29:00            2359 0611
00:29:00            True
00:30:00   Main.Weather Condition: 'Partly Cloudy'
00:30:00            Partly Cloudy -30
00:30:00            0100 1654
00:30:00            0000 0611
00:30:00            False
00:31:00   Main.Weather Condition: 'Partly Cloudy'
00:31:00            Partly Cloudy -30
00:31:00            0101 1654
00:31:00            0001 0611
00:31:00            False

Re: SunTracker - with moving ghost

Posted: Fri Jan 04, 2013 10:26 am
by krambriw
It was a bug you found, thank you!

I have changed the evaluation logic, can you try this version instead? (It seems working ok when I test...)

BestR Walter
__init__.py
(160.06 KiB) Downloaded 300 times

Re: SunTracker - with moving ghost

Posted: Fri Jan 04, 2013 2:10 pm
by Saxtus
It was my pleasure to help.

Installed now and I'll have an eye on it when the sun goes down.
Probably tomorrow I will make a new post to tell you how it went.