Squeezelite integration
#1
Just something I wanted to toss out as it seems doable based on the research I've done so far.

bossanova808 has done a great job on the XSqueeze addon, but it has some limitations that I just don't think make it as integrated as some other functionality of XBMC. Namely the fact that it doesn't use XBMC as a player so you can't continue to control XBMC as you normally do. For other addons, like Spotify or Pandora, it makes them feel more integrated when you can still use your phone/tablet XBMC remote or other control functionality and get the same feel as when playing music normally in XBMC.

If a soft-squeezebox client could be integrated with XBMC this would solve a lot of these problems and allow XBMC to get media from a squeeze server in a more native way. Looking over the SqueezeLite project it seems like this might be possible. Granted, changes will be needed to integrate it as a library that XBMC can throw a wrapper around, but all the hard work already seems to be there. I'm thinking it could be a browseable source that would be setup via an internal url - like "squeeze://IPTongueort" and then show up in the Music sources. You could then browse the squeeze server directories through a native list (no custom gui needed) and queue up a playlist on the squeeze server that would play via XBMC.

Unfortunately my C++ skills are pretty bad, I can code some minor things but getting an environment setup to attempt something like this is beyond my skill. Python and Java are just more my style I guess. Still, I can see enough potential here that I'd be willing to give some things a try if I can get a helping hand getting a sane build environment setup. I know how to compile from source but adding a new library and getting the correct XBMC hooks in place to use it are beyond me. I've looked some of the other protocols in place already and have a basic idea.

Is there any interest in something like this? Are there any pitfalls that I'm just missing (which is why no one has attempted this already)? Seems like a very nice addition to XBMC that would make the multi-room audio dream a lot more integrated.
Reply
#2
I know that a dev is working on an interface/API for addons to integrate seamlessly with the DB. This however depends on support for binary addons - so the later has to be finished first before the other can go in. So with some more patience, you dreams might come true way more easily.
Reply
#3
Very interesting. I can see how binary addons would help solve the issue of integration immensely. Adding yet another protocol to the core system when an addon could do is probably the best idea. As long as the interface is in place to add itself as a player - I suppose sort of like how the pvr addons just expose the right data to that system - it would work great.
Reply
#4
How about th simple expedient of adding your logitechmediaserver as a upnp source?

Oh and you are aware that bosanova's addon does use squeezelite? (and can also use squeezeplayer).
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#5
Adding the media server as a upnp source doesn't really capture the goal of using the Squeezebox interface to begin with. If I just wanted to play music I'd skip the squeeze server stuff all together and just scan my music into XBMC for local playback. Being able to control and synchronize the clients is the true power of having that particular application.

I do know that bosanova's addon uses squeezelite. It does a great job, I just think if the XBMC integration was a bit tighter it could make the experience a lot more seamless. Right now it functions more like an independent application that just happens to show an XBMC gui for information purposes. All of the sound and playback metadata bypasses normal XBMC functionality. What if - for example - you had a different addon that was monitoring for playback events and was supposed to do something when playback started. I know people with home automation controls or boblight type stuff do just that. With the XSqueeze addon in it's current state XBMC gets no playback information so as far as its concerned it's not doing anything. With AE shutdown you don't get your normal notification sounds. At an extremely picky level, you don't get music visualization either.

I like da-anda's idea of using an addon if the correct functionality can be exposed through an interface. This is probably a better long-term solution as it's not adding another library to keep track of into XBMC.
Reply
#6
@robweber - I completely agree that a more integrated solution would be awesome, with xbmc acting as a proper squeeze client. triode, developer of squeezelite, is very active and receptive and might be willing to help at his end if you can find an xbmc dev at the other end you'd be away...

The real sales point, I think, is the vastly better music library stuff LMS offers over xbmc, and much better synchronised playback too.

XSqueeze is an overgrown gross hack - can be useful but I fully agree it's not the right approach ultimately - I'd love to see something better but have no where near enough time to take it on. I really just made it as a way of getting better with Python...

The addon level approach I am not so sure about - I wonder whether it will have an impact on latency etc. and make sync - always less good with software than hardware anyway - less good again. But I have no idea really, all depends on how the addons work I guess...
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#7
Thanks for your reply. Glad to know you're not offended by my comments regarding the integration of the squeeze client. I did look through the code of your addon before starting this thread just to get an idea of how the whole thing was put together. After looking it over I started to think of it more as a stepping stone - sort of like the old PVR scripts that existed before the integration of the PVR system - until something better could come along.

I was hoping this thread would spark more interest from a dev more familiar with this type of integration in xbmc, and maybe it still will. As always there has to be a need, and then someone with the right skill set willing to invest the time. I'll keep in mind what you said about triode and reach out to him if I can get more details on what exactly XBMC would need from a library and see if he can assist on the squeezelite side. Been trying to go through some of the XBMC code myself for ideas on how similar integrations have been done but its slow going. Thanks again for your comments.
Reply
#8
Just thinking out loud -

You'll basically need to build a bridge between the squeezelite library which will essentially be a slimproto handler & wrapped in an xbmc player. Then basically you'll take state/data from LMS and fill in XBMC skins with it. Should be a fun project for the right person.

I see a lot of value in bringing xbmc compatibility to what is now in essence an open source, rather fantastic network music player system. I think xbmc devs probably don't realise LMS is now being developed open source: https://github.com/Logitech/slimserver

There seems to be a number of open source (ish) hardware developments for the system as well. It's all very interesting but still too early to see if anything great will come of it I guess...but the squeeze system remains the benchmark for network audio for me, it's still way ahead of your sonos etc. I cancelled my order for an Olive One due to the ridiculous delays and failure to support various promised things (e.g. multi room playback) - so I am sticking with squeeze a while longer it seems...
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#9
This would be awesome, in the mean time reinstalling xsqueeze for some synced audio in the lounge room on day off.
Reply
#10
LMS and its predecessors squeezeserver and slimserver have always (at least since well before I have been using them) been open source, albeit the main source tree controlled by slim/logitech. There has also always been a strong community fostered through mailing lists, online forums and an open plugin architecture.

It's good to see that this is being carried on now that logitech have been stoooooopid enough to dump this brilliant ecosystem. I have been picking up a few of them on NZ's ebay equivalent since they stopped selling them retail. Our house is currently being earthquake repaired and all the wall linings are off. I intend to end up with a squeezebox of some sort in every room where you might want music/radio, as well as outside by the pool and in the garage.

Present complement: One SB3, Two Booms, Two Duets.

I wonder if x-squeeze should be split into a player on the one hand and a controller on the other, so you could do whole of house control from your XBMC remote.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#11
Just hitting this again with a little updated information. I've been going through the xbmc code and so far have made some small progress. I've created a way to specify the squeezebox protocol (squeeze://username:password@IPTongueort) and created a directory structure. I've hit the point though where some communication with the LMS server is going to be needed. Sort of reverse engineering the python code from xsqueeze it appears that a telenet connection needs to be made to communicate with the LMS server and get information. I'm thinking this will need to be part of a squeeze library, and return results back to the directory listing functions.

Any pointers on how best to start this process would be great. Is there something already within XBMC that can be used or do I need to start from scratch here? Link to my github branch: https://github.com/robweber/xbmc/tree/squeeze_client
Reply
#12
LMS is open source and very well documented. You don't need to reverse engineer the protocol when it is documented so openly.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#13
I didn't mean so much reverse engineer the protocol as some pointers about what methods could be used for accessing it. For instance - you can communicate with the server via telnet or JSON from what I've been able to find. I'd hate to go through all the trouble of finding a C based Telnet or JSON client only to find out that XBMC has a really easy import "Telenet.h" file that I could have used the whole time. Digging through the the libraries included in XBMC is a bit daunting when someone could easily say "oh yea, you just need to look at this" and get it over with.

I did manage to find some documentation on the JSON interface for the LMS server. Should provide most of what I'm looking for, at least for browsing and selecting music. Once I get to playback I'll have to dig into the squeezelite player and how to actually connect that with XBMC.
Reply
#14
Yeah code snippets can be useful even for the best documented protocols!

Places where you might find sample code would include not only x-squeeze, but also:

squeezelite itself (written in C, does provide a commandline interface) - this is the protocol implementation https://code.google.com/p/squeezelite/so...limproto.c

jivelite (written in lua, but an example of a gui for LMS) http://forums.slimdevices.com/showthread...pplication

squeezeslave
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#15
Would will want to implement a lower level connection using SLIMPROTO rather than the telnet/jason stuff if you want to implement a proper player.

ah looks like nickr beat me to it

Honestly, contact triode at the LMS forums and ask him how to get started. he even seemed interested in making his squeezelite into a shared lib for use in xbmc...there was a message on his googlecode abotu it, but the person who originally asked never came back. if you n piggy back on an exisiting established c based code base and just write an xbmc wrapper, that's surely the way to go...
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply

Logout Mark Read Team Forum Stats Members Help
Squeezelite integration0