HowTo: Roonify non-Roon streamers (lms-to-uPnP)

There are a lot of posts on how to get this up and running so rather than traipse through 100s of posts to piece it all together I’ll pull together here. It took a while to nut out some of the finer points so I hope this helps.

There are appear to be two differing methods of using Roon with older streamers.

  1. Get a Rpi and Allo DAC or some derivation and use that as the end point.
  2. Use a method that creates an endpoint the bridges the Roon Raat protocol to something that the older streamers understand like uPnP.

This post discusses option 2
There are 2 methods I know of to implement the bridge, Software only and a hardware version. A company called “small green computer” sells a Sonore uPnP bridge/sonic transporter which acts as the bridge. I have never used these.

The second method is a piece of open source software that I have used with great success called lms-to-uPnP. It is usually used as a plugin to the Logitech Media Server (LMS) - but we will not be installing it in LMS as a plugin. We will install it manually on its own so our Roon server can see it.

Pros and Cons (in no particular order)

  • Its opensource and freely available and actively maintained.
  • Lots of OSs and CPU architectures are supported including Linux Windows MacOS and NASs.
  • Allows grouping (but not proper syncing of new and old devices)
  • No meta data shows up on my ND5XS ( I prefer the Roon interface anyway)
  • I have all DSP off so volume does not work for me on the Naim( I use the NAC 102 remote for volume)
  • It requires a NAS/Rpi/Server or something on 24/7 to act as a bridge. ( I use the same Linux box that the Roon server is installed on)
  • I don’t know if there’s an impact on SQ compared to the Sonare uPnP bridge. (but expect it to be be better than the Rpi/DAC route)
  • Nothing to compile or build - downloading the zip file gets you all the binaries for all OSs
  • It uses very low resources (I have it configured for passthrough mode)
  • Cannot use the LMS GUI to install.

What does it do and how does it work?
I’m not entirely sure, I’m no expert on how it actually works, but I think the lms-to-uPnP searches the network using mDNS and finds all uPnP servers. It then advertises each uPnP device back to Roon as a squeezebox.
The uPnP spec also allows the uPnP devices to advertise their specifications, like sample rates, file formats etc. The lms-to-uPnP does a pretty good job of translating this back to the Roon in pass through mode, and this means that when I play a song at 384khz, the Roon server automatically re-samples/converts it to 192khz (which is the limit of the ND5XS). Manual changes can be made in a config.xml file if needed. I need to to experiment with sending WAV vs PCM (raw), not sure what they do!
In the config file, parameter values listed first have higher priority.

Where to get it and read about it?
https://github.com/philippe44/LMS-to-uPnP
https://sourceforge.net/projects/lms-to-upnp/

How to Run it?

  1. Ensure LMS compatibility is turned on in the Roon interface
  2. Put the application on a LOCAL disk where you have read/write access
  3. Choose the correct binary for your OS and CPU (choose the “static” version for the least problems)
  4. launch it with “squeeze2upnplms-??? -i config.xml” on the command line, and wait 30s till it exits.
  5. Launch it again just without any flags and hopefully your devices will appear in Roon.
  6. Go and edit the config.xml file if needed.
  7. Once happy create a start script so it comes up on reboot.
  8. Ensure the “-Z” flag is used in your start script otherwise the lms-to-uPnP bridge will slowly consume all your RAM (since its waiting for input) the Z flag puts into daemon/background service.
  9. There are a couple of “modes”, I use “pass through” mode and have not tried any others. I’m keen to hear from anyone that has?
  10. In the doc folder there is a great userguide.htm and it explains all the settings.
  11. Make sure the parameter in the config.xml called roon_mode is set to 1 as per the file below.

Some helpful files
INSTALL\Bin\config.xml (you cannot copy this file and expect it to work as your UUIDs will be different!).
The top section is a general section which holds all the defaults. Copying a parameter to a device section and editing it overrides the default. the below file works, but is not necessary optimised, I’d be keen to hear back form others that have managed to improve it.

<?xml version="1.0"?>
<squeeze2upnp>
<common>
<streambuf_size>524288</streambuf_size>
<output_size>4194304</output_size>
<stream_length>-3</stream_length>
<enabled>1</enabled>
<roon_mode>1</roon_mode>
<codecs>aac,ogg,flc,alc,aif,pcm,mp3</codecs>
<mode>thru</mode>
<raw_audio_format>wav,raw,aif</raw_audio_format>
<sample_rate>48000</sample_rate>
<L24_format>1</L24_format>
<flac_header>1</flac_header>
<forced_mimetypes></forced_mimetypes>
<seek_after_pause>0</seek_after_pause>
<send_icy>1</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>10</min_gapless>
<auto_play>0</auto_play>
<server>?</server>
<resample_options></resample_options>
</common>
<upnp_socket>?</upnp_socket>
<slimproto_log>info</slimproto_log>
<slimmain_log>warn</slimmain_log>
<stream_log>warn</stream_log>
<output_log>info</output_log>
<decode_log>warn</decode_log>
<main_log>info</main_log>
<upnp_log>info</upnp_log>
<util_log>warn</util_log>
<log_limit>-1</log_limit>
<device>
<udn>uuid:67a91540-097a-d74a-d66d-2bcf116dfe06</udn>
<name>Kodi (kodi)</name>
<friendly_name>Kodi (kodi)</friendly_name>
<mac>bb:bb:2a:39:56:53</mac>
<enabled>1</enabled>
</device>
<device>
<udn>uuid:5F9EC1B3-ED59-79BB-4530-0011F68C99A2</udn>
<name>naim lounge</name>
<friendly_name>naim lounge</friendly_name>
<mac>bb:bb:01:a9:ba:03</mac>
<enabled>1</enabled>
<sample_rate>192000</sample_rate>
<send_coverart>0</send_coverart>
<volume_on_play>-1</volume_on_play>
</device>
</squeeze2upnp>

Start Script for Linux
/etc/systemd/system/lms_upnp_bridge.service

[Unit]
Description=LMS upnp Bridge
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/opt/squeezeupnpbridge/Bin/squeeze2upnp-x86-64 -Z -x /opt/squeezeupnpbridge/Bin/config.xml
Restart=on-failure
RestartSec=30

[Install]
WantedBy=multi-user.target
10 Likes

Nice one, followed your howto, set this up on a RPi feeding an NDX, works great.

Excellent, Im glad it worked out @dknk
Out of interest, did you use the squeeze2upnp-armv6hf-static binary?

Yes, just a quess really. It worked, so did not try armv5

And don’t forget Airplay… if you have a non RAAT endpoint, this seems a good way to stream using Roon supported connectivity… you just need an Airplay device with SPDIF out, but these are plentiful and cheap. The days of having to build DIY media transport converters are over, unless that is what you want to do of course. Also Airplay allows Roon volume control.
Yes the the media won’t be as potentially high definition as RAAT, but it won’t be bad and it’s plug and play.

Nice one.

As mentioned on a different thread I had looked at this on the weekend before your post but struggled to get this to work.

The key item that was blocking it from working was the line:

<roon_mode>1</roon_mode>

In the default config file the value is set to 0 and it needs to be set to 1.

I got this working first on a Windows system as a proof of concept but now have it working temporarily on a Netgear ReadyNas which supports a one click installation of Logitech Media Server (LMS). I know LMS isn’t necessary but it was a quick way to get this working as LMS supports the plugin ‘out of the box’ and it saves invading the NAS back door file system. I then copied the config file over from my Windows PC and it all sprang into life.

I now want to get this working directly on the QNAP as the Netgear devices I have are on a timer based schedule for power-up as they are just used for backups and I don’t really want another device running 24x7.

The sound seems excellent, I haven’t done a comparison to Asset streaming UPNP yet but there wasn’t any obvious issue that I identified yesterday.

One strange thing. When I started playing a couple of albums the first track was playing louder than normal and distorted. No other tracks on the two albums in question were doing this and it was repeatable. I resolved this by enabling the FLAC compression option in Roon. I think this sends the Flac file to the Squeezebox rather than WAV but my NDS is saying that the format is PCM.

1 Like

Would not the same be true of Chromecast, with much less restriction on resolution?
(Chromecast supports 24/192 if your WiFi is up to it.)

Ah, the tinkerers must, and will always, exist. This thread is not intended for the plug and play people in my opinion.

I have been very pleasantly surprised by the quality of Chromecast which in conjunction with a decent little HDMI to Optical SPDIF splitter now acts as a Roon end-point for my bedroom system using the DAC component of my Marantz NA7004 streamer. Total cost of the Chromecast and HDMI splitter was around £50, and the bedroom system sounds if anything better than it did when I used the Marantz as a conventional streaming device.

You deserve a medal for this. Well done!

Hi @Simon-in-Suffolk & @Xanthe
I think this plugin trades the convenience of buying hardware, for the effort to install and configure some software without any outlay. There were a lot of posts detailing the Rpi/Allo Chromecast etc route for using Roon and I think many people thought their only option was to buy more hardware.

Hopefully the instructions lower the barrier to entry and allow more people to get it up and running, but you are right, for some people, a Chromecast or airplay is probably good enough as they have a device already kicking about.

Personally, I think its a good idea to continue to utilise the streamer buffer section in the Naim streamers rather than bypassing it and going straight to the DAC by using a Chromecast Rpi/Allo SPDIF solution.
From a price/performance perspective the plugin is fantastic.

Great @trickydickie
What CPU is the QNAP armv5 ? if so then it should work because I think I saw a binary for that?

I experimented with the raw_audio_format to lots of options like Wav and Flac, didn’t seem to make a difference - always sent PCM. I think those options are bypassed in pass through mode maybe.

I’ve been reading up on the LMS forum about it and I think this software has 131 pages alone so there is a bit of night time reading :slight_smile:

I have a QNAP TS-453 pro. It’s got a 64bit 2ghz Celeron processor. It has 8gb ram so plenty in hand. It seems a decent mid range model.

I suspect I could just install the lms-to-upnp application on the QNAP by hacking the file system and startup scripts but this could lead to trouble with firmware upgrades from QNAP as it would be an unsupported configuration.

I’m going to look at the container station tonight and see if I can install LMS through this, there seem to be a couple of options available. Thi s uses a virtualise solution which decouples my tinkering from the QNAP hardware. I appreciate I don’t need LMS but it may be a way to have the plugin functional without doing anything non-standard on the QNAP.

Nice write up @Weta, thanks for taking the time.

I went the expensive-easy route of buyign a piece of kit with all of that setup. Years ago I would probably have done what you did, but am now too old and lazy!

Hi

I have tried it but not yet got it working so will need to investigate further.

I have added into the Naim section of config.xml <roon_mode>1 etc but left <roon_mode>0 in common section, so don’t know if that is causing problem. I edited file on my Synology Nas which was already running LMS. Perhaps I should try a clean start without LMS running.

Anyway, it gives us ‘tinkerers’ something to do while we are waiting for N372 to appear, (or buying the Sonore bridge in frustration) I don’t want any more clutter around the hifi. B-)

Thanks for above info

CK

@ceexkay you need to change the roon_mode setting in the common section from 0 to 1 and remove the one you added in.

If your running LMS on a seperate machine to Roon core then you can also set in the UI for the plugin to automatically connect to the Roon server by putting in the ip address for it. If it’s running on the same NAS then you will need to shut LMS down or all the endpoints will migrate to it and not be available in Roon.

Hi @Ceexkay,
I think the Roon mode parameter may need to stay in the general section, I don’t think that value can vary by device.

Thanks @trickydickie and @Weta for info.

I have moved the roon mode parameter to the common area and now the N272 and various Sonos boxes are being recognised by Roon.
The Sonos boxes were already identified as native endpoints so they are appearing twice hence why I was trying to enable N272 only.
So now I can see and enable the endpoints within Roon but cannot play music to them.

Does the squeeze2upnp have to run on same box as roon server? It currently runs on iMac which has roon controller and out put on it while roon server runs on Synology NAS. Log file speaks about ‘unable to connect to server with cli’ and also codec not found.

I have switched LMS off in NAS while trying to do this, as observed above they do not get on!

All advice appreciated.

I can at least try out Roon using Sonos endpoints to see if I enjoy the interface whilst I have the 14 day trial.

For info system is NAC N272, XPSDR, NAP250DR + 10 Sonos speakers/connect/amps.
Also have DacV1 + NAP100 connected to Imac, this is also seen by Roon as direct connection. (It has twice played at 100% whilst tinkering with Roon :anguished:)

Thanks

CK

You can run the binary on any computer on your network even a raspberry pi if you have one.