Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,127

    LMS and Sonos - trying

    I'me creating that new thread to try to reach a decent solution on that. I'd copy first a few existing messages from other threads that I've exchanged

    ------------ my working solution today -----------------

    Sonos cannot point to LMS, they ignore each other. What Sonos does well is distributing analog source connected to the line-in of any capable device (a play:5 or a connect) to any other device in the Sonos system and keeping them fully in sync. So it is as simple as connecting the line-out of a SB3 or a Touch or a Receiver to any Sonos device with Line-In. Then _that_ Squeezebox device becomes your bridge. In other words, you have to always play on that SB device to be able to listen to your music on the Sonos system. The Sonos is, to some extend, just used as wireless speakers with enhanced synchronization capabilities. What is amazing is that when I tried that, I was expecting the Sonos system to delay the analog input to a few 100ms and have to delay all my Squeezebox devices to take that into account, I was expecting awfull jitter at all - well, not at all (and I've been using that for almost 2 years). There is no audible delay between an analog input of a Sonos system and that same music forwarded to any other sonos devices - this is just instant "forward"

    So, what is played on my Sonos "extensions" is fully controlled by my Squeezebox system (I use iPeng a lot, it is really a great piece of software). The only time when I use the Sonos controller is to mute / unmute / group Sonos speakers as, again, all the Sonos speakers appears as "one single entity" to the SB system. But that's all. Of course, at any time, you can ask the Sonos system to play something else than the line-in of (eg) a Play:5. The Sonos system is pointing to the same folder containing my music, so everything is as well available "natively"

    Say you have

    Kitchen : Boombox
    Dinner room : SB3 on amplifier speakers
    Bedroom : Radio

    you add Sonos devices
    Dinner room : Play:5
    Bedroom : 2xSonos:1

    Connect line-out of SB3 to the Play:5 line-in using a Y connector

    To play on the Sonos(Dinner) or Sonos(Bedroom), the caveat is that you have to play on SB(Kitchen). On Sonos, configure it to re-play Sonos(Dinner:LineIn) to Sonos(Bedroom) and/or Sonos(Dinner). Using your prefered SB controller, then do what you used to do, and all speakers in Bedroom will play in perfect sync, although they are a combo of Sonos and Squeezebox. If you want to switch off Sonos(Dinner) or Sonos(Bedroom), use the Sonos application on your preferred smartphone. You can also dedicated an "old" Squeezebox receiver to be the bridge between the system, not connected to any speaker - in that case, no annoyance of having mandatory sound to be heard in one room to bridge to Sonos. I feel it is a very smooth transition or a very good combo

  2. #2
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,127
    In fact, I was thinking that is I can get a multiple instance of SqueezeLite, all feeding different streams connected to Sonos controller, it might be an interesting solution. In other words

    SqueezeLite:1 ==> Stream:1 ==> Sonos device:1
    SqueezeLite:2 ==> Stream:2 ==> Sonos device:2
    . . . . .
    SqueezeLite:N ==> Stream:N ==> Sonos device:N

    So, from LMS, each Sonos device would be a separated SqueezeLite entity, so it would be independently controllable as far as volume and what is played on to it. From Sonos controller, what is needed is to play a different stream on each device. Synchronization is not likely to work, but it can be achieved by connecting multiple Sonos devices to a single stream

    It might be a resource hog, I don't know but I'll try with one first to see if it is possible to easily procude a stream (like a radio stream) that Sonos would recognize and if it works, then I'll see how to hack Squeezelite and a simple streamer. I realize it might not work at all, but can be a fun result :-)

    Thoughts ?

  3. #3
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,127
    -------one answer -----------
    Probably no need to hack squeezelite as it already does output to stdout and has been used in other threads to pipe audio into other applications. In this case possibly VLC but it does not support http streaming Flac only streaming MP3 and possibly other lossy audio.

    ------ my cont'd ------------
    That's what I'm doing now for test. I started with FFmpeg to directly do RTP but unfortunately Sonos does not support RTP. So I will either use FFServer or VLC. But, for going beyond just the test that would proove feasibility, I was more concerned about the CPU required by multiple transcoding, i.e Squeezelite decoding then VLC re-coding, that x times number of streams ... pretty inefficient, no ?

  4. #4
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,127
    ---------- another proposal -----------

    If mp3 is acceptable, the simplest way would be to point the sonos devices to http://lmsserver:9000/stream.mp3 (see here for details)

  5. #5
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,127
    Back home for some tests - this is unfortuately unusable. Sonos streams properly from http://<my LMS>/stream.mp3 but the delay for start or stop is like 30 seconds. Propably just the fact that this is heavily buffered and the Sonos client just get the stream from LMS "as it is", LMS is just a http audio server. Well I guess I will have at least to get back to squeezelite and translate a few commands to Sonos as an uPnP client. This will obviously be a long journey :-). I'v seen other threads where people manage to have something similar, but not exactly that, especially no sycn and lot of transcoding that I'd like to avoid. If I cannot make it work with at minimum a sync between LMS and Sonos, then I'd better stick to my current HW solution which provides perfect audio synchro, just with that limitation that the whole Sonos system is seens a single player by LMS

    What gives me some hope is that when I use a generic app on my iPhone like PPlayer and I choose one of my uPnP servers as a server (not a Sonos device) and one of the Sonos devices as a client, it works fine, this external app is capable of streaming between both and there is almost no delay between play requests and actual play (same for stop /pause/restart). So, there might be a solution.

    But if you don't care about sync and delay, using http://<my LMS>/stream.mp3 as a radio station of Sonos works
    Last edited by philippe_44; 2014-09-21 at 22:51.

  6. #6
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,127
    was able to get and compile libupnp & pthread32 for Windows - sample upnp application works and is able to communicate with other apps. Will see next step if I can control a Sonos device

  7. #7
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,127

    LMS & Sonos - Update

    Just want to report some update. Thanks to libupnp, I now have a small application that discovers automatically all uPNP media renderer on my networks. It is a general uPNP control point, but focusing on Sonos, I'm able to play, pause, stop Sonos devices.

    1) I can send an URI that comes from LMS directly. In that case, LMS is acting as a uPNP media server and my app does nothing else that being a control point
    2) More interesting, my app can also receive all HTTP-GET from Sonos devices, after it has sent "play" command to it so that, I can play anything coming from the inside of the app

    I'm hopeful that I can now automatically create some "fake" SB Squeezelite devices that will simply expose Sonos to LMS - one "fake Squeezelite" for every Sonos.

    With 1) it could be a software gateway between the 2, now that play, pause, stop works, the song would be direclty piped from Sonos to LMS, but my app would provide the control. There would be no synchro possible in that case, Squeezelite would not play any role in the audio data stream in fact.

    With 2) the audio data stream would transit through my app and, maybe, I could get synchro by carefully feeding them to Sonos devices (although it requires messing with partial GET and things like that which might not work nicely ...)
    Last edited by philippe_44; 2014-09-28 at 18:25.

  8. #8
    Quote Originally Posted by philippe_44 View Post
    But if you don't care about sync and delay, using stream.mp3 as a radio station of Sonos works
    Does this mean that if I have a Play 5, I can just add the LMS stream as a radio station and play that on the Play 5?
    Will smart volume (replaygain) and smart crossfade work in this case?
    If I now also buy another SONOS player, let's say a Play 3, and I also point this to the same LMS radio station, will it be in sync with the Play 5 (SONOS syncs both players)?

    I have LMS running on my Synology DS214play and really like the smartmix plugin. SONOS doesn't have this (and also does not support ReplayGain for mp3's), but they have a lot of other streaming services that squeezebox lacks (22tracks, ...). Playing LMS as a radio station in SONOS might then give me the best of both worlds.

  9. #9
    Senior Member
    Join Date
    Jun 2014
    Location
    North Somerset, UK
    Posts
    326
    Quote Originally Posted by kefkekeyser View Post
    Does this mean that if I have a Play 5, I can just add the LMS stream as a radio station and play that on the Play 5?
    Will smart volume (replaygain) and smart crossfade work in this case?
    If I now also buy another SONOS player, let's say a Play 3, and I also point this to the same LMS radio station, will it be in sync with the Play 5 (SONOS syncs both players)?

    I have LMS running on my Synology DS214play and really like the smartmix plugin. SONOS doesn't have this (and also does not support ReplayGain for mp3's), but they have a lot of other streaming services that squeezebox lacks (22tracks, ...). Playing LMS as a radio station in SONOS might then give me the best of both worlds.
    Things have moved on a bit since Phillipe last posted in this thread back in September so you might be interested in these threads :


    http://forums.slimdevices.com/showth...d-uPNP-devices

    http://forums.slimdevices.com/showth...(squeeze2upnp)

  10. #10
    Quote Originally Posted by PaulinPosset View Post
    Things have moved on a bit since Phillipe last posted in this thread back in September so you might be interested in these threads
    Jikes, that are two really big threads. The squeeze2upnp seems like something to try, but I read on the first page that it doesn't support replaygain or smart transitions

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •