Using Roon with the LMS-to-uPnP project

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

Thank you Bastian !
What about SQ, stability and “usability” with Roon feeding your SONOS endpoints ?

Hi Bruno,

It’s stable for me. I had it running overnight feeding 2 play:1s with different source (one living room, one office upstairs, both on Wifi)

There is no lag and it’s very responsive.

As for gapless, most of the time it’s gapless, although I find that sometimes there are gaps. when Itnhappens, I would replay the last song and it became gapless going to the next song afterward.

I moved the speaker to the living room this morning to have them as a pair.

What I found is that both speakers are still added to Roon (airsonos only show one for the pair)

You have to be careful to select the main pair, otherwise the other speaker will loose connection and you have to turn that speaker off first for it to connect again (restarting both Roon and sq2u does not work)

Have been running Dev-1 version for a few days (with Bastian’s settings for stream_length, default_on, L24_format and raw_audio_format) to 3 Sonos Play speakers.

Overall, works very well (I’m using the OSX version). Only issue has been occasional skipping of track when starting an album).

Just noticed that there is now a Dev-2 version which has the option for an additional entry (roon_mode) in config.xml so will try that and report back.

Mike.

Wondered if you had found any info on the roon_mode setting at all?

I have enabled it, but am not quite sure what it is doing…

0.2.4.0 is for the cast version.
0.2.10.0 is for the upnp version
I’ve not tried last dev-2 versions yet but i think roon_mode replace default_on parameter to use the bridges with Roon vs LMS.
Have you tried to ask philippe_44 directly ?

Thanks, yes I am trying the dev2 version of the versions you quote and its my first time trying them, so no I haven’t asked philippe_44 directly yet.

Still testing to see if I have any other questions first.

I seem to have playback but groups don’t want to play nicely, unless my configs are incorrect of course.

OK … what UPnP device(s) are you using ?
What is groups ? a group of tracks playlist / album ?
With dev-1 i’ve got good results with UPnP and some issues with Cast.

I mean audio groups, so playing through both devices at the same time, the same track/album.

OK. I’ve never tried audio grouping with bridges. Not sure it is supposed to work.

I have 3 Sonos Play 1 connected to Roon using the dev2 version running under OSX.

I can group any of these together in Roon but am finding that the output is not synchronised.

I cannot group them with RAAT players (using 2 x RaspberryPi + HifiBerry DAC) but that is to be expected - Roon cannot group across different zones, just within zones.

I’m going to try these two things next:
(1) Run Squeezelite along with RoonBridge on the Pi/HiFiBerry setup - this would enable the option of grouping these with the bridge / Sonos speakers.
(2) Run 3 instances of the bridge and connect each one to each of the Sonos speakers to see if that resolves the synchronisation issue.

1 Like

@DuckSoup Sounds good. let us know how you get on. I was probably asking too much in getting it to sync, so am sticking with playing one device for the moment. Strange thing is my squeezeboxes are fully in sync.

@volpone Have you tried running the upnp and chromecast servers on the same mac, as I am getting socket errors for chromecast and am not sure if they can be run together…

According to philippe_44, if i understand correctly, the way Roon is streaming is not exactly identical than LMS one. Philippe’s bridges are mainly developed and tested against LMS (he is not using Roon yet), so there might be some differences and limitations.[quote=“mannp, post:34, topic:15199”]
@volpone Have you tried running the upnp and chromecast servers on the same mac, as I am getting socket errors for chromecast and am not sure if they can be run together…
[/quote] No i don’t. I will try this week-end and let your know.

Understand and thanks :slight_smile:

Tried (2) - running multiple instances of UPnPBridge - worked OK once I ce=reated separate config.xml files for each Sonos speaker and set enabled=0 in ‘common’ section. Didn’t solve the synchronisation problem though - if anything, slightly worse.

Emailed Philippe and his reply was:

Hi Mike – Unfortunately, uPnP standard does no allow audio synchronization, by design. Sonos are controlled using uPnP but they have a proprietary sync system in addition and they do not want to release its specifications. So, there is no solution to synchronize a Roon-native or a SB device with a uPnP / Sonos speaker. The only thing you can do is to create a Sonos group from the Sonos control app and when you play something using the Roon controller on the master speaker of that group, then all the Sonos speakers of that group will be synchronized. Note that if you try to play from Roon on one of the slave speakers, it will not work, you must play on the master. It you have a Sonos group that is always the same, then the best is to disable all slave speakers, in the squeeze2upnp configuration file, so there is only one speaker visible in Roon.

Philippe

So, looks liks synchronisation of Sonos speakers via UPnP is unlikely - unless Sonos release details of how it is done or Roon adds ability to play directly to Sonos - for now use Sonos app to group speakers and play to the group from Roon. Not very elegant but seems to work.

Ok thanks for the tests and feedback, much appreciated.

Hello

I’ve managed to install the LMS-to-UPNP binary on my Intel X86 Nuc (running also Roon core), this is a Linux one.
squeeze2upnp find my upnp devices, it runs ok for my marantz amp and also my Sonos
Still even if it finds my upmpdcli component it is unable to play on it

  • squeeze2upnp log side
    [17:59:14.952347] process_strm:216 [0x730d70] strm command s
    [17:59:14.952436] process_strm:290 [0x730d70], strm s autostart: 1 transition period: 0 transition type: 0 codec: p
    [17:59:14.952482] sendSTAT:143 [0x730d70]: STAT:[STMf] msplayed 0
    [17:59:14.952884] sq_callback:281 [0x78f770]: codec:p, ch:2, s:16, r:44100
    [17:59:14.953003] sq_callback:296 [0x78f770]: no matching codec in player
    [17:59:14.953046] sendSTAT:143 [0x730d70]: STAT:[STMn] msplayed 0
    [17:59:15.100224] XMLGetFirstDocumentItem:69 (BUG) ixmlNode_getFirstChild(tmpNode) returned NULL
    [17:59:15.100292] XMLGetFirstDocumentItem:69 (BUG) ixmlNode_getFirstChild(tmpNode) returned NULL
    [17:59:15.102009] SyncNotifState:479 UpMpd: uPNP stop
    [17:59:15.102043] sq_notify:1098 [0x730d70] notify STOP

Has anyone tested this ?

Regards

Got Philip44’s air-upnp-bridge working with Roon.

on MAC/Linux

  1. Download corresponding bin for your architecture at
    https://github.com/philippe44/AirConnect/tree/master/bin

  2. chmod +x airupnp-<your architecture>

  3. ./airupnp-<yourarchitecture> -k
    -k is to make the program instantly closing on ctrl + c. You can also have a look at other parameters using ./airupnp-<yourarchitecture> --help

Devices showing up as airplay devices afterwards

Might not be the highest quality path available, but at least for me in order to get my bathroom internet radio to work it’s fine.

If you are running docker, feel free to have a lock at my docker image https://hub.docker.com/r/etomsen/roon-airupnpbridge/

Cheers
Tom

2 Likes