UPNP Renderer (Local, Qobuz, Tidal And Others)



# STEP18

# OPTIONAL: Using your USB DAC as a UPnP Renderer (Control Point)

# UPnP renderer: music player like BubbleUpnp or UpnpPlay send the stream from local source
# or remote source like Qobuz or Tidal to your audiophile server using MusicLounge renderer

# install upmpdcli


# UBUNTU INSTALLATION

  1. $ sudo apt update
  1. $ sudo add-apt-repository ppa:jean-francois-dockes/upnpp1

# in case of error or the repository can’t be reached, install this pkg before

  1. $ sudo apt install software-properties-common
  2. $ sudo add-apt-repository ppa:jean-francois-dockes/upnpp1

# install

  1. $ sudo apt install upmpdcli

# DEBIAN INSTALLATION
# add the repository for Debian list available here:
# IMPORTANT: change ‘buster’ by ‘bullseyes’ to match your debian version
https://www.lesbonscomptes.com/upmpdcli/pages/downloads.html

  1. $ cd /etc/apt/sources.list.d/
  1. $ sudo wget https://www.lesbonscomptes.com/upmpdcli/pages/upmpdcli-bullseye.list

# update pkgs

  1. $ sudo apt update

# install repository key

  1. $ cd ~/Downloads
  1. $ gpg --no-default-keyring --keyring ./lesbonscomptes.gpg --keyserver pool.sks-keyservers.net --recv-key F8E3347256922A8AE767605B7808CE96D38B9201

# or fetch the key form website

  1. $ sudo wget https://www.lesbonscomptes.com/pages/lesbonscomptes.gpg

# copy lesbonscomptes.gpg to /usr/share/keyrings/

  1. $ sudo cp lesbonscomptes.gpg /usr/share/keyrings/
  1. $ sudo chmod 644 /usr/share/keyrings/lesbonscomptes.gpg

# update pkgs

  1. $ sudo apt update

# install

  1. $ sudo apt install upmpdcli

# RASPBERRY PI INSTALLATION
# add the repository for Debian bullseye list available here:
# IMPORTANT: change ‘buster’ by ‘bullseyes’ to match your debian version
https://www.lesbonscomptes.com/upmpdcli/pages/downloads.html

  1. $ cd /etc/apt/sources.list.d/
  1. $ sudo wget https://www.lesbonscomptes.com/upmpdcli/pages/upmpdcli-rbullseye.list

# update pkgs

  1. $ sudo apt update

# install repository key

  1. $ cd ~/Downloads
  1. $ gpg --no-default-keyring --keyring ./lesbonscomptes.gpg --keyserver pool.sks-keyservers.net --recv-key F8E3347256922A8AE767605B7808CE96D38B9201

# copy lesbonscomptes.gpg to /usr/share/keyrings/

  1. $ sudo cp lesbonscomptes.gpg /usr/share/keyrings/

# update pkgs

  1. $ sudo apt update

# install

  1. $ sudo apt install upmpdcli

# Edit configuration the server:

  1. $ sudo nano /etc/upmpdcli.conf

# uncomment and modify friendlyname and checkcontentformat
# upnpAV is deactivated here (upnpav = 0)
# and should be 1 if you intend to play videos which is not the main purpose of an high end audiophile system
# OpenHome is also supported by default

friendlyname = MusicLounge
upnpav = 0
checkcontentformat = 0

# CTRL+O to save
# CTRL+X to exit

# Start UPNP Renderer

  1. $ sudo systemctl enable upmpdcli
  2. $ sudo systemctl start upmpdcli

# status of the service:

  1. $ sudo systemctl status upmpdcli

# to stop the service (if needed) do the following:

  1. $ sudo systemctl stop upmpdcli

# install qobuz and tidal plugins if needed

  1. $ sudo apt install upmpdcli-qobuz
  1. $ sudo apt install upmpdcli-tidal

# edit /etc/upmpdcli.conf to add your credential by editing the configuration (sudo nano /etc/upmpdcli.conf)

Congrats! You listen the music stored on your phone on your audiophile system using a UpNp Client like BubbleUpnp



More info on UPMPDCLI Project:
https://www.lesbonscomptes.com/upmpdcli/index.html

DLNA Server


# STEP17

# OPTIONAL: Install a DLNA server (browse and stream the music very easily with your Upnp music player client )

# MiniDLNA Project:
https://sourceforge.net/projects/minidlna/

# Install DLNA server type:

  1. $ sudo apt install minidlna

# Edit configuration the server:

  1. $ sudo nano /etc/minidlna.conf
media_dir=A,/mnt/media
friendly_name=MusicLounge

# CTRL+O to save
# CTRL+X to exit

  1. $ sudo systemctl enable minidlna
  2. $ sudo systemctl start minidlna
  1. $ sudo systemctl status minidlna

# That’s it! you can now browse the music library with your Upnp music player like BubbleUpnp

# to check the status of the DLNA server open your net browser and type the ip address of the Raspberry followed by the dedicated port 8200:
# http://192.168.x.x:8200


TROUBLESHOOTING

# force update minidlna database

  1. $ sudo systemctl stop minidlna.service
  2. $ sudo systemd-run -t /usr/sbin/minidlnad -r -f /etc/minidlna.conf
  3. $ sudo systemctl restart minidlna.service

# you can monitor DLNA database update
# “Finished parsing playlists” means it’s completed

  1. $ sudo tail -f /var/log/minidlna/minidlna.log

# check the minidlna log

  1. $ sudo cat /var/log/minidlna/minidlna.log

# in case of error:

WARNING: Inotify max_user_watches [16384] is low or close to the number of used watches [2] and I do not have permission to increase this limit.

# edit /etc/sysctl.conf to change the limit

  1. $ sudo nano /etc/sysctl.conf

# add these lines

fs.inotify.max_user_instances=8192
fs.inotify.max_user_watches=524288

#
# check the status of minidlna service

  1. $ sudo systemctl status minidlna

# in case of error related to autofs

/lib/systemd/system/minidlna.service:4: Failed to add dependency on autofs, ignoring: Invalid argument

# edit service to apply this fix

  1. $ sudo nano /lib/systemd/system/minidlna.service

# and replace autofs by autofs.service
# CTRL + X and Y to SAVE

  1. $ sudo systemctl daemon-reload
  2. $ sudo systemctl restart minidlna