View Full Version : Yac2Slim and multiple players

Jeffrey R. Olson
2004-02-02, 17:51
I've been trying to use the Yac2Slim program to display Caller ID info on my
Squeezebox, and I've been getting intermittent results. Sometimes it works,
and sometimes it doesn't. I believe this is caused by the Yac2Slim code
assuming that there is only one player. Since I use Winamp on my main
workstation PC to stream from Slimserver and I have one Squeezebox, I always
have 2 players connected to the server.

I don't know Delphi very well, but it appears to me that this code is not
allowing for more than one player:

url_main := 'http://' + Config.server + ':9000/status.html?';

// First pause the player
if Config.pause <> 0 then begin
url := url_main + 'p0=pause&p1=1';

When I told SlimServer to forget the Winamp player, the caller ID info seems
to appear without a hitch on my Squeezebox. So it does seem to be a
multiple-player problem.

First of all, what is the behavior of SlimServer, when there is more than
one player attached, to an http request that doesn't specify the player?
Will it randomly pick one to control? Or is it determined by the most
recent player to connect to the server?

Second of all, is there any way to get a list of all the players from
SlimServer, either IP addresses or MAC addresses? If I could get a list of
all the players connected to the server, I could modify Yac2Slim (or
probably just write my own Perl script :-) to loop through all the players
and send the CallerID info to all of them (which is probably what you would
want to happen). Alternatively, if SlimServer cannot report the players it
knows about, I could always just hardcode the player's MAC address into the
Yac2Slim registry entries if needed.

Jeff Olson
jeff (AT) olsonzoo (DOT) com

2004-02-02, 19:07
On Mon, 2 Feb 2004 17:28:16 -0800, you wrote:
>As you can see there is nothing that specifies WHICH player to show the
>caller ID information on. It simply isn't part of the syntax on the Slim
>server web interface.

Actually, it is. Just add "&player=11:22:33:44:55:66", substituting
your player's MAC address.

I don't think it can be done with the HTTP interface, but if you use
the CLI (port 9090), you can say "player count ?" to get the number of
players, and then "player id n" for each one (n starts at 0) to get
the MAC address of each player.

The CLI also supports the display command (macaddress display line1
line2 duration)

- Jacob