Using Roon with the LMS-to-uPnP project

Hi,
I’m in touch with @philippe_44 the squeeze2upnp bridge developper on the squeezebox community forum: Squeeze2Upnp and Roon discussion

Philippe is very busy with other projects but “95% sure” there might be a solution from his side to deal with Roon. If such a solution is somedays available to manage UPnP endpoints using Roon SqueezeBox emulation capabilities one would also expect Google Cast compatibility using Cast2Bridge plugin.

1 Like

Excellent !!! :smile:

Agreed! It would be great if a third party could get us beyond the staring contest between Roon and Linn.

Yes, IMHO a third party LMS “bridge based” workaround (possibly not supported officially by the Roon Team) seems to me the best short / mid term realistic solution (other example of this bridge strategy is bubbleupnpserver to gain access to openhome advanced capabilities from a raw upnp renderer).

I hope @philippe_44 will have a try with Roon and confirm the technical feasability.

I greatly prefer RAAT vs UPnP architecture but, for users already owning non RAAT compatible costly UPNP “audiophile” players and even if the global experience with such a third party bridge will be far less enjoyable than a full RAAT solution, seems a very good workaround with no major SQ drawbacks.

Also interested on Roon team or @brian opinion ?

I would prefer native RAAT support in my various Linn devices, but will be happy to try out this software bridge if it becomes compatible with Roon. I’m worried that multi-room sync won’t work well with this sort of solution, but would be happy to be pleasantly surprised.

In the meantime, I am up at a ridiculous hour (Tokyo time) configuring two more Raspberry Pis with Roon Bridge for use in my two secondary systems… (It is taking much longer than expected because, I think I have determined, two of the MicroSD cars I was trying to use just won’t work reliably.) This works (well, at least one of the two new Pis is working so far), but is a kludge, and requires adding an Ethernet switch in each room (to feed the Raspberry Pi in addition to the exiting Linn device in each room), resulting in lots of extra and unnecessary cables and power supplies stuffed into various closets.

Hi,
I’m beginning to test philippe_44 open-source third party software bridges allowing streaming from LMS to UPnP and Google Cast devices.

I’ve downloaded the philippe_44’s new versions from:
sq2upnp 0.2.10.0-dev-1 => https://sourceforge.net/projects/lms-to-upnp/

I’ve also checked https://github.com/philippe44 for the source code and config user guide.
The new default_on parameter must be set to 1 to use the bridges with Roon.

My first experience (install on WIN10) seems promising even if i don’t know yet:

  1. if it is really usable with Roon (emulating LMS) as it is.
  2. if sq2upnp is Open Home compliant.

Anyway I was able to successfully stream from Roon to UPnP renderer (foobar)
IMHO the best place to get support on install and configuration and to give feedbacks to philippe_44 are:

sq2upnp => http://forums.slimdevices.com/showthread.php?103728-Announce-UPnPBridge-integrate-UPnP-DLNA-players-with-LMS-(squeeze2upnp)&p=865044&viewfull=1#post865044

config.xml used to test squeeze2upnp with Foobar200 UPnP renderer.

Only change i’ve made to the autogenerated config.xml is to set default_on to 1 per philippe’s instruction.

For others UPnP devices, SONOS for example, some different parameters are needed in device part of the config.

<?xml version="1.0"?>
<squeeze2upnp>
<common>
<streambuf_size>2457600</streambuf_size>
<output_size>2457600</output_size>
<default_on>1</default_on>
<buffer_dir>?</buffer_dir>
<buffer_limit>-1</buffer_limit>
<stream_length>-3</stream_length>
<stream_pacing_size>1048576</stream_pacing_size>
<max_GET_bytes>-1</max_GET_bytes>
<keep_buffer_file>0</keep_buffer_file>
<enabled>1</enabled>
<process_mode>2</process_mode>
<codecs>pcm,flc,mp3</codecs>
<sample_rate>48000</sample_rate>
<L24_format>1</L24_format>
<flac_header>1</flac_header>
<allow_flac>0</allow_flac>
<seek_after_pause>0</seek_after_pause>
<byte_seek>0</byte_seek>
<send_icy>0</send_icy>
<volume_on_play>1</volume_on_play>
<volume_feedback>1</volume_feedback>
<send_metadata>1</send_metadata>
<send_coverart>1</send_coverart>
<max_volume>100</max_volume>
<accept_nexturi>1</accept_nexturi>
<min_gapless>0</min_gapless>
<upnp_remove_count>1</upnp_remove_count>
<raw_audio_format>raw</raw_audio_format>
<match_endianness>1</match_endianness>
<auto_play>0</auto_play>
<server>?</server>
</common>
<upnp_socket>?</upnp_socket>
<slimproto_log>warn</slimproto_log>
<stream_log>warn</stream_log>
<output_log>warn</output_log>
<decode_log>warn</decode_log>
<web_log>warn</web_log>
<main_log>info</main_log>
<slimmain_log>info</slimmain_log>
<upnp_log>info</upnp_log>
<util_log>warn</util_log>
<upnp_scan_interval>30</upnp_scan_interval>
<upnp_scan_timeout>15</upnp_scan_timeout>
<log_limit>-1</log_limit>
<device>
<udn>uuid:e8cd7863-e738-2750-ae36-5c5465792b23</udn>
<name>foobar2000 Renderer (Bruno) [NUCI5]</name>
<friendly_name>foobar2000 Renderer (Bruno) [NUCI5]</friendly_name>
<mac>bb:bb:ed:eb:37:18</mac>
<enabled>1</enabled>
</device>
</squeeze2upnp>

Hi @volpone,
Could you share your config.xml with me?

I’m trying to run it with my Sonos. I’ve been using airsonos, but it is too cumbersome (need to re-add, connection dropping).

I added the default_on and set it to 1 on the config.xml and run it (on macOS) using the -x flag.
I can see the Sonos on Roon and add it to the audio, but when I run it, there’s no sound coming out of it.

thank you very much for your help.

Bastian

Hi Bastian,

Better to ask directly to the developer @philippe_44 on the original sq2u thread. I think philippe is using SONOS devices.:
http://forums.slimdevices.com/showthread.php?103728-Announce-UPnPBridge-integrate-UPnP-DLNA-players-with-LMS-(squeeze2upnp)&p=865044&viewfull=1#post865044

Also watch to your firewall settings.

I’ve used sq2u on WIN10 and only successfully streamed to foobar2000 UPnP renderer.
I will post it on the LMS forum original thread.

Hi Bruno,

Thank you for your suggestion. I have asked him on the other forum.
Hopefully, i can get it working soon.

Bastian

I hope so too, please let us know here if you success (or fail) with SONOS devices …

Have tried this (Macbook Pro, OSX 10.11.6)

  1. Run Logitech Media Server with squeeze2upnp plugin enabled. Plays to Sonos exactly as I had hoped (i.e. no delay, unlike AirSonons) - but only after configured to defaults for Sonos (option in LMS web management software).

  2. Stop Logitech Media Server. Run OSX version of squeeze2upnp (squeeze2upnp-osx-multi). This detects Sonos speakers and they show in Roon. Enable in Roon and play - looks like it is playing (histogram moving) but no sound from Sonos speaker.

  3. Run Squeezelite - it says no LMS available - so configure it withLMS is at IP address of Roon Server. Shows up in Roon but, again, when play in Roon nothing appears in Squeezelite.

I thought that the problem might be in the config file for squeeze2upnp-osx-multi so I copied the settings that changed in the config file used by squeeze2upnp in LMS when I configured for Sonos but this didn’t make any difference.

So, I’m wondering if the problem is somehow connected with the way in which Roon emulates LMS. Are there any details available on this?

Mike.

Also, noticed that when playing from Roon to squeeze2upnp zone the histogram (in the list of zones) is moving (which normally indicates that something is playing) but the track section at the bottom of the screen is static (i.e. vertical bar doesn’t move along and time shown doesn’t change).

So, my guess (an uninformed guess, I am a beginner in this) is that the issue is in how Roon communicates with Squeezebox endpoints created by squeeze2upnp.

Hi Mike,
As for Bastian i presume the best way to get support on this is to ask directly to philippe. He told me he use SONOS devices. The thread on LMS forum is here: http://forums.slimdevices.com/showthread.php?103728-Announce-UPnPBridge-integrate-UPnP-DLNA-players-with-LMS-(squeeze2upnp)&p=865044&viewfull=1#post865044

Also check if default_on is set to 1 in your config.xml

According to philippe: There might have been something wrong with the OSX version; Try again, it shoudl now be named 0.2.10.0-dev-1

Hi Bastian,
Did you succeed with sq2u and your Sonos device ?

Philippe use one to test sq2pnp with Roon and he said: “So far I only had no glitch with Sonos, although I’ve not played 100’s of tracks …”
So i’m interested in your experience.

For my own tests with Foobar UPnP renderer (sq2u OSX and WIN10) see: http://forums.slimdevices.com/showthread.php?103728-Announce-UPnPBridge-integrate-UPnP-DLNA-players-with-LMS-(squeeze2upnp)&p=865126&viewfull=1#post865126

HI Bruno,

I’ve made a few tests and still cannot get Sonos to play with the dev-1 version.
There are some BUG errors on the squeeze2upnp log (XMLGetFirstDocumentItem:75 (BUG) ixmlNode_getFirstChild(tmpNode) returned NULL)

Another issue that might have caused it is that the log says that the Codec was not found (I was playing an mp3 file)

I have replied to the other forum, and waiting to be approved.

On Roon side here are the logs I get.

  1. starting sq2u
    Observation: Sonos gets added to the list.

Log:
10/25 10:26:10 Info: [stats] 3112mb Virtual, 333mb Physical, 78mb Managed, 35 Threads, FDs
10/25 10:26:25 Info: [stats] 3108mb Virtual, 334mb Physical, 78mb Managed, 33 Threads, FDs
10/25 10:26:28 Warn: Error in web request https://push.roonlabs.com/push/1/connect: NetworkError (Aborted.)
10/25 10:26:28 Trace: [push] request to manager failed
10/25 10:26:28 Trace: [push] retrying connection in 196473ms
10/25 10:26:36 Info: [squeezebox/client] [192.168.0.18:53767] connected
10/25 10:26:36 Trace: [squeezebox/client] [192.168.0.18:53767] GOT HELO device_id=12 revision=0 mac=bb:bb:37:88:f1:26 uuid=00000000-0000-0000-0000-000000000000 wlan_channel_list=0 bytes_received=0 language= capabilities=Model=squeezelite,ModelName=SqueezeLite,AccuratePlayPoints=0,HasDigitalOut=0,MaxSampleRate=48000,pcm,flc,mp3
10/25 10:26:36 Info: [squeezebox/client] [192.168.0.18:53767] Device Data: modelkey=squeezelite model=SqueezeLite uuid=00000000-0000-0000-0000-000000000000 name= mac=bb:bb:37:88:f1:26 ipendpoint=192.168.0.18:53767
10/25 10:26:38 Trace: [squeezebox/client] [192.168.0.18:53767] State Change Initializing => Connected
10/25 10:26:38 Info: [transport/squeezebox] device 192.168.0.68 - Sonos PLAY:1 (SqueezeLite# bb:bb:37:88:f1:26 @ 192.168.0.18:53767) added
10/25 10:26:41 Info: [stats] 3116mb Virtual, 334mb Physical, 78mb Managed, 36 Threads, FDs
10/25 10:26:55 Trace: [raat] [sood] Refreshing device list
10/25 10:26:55 Trace: [raatserver] [sood] Refreshing device list
10/25 10:26:56 Info: [stats] 3125mb Virtual, 339mb Physical, 82mb Managed, 39 Threads, FDs

  1. Enabling Sonos
    Observation: Sonos gets suspended right after loading, I find suspend is Called when disabling songs from Roon as well.

Log:
10/25 10:27:11 Info: [stats] 3125mb Virtual, 340mb Physical, 82mb Managed, 39 Threads, FDs
10/25 10:27:11 Info: [transport] creating endpoint for squeezebox device 23:1:1861f1ef-6b47-d66b-20b6-f2b70507c8af
10/25 10:27:11 Trace: [squeezebox/client] [192.168.0.18:53767] SENT audg oldvol=27 dvc=1 preamp=255 newvol=1613
10/25 10:27:11 Debug: AudioDeviceMunge.GetManufacturer(AudioDeviceType.Squeezebox, “Logitech”, “SqueezeLite”, “192.168.0.68 - Sonos PLAY:1 (SqueezeLite# bb:bb:37:88:f1:26 @ 192.168.0.18:53767)”, “”) => “Logitech”;
10/25 10:27:11 Debug: AudioDeviceMunge.GetModel(AudioDeviceType.Squeezebox, “Logitech”, “SqueezeLite”, “192.168.0.68 - Sonos PLAY:1 (SqueezeLite# bb:bb:37:88:f1:26 @ 192.168.0.18:53767)”, “”) => “SqueezeLite”;
10/25 10:27:11 Trace: [zone] [sonos] Loading
10/25 10:27:11 Trace: [zone] [sonos] Suspend
10/25 10:27:11 Trace: [squeezebox/client] [192.168.0.18:53767] SENT strm command=q autostart=0 formatbyte=p pcmsamplesize=1 pcmsamplerate=3 pcmchannels=2 pcmendian=1 threshold=0 spdif_enable=0 trans_period=0 trans_type=0, flags=0, output_threshold=0, replay_gain=0, http_header=
10/25 10:27:11 Info: [transport] created zone sonos
10/25 10:27:11 Info: [transport] with endpoint 192.168.0.68 - Sonos PLAY:1 (SqueezeLite# bb:bb:37:88:f1:26 @ 192.168.0.18:53767) (23:1:1861f1ef-6b47-d66b-20b6-f2b70507c8af) [IsAvailable=True]
10/25 10:27:11 Trace: [zone] [sonos] Loaded Queue=0 Tracks Swim=Inactive AutoSwim=True Loop=Disabled Shuffle=False
10/25 10:27:26 Info: [stats] 3125mb Virtual, 341mb Physical, 83mb Managed, 39 Threads, FDs
10/25 10:27:31 Warn: Error in web request https://push.roonlabs.com/push/1/connect: NetworkError (Aborted.)
10/25 10:27:31 Trace: [push] request to manager failed
10/25 10:27:31 Trace: [push] retrying connection in 244861ms

Let’s wait for Philippe’s reply, hopefully I’m doing something wrong that I don’t know about.

Bastian,
Did you posted your logs and observations on the sq2u slimserver forum for philippe ?
I’m unable to see your post in the squeeze2upnp thread yet ?

For the SONOS codec issue, have you tried to set these 2 lines In the devices part of your config.xml file:

<L24_format>2</L24_format>
<raw_audio_format>wav</raw_audio_format>

SONOS doesn’t support raw pcm according to philippe.

Hi Bruno,

That is what’s missing…
Thank you so much for your help.

I changed those tags in the config.xml and now it works…
I’ve quickly tested with several tracks up to DSD and they all work by downsampling to either 44.1 or 48.

I’ll do some more testing and get back to both Philippe and yourself.

As for my update at the other forum, my replies need to be approved before it can be published to public.

Bastian

Bastian, fine if you succeeded to play !
I don’t understand where and why “approval” is needed on the Slimserver forum ?
If you could post your complete config.xml for your SONOS it will help others to test and give feedback to philippe.

Hi Bruno,

Below is my config.xml to that I’m using with my 2 Play:1s.

Here’s the steps on how to create it.

  1. Create config.xml
    sudo ./squeeze2upnp-osx-multi -i config.xml

  2. Replace the tags below (you may want to change the debug levels as well for testing, otherwise you can use -d flag when running the script).

     <stream_length>1000000000</stream_length>
     <default_on>1</default_on>
     <L24_format>2</L24_format>
     <raw_audio_format>wav</raw_audio_format>
    
  3. Run squeeze2upnp
    sudo ./squeeze2upnp-osx-multi -x config.xml -f log.txt

And below is my full config.xml

<?xml version="1.0"?>
<squeeze2upnp>
<common>
<streambuf_size>2457600</streambuf_size>
<output_size>2457600</output_size>
<buffer_dir>?</buffer_dir>
<buffer_limit>-1</buffer_limit>
<stream_length>1000000000</stream_length>
<stream_pacing_size>1048576</stream_pacing_size>
<max_GET_bytes>-1</max_GET_bytes>
<keep_buffer_file>0</keep_buffer_file>
<enabled>1</enabled>
<default_on>1</default_on>
<process_mode>2</process_mode>
<codecs>pcm,flc,mp3</codecs>
<sample_rate>48000</sample_rate>
<L24_format>2</L24_format>
<flac_header>1</flac_header>
<allow_flac>0</allow_flac>
<seek_after_pause>0</seek_after_pause>
<byte_seek>0</byte_seek>
<send_icy>0</send_icy>
<volume_on_play>1</volume_on_play>
<volume_feedback>1</volume_feedback>
<send_metadata>1</send_metadata>
<send_coverart>1</send_coverart>
<max_volume>100</max_volume>
<accept_nexturi>1</accept_nexturi>
<min_gapless>0</min_gapless>
<upnp_remove_count>1</upnp_remove_count>
<raw_audio_format>wav</raw_audio_format>
<match_endianness>1</match_endianness>
<auto_play>0</auto_play>
<server>?</server>
</common>
<upnp_socket>?</upnp_socket>
<slimproto_log>warn</slimproto_log>
<stream_log>warn</stream_log>
<output_log>warn</output_log>
<decode_log>warn</decode_log>
<web_log>warn</web_log>
<main_log>info</main_log>
<slimmain_log>info</slimmain_log>
<upnp_log>info</upnp_log>
<util_log>warn</util_log>
<upnp_scan_interval>30</upnp_scan_interval>
<upnp_scan_timeout>15</upnp_scan_timeout>
<log_limit>-1</log_limit>
<device>
<udn>uuid:RINCON_B8E93788F13801400</udn>
<name>192.168.0.67 - Sonos PLAY:1</name>
<friendly_name>192.168.0.67 - Sonos PLAY:1</friendly_name>
<mac>bb:bb:37:88:f1:38</mac>
<enabled>1</enabled>
</device>
<device>
<udn>uuid:RINCON_B8E93788F12601400</udn>
<name>192.168.0.68 - Sonos PLAY:1</name>
<friendly_name>192.168.0.68 - Sonos PLAY:1</friendly_name>
<mac>bb:bb:37:88:f1:26</mac>
<enabled>1</enabled>
</device>
</squeeze2upnp>

Bastian

1 Like