PDA

View Full Version : Simple but really unpleasant problem with squeezenetwork !



jaysung
2007-07-26, 10:24
Hello,
as some of you know I am blind and really fond of my squeezebox. I use to have it connected to my Slimserver running on a Thecus N5200 nas and that is all well!
However once I connect my SB3 to Squeezenetwork the slimserver who's web interface I use to command the SB3 uses track of the player. Now a sighted user doesn't even notice the problem because he just moves up by some arrow clicks and says "Connect to slimserver" and all is well.
When one is bound to use the web interface one has a problem since one can not connect a player that the server doesn't see because it is not connected. Got the point? Any solution like scanning for players via the slimserver? I know it works vice versa normally but that is not an option as I said.
Thanx
Jeronimo

andyg
2007-07-26, 10:34
On Jul 26, 2007, at 1:24 PM, jaysung wrote:

>
> Hello,
> as some of you know I am blind and really fond of my squeezebox. I use
> to have it connected to my Slimserver running on a Thecus N5200 nas
> and
> that is all well!
> However once I connect my SB3 to Squeezenetwork the slimserver who's
> web interface I use to command the SB3 uses track of the player. Now a
> sighted user doesn't even notice the problem because he just moves up
> by some arrow clicks and says "Connect to slimserver" and all is well.
> When one is bound to use the web interface one has a problem since one
> can not connect a player that the server doesn't see because it is not
> connected. Got the point? Any solution like scanning for players via
> the slimserver? I know it works vice versa normally but that is not an
> option as I said.

The option you are looking for is a bit hidden. On the SN website,
go to Players -> Settings for the desired player, and select
"Disconnect <player> from SqueezeNetwork".

snarlydwarf
2007-07-26, 10:39
Jaysung needs an automated way to do that, though. Is the "disconnect player xxx" a fixed URL? If he has CLI stuff to control his setup, I would think he'd be able to piece together a cheap "login to SN to get cookies, go to this url with those cookies to reconnect"

That said, this may be one of those things that will be less hassle in 7.0.

andyg
2007-07-26, 10:44
On Jul 26, 2007, at 1:39 PM, snarlydwarf wrote:

>
> Jaysung needs an automated way to do that, though. Is the "disconnect
> player xxx" a fixed URL? If he has CLI stuff to control his setup, I
> would think he'd be able to piece together a cheap "login to SN to get
> cookies, go to this url with those cookies to reconnect"
>
> That said, this may be one of those things that will be less hassle in
> 7.0.

The URL is http://www.squeezenetwork.com/player/disconnect?
player=<id> where <id> is your player ID. A session cookie is
required to access this page.

I didn't see that he was using the CLI, just the web interfaces.

snarlydwarf
2007-07-26, 11:00
Ah you are right, Andy, sorry. :)

myrrh
2007-07-26, 13:15
What I've done is to have a set of bookmarks in my browser that can achieve such operations with one click. So I have a set of bookmarks for

Play KQED Radio on Lounge
Connect Lounge to Squeezenetwork
Disconnect Lounge from Squeezenetwork

so for commonly used tasks this becomes really quick since you can bypass the web interface navigation altogether. I'm not sure what is in store for 7.0 but a nice feature might be to have a user friendly way of generating bookmarks like these.

jaysung
2007-07-27, 09:04
>The URL is http://www.squeezenetwork.com/player/disconnect?>
>player=<id> where <id> is your player ID. A session cookie is
>required to access this page.
>I didn't see that he was using the CLI, just the web interfaces.

Can you give an example for I don't know exactly what my player id would be.
Would I just do a call to that web site? i.e would wget be enough? Then I could write a script running on the server machine which chekcks the state of all players and connects them back to the server every now and then or when a cerain condition ist true.

Where can I find an introduction to the cli? I logged in via telnet to slimserver:9090 but there was not much I intuitively grasped from I knowledge of bash.

snarlydwarf
2007-07-27, 09:45
Can you give an example for I don't know exactly what my player id would be.
Would I just do a call to that web site? i.e would wget be enough? Then I could write a script running on the server machine which chekcks the state of all players and connects them back to the server every now and then or when a cerain condition ist true.

A wget wouldn't be enough, it needs to login. It should be doable in Perl, though.

The player ID seems to be (at least for me) a 4 digit number, perhaps from the PIN or perhaps just a token to distinguish SB's registered to the same account apart. (Since it will still need the authentication cookie to actually disconnect.)



Where can I find an introduction to the cli? I logged in via telnet to slimserver:9090 but there was not much I intuitively grasped from I knowledge of bash.

http://localhost:9000/html/docs/cli-api.html would work, but the catch is the "disconnect a player" would have to be given to the Squeezenetwork servers which don't support CLI access.

andyg
2007-07-27, 09:47
On Jul 27, 2007, at 12:04 PM, jaysung wrote:

>
>> The URL is http://www.squeezenetwork.com/player/disconnect?>
>> player=<id> where <id> is your player ID. A session cookie is
>> required to access this page.
>> I didn't see that he was using the CLI, just the web interfaces.
>
> Can you give an example for I don't know exactly what my player id
> would be.
> Would I just do a call to that web site? i.e would wget be enough?
> Then
> I could write a script running on the server machine which chekcks the
> state of all players and connects them back to the server every now
> and
> then or when a cerain condition ist true.
>
> Where can I find an introduction to the cli? I logged in via telnet to
> slimserver:9090 but there was not much I intuitively grasped from I
> knowledge of bash.

It might be easier if I just added a disconnect command to the SN CLI
server. Then you could easily script that to disconnect all players
that are connected.

andyg
2007-07-27, 09:53
On Jul 27, 2007, at 12:45 PM, snarlydwarf wrote:

>
> jaysung;217434 Wrote:
>>
>> Can you give an example for I don't know exactly what my player id
>> would be.
>> Would I just do a call to that web site? i.e would wget be enough?
>> Then
>> I could write a script running on the server machine which chekcks
>> the
>> state of all players and connects them back to the server every
>> now and
>> then or when a cerain condition ist true.
>
> A wget wouldn't be enough, it needs to login. It should be doable in
> Perl, though.
>
> The player ID seems to be (at least for me) a 4 digit number, perhaps
> from the PIN or perhaps just a token to distinguish SB's registered to
> the same account apart. (Since it will still need the authentication
> cookie to actually disconnect.)

Player ID is just a unique ID for your player in our database.
You'll have to login and parse the player page to find it.

>
>>
>> Where can I find an introduction to the cli? I logged in via
>> telnet to
>> slimserver:9090 but there was not much I intuitively grasped from I
>> knowledge of bash.
>
> http://localhost:9000/html/docs/cli-api.html would work, but the catch
> is the "disconnect a player" would have to be given to the
> Squeezenetwork servers which don't support CLI access.

SN does support CLI, it just doesn't have a disconnect method, but I
will add one. See http://wiki.slimdevices.com/index.cgi?CLIProxy