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 viewtopic.php?p=18973#p18973Foune wrote:Thank you very much for you explanations. I think that for a H24 use, the weather should be updated only every hour.
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
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
@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
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
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
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
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
Re: SunTracker - with moving ghost
I'm going to run your last version during a couple of days, I'll let you know wether I get problems
Re: SunTracker - with moving ghost
@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):
from:
http://www.schorsch.com/en/kbase/glossary/skies.html
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.
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):
I checked the internet to find out what the standard weather terms mean and found this: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"
from:
http://www.schorsch.com/en/kbase/glossary/skies.html
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?(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.
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.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
@ 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"
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"
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
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 :
I havn't set up the "Night off", "Evening Off" and so on options.
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-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
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
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
All right, I understand now. That's very usefull indeed.
Re: SunTracker - with moving ghost
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?
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?
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
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:
Best regards, Walter
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,
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
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.
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.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
New version uploaded in first post
Maybe this is not ok, I'm also running as admin...
Best regards, Walter
This should work now...cannot type more than 2 digits before the decimal point
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\LogI think it's due to writing the log to a protected location
Maybe this is not ok, I'm also running as admin...
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
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: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...
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'[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: SunstateSorry 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]
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
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: 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
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: 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
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM