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
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Yes of course, I will try it, thank you Pako!
I believe Bitmonster made the eg.Scheduler running in a separate thread, it must be, right?
Best regards, Walter
PS Dear Pako, your solution is more elegant of course and uses already provided mechanism. From CPU load point of view they are the same what I have seen during testing (non significant load).
I believe Bitmonster made the eg.Scheduler running in a separate thread, it must be, right?
Best regards, Walter
PS Dear Pako, your solution is more elegant of course and uses already provided mechanism. From CPU load point of view they are the same what I have seen during testing (non significant load).
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: SunTracker - with moving ghost
Yes, it probably must.krambriw wrote:I believe Bitmonster made the eg.Scheduler running in a separate thread, it must be, right?
But take into account that you can have several plugins running and inside each of them can be running some separate Thread. I suppose, that if it is a periodic activity and therefore is possible (instead of Thread) the eg.Scheduler use, will reduce the CPU load.krambriw wrote:From CPU load point of view they are the same what I have seen during testing (non significant load).
Therefore, I always try to use inside of my plugins the eg.Scheduler instead of a Thread, if possible.
Best regards, Pako
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Yes Pako, you are right.
To summarize:
- using eg.Wait(n.n) or time.sleep(n.n) causes the whole EG to pause
- if you have a thread running as part of a plugin and need that it (the thread) takes a pause, use the threads provide wait method instead of eg.Wait(n.n) or time.sleep(n.n)
- if you have a need to make repetitive "things" with a delay between, use eg.scheduler
Hope this was correct now
Best regards, Walter
To summarize:
- using eg.Wait(n.n) or time.sleep(n.n) causes the whole EG to pause
- if you have a thread running as part of a plugin and need that it (the thread) takes a pause, use the threads provide wait method instead of eg.Wait(n.n) or time.sleep(n.n)
- if you have a need to make repetitive "things" with a delay between, use eg.scheduler
Hope this was correct now
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
Hello Walter, a slight time after initialising i┬┤m getting an error:
i don┬┤t know where this is coming from.
best
H.
EDIT: it just happens from time to time (when restarting. Not every restart)
EDIT2: it happens also every now and then (today)
Code: Select all
20:27:01 Exception in thread Thread-9:
20:27:01 Traceback (most recent call last):
20:27:01 File "threading.pyc", line 532, in __bootstrap_inner
20:27:01 File "threading.pyc", line 484, in run
20:27:01 File "C:\Programme\EventGhost\plugins\SunTracker\__init__.py", line 1848, in main
20:27:01 self.currCondition = self.CheckWeatherCondition()
20:27:01 File "C:\Programme\EventGhost\plugins\SunTracker\__init__.py", line 1549, in CheckWeatherCondition
20:27:01 ''
20:27:01 File "C:\Programme\EventGhost\plugins\SunTracker\pywapi.py", line 81, in get_weather_from_google
20:27:01 dom = minidom.parseString(xml_response)
20:27:01 File "xml\dom\minidom.pyc", line 1928, in parseString
20:27:01 File "xml\dom\expatbuilder.pyc", line 940, in parseString
20:27:01 File "xml\dom\expatbuilder.pyc", line 223, in parseString
20:27:01 ExpatError: syntax error: line 1, column 0best
H.
EDIT: it just happens from time to time (when restarting. Not every restart)
EDIT2: it happens also every now and then (today)
Last edited by holle75 on Tue Aug 21, 2012 7:46 pm, edited 1 time in total.
Re: SunTracker - with moving ghost
Same error here, seems connected to getting weather info from google...
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Hi, the problem is related to getting the weather data from Google. I have seen this too once and made a modification to the attached file. Can you replace with this instead? It is in the same folder ..\plugins\SunTracker.
Please let me know if the problem gets solved
Best regards, Walter
Please let me know if the problem gets solved
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
Code: Select all
00:35:41 Next execution will start in 600 seconds
00:35:41 Main.IsSunDown.True u"-60|30|Mostly Cloudy|Real Sunset expected:|2025|Virtual Sunset expected:|1910|Minutes to Virtual Sunset:|1115|Minutes adjusted:|-75|IsSunDown:|True"
00:42:40 Weather condition missing...
00:43:40 Weather condition missing...
00:44:40 Weather condition missing...
00:45:41 Next execution will start in 600 seconds
00:45:41 Main.IsSunDown.True u"-60|30|Mostly Cloudy|Real Sunset expected:|2025|Virtual Sunset expected:|1910|Minutes to Virtual Sunset:|1105|Minutes adjusted:|-75|IsSunDown:|True"
00:48:04 System.UnIdle
00:54:13 System.ClipboardChanged
00:55:41 Next execution will start in 600 seconds
00:55:41 Main.IsSunDown.True u"-60|30|Mostly Cloudy|Real Sunset expected:|2025|Virtual Sunset expected:|1910|Minutes to Virtual Sunset:|1095|Minutes adjusted:|-75|IsSunDown:|True"-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Thanks!
Yes, this is looking ok, no crash but a report that weather data was not received from Google (after 20 attempts with 2 seconds delay in between each).
You may see one of the following print statements if Google weather returns some data:
"Weather condition missing..."
"Weather data empty..."
or
"Retry getting weather..." if Google Weather is not even responding
Best R Walter
Yes, this is looking ok, no crash but a report that weather data was not received from Google (after 20 attempts with 2 seconds delay in between each).
You may see one of the following print statements if Google weather returns some data:
"Weather condition missing..."
"Weather data empty..."
or
"Retry getting weather..." if Google Weather is not even responding
Best R Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
A simple question...
How do I set up "Day and Time Settings" to turn on the lights at sunset and turn them off them at sunrise? The lights are outside and should stay on all night.
Thanks.
How do I set up "Day and Time Settings" to turn on the lights at sunset and turn them off them at sunrise? The lights are outside and should stay on all night.
Thanks.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
You can do as in the example below. We have to set at least one time per day to get the thing going. Assuming sun is at its highest peak at noon, I put in 11.59. The lights will actually not turn on because the sun is up but the "logic" will start running.
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
Thanks, that solved it.
May I suggest adding a checkbox to enable/disable the "day" without adding a specific time. If enabled an event should be fired at sunset, sunrise.
May I suggest adding a checkbox to enable/disable the "day" without adding a specific time. If enabled an event should be fired at sunset, sunrise.
Re: SunTracker - with moving ghost
The fix seems to work here, thanks.krambriw wrote:Hi, the problem is related to getting the weather data from Google. I have seen this too once and made a modification to the attached file. Can you replace with this instead? It is in the same folder ..\plugins\SunTracker.
Please let me know if the problem gets solved
Best regards, Walter
However, checking the weather condition each minute seems to be a bit of overkill, and the eg log gets flooded.
Permanent error messages
Dear all!
Every time I start the SunTracker Plug-in, I receive some error messages after a few seconds. I searched the forum and the net, but couldn't find a solution to it. I tried a few different versions of eventghost an suntracker, but without success. Perhaps it's because I'm new to the whole thing and have no experience? Is there anybody who can help me? Thanks a lot in advance!!!
Best regards
Rainer
Every time I start the SunTracker Plug-in, I receive some error messages after a few seconds. I searched the forum and the net, but couldn't find a solution to it. I tried a few different versions of eventghost an suntracker, but without success. Perhaps it's because I'm new to the whole thing and have no experience? Is there anybody who can help me? Thanks a lot in advance!!!
Best regards
Rainer
Re: SunTracker - with moving ghost
I'll have the some errors. Anyone a solution?
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
The problem is that I do not handle all characters correctly. You named the thread "FS20 Gartenkugeln an/aus" and the character "/" will then be used incorrectlly.
Please try to rename it with another character instead like "FS20 Gartenkugeln an_aus" or similar.
For a later version, I will check if I can improve this
Best regards, Walter
Please try to rename it with another character instead like "FS20 Gartenkugeln an_aus" or similar.
For a later version, I will check if I can improve this
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM