"Master Volume Set" - How to set via external Program

V3 help and support questions

"Master Volume Set" - How to set via external Program

Postby smarty on Sat Jun 27, 2009 5:54 pm

I am trying to figure out a way to have an external program (in my case it is PowerHome) set the Master Volume to a level that I can pass into Xlobby.

I have had very good success in getting Powerhome and Xlobby to talk with each other (and passing other information back and forth).
++For sending information INTO Powerhome, I use the PHSSCMD.EXE file (PowerHome Socket Server command line) with XLobby's "execute command" function.

++For receiving information INTO Xlobby, I use the XRecieve plugin. This allows me to to run any event that I choose (including setting button states and button text....extremely flexible)!!

Now for what I am doing....
I monitor XLobby's "master volume" and if Xlobby is playing music or media. When PowerHome needs to make an announcement, I pause the music/media (if playing), then I adjust the volume (both Powerhomes' and Xlobby's volume to a pre-defined level for the annoucement). After the annoucement I want to return Xlobby to it's pervios Volume level (where it was set before the announcement) and then re-start the music/media.

I am able to pass the initial Xlobby volume level into PowerHome, so, after the annoucement, I do have the volume level that I want to set Xlobby back to, but my problem is that this level information does not seem to pass into Xlobby like other information that I have been able to pass into Xlobby.


For example, the following Xrecieve command lines work fine (the {} brackets are PowerHome variables):

ph_run('c:\program files\xlobby\xsend.exe ~~"command:xlobby:run event:music:play~~" 8000 192.168.0.106')

ph_run('{XLOBBY PATH}\xsend.exe ~~"command:xlobby:button set text:last device:{ROOM DEVICE ID}~~" 8000 192.168.0.106')

ph_run('c:\program files\xlobby\xsend.exe ~~"command:xlobby:run event:master volume:volume soft~~" 8000 192.168.0.106')

SO, HOW CAN I PASS THE ORIGINAL XLOBBY VOLUME LEVEL? I have tried things like:
ph_run('c:\program files\xlobby\xsend.exe ~~"command:xlobby:run event:master volume:set:{PH Variable}~~" 8000 192.168.0.106') <== This should have worked, but no luck..... Ideas??
smarty
 
Posts: 179
Joined: Thu Jul 27, 2006 12:04 am
Location: San Antonio, TX USA

Re: "Master Volume Set" - How to set via external Program

Postby smarty on Sun Jun 28, 2009 1:54 am

OK, after much trying, I decided to create master volume setpoints at 5,10,15,20...100.

I then evaluate the Xlobby pre-announcemnt volume to find out which pre-defined volume setpoints it is closest to. I then change the post announcement volume back to the proper increment of 5 volume level.

Close enough...... and it works!!!
smarty
 
Posts: 179
Joined: Thu Jul 27, 2006 12:04 am
Location: San Antonio, TX USA