For Scalt.....VAC Setup

Help each other out

Postby Marbles_00 on Tue Feb 06, 2007 2:36 pm

Not really sure what this is supposed to do, can you explain a little more?


It sounded as though your're having a problem that toggles are working fine, but the actual command/event to to control the zones was not being executed on the server, or it was trying to execute the commands on the client. What checking that box off, in therory, does is to only execute the said event on the server. But this may not be what you want.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Postby scottw on Tue Feb 06, 2007 2:48 pm

Oh ok that makes sense. The problem was that when you click one toggle (source), which works, it then is supposed to change other toggles on the screen(zones) which is what is not working. And the event for the zone toggles won't run because they are not in the right state.

I think that all came out right :lol: It's hard to explain without seeing it. I think the problem is with the way the script calls the toggles but I do not know enough about scripting to fix it. The script works perfectly on a my main XL computer but not on the thin client which is what my touchscreen is running. I am working on a way now to accomplish something similar by calling toggles thru XL , still using part of the script, but it will not be as nice as Scalt's script.
If anyone else wants to take a stab at it please go right ahead and PLEASE let me know.

Again I could not have gotten this far without your help Scalt!!!!!!

Thanks,
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Postby Marbles_00 on Tue Feb 06, 2007 8:20 pm

This may be completely off the wall, but could you use the Mimic command? Mimic is whatever is done on the client, the same is done on the server. Most likely it won't work, but decided to throw it at ya...just to try.

I haven't used it too much, as it doesn't really matter to me if I see what's going on, on the music server itself. But at one point I played around with it so whatever zone I was controlling on the PPC, it was reflected on the server...hence updating my Now Playing image here on Xlobby.com. Though at some point, I lost the communication, then I just scraped the idea. I found that Buddabing's Now Playing sequence, and the added feature of swapping zone control, depending on the sequence was enough to update the image.

Anyways...back on topic.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Postby scalt on Tue Feb 06, 2007 8:27 pm

Do you guys think this could have to do with the way XScript calls the Xlobby commands? Because, in the script I wrote, I'm basically only calling some Xlobby.ExecCommand().

Would it be any different with XScriptNG?
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

Postby scottw on Tue Feb 06, 2007 8:29 pm

I tried that before but it did not seem to work right, maybe I had it setup wrong.

I have had some success with manually creating everything in XL. I have been able to make 3 sources:
Music Player 1
Music Player 2
Radio
(3 copies of Winamp)

Getting ready to leave now but will post more detail tonight.
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Postby scottw on Tue Feb 06, 2007 8:33 pm

scalt wrote:Do you guys think this could have to do with the way XScript calls the Xlobby commands? Because, in the script I wrote, I'm basically only calling some Xlobby.ExecCommand().

Would it be any different with XScriptNG?


I tried with XScriptNG, no luck :x

I don't think it's the Xlobby.ExecCommand(). I think I may be one of the IF, Else, or "for each" statements. But I am no expert just a guess because some of the Xlobby.ExecCommand().'s work.
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Postby scottw on Wed Feb 07, 2007 2:31 am

OK so what I started out with was 3 zones (Sunroom, Bedroom, and AllRooms) each with a copy of Winamp outputted to channels of my sound card (Kx drivers 0/1, 3/4 and 6/7, numbers may be off) I had a music screen and cycled thru the zones with the Zone Next command. We mainly stayed on the Sunroom zone.
I didn't want to change the look to much since my wife already know's how to work this setup.



For the sake of this post and so I don't get confused, from now on when I say Sources it is what XL calls Zones and what I call Zones are Rooms or outputs of my sound card.


Using Scalt's script worked fine but I could not get the toggle buttons to work right in the thin client (main touch screen used in the Sunroom). If I manually setup toggle buttons they work fine with the thin client, well kind of, I will explain later. What is cool about Scalt's script is the fact that you cannot accidentally play 2 sources to one zone/set of speakers.
My setup involves ALOT of events and is messy but works for me (so far), if someone has a suggestion on how to clean it up please let me know.

I have 3 sources:
Music Player 1
Music Player 2
Radio
Each of these is a copy of Winamp outputted to a Virtual Cable.
For right now until I can think of a better way, each Source has it's own page although Music Player 1 and 2 are identical. I changed the button that use to be "Next Zone" to "Sources" which pops up an overlay that shows each of the sources that takes you to the appropriate page. Each page also has a button which pops up another overlay that lists all of the zones. Clicking on them opens the Audio Repeater for that zone (using the script) and changes the toggle state to show a speaker next to it. Clicking the zone again closes that copy of the Audio Repeater and changes the toggle back to it's original state. Because of the script it keeps track of which Audio Repeater program was opened for each zone so it can close the right one. :)
This all worked fine for one source but I had to try to figure out how to play from the other sources without sending 2 audio streams to one speaker. The only way I could figure to do it was on each of the events to start the Audio Repeater I had it try to kill any other source instances for that zone (2 others in my case). So if I am playing a song in the Bedroom and Sunroom on Music Player 1 and want to listen to the radio in the Bedroom now, all I have to do is select what I want to listen to from the Radio source page and from the overlay on the radio screen pick the Bedroom zone and it will kill the Audio Repeater playing from Music Player 1 to the Bedroom zone (leaving the one from MP1 to Sunroom alone) and start one for the Radio to the Bedroom zone all without interrupting what is playing in the Sunroom.
My event to enable a zone looks like this for (Source) Music Player 1 to (Zone) Sunroom:
Code: Select all
<event>
    <name>MP1 Zone Sunroom Enable</name>
    <serverevent>True</serverevent>
    <commands>
      <command>
        <type>xlobby</type>
        <execute>run event</execute>
        <parameter>music</parameter>
        <parameter>radio Zone Sunroom Disable</parameter>....Explained further down
      </command>
      <command>
        <type>xlobby</type>
        <execute>run event</execute>
        <parameter>music</parameter>
        <parameter>MP2 Zone Sunroom Disable</parameter>
      </command>
      <command>
        <type>timer</type>
        <execute>wait</execute>
        <parameter>200</parameter>
      </command>
      <command>
        <type>xlobby</type>
        <execute>button state set</execute>
        <parameter>MP1_sunroom_spkr</parameter>
        <parameter>On</parameter>
      </command>
      <command>
        <type>xlobby</type>
        <execute>button set text</execute>
        <parameter>MP1_sunroom_spkr</parameter>
        <parameter>f</parameter>.........................this changes the image of a speaker to a speaker that is playing :)
      </command>
      <command>
        <type>plugin</type>
        <execute>command</execute>
        <parameter>XScript</parameter>
        <parameter>ExecScript</parameter>
        <parameter>source.txt source_%zone>current% On</parameter>...sets the source player
      </command>
      <command>
        <type>timer</type>
        <execute>wait</execute>
        <parameter>200</parameter>
      </command>
      <command>
        <type>plugin</type>
        <execute>command</execute>
        <parameter>XScript</parameter>
        <parameter>ExecScript</parameter>
        <parameter>zones.txt zone_Sunroom On</parameter>....sets the output zone
      </command>
    </commands>
  </event>


The zone disable command looks like this:
Code: Select all
<event>
    <name>MP1 Zone Sunroom Disable</name>
    <commands>
      <command>
        <type>xlobby</type>
        <execute>button state set</execute>
        <parameter>MP1_sunroom_spkr</parameter>
        <parameter>Off</parameter>
      </command>
      <command>
        <type>xlobby</type>
        <execute>button set text</execute>
        <parameter>MP1_sunroom_spkr</parameter>
        <parameter>e</parameter>
      </command>
      <command>
        <type>plugin</type>
        <execute>command</execute>
        <parameter>XScript</parameter>
        <parameter>ExecScript</parameter>
        <parameter>zones.txt zone_Sunroom Off</parameter>
      </command>
    </commands>
  </event>




The problem with this is I need these 2 events for each zone x sources =12 events so far, got to be a better way :oops:

Sorry if I jumped around a bit or did not explain fully, I took in a lot of info at one time and tried to explain it the best I could while I still had it in my head. :) Let me know if I need to explain anything further.


I know this is a messy solution and I am going to be cleaning it up and simplifying what I can, hopefully from suggestions here. This is far from done.

This would work a lot better if Marbles "Feature Request" for Global Toggle Buttons would get added :)

This setup may or may not help anyone else but I just wanted to document what I have done so far.
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Postby CiXel on Sun Mar 11, 2007 1:43 pm

Scott-
Does your hack ;) make this work successfully with the thin client setup you were having issues with previously?
CiXel
 
Posts: 177
Joined: Tue Feb 22, 2005 6:27 pm
Location: New York

Postby scottw on Sun Mar 11, 2007 5:02 pm

Yes is does :D

The problem is the fact that I cannot change the state or text of buttons using a script so it had to be done thru Xlobby itself.

My method here is way to messy and some commands were not needed. I am in the process of cleaning this and the rest of my skin up because it seemed to get way out of hand for me to keep track of what was actually being used :D

I have since setup a zone map to control the rooms the sources were outputted to. You can see a non-finished screen shot of my map in my last post here:
http://www.xlobby.com/forum/viewtopic.php?t=5471
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Postby CiXel on Sun Mar 11, 2007 6:00 pm

I have been been toying with this idea for quite some time... Especially using VAC. Perhaps it is time to finally sit down and get this working over my thin clients as well (progears) I think you may have inspired me. I just have to figure out how to implement some of my favorite features from eJukebox into my new XL skin (it has some of the best auto playlist features around)

Thanks
CiXel
 
Posts: 177
Joined: Tue Feb 22, 2005 6:27 pm
Location: New York

Postby scottw on Mon Mar 12, 2007 12:33 am

Cool. Post some screen shots when you get them. Also check on the xMusic plugin:
http://www.xlobby.com/forum/viewtopic.php?t=5438

He has some auto playlist functions in there that may help. I am trying to toy with that now :D
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Previous