SchedulGhost

Questions and comments specific to a particular plugin should go here.
Post Reply
TRIROG1
Posts: 45
Joined: Fri Aug 08, 2014 10:07 pm

Re: SchedulGhost

Post by TRIROG1 » Sun Aug 10, 2014 6:42 am

Hi!

Thanks for your suggestion ... i did exactly that ... but still ... is it possible to set&start an egg timer from a script?

Sem;colon
Experienced User
Posts: 609
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: SchedulGhost

Post by Sem;colon » Sun Aug 10, 2014 7:53 am

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'))

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SchedulGhost

Post by krambriw » Sun Aug 10, 2014 7:56 am

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)))

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SchedulGhost

Post by krambriw » Sun Aug 10, 2014 8:00 am

@ Sem;colon

:D

TRIROG1
Posts: 45
Joined: Fri Aug 08, 2014 10:07 pm

Re: SchedulGhost

Post by TRIROG1 » Mon Aug 11, 2014 5:53 pm

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!!

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SchedulGhost

Post by krambriw » Mon Aug 11, 2014 7:11 pm

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

TRIROG1
Posts: 45
Joined: Fri Aug 08, 2014 10:07 pm

Re: SchedulGhost

Post by TRIROG1 » Mon Aug 11, 2014 9:48 pm

Doh .. Silly me ... :mrgreen:

Sem;colon
Experienced User
Posts: 609
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: SchedulGhost

Post by Sem;colon » Mon Nov 03, 2014 3:21 pm

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?

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: SchedulGhost

Post by Pako » Thu Nov 06, 2014 7:42 pm

I'll think about it.

Pako
You know flattr ? You can Image

Sem;colon
Experienced User
Posts: 609
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: SchedulGhost

Post by Sem;colon » Wed Nov 26, 2014 1:07 pm

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 ;-)

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: SchedulGhost

Post by Pako » Wed Nov 26, 2014 4:04 pm

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
You know flattr ? You can Image

Sem;colon
Experienced User
Posts: 609
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: SchedulGhost

Post by Sem;colon » Wed Nov 26, 2014 7:50 pm

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.
Attachments
__init__.py
version 0.1.12
(139.36 KiB) Downloaded 162 times
Last edited by Sem;colon on Sun Nov 30, 2014 9:19 am, edited 1 time in total.

touiquette
Posts: 3
Joined: Mon Dec 15, 2014 3:56 pm

Re: SchedulGhost

Post by touiquette » Mon Dec 15, 2014 5:47 pm

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!

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: SchedulGhost

Post by Pako » Tue Dec 16, 2014 7:31 am

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
You know flattr ? You can Image

touiquette
Posts: 3
Joined: Mon Dec 15, 2014 3:56 pm

Re: SchedulGhost

Post by touiquette » Mon Feb 02, 2015 4:49 am

I know. :roll: 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.

Post Reply