I'm running LMS 7.8 on a QNAP TS-219II (2Ghz Arm, 1GB ram). On the other end, I am using an SBT and controlling it with the Logitech Squeezebox Android app on an HTC One X (Tegra 3. About 15k on Antutu benchmark). My library is rather large (about 2.5T worth of lossless). The Android app Squeeze Commander is great for remoting. It automatically finds the server and the devices on the network. You can group the devices togin all zones or different music in each zone. It costs a few dollars, which it is worth. Squeezebox has also released an own Android remote app, Logitech Squeezebox Controler. Description Control all your Squeezebox devices with your windows phone 7. This includes Squeezebox™ Classic, Duet, Boom etc. Both squeezebox server and www.mysqueezebox.com are supported. Full Windows Phone 7.5 support: smooth scrolling and fast app switching.Main view shows your current playlist with full cover art.
- Modern App For Controlling Squeezebox Os X 10
- Modern App For Controlling Squeezebox Os X 2
- Modern App For Controlling Squeezebox Os X Pc
Home Page › Squeezebox
You can use the arduino with a wifi shield to talk to a squeezebox. It is possible to set the display and also make the arduino operate the unit for instance changing station.
Trileet already demonstrated the principle using a wired ethernet shield which he operated using RFID. Really cool. I have done the same thing using a wireless wifi shield from asynclabs. I used a Violet Mirror and a USB shield from circuitsonline to get the RFID card number. Depending on this number an action could then be innitiated. Ok so lets describe how this was done in steps. The first step is to be able to control the squeezebox from the browser window. Later on this same instruction will be used by the get command in the arduino program. You have many commands available so please read the instructions found on the logitech media server help.
Squeezebox commands
http://192.168.0.107:9002/status.txt This displays current status.
Now Playing
The Sunset Mix
Now Playing
The Sunset Mix
http://192.168.0.107:9002/status.txt?command=playlist&subcommand=loadtracks&trackid=1833
This plays track 1833 from your music collection
This plays track 1833 from your music collection
http://192.168.0.107:9002/plugins/Favorites/index.html?action=play&index=0
Plays from your favourites the first entry
Plays from your favourites the first entry
http://192.168.0.107:9002/status.txt?p0=playlist&p1=play&p2=http://192.168.0.107/tuner/Mousse%20T%20-%20Horny.mp3
Play track stored on server
Play track stored on server
http://192.168.0.107:9002/status.txt?p0=display&p1=(c)B.Kasteel&p2=super%20this%20works&p3=20
This displays the text on the two lines for 20 seconds then reverts back to the original display
This displays the text on the two lines for 20 seconds then reverts back to the original display
http://192.168.0.107:9002/status.html?p0=button&p1=play
Play what was playing (other command= STOP)
Play what was playing (other command= STOP)
http://192.168.0.107:9002/status.html?p0=mixer&p1=volume&p2=20
Change volume absolute or relative
Change volume absolute or relative
So you see that there are many different types of commands that can be used. Each command can be linked to a particular RFID tag later on. The main ones might be play a certain radio station or song. Obviously the localhost needs to be found for your setup. Change the 192.168.0.107 accordingly.
The following is a summary of the supported commands. Additional information about the command set is available in the Logitech Media Server Command Line Interface documentation.
Now that we have control over the squeezebox we need to drive the commands through a PHP program. This PHP program later on interprets the codes that will be sent from the arduino program and translates it into the commandes required by the squeezebox. These commands can be twofold at this stage. http://192.168.0.107/tuner/index3.php?key=1045236790 is one type which when typed into the browser executes an instruction as if a tag with number 1045236790 has been seen by the RFID reader. The other instruction is http://192.168.0.107/tuner/index3.php?stop=1 which stops the player. Once the PHP program is installed at the right location you can type in these two commands into your browser and the instructions will be carried out. Of course the PHP program needs to have the right name and be in the right directory. In my example its the tuner directory and the program is called index3.php. Below you can see what this looks like when executed.
First all the commands that can be found are printed out. Then some info what the program is doing. These are for debugging and can be removed from the final program. Finally there is a table which is how you program the keys. This is done by editing the text string in the textbox. The text should be the same as an instruction that worked before when typing it directly into the browser window. When the correct command is ready you press the appropriate update button which updates the key. Whe you later on are using the program as intended, when you scan a new RFID code it will automatically generate a new row in the table. The keys are stored in special files which are are named RFID code dot key. In this case for example 1045236791.key. They contain only the string command as seen in the text box as a text file. so for instance:
http://192.168.0.107:9002/status.html?p0=playlist&p1=play&p2=http://192.168.0.107/tuner/Mousse%20T%20-%20Horny.mp3&player=00:04:20:1e:1d:52
First all the commands that can be found are printed out. Then some info what the program is doing. These are for debugging and can be removed from the final program. Finally there is a table which is how you program the keys. This is done by editing the text string in the textbox. The text should be the same as an instruction that worked before when typing it directly into the browser window. When the correct command is ready you press the appropriate update button which updates the key. Whe you later on are using the program as intended, when you scan a new RFID code it will automatically generate a new row in the table. The keys are stored in special files which are are named RFID code dot key. In this case for example 1045236791.key. They contain only the string command as seen in the text box as a text file. so for instance:
http://192.168.0.107:9002/status.html?p0=playlist&p1=play&p2=http://192.168.0.107/tuner/Mousse%20T%20-%20Horny.mp3&player=00:04:20:1e:1d:52
There is one other file needed and this is called last. This file simply contains the last RFID code found. so for instance 1045236790.
The PHP program you can view below.
The PHP program you can view below.
Ok so now we can command the squeezebox by typing in a command like http://192.168.0.107/tuner/index3.php?key=1045236790 into the browser.
Now we must read the RFID code needed and send this to this page. This is where the arduino comes in. The arduino has a wifi shield which is used to do the transmission to the server which has the PHP program on it.
The arduino should therefore be on the same network as this PHP program.
Reading the RFID code itself is done by the Violet Mir:ror but basically any RFID reader could be used. The Violet Mir:ror is a USB RFID reader so you also need the usb host shield from circuitsonline to read the data coming from it. There is an article http://arduino-projects4u.com/violet-mirror/ exactly how this works.
The wifi shield is also described on the site as is some basic software on how it can work.
So now all the components have been tested separately and all we need to do is make the whole thing work together.
Now we must read the RFID code needed and send this to this page. This is where the arduino comes in. The arduino has a wifi shield which is used to do the transmission to the server which has the PHP program on it.
The arduino should therefore be on the same network as this PHP program.
Reading the RFID code itself is done by the Violet Mir:ror but basically any RFID reader could be used. The Violet Mir:ror is a USB RFID reader so you also need the usb host shield from circuitsonline to read the data coming from it. There is an article http://arduino-projects4u.com/violet-mirror/ exactly how this works.
The wifi shield is also described on the site as is some basic software on how it can work.
So now all the components have been tested separately and all we need to do is make the whole thing work together.
Still to come.
I read somewhere that you could embed commands in a HTML file using iframe. I have not tested this but this is what it said.
<iframe src=”http://localhost:9000/status.txt?p0=display&p1=%title%&p2=%text%&p3=20″ height=”0″ width=”0″ frameborder=”0″ scrolling=”no”/>
<iframe src=”http://localhost:9000/status.txt?p0=display&p1=%title%&p2=%text%&p3=20″ height=”0″ width=”0″ frameborder=”0″ scrolling=”no”/>
XSqueeze | ||||||||||||
|
Add-ons | XSqueeze |
Need help with this add-on? See here. |
Turn your XBMC into a Logitech Media Server player or control an external Squeezebox.
- 1Introduction
- 2Requirements
- 4Configuration
- 4.2XSqueeze
- 4.3Raspberry Pi
- 6Troubleshooting
1 Introduction
XSqueeze is Squeezebox player/controller/music chooser for Kodi (and its predecessor, XBMC). XSqueeze can be used in three main ways:
- As simply a big-screen visualiser/controller/music chooser for an existing Squeezebox player
- As a software based squeezeplayer to extend your existing network of Squeezebox audio players using your Kodi machine - with local playback, music choosing, and a visualiser. This allows you to have a Kodi/XSqueeze setup in one room that syncs with other Squeezebox players you use.
- As an easy hack to achieve multi-room, synchronized audio playback with Kodi. In this case, all your players are software players using your current Kodi 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/OSMC/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).
1.1 Screenshots
2 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)
2.1 Supported Platforms
Note:Local playback means audio playback on the local machine as a full Squeezebox emulator using the software Squeezebox emulators - and you can choose squeezeslave or (recommended) squeezelite - i.e you can playback all formats and use all plugins those external players support - using squeezelite you can even have easy Spotify supportNote:Controller only means visualisation of an existing Squeezebox or software player, with control, and music choosing, but no playback
- Windows, Libre/OpenELEC, Linux variants (on x86 and ARM) - with ALSA, OSX, Apple TV1 (Crystalbuntu) - Full support including local playback
- Raspberry Pi - In theory full support if your distro has ALSA Note: XBian and OSMC/Raspbmc provide ALSA support out of the box. Libre/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 with the local playback addon), you can then control this via Xsqueeze if you want to. So pretty much the same result.
- 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.
2.2 Spotify Support
XSqueeze supports Spotify playback as of version 0.8.7 and above.
Requirements for this:
- 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!
3 Installation
In order to install XSqueeze, you must first enable the bossanova808 repo in Kodi. 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.
4 Configuration
4.1 Kodi
Important Notes:* XSqueeze should be launched from an icon on your skin's home page (add it as such using your skin settings). e.g. in Confluence: Go to System->Settings->Appearance->Skin->Skin->Settings ... it barely looks like you can click it, but you can, and all the Confluence specific settings can be found hidden under there - go to Add-On Shortcuts, and add it as either a music or program shortcut (works either way). If you just launch it from the Programs list section, the Chooser (see below) possibly will not work properly - this is due to a bug in XBMC's window stacking code (not confirmed that this remains an issue with Kodi).
* A secondary plugin (XSqueeze Chooser) will automatically be installed along with XSqueeze. This is a music choosing utility, and should be launched only from within XSqueeze by hitting i or info.
* You should also disable GUI sounds and the new Gotham 'keep audio device alive' option if you use XSqueeze, or you may experience weird noises when you start XSqueeze (as XSqueeze suspends the internal XBMC AudioEngine but this does not unfortunately flush the audio output buffers, so when XSqueeze starts this buffered data is pushed through and you can get a weird repeating drone noise).big>*</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.}}
4.2 XSqueeze
Go to the XSqueeze addon settings (go to the addon and use the context menu to get to 'configure').
4.2.1 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.
4.2.2 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:
- 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:
- If you have multiple installations of XSqueeze for example - otherwise all your software players will register as one player in LMS
- 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 (Kodi 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.
4.2.3 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
4.2.4 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.
4.3 Raspberry Pi
What you need to do depends on which distribution you are using for your Pi. If you wish to use XSqueeze as a player, you will generally 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:
lsmod | grep -q snd_bcm2835 && echo 'snd_bcm2835 module is loaded.' || echo 'snd_bcm2835 module is NOT loaded.' |
Load the Raspberry Pi ALSA module:
sudo modprobe snd_bcm2835 |
4.3.1 Raspbmc
Early versions of Raspbmc did not load the Raspberry Pi ALSA module by default. This change must be made in order for snd_bcm2835 to be loaded at bootup:
echo snd_bcm2835 | sudo tee -a /etc/modules |
Note: This change is not needed for OSMC (which is what Raspbmc became)
4.3.2 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:
echo snd_bcm2835 >> /storage/.config/modules-load.d/audio.conf |
4.3.3 LibreELEC (Raspberry Pi build)
mount -o remount,rw /flash |
Add the following to you config.txt:
nano /flash/config.txt |
dtparam audio=on |
There is more detail about this file here: https://wiki.libreelec.tv/index.php?title=Config.txt
5 Usage
In Kodi->Add Ons->Programs, run XSqueeze
Extra Information:XSqueeze actually runs best when launched from an icon on your home page (add it as such using your skin settings). (There is a bug in XBMC (not confirmed that this issue remains with Kodi) that can cause the Chooser component to improperly exit if you run it from the programs list rather than a home screen icon).
XSqueeze does not live in the music plugins section as it is not a typical Kodi music plugin, it is a Program plugin as the playback itself is external to Kodi's playback systems).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 i or info and you will get a music chooser. Select some music and you will 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 or Return if using a TV Remote via CEC). 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!
6 Troubleshooting
6.1 Audio Issues (dropouts, no audio etc)
FIRST, TRY TURNING OFF KODI MENU SOUNDS AND THE KEEP AUDIO DEVICE ALIVE OPTION!!
Note:Squeezeslave Users: In XSqueeze settings->Local Playback->Extra squeezeslave arguments-> add '-y200' (without the quotes) to try & solve audio dropout issues.Note:squeezelite Users: In XSqueeze settings->Local Playback->Extra squeezelite arguments-> add '-a 160' (without the quotes) to try & solve audio issues.
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
6.2 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:
..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:
If you are stuck - post a message to the forum threadXSqueeze forum thread
and remember to please always ***INCLUDE YOUR FULL DEBUG LOGFILE****
6.3 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.
6.4 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!
7 Manual Installation of squeezelite or squeezeslave on your Kodi 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 can use the ones in the addon folder too of course:SqueezeSlave DownloadSqueezelite Download
Modern App For Controlling Squeezebox Os X 10
...with notes and install/build/etc instructions here:SqueezeSlaveSqueezelite
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
Modern App For Controlling Squeezebox Os X 2
....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.
8 Feedback
Please experiment with XSqueeze and report back. The thread for discussion/issues/etc is here:XSqueeze forum thread
9 Credits
Modern App For Controlling Squeezebox Os X Pc
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!
Retrieved from 'https://kodi.wiki/index.php?title=Add-on:XSqueeze&oldid=131347'