Page 7 of 12
Re: SchedulGhost
Posted: Sun Aug 10, 2014 6:42 am
by TRIROG1
Hi!
Thanks for your suggestion ... i did exactly that ... but still ... is it possible to set&start an egg timer from a script?
Re: SchedulGhost
Posted: Sun Aug 10, 2014 7:53 am
by Sem;colon
Sure, EventGhost has a function that makes such things very easy.
On every action you can do a "Copy As Python" via right click (after configuring it) and then you can past it into a script.
For the Egg Timer this looks like:
Code: Select all
eg.plugins.SchedulGhost.StartEggTimer((u'00:00:30', u'SchedulGhost', u'EggTimer', 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), u'EggTimer'))
Re: SchedulGhost
Posted: Sun Aug 10, 2014 7:56 am
by krambriw
Sure it is, if you install SchedulGhost, then create an action for "Start egg timer" with 30s, Copy As Python, paste it into a python script and you get something like below:
Code: Select all
eg.plugins.SchedulGhost.StartEggTimer((u'00:00:30', u'SchedulGhost', u'EggTimer', 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)))
Re: SchedulGhost
Posted: Sun Aug 10, 2014 8:00 am
by krambriw
@ Sem;colon

Re: SchedulGhost
Posted: Mon Aug 11, 2014 5:53 pm
by TRIROG1
Thanks!
Can someone please explain what is the difference between using
eg.plugins.SchedulGhost.SetEggTimer
eg.plugins.SchedulGhost.StartEggTimer
e.g.
eg.plugins.SchedulGhost.StartEggTimer((u'00:00:30', u'SchedulGhost', u'test', u'', u'', (191, 191, 255), (64, 0, 128), u'0;-56;0;0;0;400;0;0;0;238;0;0;0;0;MS Shell Dlg 2', (10, 10)))
eg.plugins.SchedulGhost.SetEggTimer((u'00:00:30', u'SchedulGhost', u'test', u'', u'', (191, 191, 255), (64, 0, 128), u'0;-56;0;0;0;400;0;0;0;238;0;0;0;0;MS Shell Dlg 2', (10, 10)))
?
Thanks!!
Re: SchedulGhost
Posted: Mon Aug 11, 2014 7:11 pm
by krambriw
You could try them...you would see the difference
eg.plugins.SchedulGhost.SetEggTimer
Show dialog, you can Adjust and start egg timer
eg.plugins.SchedulGhost.StartEggTimer:
Start right away
Re: SchedulGhost
Posted: Mon Aug 11, 2014 9:48 pm
by TRIROG1
Doh .. Silly me ...

Re: SchedulGhost
Posted: Mon Nov 03, 2014 3:21 pm
by Sem;colon
Hi Pako,
I noticed that if I do a "Run schedule immediately" or a "Force to run schedule immediately" the "Last run" entry is not updated - did you do that on purpose?
Don't you think it would be nicer to always see the "real" last execution date/time?
Re: SchedulGhost
Posted: Thu Nov 06, 2014 7:42 pm
by Pako
I'll think about it.
Pako
Re: SchedulGhost
Posted: Wed Nov 26, 2014 1:07 pm
by Sem;colon
Pako wrote:I'll think about it.
I just need to know, if it works like intended I can also script that part, no problem.
I just want to aviod that we do the work twice

Re: SchedulGhost
Posted: Wed Nov 26, 2014 4:04 pm
by Pako
I've been thinking about it, but I will make no change.
I did so intentionally and still do not see any advantage, when it will be different.
I mean, manual start is exceptional and everyone knows why and when did it.
On the contrary, I need to know when it was last run automatically.
Pako
Re: SchedulGhost
Posted: Wed Nov 26, 2014 7:50 pm
by Sem;colon
That's true, but in my case the "manuel" start is triggered by an event, that's why I would like to see that as well.
It would have been cleaner if the plugin did that by itself, but no problem, I can script that...
Anyway, if I do it for my self, I can also share it.
I attached the modified version of the plugin.
I added "Update 'Last run' field when executed" as option (check-box) to the "Run schedule immediately" function, I guess that's OK.
Re: SchedulGhost
Posted: Mon Dec 15, 2014 5:47 pm
by touiquette
1. Pako, would you please link to post #186 in the original post? Thank you kkl for translating into US-English, er, user logic (language, for good or ill, shapes the way we understand things. I found those instructions to be very helpful.)
2. Also regarding post #186: why does an enabler schedule with a span need an event to disable the acting schedule? If the process is staged (preset) with the acting schedule disabled, should not the disabled state be returned once the enabler schedule ends? Put another way, is the end of the span a tag/handle, or does it do anything (back out)?
For example, the System Action "Play Sound" has a checkbox to to trigger and event after completion. I'm assuming each plugin behaves in its own way in this regard. My guess is that SchedulGhost requires everything to be explicit, but I haven't tried it yet.
3. Would it be better for a time-dependent (versus duration-dependent) action to use separate disabler-schedule, instead of using a span?
- I think so. Pako, I'm wondering if it would be clearer to use "Duration" instead of "Span" as a label for that field. I'm not sure how it translates to other languages, though. Also, I'm curious if anyone has, and would be willing to walk through, an implementation that gets these two features to play together.
(I'm asking in part because I've noticed how the popularity of AutoRemote
https://play.google.com/store/apps/deta ... mote&hl=en for Android seems to be increasing, and home automation implementations are becoming more affordable and cross-platform friendly (hackable). Having watched Tasker
http://tasker.dinglisch.net/ take off, I do think traffic here will increase, particularly with more inexperienced programmers. Clear documentation will help keep questions more limited.)
Also, just a request of people who post, if you find the answer to your own question, please post what you did. Then, no one has to post the same question again.
Thank you, Pako, for such a usable, useful tool!
Re: SchedulGhost
Posted: Tue Dec 16, 2014 7:31 am
by Pako
I do not speak English, so for me it is difficult to understand the post that is so extensive.
We can discuss various things gradually. And I'd also like to know the opinion of other users.
For now, what you have in mind when you write "... would you please link to post #186 in the original post ..." ?
Pako
Re: SchedulGhost
Posted: Mon Feb 02, 2015 4:49 am
by touiquette
I know.

There I go again. I apologize. My English is sometimes difficult for native speakers. If I can make it easier, please let me know.
I also apologize for the delay in my response.
This post was very helpful to me. It explains in US-English very well "Span" and "Schedule."
viewtopic.php?p=29296#p29296 by kkl, 12 January 2014, 5:05pm.