Jump to content
Light-O-Rama Forums

Command line control


unclesteve

Recommended Posts

Is there an kind of command line interface for stopping, starting, pausing, change the schedule, changing the show etc. or an SDK or DLL interface library for LOR?

I'm planning on remote controil of my entire LOR system via a web page with my Android phone. I'm a Systems Engineer with significant software engineering experience and could probably handle most any API.

Steve

Link to comment
Share on other sites

[align=center]windows shell command

[/align]For example, some people broadcast the songs that play during their shows over radio, and would like the name of the song to be broadcast along with it, using the RDS ("Radio Data System") protocol, allowing people with RDS-enabled radios to see the name of the song that they are listening to. RDS is not directly supported by Light-O-Rama, but you could set up your musical sequences so that, whenever one of them is played, Light-O-Rama will tell Windows to tell your RDS program to broadcast the name of the song for that sequence.


To set up a sequence to execute a Windows command, select Windows Command from the Sequence Editor's Edit menu. After that, whenever that sequence is played (either by the Sequence Editor or the Show Player, the command will be executed.

Note, though: If the Show Player is running when you change the command associated with a sequence, you may have to stop and start the Show Player in order for this change to be picked up.

This feature is available only for the Advanced feature level.

Is this what you are refering to

found this in the help files of the sequence editor

Frank A.:)

Link to comment
Share on other sites

Anything you can do with the schedule editor, you can do with your own program. The files weeksched.lsc and yearsched.lsc are constantly monitored by the show player. IIRC, the show player also monitors the show file that is currently playing, and will re-read it if it changes.

If you change these files, the currently-playing show will still shutdown gracefully, meaning it will wait for the current musical sequence to finish, then run the sequences in the shutdown tab before it stops or goes to the next show.

Link to comment
Share on other sites

Are there any files that are updated showing the currently playing sequence or the last entry of the Status window?

I did some digging but have not found anywhere that the messages in the Status window are populated into a file or the registry.

Link to comment
Share on other sites

heystew wrote:

Are there any files that are updated showing the currently playing sequence or the last entry of the Status window?

No, but you can do it yourself with the "Windows Command" property of each sequence. I have a small BAT file that takes its arguments and put them into a "Now Playing.txt" file. I use this file to update my transmitter's RDS encoder.
Link to comment
Share on other sites

unclesteve wrote:

Is there an kind of command line interface for stopping, starting, pausing, change the schedule, changing the show etc. or an SDK or DLL interface library for LOR?

I'm planning on remote controil of my entire LOR system via a web page with my Android phone. I'm a Systems Engineer with significant software engineering experience and could probably handle most any API.

Steve


I'm specifically interested in being able to pause a sequence via the DOS command line or some other interface. I'm aware of the Windows shell interface but it's a "read only" interface, I can't control LOR with it.

I can build my own scheduler and show applications that control the sequences (just like the LOR Scheduler and Show creator applications

Here's my reason; I've had a number of very loud visitors. I broadcast the music via an FM radio as most everyone else does to specifically avoid outdoor speakers. Several of my LOR seuences have "rockin" pieces of music and it promotes people parking across the street, opening all their vehicle windows and doors and blasting their radio at full volume. This very much annoys the neighbors and they have complained to me about it.

I've put up signs and people don't read them. I also broadcast multiple requests to keep the sound down during my LOR show and people ignore that as well.

I have now implemented a web page that my neighbors can go to, enter a code and shut off my LOR sound track. I've implemented a USB controlled relay that disconnects the audio from the LOR computer to the FM transmitter and broadcasts the following message from a CD player in "loop mode":

"The sound has been discontinued as a result of excessive volume near my house. When the volume levels return to an acceptable level the show will resume. I aplogize for this disruption"

I have a program on the LOP computer that stays in a loop and watches my website and crontrols the audio relay. I can also start or stop the entire show.

This works well to discourage those people that just don't seem to care about my neighbors.

The naighbors can shut off the sound for about 3 minutes at a time.

This way my neighbors have control when I'm not home to talk to people.

This is the only thing I figure will keep my neighbors happy, let me have a life and train the obnoxious people to be more considerate. My neighbors all tell me they love the show just not the inconsiderate people.

The only drawback is that the light sequence continues without the soundtrack. I'm hoping to find a way to simply put the entire show on "pause" and then resume exactly where it left off.

Any ideas?

I'd be glad to share what I've built. Right now it's designed to work with just my specific web site but if other people want something like it I'll create some documentation.
Link to comment
Share on other sites

unclesteve wrote:

I'm hoping to find a way to simply put the entire show on "pause" and then resume exactly where it left off.

The options in the control panel are "Disable Shows Gracefully", and "Disable Shows Immediately". There is no "Pause Show", but this would be nice. If you can't do it from the LOR control panel, then I'm sure there's no way to do it via an external program.

The Sequence Editor can pause, but that's a completely different program (that requires a higher-power computer than is required for the show player).

One solution is to write a program that finds the show player process, and terminate it. Then launch it again to restart the show.

Another idea is to use the USB relay to disconnect the LOR network from the show computer. Then the lights would go out. After your 3 minutes or whatever, both the transmitter input and the LOR network could be reconnected, and the show in progress would continue.

To get fancy, the relay could also turn on a sign that reads "Lights Disabled".
Link to comment
Share on other sites

Steven wrote:

unclesteve wrote:
I'm hoping to find a way to simply put the entire show on "pause" and then resume exactly where it left off.

The options in the control panel are "Disable Shows Gracefully", and "Disable Shows Immediately". There is no "Pause Show", but this would be nice. If you can't do it from the LOR control panel, then I'm sure there's no way to do it via an external program.

To get fancy, the relay could also turn on a sign that reads "Lights Disabled".


Thanks for the suggestions, I already have a moving message sign that I feed serial data to and change the message on the fly (name of the song, please be quiet, show times, etc.) . It seems the obnoxious people can't read. I thought about cutting off the LOR signal or halting the show completely but halting the show causes the entire show cycle to start back at the beginning and would penilize the normal courteous people.

I must assume there is no API since if there was it would have been advertised as a feature.

I can easily interface with the LOR GUI ("Disable Shows Gracefully", and "Disable Shows Immediately", etc) unfortunately the current GUI doesn't give me what I'm looking for. Oh well maybe a future feature.

The problem boils down to the fact that the Windows Streaming API is a bit tricky to start and pause parallel data streams without losing synchronization between the data sources (in this case LOR data, video and the audio streams). If LOR wrote the applications in "C/C++" or in VB. If LOR was written in VB then you don't have a simple means to control the stream. If LOR was written in "C/C++" then you can control media behavior more directly.

I suspect LOR was witten in something like Visual Basic.

I also suspect that with time LOR software will evolve and an API may be developed. If that happens we'll see third party features become available.

I suspect a good number of LOR users are Engineers and are naturally inclined to "tinker" with things.

Thanks for your suggestions!

Steve
Link to comment
Share on other sites

One more thought... If you have a way to drive a relay from some other source, like your user interface for the neighbors, you could set up a trigger into LOR. So when the relay closes, LOR detects the contact closure, and interrupts the current sequence, then plays your 3 minute sequence with few, or no lights, and your announcements.

Then, once that sequence is over, LOR will pick up at start of the next song in your show. Not quite a pause, but better than starting over from the beginning...

Link to comment
Share on other sites

-klb- wrote:

One more thought... If you have a way to drive a relay from some other source, like your user interface for the neighbors, you could set up a trigger into LOR. So when the relay closes, LOR detects the contact closure, and interrupts the current sequence, then plays your 3 minute sequence with few, or no lights, and your announcements.

Then, once that sequence is over, LOR will pick up at start of the next song in your show. Not quite a pause, but better than starting over from the beginning...


Hmmm.... not bad, I'll have to give that more thought. I've never explored the LOR controller digital interface. I'll research it further, and test it in my LOR lab (spare equipment) and let you know the results.

Thanks!
Link to comment
Share on other sites

wow UncleSteve you are doing a lot for the neighbors. I wish there was an interface too. I did a similar web page and .net program entirely by overwriting the files mentioned above.

Click the MIIP banner for info. http://miip.mobi
Honestly it was barely noticed by people. A few guests loved and gushed over it. But mostly people did not bother to get out their phones or dont have one. Less than 1 in a 50 guests voted.

It was great for me though as I could pick the next song in the schedule while talking to people.
Just like the issues you were having MIIP could not pause,resume, or skip to end of a song. If you find out how...please share.

Link to comment
Share on other sites

Wow, you put a lot of work and tought into your application. I seriously considered doing something very similar. Then after talking to so many people watching my show I realized I'd likely be the only person that uses it. The viewers are transitory the neighbors are not so I thought I'd focus on keeping the peace in the neighborhood. I have had friends & family call me after Christmas when the show is finished but not dismantled to request a private viewing. This usually happens while I'm not at home so I created the show start/stop capability via a web interface and my (Windows Mobile) cell phone.

Thanks for your efforts on behalf of the LOR community!

Steve

Link to comment
Share on other sites

  • 5 months later...

Like I good neighbor, Uncle Steve is there :)

Way to go! Talk about awesome neighbor relations.
I agree that you should put up a sign that says "Lights Disabled due to Loud Guests"

Link to comment
Share on other sites

×
×
  • Create New...