PDA

View Full Version : Starting the show with a text message: execution control with external program



Matt
11-13-2009, 10:29 PM
I set up my show so that it runs once every hour, but I'd like a way for people to trigger it on demand. I thought it would be cool if people could send a text message that starts the show automatically, prompted by a scheduled voice-over on the FM broadcast. Here's a quick rundown on my setup so far:

- I managed to get an invite to the beta of Google Voice (http://www.google.com/voice/), which is a free service that gives you a local telephone number and can forward calls and text messages to multiple phones.
- I set up google voice to forward text messages to my email (and not to my phone). My personal email forwards them to another email account I set up solely for handling the text messages.
- I wrote a (sloppy) Java program that can fetch the messages from that email account via POP/IMAP and parse them for a keyword.

I need some advice as to where to go from here, though: how can I tie this system into Vixen? There are a few requirements:

- Vixen should run my show on a once-per-hour schedule.
- Text messages received while the show is running, or close enough to a scheduled runtime to interfere with the scheduled show, should not trigger the show.
- Text messages sent outside the time the display is on (5pm - 11pm) should not trigger the show.

My thought at the moment is to use vixen's launcher plugin to launch the java program at 20-second intervals. The scheduled launcher sequence would only run at the allowed times. The problem, then, is starting the sequence from the java program. I thought maybe I could send a web control request over http, but I'm not clear on the intricacies of the web control framework. Really, it seems like overkill since the program runs locally. Is there some other mechanism in Vixen that would do the trick? I'd be OK with abandoning my java program, if the email checking functionality needed to be written into a trigger plugin or something.

Thoughts?

-Matt

NogginBoink
11-17-2009, 10:53 AM
Matt, that's a super cool idea and I sincerely hope to see you get this working.

Unfortunately, I'm not aware of a programmatic interface to start a Vixen sequence. Maybe KC might see this thread and chime in.

deweycooter
11-23-2009, 02:15 PM
Network triggers? http://doityourselfchristmas.com/forums/showthread.php?t=4625

Have the java program run continuously, check email every 20 sec - if a message is retrieved and you're outside the window of scheduled shows, parse the email and run the appropriate trigger.

I haven't done anything with triggers, but it seems to me that this would accomplish what you're trying to do.

You might even have the program send back a reply to the text. :cool: