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.
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
Re: SunTracker - with moving ghost
Is the latitude / longitude figure supposed to be red if you put in a negative figure? e.g. a southern hemisphere country
Thanks!
Thanks!
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Yes, this is the standard for SpinNumCtrl
BestR
BestR
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
Hello!
I think I've found a bug again!
I am trying the "SunTracker: Check if time now is inside calculated virtual range including a weather compensated offset" functions with the following settings:

The sunset part seems working ok.
The sunrise part is not.
It returns True at Sunrise (7:35am in my case), ignoring the offset,
then goes back to returning False at 7:52am (obeying the offset),
until 8:35am that start returning True again (as expected).
I think I've found a bug again!
I am trying the "SunTracker: Check if time now is inside calculated virtual range including a weather compensated offset" functions with the following settings:

The sunset part seems working ok.
The sunrise part is not.
It returns True at Sunrise (7:35am in my case), ignoring the offset,
then goes back to returning False at 7:52am (obeying the offset),
until 8:35am that start returning True again (as expected).
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
I'm not so sure. Have you verified that the conditions are all fulfilled or not changed during the possible time interval range?
Every minute the calculation happens and the weather compensation is taken into consideration. Suppose the
weather condition changes during the time period (in your case we are talking about 2 hours). What could happen
is that you will get 'true' already at sunrise even with -120 minutes if the weather condition is
in the list 'weather_conditions_dark'. If the weather condition then changes, you could get 'false' again if you are still
in the sunrise+120 minutes range. Actually, you could get a lot of changes 'true'/'false' within this range if
the weather condition would change dramatically several times.
To verify better, you could active the print statement that is in the plugin code.
Line nbr 4610:
This morning, the results in my case was the following:
As you can see, it was -60 minutes compensation as expected.
A little later the weather was changed:
To get the first line printing the base sunrise/sunset times, I use a simple python script with:
You have to compare those data to verify if the return value is correct or not. In the example above, I would get
true exactly at sunrise since the weather condition 'Light Sleet' would give a resulting time compensation of zero.
Best regards, Walter
Every minute the calculation happens and the weather compensation is taken into consideration. Suppose the
weather condition changes during the time period (in your case we are talking about 2 hours). What could happen
is that you will get 'true' already at sunrise even with -120 minutes if the weather condition is
in the list 'weather_conditions_dark'. If the weather condition then changes, you could get 'false' again if you are still
in the sunrise+120 minutes range. Actually, you could get a lot of changes 'true'/'false' within this range if
the weather condition would change dramatically several times.
To verify better, you could active the print statement that is in the plugin code.
Line nbr 4610:
Code: Select all
print isInsideRange, currCondition, self.iTimeAhead
Code: Select all
2013-01-26 09:09:00 ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Mostly Cloudy'
2013-01-26 09:09:00 ('Up|0810', 'Down|1551')
2013-01-26 09:09:00 False Mostly Cloudy -60
2013-01-26 09:10:00 ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Mostly Cloudy'
2013-01-26 09:10:00 ('Up|0810', 'Down|1551')
2013-01-26 09:10:00 True Mostly Cloudy -60
A little later the weather was changed:
Code: Select all
2013-01-26 10:45:00 ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Light Sleet'
2013-01-26 10:45:00 ('Up|0810', 'Down|1551')
2013-01-26 10:45:00 True Light Sleet 0Code: Select all
print eg.plugins.Suntracker.GetTimeFor_SunSet_SunRise()
true exactly at sunrise since the weather condition 'Light Sleet' would give a resulting time compensation of zero.
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
Yes and sorry for forgetting mentioning it.krambriw wrote:Have you verified that the conditions are all fulfilled or not changed during the possible time interval range?
I was proactive and I checked the weather statements from the log: It was "Mostly Cloudy" at the entire time.
Thing is that I woke up that time, but I don't know when that will happen again to make more tests.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
OK, but you could activate the thing as i have from now and then just log it, hopefully we will get some data captured that can help us find the issue. For better logging, use Pako's nice 'Log redirector' plugin.
BestR Walter
BestR Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
I did. I will let you know of my findings.
Let's hope I was just not fully awake and I misread my logs!
Let's hope I was just not fully awake and I misread my logs!
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
@saxtus
Just some interesting observations:
This morning, the following was in the log
At sunrise, the weather made the total time compensation to -60 minutes, expected the 'true' condition to happen at 0901 instead of 0801 (actual sunrise)
Everything worked as expected.
Best regards, Walter
Just some interesting observations:
This morning, the following was in the log
At sunrise, the weather made the total time compensation to -60 minutes, expected the 'true' condition to happen at 0901 instead of 0801 (actual sunrise)
But next in a few minutes, the weather changed to 'Light Rain' and the condition became 'true' instantly2013-01-30 08:00:00 ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Mostly Cloudy'
2013-01-30 08:00:00 ('Up|0801', 'Down|1601')
2013-01-30 08:00:00 False Mostly Cloudy -60
2013-01-30 08:01:00 ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Mostly Cloudy'
2013-01-30 08:01:00 ('Up|0801', 'Down|1601')
2013-01-30 08:01:00 False Mostly Cloudy -60
2013-01-30 08:01:00 EVENT: Main.Sunrise
2013-01-30 08:02:00 ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Mostly Cloudy'
2013-01-30 08:02:00 ('Up|0801', 'Down|1601')
2013-01-30 08:02:00 False Mostly Cloudy -60
2013-01-30 08:03:00 ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Mostly Cloudy'
2013-01-30 08:03:00 ('Up|0801', 'Down|1601')
2013-01-30 08:03:00 False Mostly Cloudy -60
The weather stayed like this for a while and then later changed to 'Rain' and kept the condition 'true'.2013-01-30 08:08:00 ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Mostly Cloudy'
2013-01-30 08:08:00 ('Up|0801', 'Down|1601')
2013-01-30 08:08:00 False Mostly Cloudy -60
2013-01-30 08:09:00 ["'Main.Weather", "Condition:'"]Main.Weather Condition: 'Light Rain'
2013-01-30 08:09:00 ('Up|0801', 'Down|1601')
2013-01-30 08:09:00 True Light Rain 0
Everything worked as expected.
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
Until I have the log file to prove it, your script works as expected.
This time I am prepared, log is created 24/7, but at sunrise your script is used only when I am awake and that somehow haven't happened yet!
This time I am prepared, log is created 24/7, but at sunrise your script is used only when I am awake and that somehow haven't happened yet!
Re: SunTracker - with moving ghost
Proof logSaxtus wrote:Until I have the log file to prove it, your script works as expected.
This time I am prepared, log is created 24/7, but at sunrise your script is used only when I am awake and that somehow haven't happened yet!

Now, either I don't understand how compensation works, or the value is ignored completely if the weather is good and does zero compensation.
What I am looking for, is a way to have combined custom compensation + weather compensation.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
What I can see, the logic is working correctly (even if it is not matching your expectations).Now, either I don't understand how compensation works, or the value is ignored completely if the weather is good and does zero compensation.
What I am looking for, is a way to have combined custom compensation + weather compensation.
'Light Rain' is defined under 'weather_conditions_dark():'
What will happen is that your '-120' will be fully weather compensated and therefore you see a ' 0 ' value.
If the weather would have been some condition under the section 'weather_conditions_half_bright():' the compensation would result in ' -60 ' and for all conditions under 'weather_conditions_bright():' the result would be ' -120 '.
I think I understand, you would actually like to have a fixed offset setting as well in combination with the weather stuff.
So as example, assume a fixed offset of ' -60 ' and a weather compensation of ' -60 '. This would result in a the following possible resulting compensations: -120, -90 and -60
If you instead would set ' +30 ' as fixed and ' -60 ' for weather, the possible resulting could be: -30, 0 and +30
Did I understand your expectation correctly?
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
Yes!krambriw wrote:Did I understand your expectation correctly?
I thought it was clear from a previous post of mine.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
@saxtus
Attached version I think is working correctly...
Now you configure first the default offset you like to have (-120 ---- +120 minutes)
Second you set the weather compensation time base (0 ---- +120 minutes)
If clear weather, only the offset will have an impact, if weather gets bad, the weather compensation comes into consideration.
Like if you have -60 as offset, in good weather it will return 'false' 60 minutes before sunset and 'true' 60 minutes after sunrise.
If you then add a value for the weather compensation, like 30, this will be used as well: in good weather it will not be considered at all, in half bad 15 minutes will be added so you would get -75 and in bad weather you would get -90 in total correction.
Let me know what you think about it?
Best regards, Walter
PS I have tried testing as much as possible by changing my PC clock back and forth, it looked ok in my tests.
Attached version I think is working correctly...
Now you configure first the default offset you like to have (-120 ---- +120 minutes)
Second you set the weather compensation time base (0 ---- +120 minutes)
If clear weather, only the offset will have an impact, if weather gets bad, the weather compensation comes into consideration.
Like if you have -60 as offset, in good weather it will return 'false' 60 minutes before sunset and 'true' 60 minutes after sunrise.
If you then add a value for the weather compensation, like 30, this will be used as well: in good weather it will not be considered at all, in half bad 15 minutes will be added so you would get -75 and in bad weather you would get -90 in total correction.
Let me know what you think about it?
Best regards, Walter
PS I have tried testing as much as possible by changing my PC clock back and forth, it looked ok in my tests.
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
Thank you once again!
I've installed it, configured it and seems working ok so far.
I guess time will tell!
I've installed it, configured it and seems working ok so far.
I guess time will tell!
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Released version updated in first post
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM