DIY Projects - TheAppgineer/roon-extension-manager GitHub Wiki

This page lists Do It Yourself projects based on Roon extensions.

Roon CD Player/Ripper

This project describes how to create a CD Player/Ripper that you can control via Roon. It uses the Roon Extension Manager in combination with the CD Player and CD Ripper extension. The platform used is a Raspberry Pi running DietPi.

Required Parts

  • Raspberry PI 2 or later
  • Micro SD card (4 GB or greater)
  • CD-ROM or DVD-ROM drive, can be a USB, IDE or SATA type (hereafter called optical drive)
  • IDE/SATA to USB converter (only if the drive isn’t USB)

Note: Although this guide assumes that a Raspberry Pi is used, other Single Board Computers that are supported by DietPi should work as well.

Step 1: Install DietPi

  • Download and Install Balena Etcher, it is available for Windows, Mac and Linux
  • Download the DietPi for Raspberry Pi image and extract the DietPi_vx.xx.img file
  • Start Etcher, select the DietPi image file, select your SD card as target, and Flash!
  • Plug the SD card into your Raspberry Pi and turn it on
  • Let it do its thing till you get the login prompt

Note: The official DietPi installation guide can be found here

Note: You can also run DietPi in a Virtual Machine on your PC. Read the VM Setup Instructions

Step 2: Install the Extension Manager and Docker

  • Login with the username root and the password dietpi
  • Follow further instructions till you reach the software menu
  • Select the 'Software Optimized' category, move down the list and select the Extension Manager (86) in the 'Media Systems' group (select by pressing space-bar), move down further and also select Docker (162) in the 'System Security' group'.
  • Press Tab to highlight OK and press Enter to go back to the previous menu
  • Move down to the Install option and press Enter
  • After the installation is finished you select OK to reboot

Step 3: Connect the optical drive to the Raspberry Pi

Now we have to determine some drive properties that are required during the installation of the extensions (step 4 and 5). Login to DietPi and connect the USB lead (using any optional adapter) of the optical drive to a USB port of the Raspberry Pi.

Get the Optical Drive Path

Enter the command dmesg and search for the drive identifier somewhere at the end of the command output. There should be a line that contains "Attached scsi CD-ROM" followed by the identifier we are looking fore. Below is some example output and for this case the identifier is sr0.

Example output:

[ 536.436467] usb-storage 1-1.5:2.0: USB Mass Storage device detected
[ 536.446432] scsi host0: usb-storage 1-1.5:2.0
[ 537.594871] scsi 0:0:0:0: Attached scsi generic sg0 type 5
[ 537.616164] sr 0:0:0:0: [sr0] scsi3-mmc drive: 32x/32x writer cd/rw xa/form2 cdda tray
[ 537.616173] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 537.616506] sr 0:0:0:0: Attached scsi CD-ROM sr0

Now write down your Optical Drive Path, this is constructed as follows:

/dev/<identifier>

Replace the <identifier> part with the identifier you found in the dmesg output. So the drive path for the example output is /dev/sr0.

Get the cdrom group ID

Next step is to get the cdrom group ID on the Raspberry Pi, you get this by entering the getent group cdrom command.
Write down the number that is at the end of the output line between the colons (probably 24).

Step 4: Install the CD Player extension

Follow the instructions in the first post of the CD Player thread, supply the found Optical Drive Path and cdrom group ID (see step 3) in the Docker Install Options during the installation.

Step 5: Install the CD Ripper extension

Follow the instructions in the first post of the CD Ripper thread, supply the found Optical Drive Path (see step 3) in the Docker Install Options during the installation.

(Optional) Setup Auto Rip (version ≥ 0.4.0)

To setup the Auto Rip feature the udev system of the Linux host has to be configured, a rule has to be created for this. Rules are stored in the /etc/udev/rules.d/ directory:

sudo mkdir -p /etc/udev/rules.d/

The command used to create the rule depends on how the Extension Manager was installed. For the DietPi setup and other Linux systems that used the setup.sh script for installation the required command is:

echo "SUBSYSTEM==\"block\", SUBSYSTEMS==\"scsi\", KERNEL==\"sr?\", ENV{ID_TYPE}==\"cd\", ENV{ID_CDROM}==\"?*\", ENV{ID_CDROM_MEDIA_TRACK_COUNT_AUDIO}==\"?*\", ACTION==\"change\", RUN+=\"/bin/su -lc 'echo 1 > `npm config get prefix`/lib/binds/roon-extension-cd-ripper/root/inserted' ${USER}\"" | sudo tee /etc/udev/rules.d/80-audio-cd.rules

Copy over the full command and run it in a terminal window on the Linux system, run it for the same user that was used during the Extension Manager installation (i.e. root for DietPi).

If the Roon Extension Manager is running in a Docker container then the required command is:

echo "SUBSYSTEM==\"block\", SUBSYSTEMS==\"scsi\", KERNEL==\"sr?\", ENV{ID_TYPE}==\"cd\", ENV{ID_CDROM}==\"?*\", ENV{ID_CDROM_MEDIA_TRACK_COUNT_AUDIO}==\"?*\", ACTION==\"change\", RUN+=\"/bin/su -lc 'echo 1 > `docker volume inspect -f {{.Mountpoint}} roon-extensions`/binds/roon-extension-cd-ripper/root/inserted' root\"" | sudo tee /etc/udev/rules.d/80-audio-cd.rules

Last step is to activate the rule:

sudo udevadm control --reload-rules && udevadm trigger

After inserting a CD into the drive and opening the Global Settings of the CD Ripper extension you should see the Auto Rip setting that can then be Enabled. The next time a CD is inserted Auto Rip will start.

Step 6: Enjoy!

You should now be able to Play and Rip CDs directly from the Roon interface.

Step 7: Share @ Roon Labs Community

Share your achievements (preferably with a picture of your setup) in the CD Player/Ripper thread on the Roon Labs Community forum.

⚠️ **GitHub.com Fallback** ⚠️