PDA

View Full Version : Scheduler with options/Payloads?



Billmans
March 13th, 2007, 08:13 AM
Is there anyway to create a scheduler with plds? I am trying to create an interface for netremote that will create a schedule within girder, but I need to be able to pass "options" to the scheduler. For example, create an schedule for the morning which will play a specific MP3 in bedroom1 with volume set to 50%.

If there is not way to do this, is there any way to determine the name of the scheduler once it fires its event? This way I could save the options to variables/files/registry etc, and then simply look them up when the scheduled event fires.

Any thoughts on this one.?

Thanks again
Bill

Ron
March 13th, 2007, 02:05 PM
I don't think there is a way to add plds to schedulers but you could send different eventstrings and base you logic on that.

Billmans
March 13th, 2007, 02:11 PM
How would I dynamically script that?

I want to be able to script an event, I need some way to know what scheduled event fired to know how to respond to it. Is there any way to extract the name of the event when it fires.

So If I create a Scheduled Event called "Wakeup", from a script how can I tell that "Wakeup" just ran and not "Sleep" which are both dynamically created scheduled events?

Ron
March 13th, 2007, 03:05 PM
There is the 'eventstring' variable which holds the eventstring. You can also subscribe to events with the gir.AddEventHandler function. This takes a regexp as the matching parameter so you can even match substrings. It all comes down to choosing different event strings for different schedulers. That should allow you to distinguish the 'wakeup' from the 'sleep' by giving them different eventstrings.

Billmans
March 14th, 2007, 07:13 AM
Thanks Ron,

Now I am on the right track.

When I create an event from with Netremote I trigger a G script that saves all the options into a file with the name of the eventstring.

Volume:40
Where:Bedroom1
What:Playlist1

The script also creates a scheduler in the name of the eventstring.

Then within G I created another script with an "Inverted" event string to catch all Scheduler events. The event string matches the file, reads in the options and triggers the approriate event there after. It is working pretty good and allows for alot of customization from within Netremote.''

As always, thanks for you help.

Bill

Ron
March 14th, 2007, 08:39 AM
Glad you found a solution for your situation!

Billmans
March 14th, 2007, 09:06 AM
Actually ran into one more snag.....

There seems to be a limit to the payload size coming from Netremote.

I posted in this thread becuase it talks about it back in 2006

http://www.promixis.com/forums/showthread.php?t=13597

Anyone know if this has been fixed, or if there is a workaround?

Bill

Ron
March 14th, 2007, 09:13 AM
Payloads are not limited in Length on Girder's side. The number of payloads is limited to 255.