Add-on:XSqueeze

Introduction
XSqueeze is Squeezebox player/controller/music chooser for XBMC. XSqueeze can be used in three main ways:


 * 1) As simply a big-screen visualiser/controller/music chooser for an existing Squeezebox player
 * 2) As a software based squeezeplayer to extend your existing network of Squeezebox audio players using your XBMC machine - with local playback, music choosing, and a visualiser. This allows you to have an XBMC/XSqueeze setup in one room that syncs with other Squeezebox players you use.
 * 3) As an easy hack to achieve multi-room, synchronized audio playback with XBMC. In this case, all your players are software players using your current XBMC hardware

The last two use cases rely on either squeezelite or squeezeslave for music playback. Either of these can be automatically run directly by the addon (typical use case) or manually installed as a background service if you need something out of the ordinary.

(NB: The player functionality only works on Windows, OSX and Linux variants with alsa - 2.6+/OpenELEC/Crystalbuntu/Raspbmc - NOT iOS/ATV2/Android/other platforms not listed. Basically, the squeezelite or squeezeslave binary must be available for your system for local playback to be possible).

Screenshots
 

Requirements

 * Logitech Media Server >= version 7.6 must be running somewhere on your network as the music server
 * squeezelite or squeezeslave (only required for local playback, installed automatically with the addon)

Supported Platforms

 * Windows, OpenELEC, Linux variants with alsa, OSX, Apple TV1 (Crystalbuntu) - Full support including local playback
 * ARM/Raspberry Pi - In theory full support if your distro has alsa Note: XBian and Raspbmc provide alsa support out of the box. OpenELEC can be made to support ALSA with a minor configuration change (see below).
 * ATV2/iOS - Controller mode supported, but no local playback support. If you install a squeezeplayer app from the app store (e.g iPeng with the local playback addon), you can then control this via Xsqueeze if you want to.
 * Android - Controller mode support, no local playback support - but you can install Squeezeplayer from Google Play and then control that from Xsqueeze for basically the same result.

Visit XSqueeze forum thread for latest discussion, new release notification, and help.

Spotify Support
XSqueeze supports Spotify playback as of version 0.8.7 and above.

Requirements for this: (LMS->Settings->Recommended Third Party Plug-ins.   Install, restart LMS, configure, restart LMS, run tests on the plug-ins setting page)
 * You must have a Spotify Premium account
 * You must configure XSqueeze to use squeezelite as the internal player
 * You must install Triode's Third Party Spotify plug-in

Once you have it all working, in XSqueeze start the music chooser (use the icon bottom right that looks like a speech bubble!) - go to Apps -> Spotify -> and you should be able to browse all your Spotify music. Select what you want and it should start playing!

Installation
In order to install XSqueeze, you must first enable the bossanova808 repo in XBMC. You can accomplish this by downloading the zip file at this link and installing the repo manually by following these directions.

Once the bossanova808 repo has been enabled, you will be able to install XSqueeze from it. Installing XSqueeze will automatically install any dependencies including XSqueezeChooser (the music choosing component), and the player binaries.

XBMC
big>* ''' In XSqueeze settings there is a Troubleshooting page with various options you can use to work around various issues...but feel free to ask in the support thread too. The default settings work out of the box for most people.}}

XSqueeze
Go to the XSqueeze addon settings (go to the addon and use the context menu to get to 'configure').

Logitech Media Server AKA LMS
Here's where you put your LMS server details. Generally you can use the automatic discovery option to find your server on the network and it will full in the IP address for you. Otherwise you can just enter it manually if you need to. Add login details/port etc. if you need to.

Mode
If you don't want to use local playback, i.e. you just want to control/visualise an external squeezebox, disable the first toggle. You'll then need to enter the actual MAC address of the existing player you want to control (usually found on a sticker on the back of the machine).

If local playback is enabled you can: (for available options, see http://wiki.slimdevices.com/index.php/SqueezeSlave#Command_Line_Switches or http://code.google.com/p/squeezelite/) **** NOTE IF USING OpenELEC, I RECOMMEND adding '-y200' (without the quotes) as an argument to avoid audio dropouts
 * Choose which player (squeezelite is more modern and supports hi def audio, spotify etc, but squeezeslave is kept for historical reasons)
 * Use the automatic audio output chooser to specify the audio output device (although usually it will pick the right one by default there's no harm in explicitly setting it)
 * Change the dummy MAC address the player uses - required for two reasons:
 * 1) If you have multiple installations of XSqueeze for example - otherwise all your software players will register as one player in LMS
 * 2) LMS uses this number to register the device/player on the mysqueezebox.com cloud service. Many remote software or apps (such as the official ones for iOS and android) rely on this registration to identify and communicate with the device. If your device (xbmc installation in this case) is not registered with a unique mac address, remote apps will not be able to connect to it. You can also manage favourites and player settings through this cloud service, and control the players over the internet
 * [Optionally] Add a list of extra player arguments that will be passed on - such as manually specifying an audio output to use.

Other Settings
You can choose:
 * To have music start playing immediately on XSqueeze launch (a 'play' signal is sent and anything stored in your playlist resumes)
 * To enable/disable mouse/touchscreen controls

Troubleshooting
Various delays can be configured here to workaround issues, but the defaults are sensibly chosen and work for almost everyone. If you still have issues after playing with these, come to the forum thread for help.

Raspberry Pi
If you wish to use XSqueeze as a player, you will need to load the snd_bcm2835 ALSA module if your Raspberry Pi distro does not do so by default. If you use squeezelite with XSqueeze, you may need to add "-a 160" (without the quotes) to the squeezelite extra settings to avoid stuttering audio issues. Some people have found "-a 80" is enough.

Check whether or not the Raspberry Pi ALSA module is loaded:

Load the Raspberry Pi ALSA module:

Raspbmc
Raspbmc does not load the Raspberry Pi ALSA module by default. This change must be made in order for snd_bcm2835 to be loaded at bootup:

OpenELEC (Raspberry Pi build)
OpenELEC does not load the Raspberry Pi ALSA module by default. This change must be made in order for snd_bcm2835 to be loaded at bootup:

Usage
In XBMC->Add Ons->Programs, run XSqueeze

On your first run of any new version, you may get a message window pop up with any important changes, reminders etc. This only occurs the first run of each version, but you can find the same information in the addon folder/FIRSTRUN.txt if you need it.

As the addon starts, you will get messages if there are any issues (see below for troubleshooting). Once everything is OK (and after the external player has started if you have chosen the local playback option) - you will get to the main XSqueeze Now Playing screen.

If you haven't used XSqueeze before, now is the time to add some music. Hit your or  and you will get a music chooser. Select some music and you'll drop back into the XSqueeze main screen and playback begins.

You can exit at any time with your normal exit/home button (usually the big green button on MCE remotes, or escape on your keyboard). This can take several seconds as XSqueeze waits on various things to finish - the external player, the artist slideshow script etc.

If using squeezeslave: To navigate the virtual player (green lines at bottom of screen), use the up/down/arrows/left/right arrows just like on a Squeezebox classic etc. - and note that hitting right is generally the 'select' action just like on actual Squeezeboxes (select itself will probably also work in most contexts).

(Confluence:) The basic layout is a big panel with cover art, progress bar etc. for the current track, and smaller displays for the next 10 coming tracks. The panel on the right uses script.artistslideshow to pull band photos and bio information for the currently playing artist.

(Other Skins) - There have been reports of missing controls with other skins - try using Confluence if you have this issue. Would like some help with working out why this occurs - I always use Confluence. If you have any solutions - please post them in the forum thread!

Audio Issues (dropouts, no audio etc)
FIRST, TRY TURNING OFF XBMC MENU SOUNDS AND THE KEEP AUDIO DEVICE ALIVE OPTION!!

If you're not getting audio full stop from the addon then you will probably need to manually set your output for squeezelite/slave, whichever you're using.

This is done in XSqueeze settings -> Local Playback -> Audio Output Chooser

General Issues
If you are still having issues, then it's best to drop to the commandline on your machine and try running the player directly there. The player binaries live in your xbmc userdata folder under:

/addons/script.xsqueeze/resources/bin/SYSTEM ... etc. Find the right binary (platform and 32 or 64 bit as needed), and run it directly from there.

(squeezelite: you can list audio output devices with the -l switch, then specify a device with the -o switch)

(squeezeslave: You can test all of this from the command line quite easily using the -D switch, so in full:

squeezeslave -o12 -D yourserveraddress

..this will give you a text based Squeezeslave player right on your command line so you can quickly trigger audio to test etc.)

Once you have worked out how to run the player from the commandline, and get audio out ok, then just copy the switches you need into your xsqueeze settings.

For further info on squeezeslave, see: And for squeezelite, see:
 * squeezeslave
 * squeezeslave/Command Line Switches
 * squeezelite

If you are stuck - post a message to the forum thread XSqueeze forum thread

and remember to please always ***INCLUDE YOUR FULL DEBUG LOGFILE****

Audio Sync Issues
Squeezeslave and squeezelite are software players and like all software players, do not 100% support really precise sync like the hardware ones do - this is due to all sorts of factors (network latency, buffering, soundcard timing drift etc)

In general, squeezelite is really very good with sync, but try both players to see which works for you best.

Once you know in general which works best for you, there are some tweaks available in your LMS Settings->Player->Synchronize which can improve things further.

I regularly sync real squeezeboxes with squeezelite players and it works very well.

What to do if you're still stuck
Try harder and re-read these instructions - there's a lot of info here!

Try really hard, and if you are then still really stuck, post to the forum thread here: XSqueeze forum thread

Feedback and ideas appreciated!

Manual Installation of squeezelite or squeezeslave on your XBMC system
Generally it's best to just use the included player, but if you have special needs you might want to use a manual install. For example, you want to be able to exit XSqueeze and leave the music playing while you run a picture slideshow.

To do this you must manually install a player on your system, and then use XSqueeze with it in 'controller only' mode.

Binaries are available here (use latest version) - or you an use the ones in the addon folder too of course: SqueezeSlave Download Squeezelite Download

...with notes and install/build/etc instructions here: SqueezeSlave Squeezelite

OpenELEC users can find a service addon here: squeezeserversoftsqueeze on OpenELEC

For support for those things, please see their own threads in their respective forums.

Example - Manually Run Squeezeslave

e.g. squeezeslave.exe 192.168.1.1

....the IP address is your server address

If it connects, you will not see anything happen, but you also won't see an error message!

squeezeslave -h will give you help/options if anything goes wrong.

Feedback
Please experiment with XSqueeze and report back. The thread for discussion/issues/etc is here: XSqueeze forum thread

Credits
XSqueeze was built by bossanova808 using some python and building on the hard work of other handy projects: SqueezeSlave and squeezelite and PyLMS.

Generous help with development was also received from XBMC/OE team and forum members: jmarshall, pkscout, mizaki, giftie, HKShai, Bstrdsmkr, spoyser, and more! Many thanks to all the members of this great community!

Thanks also to UNiversal, Aptalca and Jonathan for doing a great job adding to and cleaning up this wiki entry!