Skip to content
guussie edited this page Mar 23, 2023 · 23 revisions

Welcome to the MACtoRoon wiki!

This Wiki explains one way to send an audio stream from an Apple device (macOS, iOS, iPadOS) to ROON.

We will be using the Roon Entrypoints extension.

In a related post we will describe in detail how to create an Entrypoint and specifically an Entrypoint for connecting a turntable to Roon, so that the output of the turntable can be played on any Roon device in the home.

These setup instructions can also be found in other places, but while following those instructions I have encountered problems for which no solutions were provided. You will find these problems plus the relevant solutions and hints in this Wiki.

The main software used that makes all this possible is Roon Entrypoints (which includes Roon Extension Manager) that can be found here, and Shairport-sync that can be found here.

Download the appropriate image for your version of Raspberry Pi from DietPi. Use the 32-bit version.

Transfer the image to a Micro SD card using Balena Etcher. Once the transfer is done, remove the card from your computer and then reintroduce it.

Open Terminal and write:

cd /Volumes

cd "NO NAME"

sudo nano dietpi.txt

Change the setting to "AUTO_SETUP_NET_ETHERNET_ENABLED=0"

Change the setting to "AUTO_SETUP_NET_WIFI_ENABLED=1"

Change the setting for "AUTO_SETUP_NET_WIFI_COUNTRY_CODE=GB" to the country where you are located.

Change the setting for "AUTO_SETUP_HEADLESS=1" (for headless setup).

Also change the time zone appropriately.

Close the file: ctrl-X, Y, Enter.

sudo nano dietpi-wifi.txt

Enter the name of your SSID in the appropriate place.

aWIFI_SSID[0]='MYSSID'

and the passcode:

aWIFI_KEY[0]='MYPASSCODE'

Close the file: ctrl-X, Y, Enter.

exit

Open Finder and eject the "NO NAME" drive.

Put the Micro SD card in the RPI and start it up.

You need two find the IP address of your RPi. I will not cover that process here. Once you know the IP address, log into the RPI:

ssh root@xxx.xxx.xxx.xxx

Password is "dietpi".

Follow all instructions and wait for the setup to finish. You will be asked to change the default passwords, and it is a good idea to do this.

First you need to configure the RPi:

dietpi-config

Select 2. Audio Options.

Press "Enter" to enable ALSA sound.

Don't choose a Soundcard at this stage. Select "Back", then select 6. Security Options. Choose an appropriate "Hostname" for your device. This name will also be the the device that you need to send AirPlay sound to. Select "Exit".

Now select "Browse Software", locate "Shairport-sync" and press the space bar.

Confirm. In the menu, move to "Install" and let the software install. You will have to choose if you want the new AirPlay 2 or the legacy AirPlay.

When done type again:

dietpi-software

This time, locate "Roon Extension Manager" and confirm by tapping the space bar. Do the same for "Docker Compose".

Confirm. In the menu, move to "Install" and let the software install.

Once the software is installed, reboot the RPi.

reboot

In the following steps we follow the instructions from The Appgineer

Login to the RPI again and don't forget that you just changed the password:

ssh root@xxx.xxx.xxx.xxx

Now install the loopback functionality:

echo snd-aloop >> /etc/modules

reboot

Login to the RPI again:

ssh root@xxx.xxx.xxx.xxx

dietpi-config

Select the "2. Audio Options" → "Sound card" and select "Loopback Loopback PCM [hw:0,0]" near the bottom of the list.

image

Exit dietpi-config by selecting Back Exit Ok.

Now we need to instruct Shairport-sync that the applications needs to send the sound stream to the loopback device:

nano /usr/local/etc/shairport-sync.conf

Locate the line that starts with

// output_device = "default";

Create a new line underneath with the following text:

output_device = "hw:0,0";

This will direct the sound output to the loopback device.

Close the file (ctrl-X, Y, Enter).

Restart Shairport-sync:

systemctl restart shairport-sync

Now we need to setup Roon. Open Roon on any device, click the "Menu" and select "Extensions".

You should now see the "Roon Extension Manager".

Select Settings. Install the Entrypoint Gateway, then install the Audio Entrypoint.

In case you are running an instance of Roon Entrypoints on another Raspberry Pi and you have installed the Entrypoint Gateway there, you don't need to set it up again. Just install the Audio Entrypoint. Check the Roon Entrypoints Installation Guide in case you get lost.

Open the Audio Entrypoint Settings and select the second "Loopback Loopback PCM" device in the "Sound Card" dropdown. After selection the "Sound Card" should have (hw:0,1) in its name.

Important: also select the "Format" as 44.1kHz, 24 bit. Failing to do this will result in errors and no sound.

image

In case you have another instance of Roon Extension Manager running with Entrypoint Gateway activated, the need to enter the IP address of the Gateway in this dialog box. If this is the only instance of Roon Entrypoints, you can leave the default settings.

Now you can select "Save".

The last thing you need to do is to create a Radio Station through which the AirPlay audio stream will be played. The process is explained in the Roon Entrypoints Installation Guide, but here it is again:

Open Roon on any device. Select "Settings", then "Extensions", locate the "Roon Entrypoint" and click "Settings". Locate the Station URL and copy it to the clipboard. Click "Cancel".

Select "My Live Radio" in "My Library" and click on "Add station". Now click "Add station URL". Now paste the URL that you copied from the Roon Entrypoint Dialog and click "Save". In case you get an error, you may have to activate the Roon Entrypoint or actually play a stream to the AirPlay device that you created earlier.

Note that you need to create a separate Radio station for each Entrypoint you create.

On any Apple device you can now direct the sound output to the AirPlay device that you have just created. Make sure that you set the volume to maximum, otherwise you may not hear anything playing through Roon. For volume control use the Roon Player volume control.

It is important to start the different parts of this solution in the right order:

  1. Start the application that produces the sound stream on your Apple device
  2. Send the stream to the Airplay device on your Raspberry Pi
  3. Make sure the Entrypoint is "Active"
  4. Start playing the radio station that is associated with that Entrypoint

When the stream stops playing, the radio station is disconnected and you will have to restart it after you start a new stream or restart the old stream. Automating this process will be another project. Perhaps this could be done with MQQT.

Clone this wiki locally