Page 1 of 1

Scheduling events from web interface: is it possible?

Posted: Mon Jan 30, 2012 12:49 pm
by vitus81
Hi everybody,

I'm quite new to EventGhost, and I was wondering whether the following can be done with available plugins or would need extra coding instead.

I'd like to schedule video recordings via Virtualdub from an external source through a web interface.

I would specify parameters like recording channel, file name, start time and duration of the recording etc. in a web page.
Then I would generate a string with a command line call to vdub.exe including the needed parameters (e.g. with PHP).

Now it comes to the challenging part (for me!). If I have well understood the philosphy of EventGhost, I should create a macro which:
1) uses an IR blaster to switch the external video receiver to the desired channel;
2) calls the command line I have generated.
Then I should schedule this macro to be executed by EventGhost at the specified time.

I have seen there are 2 web server plugins. Would they allow to do such a thing, maybe together with SchedulGhost?
Does anyone have other hints how to implement this?

Thanks,
VD

P.S. I must say I've never used Python so far, but it can be the right occasion to learn it ;-)

Re: Scheduling events from web interface: is it possible?

Posted: Wed Feb 20, 2013 7:26 pm
by cfull1
Sounds like you have the basics down. Events are assigned to macros which contain actions.

Using EG's webserver makes it easy. You can just call an ajax request with GET parameters.
These parameters get automatically translated to actions.

I don't know anything about Virtualdub, but it sounds like you are calling from commandline which is an easy action to set up.

However, scheduling could be a bit more indepth if you want to do that via EG. Well I guess that's mostly dependent on how you set up the website.
You are right about the SchedulGhost plugin.
What you would probably want to do is use the "Get Schedule" action and send those to your web client.
On the way back you can use "Add Schedule" which will override if one already exists.

Commands are usually set to the "eg.result" variable.
So for testing you can make a schedule in SchedulGhost window.
Then create a macro that calls show schedule, which will set eg.result.
The call a python command/script that just has "print eg.result"
That will show you the array of data for that schedule.

Let me know if you have questions, I realize this is a month later :|

Re: Scheduling events from web interface: is it possible?

Posted: Thu Feb 21, 2013 9:10 am
by vitus81
It is actually one year later, not one month :)

So, I must admit that meanwhile I had put this project aside, due to lack of time.
Thanks anyway for the reply!