PDA

View Full Version : Squeezebox control / API



wpervaiz
2010-05-16, 22:12
Hey guys,

I have the squeezebox duet receiver and controller and am trying to integrate this into my system. Is there a way to issue commands to the receiver using http commands?

For example, if the IP address of the receiver is http://192.168.1.100, can I hit something like http://192.168.1.100/PlayCMD to send the "play" event to the receiver.

Play and pause will probably be all I ever need to send.

Any ideas?

Thanks!

lrossouw
2010-05-16, 22:18
Hey guys,

I have the squeezebox duet receiver and controller and am trying to integrate this into my system. Is there a way to issue commands to the receiver using http commands?

For example, if the IP address of the receiver is http://192.168.1.100, can I hit something like http://192.168.1.100/PlayCMD to send the "play" event to the receiver.

Play and pause will probably be all I ever need to send.

Any ideas?

Thanks!

You could just look at the urls sent by the play and pause buttons on the web user interface. Got to http://localhost:9000/ on the PC that is running the squeezebox server. See what the buttons point to.

mherger
2010-05-16, 22:58
Install Firefox and Firebug, then monitor the communication going on between the web UI and the server. It's all commands as documented in the CLI reference (see the help section), wrapped in JSON data sent to /jsonrpc.js.

wpervaiz
2010-05-17, 06:31
indeed using wireshark / firebug would be an option if i was running the squeezebox server.

I was hoping to bypass running the server and send commands directly to the receiver. It'll save me some cpu memory on my server and take out an extra link in the chain.

any ideas?

thanks!

peterw
2010-05-17, 07:15
I was hoping to bypass running the server and send commands directly to the receiver. It'll save me some cpu memory on my server and take out an extra link in the chain.

any ideas?


Receiver needs a "server", so either you use Squeezebox Server, MySq
ueezebox.com, or some other program that implements the Squeezebox client protocol. Or replace your Reciever with a Touch, as it has its own server (and uses less power than the Receiver, too).

325xi
2010-05-18, 12:21
This thread seems to discuss something similar
http://forum.micasaverde.com/index.php?topic=3609.0

wpervaiz
2010-10-02, 15:54
Receiver needs a "server", so either you use Squeezebox Server, MySq
ueezebox.com, or some other program that implements the Squeezebox client protocol. Or replace your Reciever with a Touch, as it has its own server (and uses less power than the Receiver, too).

even if i use mysqueezebox.com, i havent been able to find any ip controls...
something like that:

http://www.mysqueezebox.com?username=user&password=pass&controller=1&command=play


see what im trying to do?

thanks!

Skinny
2010-10-02, 22:01
indeed using wireshark / firebug would be an option if i was running the squeezebox server.

I was hoping to bypass running the server and send commands directly to the receiver. It'll save me some cpu memory on my server and take out an extra link in the chain.

any ideas?

thanks!

You always control the server. The server then drives the player. That's how SqueezeBox works.

-Skinny

toby10
2010-10-03, 03:45
.....see what im trying to do?

Yes, you are way over thinking and way over engineering a simple problem already addressed in the web UI's of both SBS and MySB.
Connect player to server, remote control it via simple web UI, enjoy the music.

epoch1970
2010-10-03, 05:05
even if i use mysqueezebox.com, i havent been able to find any ip controls...
something like that:

http://www.mysqueezebox.com?username=user&password=pass&controller=1&command=play


see what im trying to do?

thanks!
You can have a look at this and the message right below it for an example of stand-alone control of players connected to squeezenetworks.com
http://forums.slimdevices.com/showthread.php?p=399998
EDIT: latest version, for mysqueezebox.com is here:
http://forums.slimdevices.com/showthread.php?p=470590

As Michael said, you can't just ping a URL to control the player. You have to use the JSON protocol.
Also, while the CLI guide of SBS gives the list of functions available in the API, and last time I checked which is months ago: a. some CLI commands have a slightly different output under JSON and under telnet, b. some CLI commands sent through JSON have a different output under mySB.com and a local SB server.
Some reading and debugging required.

Have fun.

VinnyC
2010-10-15, 13:57
I am trying to accomplish a similar function.

We have integrated squeezebox into our home automation system. I would like to setup a single button that would start playing a particular Rhapsody Channel on the Squeezebox.

How could I do this? I will write calls to any http url, send soap command,or do whatever it takes to make it play in 1 button press. If anyone knows a way, please let me know.

I came across this old script called DirectPlay, but it seems like it may only be for local music, not Rhapsody content ids. http://bitflip.net/slim/

wpervaiz
2011-01-14, 10:01
any luck?