Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

SunTracker - with moving ghost

Questions and comments specific to a particular plugin should go here.
rdgerken
Experienced User
Posts: 89
Joined: Fri Sep 21, 2012 7:41 pm

Re: SunTracker - with moving ghost

Post 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.
User avatar
Saxtus
Posts: 42
Joined: Wed Jan 02, 2013 3:37 am
Location: Athens, Greece
Contact:

Re: SunTracker - with moving ghost

Post 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.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SunTracker - with moving ghost

Post 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
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SunTracker - with moving ghost

Post 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


User avatar
Saxtus
Posts: 42
Joined: Wed Jan 02, 2013 3:37 am
Location: Athens, Greece
Contact:

Re: SunTracker - with moving ghost

Post 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?
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SunTracker - with moving ghost

Post by krambriw »

Yep, should be ok versions...
User avatar
Saxtus
Posts: 42
Joined: Wed Jan 02, 2013 3:37 am
Location: Athens, Greece
Contact:

Re: SunTracker - with moving ghost

Post 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)
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SunTracker - with moving ghost

Post 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 305 times
User avatar
Saxtus
Posts: 42
Joined: Wed Jan 02, 2013 3:37 am
Location: Athens, Greece
Contact:

Re: SunTracker - with moving ghost

Post 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?
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SunTracker - with moving ghost

Post 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
User avatar
Saxtus
Posts: 42
Joined: Wed Jan 02, 2013 3:37 am
Location: Athens, Greece
Contact:

Re: SunTracker - with moving ghost

Post 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.
User avatar
Saxtus
Posts: 42
Joined: Wed Jan 02, 2013 3:37 am
Location: Athens, Greece
Contact:

Re: SunTracker - with moving ghost

Post 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".
User avatar
Saxtus
Posts: 42
Joined: Wed Jan 02, 2013 3:37 am
Location: Athens, Greece
Contact:

Re: SunTracker - with moving ghost

Post 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
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SunTracker - with moving ghost

Post 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
User avatar
Saxtus
Posts: 42
Joined: Wed Jan 02, 2013 3:37 am
Location: Athens, Greece
Contact:

Re: SunTracker - with moving ghost

Post 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.
Post Reply