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.

Timer

Questions and comments specific to a particular plugin should go here.
BigBlack
Posts: 45
Joined: Wed Jan 13, 2010 3:19 am

Re: Timer

Post by BigBlack »

Ok now i've understand how to set it in the autostart! Now i need only to know how to use it in the windows scheduler. Thank you
miljbee
Experienced User
Posts: 146
Joined: Fri Mar 27, 2009 1:29 pm
Location: Orl├®ans, France

Re: Timer

Post by miljbee »

with the windows scheduler you don't need the timer plugin. Just create a scheduled task in windows, and launch eventghost.exe -e yourevent.
This will generate a Main.youevent in eg each time it runs.
miljbee
TCP Events : A Better Network Event Sender/Receiver Plugin.
The Network Event Sender/Receiver in C#
Get events in EG from Google Calendar.
BigBlack
Posts: 45
Joined: Wed Jan 13, 2010 3:19 am

Re: Timer

Post by BigBlack »

good... so if my event it's Timer.Sveglia i need to change it with Main.Sveglia to make it work with windows scheduler right?
Bartman
Plugin Developer
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: Timer

Post by Bartman »

Yep.
For long time actions I would recommend the windows task scheduler.

The timer plugin is targeted for short time usage and timers which are frequently restarted, stopper or changed in other way. Putting the computer into standby after xx minutes after last remote command and reminding me of food in the oven was the reason I started the timer plug in.
BigBlack
Posts: 45
Joined: Wed Jan 13, 2010 3:19 am

Re: Timer

Post by BigBlack »

Ok now i'll try what's better for me ;) EG has rapid access instead of windwos scheduler so to reimpost every day a different time for wake up it's faster. Thank you for ur help! Bye bye
sdmmas
Posts: 1
Joined: Tue May 11, 2010 7:55 pm

Re: Timer

Post by sdmmas »

Hi:

Im have a Python Program and i want execute this program every 30 min. ┬┐How i can do this?

Thanks and Regards
claymic
Posts: 3
Joined: Wed Mar 27, 2013 10:26 pm

Re: Timer

Post by claymic »

Hi guys.
How to know if a timer is running or not ?
Thanks
Clayton
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Timer

Post by krambriw »

Double click on the plugin itself and check what is presented in the listbox. If you see it there, it is running...
claymic
Posts: 3
Joined: Wed Mar 27, 2013 10:26 pm

Re: Timer

Post by claymic »

Thanks, i don┬┤t explain right.
I want to know if is possible with python to know if a timer is running or not.
Clayton
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Timer

Post by krambriw »

Now we are talking...

Yes, we are lucky, the plugin developer Bartman wrote the plugin in such a way that we actually can reach that data from *outside*.

Assume you configure a timer with the name 'timer test'. When the timer is running, it will be visible in the list of the plugin as mentioned earlier.

While it is running, run the following python script:

Code: Select all

if eg.plugins.Timer.plugin.timerObjects.has_key('timer test'):
    t = eg.plugins.Timer.plugin.timerObjects['timer test']
    if t.IsActive():
        print 'running'
Fumes
Posts: 24
Joined: Wed Feb 12, 2014 3:46 pm

Re: Timer

Post by Fumes »

I know the question was brought up earlier in this thread but i can't seem to find a proper answer.
Is there a way to pass along payloads with the triggered event?

Best regards / Bjarne Lindqvist
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Timer

Post by krambriw »

The Timer plugin is rather old and does not support payloads in events. But it is rock solid for normal scheduling.

The SchedulGhost plugin is much more advanced and supports payload in the event....
piert
Experienced User
Posts: 321
Joined: Tue Jun 14, 2011 2:53 pm

Re: Timer

Post by piert »

My long time trustful Timer command to stop my squeezebox after a certain time after switching it on has stopped working all of a sudden.

I have been using the Timer plugin and the below command in a Python script for a long time (many many months) and it has worked reliably until now:

Code: Select all

eg.plugins.Timer.TimerAction(u'squeezeboxtimer', 0, 1, 3600, u'test', False, False, 1, u'00:00:00')
The number 3600 in above command means that the event 'Timer.test' will be issued 3600 seconds after the start of the python script.
(I have studied the way the command works quite a long time ago, so I don't exactly remember what the other values stand for)

Does anybody have similar experiences or tips how to get this sleep timer running again. If better approaches are available to use a sleep timer in Eventghost, I am also all ears :D
Thanks, regards,
Perry
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Timer

Post by krambriw »

Perry,
I have not seen the problem myself (currently I'm not using the timer plugin) but you should instead consider to use Pako's SchedulGhost.

1) Add the plugin
2) Accept or reject to add the proposed configuration tree (you could reject)
3) Create one simple egg clock action as the sample below
Image3.jpg
You can then trigger the action from 'whatever'

Also from a script, you could trigger it very simple using this code as example

Code: Select all

eg.plugins.SchedulGhost.StartEggTimer((u'01:00:00', u'SchedulGhost', u'Squeezebox OFF', u'', u'', (191, 191, 255), (64, 0, 128), u'0;-56;0;0;0;400;0;0;0;0;0;0;0;0;MS Shell Dlg 2', (10, 10)))
(Use 'Copy As Python' to copy your action, then paste in a script to get your correct syntax)

When you trigger the action, similar to this will happen (in this case I changed the egg clock to a 5 second variant):

Code: Select all

07:32:28   SchedulGhost: Start egg timer: SchedulGhost.Squeezebox OFF: 
07:32:33   SchedulGhost.Squeezebox OFF
You can then use the event 'Squeezebox OFF' to actually turn off your squeezebox(es)


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

Re: Timer

Post by piert »

Walter,

I had not realized that Scheduleghost had an egg-timer function included: great solution!
The pictures make the answer very informative indeed.
As usual, thank you for your great help!

Best regards,
Perry
Post Reply