Page 2 of 5
Re: Timer
Posted: Tue Jun 09, 2009 4:40 pm
by manjh
krambriw wrote:Search for "Scheduler"....or "SunTracker" in this forum if you would like to involve the sun status as condition
BestR Walter
I've got Suntracker, but it is not what I'm looking for. The sun is not really a variable in my switching, the day of week is... I know Suntracker can do that as well, but it gets complicated to use Suntracker without making use of sunsets.
Re: Timer
Posted: Sun Aug 09, 2009 2:55 pm
by Bartman
I changed the Timer plugin to use EventGhost's internal scheduler.
Nothing has changed to the user but there should be less use of resources use and less potential for threading errors.
The old version also was imprecise as the processing time was taken account for the next interval (also this should be only milliseconds).
I would appreciate if some users could test the new version
http://www.eventghost.org/svn/trunk/plu ... _init__.py
Re: Timer
Posted: Mon Aug 10, 2009 3:11 pm
by krambriw
Hi Bartman,
I just renamed your new plugin to Timer2 to allow to have the old one as well
However, you have missed to insert revision information, therefore this crash
Code: Select all
16:41:29 Error while loading plugin-file Timer2.
16:41:29 Traceback (most recent call last) (1016):
16:41:29 File "C:\Program Files\EventGhost\eg\Classes\PluginManager.py", line 178, in LoadPluginInfo
16:41:29 File "C:\Program Files\EventGhost\eg\Classes\PluginInfo.py", line 116, in ImportPlugin
16:41:29 File "C:\Program Files\EventGhost\plugins\Timer2\__init__.py", line 5, in <module>
16:41:29 IndexError: list index out of range
If you change line 5 to something similar like below it loads/compiles correctly
Code: Select all
version = "1.0." + "$LastChangedRevision 000 $".split()[1],
Next step will be some testing...
Best regards, Walter
Re: Timer
Posted: Mon Aug 10, 2009 5:12 pm
by Bartman
Thanks for testing.
I guess the automatic replacement only works when doing a checkout with a SVN client but when viewing via web server.
Do you use the Timer plugin intensivly?
Re: Timer
Posted: Tue Aug 11, 2009 5:37 am
by krambriw
My current test has been running flawless over night since yesterday
Both timer types (your new (t1) and your old (t2)) triggering every 5th second
No problem detected. Stable memory usage. CPU load 0%
Best regards, Walter
Code: Select all
07:33:57 Timer.t110650 (10650, '2009-08-11 07:33:57')
07:34:00 Timer.t210633 (10633, '2009-08-11 07:34:00')
07:34:02 Timer.t110651 (10651, '2009-08-11 07:34:02')
07:34:05 Timer.t210634 (10634, '2009-08-11 07:34:05')
07:34:07 Timer.t110652 (10652, '2009-08-11 07:34:07')
07:34:10 Timer.t210635 (10635, '2009-08-11 07:34:10')
07:34:12 Timer.t110653 (10653, '2009-08-11 07:34:12')
07:34:15 Timer.t210636 (10636, '2009-08-11 07:34:15')
07:34:17 Timer.t110654 (10654, '2009-08-11 07:34:17')
07:34:20 Timer.t210637 (10637, '2009-08-11 07:34:20')
07:34:22 Timer.t110655 (10655, '2009-08-11 07:34:22')
07:34:25 Timer.t210638 (10638, '2009-08-11 07:34:25')
07:34:27 Timer.t110656 (10656, '2009-08-11 07:34:27')
07:34:30 Timer.t210639 (10639, '2009-08-11 07:34:30')
07:34:32 Timer.t110657 (10657, '2009-08-11 07:34:32')
07:34:35 Timer.t210640 (10640, '2009-08-11 07:34:35')
07:34:37 Timer.t110658 (10658, '2009-08-11 07:34:37')
07:34:40 Timer.t210641 (10641, '2009-08-11 07:34:40')
07:34:42 Timer.t110659 (10659, '2009-08-11 07:34:42')
07:34:45 Timer.t210642 (10642, '2009-08-11 07:34:45')
07:34:47 Timer.t110660 (10660, '2009-08-11 07:34:47')
07:34:50 Timer.t210643 (10643, '2009-08-11 07:34:50')
07:34:52 Timer.t110661 (10661, '2009-08-11 07:34:52')
07:34:55 Timer.t210644 (10644, '2009-08-11 07:34:55')
Re: Timer
Posted: Thu Aug 13, 2009 5:29 am
by krambriw
Still working without problem
Re: Timer
Posted: Sun Sep 06, 2009 12:14 pm
by vicx
I just used this plugin instead of the original timer plug.
I prefer this one.
Re: Timer
Posted: Sun Sep 06, 2009 1:54 pm
by Bartman
vicx wrote:I just used this plugin instead of the original timer plug.
I prefer this one.
This is the original timer plugin. It is already included in the current betas .
Re: Timer
Posted: Tue Oct 20, 2009 7:13 am
by LanceDrolet
Is there a way to pass variables to the payload of the triggered event?
I'm trying to run a "convert-to-mpg" program when Vista Media Center records a show, but I have to wait until the show is done recording before converting it. So, I'm using directory watcher to see when a 'dvr-ms' file is created. I then want to wait a safe time and trigger an event that starts the converter. So, I have to pass the file location and destination to the event-handler (script) that runs the converter.
Is this possible?
Thanks!
Re: Timer
Posted: Tue Oct 20, 2009 7:40 am
by manjh
LanceDrolet wrote:Is there a way to pass variables to the payload of the triggered event?
I'm trying to run a "convert-to-mpg" program when Vista Media Center records a show, but I have to wait until the show is done recording before converting it. So, I'm using directory watcher to see when a 'dvr-ms' file is created. I then want to wait a safe time and trigger an event that starts the converter. So, I have to pass the file location and destination to the event-handler (script) that runs the converter.
Is this possible?
Thanks!
I assume there will only be one file to convert at any given time. Could you store the file location into a fixed named/location file? The conversion program can then be triggered without any parameter, since it will always look in that file to find the information about the file to be converted.
Re: Timer
Posted: Tue Oct 20, 2009 8:11 am
by LanceDrolet
manjh wrote:
I assume there will only be one file to convert at any given time. Could you store the file location into a fixed named/location file? The conversion program can then be triggered without any parameter, since it will always look in that file to find the information about the file to be converted.
No, there are many times when we record two or more TV shows at once (often with overlapping start/stop times). Otherwise, I'd just store the locations as eg.global variables.
Re: Timer
Posted: Tue Oct 20, 2009 8:53 am
by LanceDrolet
Ok, I figured out a work-around. I can embed the variables in event name.
in my case, it will be something like
Timer.inputFile;outputDest.convert
Then I just trigger the conversion with any "convert" event... then in the event-handler, parse the event.suffix to get at what I need. Quick and dirty, but it'll get the job done.
Re: Timer
Posted: Wed Oct 21, 2009 2:56 am
by LanceDrolet
Ok then... apparently, you can only use one timer at a time... Oh well, I guess I can just save the file info to a list in eg.globals and set a timer to run through the whole list in the middle of the night.
Re: Timer
Posted: Thu Oct 22, 2009 4:21 pm
by Bartman
You can use as many timers as you like.
Re: Timer
Posted: Thu Oct 22, 2009 8:19 pm
by LanceDrolet
Bartman wrote:You can use as many timers as you like.
Guess I misspoke... you are only allowed to use one instance of the each timer... as it says in the GUI..."Currently running timer with the same name will be aborted"...
No worries, though... I found a solution to my problem.
Thanks.