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.
Timer
Re: Timer Plugin
Bartman maybe you could post some examples of how you have used it, I know it can be used for long running daily events as well as short term remote control toggles.
Re: Timer Plugin
I just use it as an egg timer and i had a macro as a sleep tmer for shutting down the computer.
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
Re: Timer Plugin
You cook eggs with EventGhost?Bartman wrote:I just use it as an egg timer and i had a macro as a sleep tmer for shutting down the computer.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Re: Timer Plugin
Here is 2 timers I am playing with.
and
Now those start the timers, do I need to build more to reset them daily?
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="908">
<Action>
Timer.TimerAction(u'NightMode', 0, 1, 1.0, u'NightMode', False, True, 2, u'20:00:00')
</Action>
</EventGhost>
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="908">
<Action>
Timer.TimerAction(u'Morning', 0, 1, 1.0, u'Morning', False, True, 2, u'05:30:00')
</Action>
</EventGhost>
Now those start the timers, do I need to build more to reset them daily?
Re: Timer Plugin
Hi there,
I'm trying to get EventGhost to power on my STB for unattended Beyond TV recordings.
Here is the macro:
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="908">
<Macro Name='Start timer "Test"' Expanded="True">
<Action>
Timer.TimerAction(u'Test', 0, 1, 1.0, u'', True, False, 2, u'13:56:00')
</Action>
<Action Name="Transmit IR Telus Box ON">
USB_UIRT.TransmitIR(u'0000 0047 0000 001A 00EA 00EA 001D 003A 001D 0075 001D 003B 001D 003B 001D 003B 001D 003B 001D 0075 001D 003B 001D 0075 001D 003B 001D 0075 001D 003B 001D 0075 001D 003B 001D 0075 001D 0075 001D 0075 001D 0075 001D 003B 001D 0075 001D 003B 001D 0075 001D 003A 001D 0075 001D 01D1', 4, 0)
</Action>
</Macro>
</EventGhost>
I have tried changing the loop and interval settings and tried using 12 hour time (but there is no AM/PM) but still no joy.
So what am I doing wrong?
Will.
I'm trying to get EventGhost to power on my STB for unattended Beyond TV recordings.
Here is the macro:
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="908">
<Macro Name='Start timer "Test"' Expanded="True">
<Action>
Timer.TimerAction(u'Test', 0, 1, 1.0, u'', True, False, 2, u'13:56:00')
</Action>
<Action Name="Transmit IR Telus Box ON">
USB_UIRT.TransmitIR(u'0000 0047 0000 001A 00EA 00EA 001D 003A 001D 0075 001D 003B 001D 003B 001D 003B 001D 003B 001D 0075 001D 003B 001D 0075 001D 003B 001D 0075 001D 003B 001D 0075 001D 003B 001D 0075 001D 0075 001D 0075 001D 0075 001D 003B 001D 0075 001D 003B 001D 0075 001D 003A 001D 0075 001D 01D1', 4, 0)
</Action>
</Macro>
</EventGhost>
I have tried changing the loop and interval settings and tried using 12 hour time (but there is no AM/PM) but still no joy.
So what am I doing wrong?
Will.
Re: Timer Plugin
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="908">
<Action>
Timer.TimerAction(u'Telus Routine', 0, 0, 86400.0, u'Wakeup Telus', False, True, 2, u'13:56:00')
</Action>
</EventGhost>
and your action is just map Timer.Telus Routine as the event.
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="908">
<Action Name="Transmit IR Telus Box ON">
USB_UIRT.TransmitIR(u'0000 0047 0000 001A 00EA 00EA 001D 003A 001D 0075 001D 003B 001D 003B 001D 003B 001D 003B 001D 0075 001D 003B 001D 0075 001D 003B 001D 0075 001D 003B 001D 0075 001D 003B 001D 0075 001D 0075 001D 0075 001D 0075 001D 003B 001D 0075 001D 003B 001D 0075 001D 003A 001D 0075 001D 01D1', 4, 0)
</Action>
-
prostetnic
- Posts: 28
- Joined: Fri Apr 18, 2008 6:52 pm
- Location: Sweden
Re: Timer
Is there some way to pause a timer and then start again without restarting from the beginning??
I want to use this to control my fish-tanks lighting. I want the tank to be lit for 10h each day but since the tank is in my home theatre room I don't want it on when I'm using my projector. So I want to turn on the lighting say 10AM each day but then I want to turn it of when I'm watching a DVD etc. and then turned on again afterwords and then stay on until its been on for 10H.
Is it possible to do this in any way?
I want to use this to control my fish-tanks lighting. I want the tank to be lit for 10h each day but since the tank is in my home theatre room I don't want it on when I'm using my projector. So I want to turn on the lighting say 10AM each day but then I want to turn it of when I'm watching a DVD etc. and then turned on again afterwords and then stay on until its been on for 10H.
Is it possible to do this in any way?
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Timer
Try my solution:prostetnic wrote:Is it possible to do this in any way?
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1449">
<Folder Name="Check 10 hours lighting">
<Macro Name="Initialization">
<Event Name="Main.OnInit" />
<Action>
EventGhost.DisableItem(XmlIdLink(16))
</Action>
<Action>
Timer.TimerAction(u'Start_lighting', 0, 0, 86400.0, u'Start_lighting', False, True, 2, u'10:00:00')
</Action>
<Action>
EventGhost.PythonScript(u'eg.globals.Time_Counter = 0\neg.globals.Light_Flag = False\n')
</Action>
</Macro>
<Macro Name="Light ON">
<Event Name="Timer.Start_lighting" />
<Action>
EventGhost.EnableItem(XmlIdLink(16))
</Action>
<Action>
EventGhost.PythonCommand(u'print "Lighting 10 hours started"')
</Action>
<Action>
Timer.TimerAction(u'Check_Time', 0, 0, 60.0, u'Check_time', False, True, 4, u'00:00:00')
</Action>
<Action>
EventGhost.PythonCommand(u'eg.globals.Light_Flag = True')
</Action>
</Macro>
<Folder Name="Pause/Continue" id="16" Enabled="False">
<Macro Name="Pause">
<Action Name="Here insert an Event">
EventGhost.Comment()
</Action>
<Action>
EventGhost.PythonCommand(u'print "Now switch light OFF"')
</Action>
<Action>
EventGhost.PythonCommand(u'eg.globals.Light_Flag = False')
</Action>
</Macro>
<Macro Name="Continue">
<Action Name="Here insert an Event">
EventGhost.Comment()
</Action>
<Action>
EventGhost.PythonCommand(u'print "Now switch light ON"')
</Action>
<Action>
EventGhost.PythonCommand(u'eg.globals.Light_Flag = True')
</Action>
</Macro>
</Folder>
<Macro Name="Minutes counter">
<Event Name="Timer.Check_time" />
<Action>
EventGhost.PythonScript(u'if eg.globals.Light_Flag:\n eg.globals.Time_Counter+=1\n if eg.globals.Time_Counter >599: # 10 hours\n eg.result = True\n else:\n eg.result = False\n\n ')
</Action>
<Action>
EventGhost.NewJumpIf(XmlIdLink(30), 0, False)
</Action>
<Action>
EventGhost.PythonCommand(u'print "Lighting:", eg.globals.Time_Counter,"minutes"')
</Action>
</Macro>
<Macro Name="Light OFF" id="30">
<Action>
EventGhost.PythonCommand(u'print "Now switch light OFF"')
</Action>
<Action>
EventGhost.DisableItem(XmlIdLink(16))
</Action>
<Action>
Timer.TimerAction(u'Check_Time', 4, 1, 1.0, u'', False, True, 1, u'00:00:00')
</Action>
<Action>
EventGhost.PythonCommand(u'print "Lighting 10 hours finished"')
</Action>
</Macro>
</Folder>
</EventGhost>-
prostetnic
- Posts: 28
- Joined: Fri Apr 18, 2008 6:52 pm
- Location: Sweden
Re: Timer
Yes that will do the trick 
Thanks
Thanks
Re: Timer
I've created two timers in EG to switch lights on and off, at fixed times.
I would like to determine the switch time based on sunset and sunrise... is there a way to do this? I know the alternative is to hook up an LDR (via an Arduino board, no problem). But putting the LDR outside with a wire running in to my computer is not what I would like to do. Simply following the sun times would do the trick
Anyone?
I would like to determine the switch time based on sunset and sunrise... is there a way to do this? I know the alternative is to hook up an LDR (via an Arduino board, no problem). But putting the LDR outside with a wire running in to my computer is not what I would like to do. Simply following the sun times would do the trick
Anyone?
Re: Timer
Perhaps this plugin is what you are looking for:
http://www.eventghost.org/forum/viewtop ... 22&start=0
http://www.eventghost.org/forum/viewtop ... 22&start=0
Re: Timer
Looks like just the one. But am having trouble to load it into EG, when I try it says "cannot read __init__.py..... also, when I compare the contents of the folder, I see there is only the __init__.py, and no __init__.pyc.jinxdone wrote:Perhaps this plugin is what you are looking for:
http://www.eventghost.org/forum/viewtop ... 22&start=0
Is this something I should generate?
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Timer
Search for "Scheduler"....or "SunTracker" in this forum if you would like to involve the sun status as condition
BestR Walter
BestR Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM