SunTracker - with moving ghost

Questions and comments specific to a particular plugin should go here.

Re: SunTracker - with moving ghost

Postby piert » Fri Jul 29, 2011 7:52 am

Foune wrote:Thank you very much for you explanations. I think that for a H24 use, the weather should be updated only every hour.

That may depend on what you need it for. For my scenario, where the plugin decides if lights should be switched on at the moment of switching on the television, it can make a big (positive) difference to have frequent updates. See my earlier post http://www.eventghost.net/forum/viewtopic.php?p=18973#p18973
piert
Experienced User
 
Posts: 116
Joined: Tue Jun 14, 2011 2:53 pm

Re: SunTracker - with moving ghost

Postby krambriw » Sat Jul 30, 2011 5:40 am

@Piert

When/if you think the latest version is working ok, let me know and I will make this a regular release update in the first post.

Thanks & Best regards, Walter
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker - with moving ghost

Postby piert » Sat Jul 30, 2011 9:25 am

Walter,

I think you might as well do that. I have tested if it worked as expected after midnight a couple of times and it did perform without any problems for me.
Should anything unexpected pop up I will let you know.

Thank you for your help in getting this realized,

Best regards,
Perry
piert
Experienced User
 
Posts: 116
Joined: Tue Jun 14, 2011 2:53 pm

Re: SunTracker - with moving ghost

Postby Foune » Sat Jul 30, 2011 9:30 am

I'm going to run your last version during a couple of days, I'll let you know wether I get problems
Foune
 
Posts: 12
Joined: Sun Jul 03, 2011 7:08 pm

Re: SunTracker - with moving ghost

Postby piert » Sat Jul 30, 2011 10:39 am

@Walter:

Out of curiosity, under which weather conditions is the maximum weather offset applied?
I just checked the weather offset value in the payload under current 'overcast' weather conditions and it seems that only a 30 minutes adjustment is applied (the other 30 minutes of the total of -60 minutes comes from user applied offset of -30):

12:31:07 Main.IsSunDown.False u"-30|60|Overcast|Real Sunset expected:|2120|Virtual Sunset expected:|2020|Minutes to Virtual Sunset:|469|Minutes adjusted:|-60|IsSunDown:|False"


I checked the internet to find out what the standard weather terms mean and found this:
from:
http://www.schorsch.com/en/kbase/glossary/skies.html
(Terms of daylighting)

For daylighting purposes, the CIE declares a number of sky conditions as standard skies. Those are defined by functions, depending on the solar altitude, even when the sun is hidden.

Sunny sky is any sky condition where the sun happens to shine (through the clouds, if there are any). This can be combined with any of the following three conditions.

Clear sky has less than 30 % cloud cover, or none. This sky is most likely to be combined with sun.

Partly cloudy sky has between 30 % and 70 % cloud cover. This sky can be combined with sun in some cases.

Cloudy sky has more than 70 % cloud cover. This sky normally excludes the sun.

Overcast sky has a completely closed cloud cover (100 %). Obviously, this sky can't be combined with sun in a meaningful way. This is the sky condition applied in daylight factor calculations.


I would have thought that the last state 'overcast' would cause the full adjustment time (in above example case 60 minutes) for weather offset to be applied?

Edit: or maybe the "Minutes adjusted:|-60" in the payload indicates only the weather adjustment offset? If so, it may be a good idea to change the description "Minutes adjusted" to "Minutes weather adjustment" or something similar.
piert
Experienced User
 
Posts: 116
Joined: Tue Jun 14, 2011 2:53 pm

Re: SunTracker - with moving ghost

Postby krambriw » Sat Jul 30, 2011 3:14 pm

@ Perry,

Good point, I did not know about this regarding overcast, thanks

Regarding the display of "Minutes adjusted" is the total adjustment including your fixed offset and the calculted weather part calculated as below. Is not very scientific, based on praxis & feeling. If you think we shall change and you have a good suggestion, no problem we will change. Like the one for the overcast, that will for sure be changed. I do not have any compensation "half positive", maybe this should be added

Best regards, Walter

full negative compensation:
"Cloudy",
"Fog",
"Light Rain",
"Rain",
"Rain Showers",
"Freezing Rain",
"Freezing Drizzle",
"Drizzle",
"Flurries",
"Rain and Snow",
"Showers",
"Isolated Thunderstorms",
"Thunderstorm",
"Chance of Showers",
"Chance of Snow",
"Chance of Storm",
"Scattered Showers",
"Mist",
"Dust",
"Icy",
"Smoke",
"Sleet"

half negative compensation:
"Snow",
"Light snow",
"Snow Showers",
"Mostly Cloudy",
"Overcast",
"Ice/Snow",
"Haze",
"Partly Cloudy"

full positive compensation during summer months and no compensation for other months:

"Clear",
"Sunny",
"Mostly Sunny",
"Partly Sunny"
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker - with moving ghost

Postby Foune » Sun Jul 31, 2011 7:31 am

Krambriw, it's probably a newbie question, why can I see this in the log ("JourNuit" is my tracker event prefix) ? EventLog runned this night :

Code: Select all
01:18:01   Main.JourNuit.OFF
01:48:02   Main.JourNuit.OFF
02:18:01   Main.JourNuit.OFF
02:48:02   Main.JourNuit.OFF
03:18:02   Main.JourNuit.OFF
03:48:01   Main.JourNuit.OFF
04:18:02   Main.JourNuit.OFF
04:48:02   Main.JourNuit.OFF
05:18:02   Main.JourNuit.OFF
05:48:02   Main.JourNuit.OFF
06:01:00   Main.Sunrise
06:18:02   Main.JourNuit.OFF
06:48:02   Main.JourNuit.OFF
07:18:01   Main.JourNuit.OFF
07:48:01   Main.JourNuit.OFF
08:18:02   Main.JourNuit.OFF
08:48:01   Main.JourNuit.OFF
09:18:02   Main.JourNuit.OFF


I havn't set up the "Night off", "Evening Off" and so on options.
Foune
 
Posts: 12
Joined: Sun Jul 03, 2011 7:08 pm

Re: SunTracker - with moving ghost

Postby krambriw » Sun Jul 31, 2011 10:11 am

The tracker is by default synchronising every 30 min. If you uncheck "Synchronisation activated" and save, it will stop. The idea behind synchronisation is to ensure that the correct state is set (sooner or later) if you make a manual override for some reason. I have some lamps myself that are controlled by cheap rf-remotes and I want those lamps to be correctly set even if someone is using a remote to change state temporarily.

Best regards, Walter
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker - with moving ghost

Postby Foune » Sun Jul 31, 2011 9:37 pm

All right, I understand now. That's very usefull indeed.
Foune
 
Posts: 12
Joined: Sun Jul 03, 2011 7:08 pm

Re: SunTracker - with moving ghost

Postby Tomkun » Wed Sep 14, 2011 4:55 am

Hello

I would like to get this plug-in working, but I live in Japan and my longitude is 140.1533. Via the keyboard I can't enter anything above 99.9999 and even with the arrows it won't get any higher than 128.0000. Is this a bug, or are you using a different format for longitude (I'm not aware of any other than degrees and decimal)? How should I enter my longitude?
Tomkun
 
Posts: 10
Joined: Wed Sep 14, 2011 4:40 am

Re: SunTracker - with moving ghost

Postby krambriw » Wed Sep 14, 2011 11:33 am

Hello Tomkun,
You are correct, there is currently a max/min of 128/-128 coded. I will change this in a new version, it should be 180/-180

In the mean time you could change line 1961 and 1962 (in the version found in a few posts up) to the following look:
Code: Select all
            min = -180.0000,
            max = 180.0000,


Best regards, Walter
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker - with moving ghost

Postby Tomkun » Wed Sep 14, 2011 11:25 pm

Thank you very much.

I can now enter my correct longitude, but still cannot type more than 2 digits before the decimal point. Howver, that is merely an inconvenience as once it is set up it doesn't need to be changed.

I have another question if you will bear with me. I am running this on Vista and I get an awful lot of error messages if I don't run EventGhost with elevated priveledges. I think it's due to writing the log to a protected location; is this an issue? I would rather not run EventGhost with admin rights.
Tomkun
 
Posts: 10
Joined: Wed Sep 14, 2011 4:40 am

Re: SunTracker - with moving ghost

Postby krambriw » Thu Sep 15, 2011 5:38 am

New version uploaded in first post

cannot type more than 2 digits before the decimal point

This should work now...

I think it's due to writing the log to a protected location

Is this related to the SunTracker plugin? I have code inside that checks what version of Windows it runs on and for Vista I write logs to ..\ProgramData\EvenGhost\Log
Maybe this is not ok, I'm also running as admin...

Best regards, Walter
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker - with moving ghost

Postby Tomkun » Thu Sep 15, 2011 11:19 pm

krambriw wrote:Is this related to the SunTracker plugin? I have code inside that checks what version of Windows it runs on and for Vista I write logs to ..\ProgramData\EvenGhost\Log
Maybe this is not ok, I'm also running as admin...


I believe so. I am also running an admin account, but I don't run eventghost with elevated priviledges. It is certainly related to SunTracker:
Code: Select all
08:14:45   Exception in thread Thread-3:
08:14:45   Traceback (most recent call last):
08:14:45     File "threading.pyc", line 532, in __bootstrap_inner
08:14:45     File "threading.pyc", line 484, in run
08:14:45     File "C:\Program Files\EventGhost\plugins\SunTracker\__init__.py", line 1665, in main
08:14:45       self.iDLS = self.Check_for_daylight_saving()
08:14:45     File "C:\Program Files\EventGhost\plugins\SunTracker\__init__.py", line 1429, in Check_for_daylight_saving
08:14:45       self.LogToFile(msg, 'Suntracker.html')
08:14:45     File "C:\Program Files\EventGhost\plugins\SunTracker\__init__.py", line 1401, in LogToFile
08:14:45       fileHandle = open(progData+'/EventGhost/Log/'+fName, 'a')
08:14:45   IOError: [Errno 13] Permission denied: 'C:\\ProgramData/EventGhost/Log/Suntracker.html'


I don't get any of these issues when I run EventGhost elevated. I took a look at the ProgramData folder and the permissions are set to read-only for normal user accounts and full access to admins.

[EDIT]
I just looked back through your thread and saw that you changed the logfile location to %ALLUSERSPROFILE% due to a request by another user. This directory does not allow regular user accounts write access as they could potentially create system-wide changes (i.e, anything they change will affect every user). A better method I think would be to write to the %USERPROFILE% instead, or allow a user to turn off logging altogether.
[/EDIT]

[EDIT 2]
Is there an online FAQ or guide for this plugin? It seems very powerful and certainly has a lot of options, but I can't get my head around it. A lot of users here seem to be doing fine, so I can only assume it's user (e.g me) error!

For example, when using the Sunstate action, shouldn't it return something? All I get is:
Code: Select all
09:33:55   SunTracker: Sunstate

Also, when using the Day and Time settings, shouldn't an event be triggered? If I set "on" at 0930, at 0930 nothing happens...
Sorry to be such a bore, but I really want to get this working and it's awfully frustrating when you don't understand what everybody else seems to understand perfectly!
[/EDIT 2]
Tomkun
 
Posts: 10
Joined: Wed Sep 14, 2011 4:40 am

Re: SunTracker - with moving ghost

Postby krambriw » Sun Sep 18, 2011 10:32 am

Hi,

1) logfile location: is now always "eg.configDir\plugins\SunTracker" and this works hopefully independent on Windows versions. If you have existing logfiles you want to continue on, stop eg, move them manually to this new location and then restart eg with the new SunTracker plugin and new events will be added as before.
Please try this version if you think it works ok now:
__init__.py
2011-09-18 Changed location for all logfiles to eg.configDir/plugins/SunTracker
(135.18 KiB) Downloaded 49 times

2) allow a user to turn off logging altogether: maybe upcoming version.

3) online FAQ or guide: there is only a readme included but it is not fully covering everything. The functionality has been extended during time and I did not have enough time to make a complete guide. I think everything is covered in this long thread but it makes it hard to get a good overview. Good idea to make one however. In the mean time, ask specific Q's and I will try to answer & help.

4) when using the Sunstate action, shouldn't it return something?: it actually does but is intended to be used in a script or similar to catch the result and eventually a variable where it can land and be of use in your code. You can use it in a python script or from another plugin

bSunStatus = eg.plugins.Suntracker.GetContentsOfVariable()
print bSunStatus

The call will return a bool (TRUE if sun is up, FALSE if sun is down)

Secondly, you can also use it in a macro in combination with the action "If successful Jump to" like described in a post on page 3 in this thread.

5) Also, when using the Day and Time settings, shouldn't an event be triggered? If I set "on" at 0930, at 0930 nothing happens...: Well it depends. At 0930 (in the morning) the Sun is up I assume so you would not get an on event...try to set it on at 0600 instead


Best regards, Walter
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

PreviousNext

Return to Plugin Support

Who is online

Users browsing this forum: Google Adsense [Bot] and 2 guests