PDA

View Full Version : Squeezebox Integration



nurowolf
January 4th, 2010, 09:22 PM
Hi Guys

Need some advice and feedback

Firstly - has anybody built any integration with Squeezebox?

If not - I am looking to build some - but need some help getting started. (Ultimately I would love to get NR integration with Squeezebox to the level that we have with J River MC).

From my reading - the Squeezebox supports both xPL and xAP for home automation. So I am looking to start here.

But I don't know how to begin. If we assume that I will use xAP - how do I get started.

At a minimum what I am looking to do is the following
1) Receive Play Message from Squeezebox (listen for xAP message)
2) Turn On Amplifier
3) Receive Squeezebox Off Message (listen for xAP message)
4) Turn Off Amplifier.

Pointers for getting started would be greatly appreciated.

Mike C
January 4th, 2010, 09:51 PM
this is something i will be looking at in the future - no sure when. the xap stuff does get events into girder from the squeezebox.

nurowolf
January 5th, 2010, 12:31 AM
Any suggestions oh how to start with xAP then?

Do we have some very easy working examples to get this to started?

I was a bit worried that a HUB was needed for xAP (or is Girder the HUB?)

jmonier
January 5th, 2010, 08:46 AM
I don't know anything about xAP but you can control Squeezebox Server via a socket in Lua.

Open the socket:
SS = gip.Open(<Squeezebox Server machine name or TCP/IP address>, 9090)

Set up a callback:
SS:Callback(2, '\n', 1000, <callback routine>)

Sample to cause callbacks when ANY Squeezebox is turned on or OFF:
SS:Write('subscribe power\n')

Sample to turn Squeezebox on or off:
SS:Write(<Squeezebox MAC address>.." power "..onoff.." \n")
(onoff is "0" or "1")

Documentation for this interface (called "Command Line") is in Help on the Squeezebox web interface under "Technical Information". There is also info on xPL in the same section.

Mike C
January 5th, 2010, 12:49 PM
direct access is better than going the xap route.

the software has CLI and JSON interface (JSON wraps the CLI making it easier to parse results).

AFAIK Girder has the JSON library - but I haven't used it.

nurowolf
January 5th, 2010, 11:56 PM
Oh WOW - that sounds good. I thought the CLI would be 1 way. IE girder send HTTP commands to Squeezebox - I didn't realise we could subscribe through the CLI.

Will need to investigate. Thanks for the pointers.

Will probably have to wait till the weekend to play.

jmonier
January 6th, 2010, 08:49 AM
AFAIK Girder has the JSON library - but I haven't used it.

It doesn't seem to be mentioned in the Girder documentation but the Lua JSON binding is in the luascript folder.

nurowolf
January 7th, 2010, 05:42 AM
WOW - I gave that a quick try tonight.

So simple. I used the ('listen 1\n') command to get everything - .

I dont know what JSON is - but this CLI interface is pretty easy. I just need to work out what to subscribe to and process.

I would love to write a small plugin for the DUET remote that would allow that remote to control the rest of the Home Theater - but I get ahead of myself.

Thanks so much for the help.

jmonier
January 7th, 2010, 08:44 AM
Note that SoftSqueeze can be controlled as well. Just use the (pseudo) MAC address that is created when SoftSqueeze is installed.

yamy125
January 7th, 2010, 05:10 PM
Nice work guys. Sounds like a friendly interface via CLI. I have been contemplating getting some Squeeze devices for some time (awesome units from what I read) but didn't want something that wasn't easily integrated into Girder and NetRemote.

Now we just need a nice plugin to tie it all together - maybe some Media Bridge integration from Promixis (pleeeeeeease)? ;)

VicVonDoom
March 30th, 2010, 09:02 AM
Now we just need a nice plugin to tie it all together - maybe some Media Bridge integration from Promixis (pleeeeeeease)? ;)

+1 for mediabridge integration.
I just got myself a squeezebox duet off fleabay.

I reckon rob's not busy enough at the moment, perhaps he can do this in his teabreak :D

VicVonDoom
April 2nd, 2010, 02:17 PM
hmmmm, no response eh?

here you go http://wiki.slimdevices.com/index.php/PluginRemoteControls all of the other boys can do it, why can't we?

even the supergiant crestron has a plugin for this so i'm guessing its not a "here today gone tomorrow jobbie".

Rob, If you fancy the challenge & you don't have one to tinker with, give me a shout and i'll lend you mine for a month until the builders finish building our new house (Promixis controlled of course...)

Rob H
April 2nd, 2010, 04:09 PM
Tempting offer there :)

May just be easier to play with the software version, but I don't know when I'll get time to do it.