Introduction: Multi Room IOS Audio (AirPlay) to Chromecast Audio

Picture of Multi Room IOS Audio (AirPlay) to Chromecast Audio

Background

A while ago, I got bored with having 1 Audio Receiver and decided I wanted something a bit more. I decided a Multiroom audio setup was naturally the next step. I began looking into existing projects and found that most you had to pay for, and adding new features to it looked to be more of a headache than I really wanted.

So naturally, I decided to build my own Multi Room Audio setup that takes advantage of multiple projects and simply combines them into one.

The project is located at https://github.com/bareinhard/Multiroom-Audio-iOS

I have spent a lot of time trying to make it as simple as possible and ready to use out of the box.

As such, it is extremely easy to install but does require some specific things.

What's different about this than other similar projects?

From my understanding most of the solutions to accomplish a similar goal will require an application on each device that will want to play iOS music to the Chrome Cast Audio devices.

Whats nice about this project is that after the first initial installation outline below, the only thing that will be required on each new device wanting to stream music to the Chrome Cast audio devices, is that the device will need to connect to the AirPlay device and begin music. After you set the proper sink with 1 device (given the Pi hasn't been rebooted since) the music should start streaming to the last used sink (Chrome Cast Audio Device/Group). There are 2 options for changing the output devices (via terminal, or the Web UI).

What is needed?

  • Raspberry Pi 2/3
  • Ethernet (Preferred, haven't tried with Wifi Only)
  • SDCard running Ubuntu MATE
  • Keyboard and mouse for setup (only a keyboard is actually needed, but a mouse makes it a bit easier)
  • 2+ Chromecast Audios, 1 will work, but then its not really multiroom
  • Google Home App

Now what?

  1. You will need to download ubuntu mate, Ubuntu MATE ,click here
  2. Then unzip the .img.xz file with WinZip or your favorite zip program.
  3. From there load the image onto your SD Card (I found this will take a good 30-40 minutes)
  4. Now start up your Pi with the SD card loaded up.
  5. Setup Ubuntu to your liking ( I found logging in automatically to work best with how this project works )
  6. Open up a terminal
  7. run sudo apt-get install git -y
  8. then, git clone https://github.com/bareinhard/multiroom-audio-ios
  9. then, cd multiroom-audio-ios
  10. then, chmod +x ./install.sh
  11. then, sudo ./install.sh
  12. Follow the prompts, the install should take a good chunk of time over 20 minutes (depending on how recently you have updated). Once completed please reboot.
  13. Now the important parts, setup your chromecast audios and create device groups inside the Google Home App. You simply go to your devices in the top right of the app, then click the settings for any Chromecast Audio device and tap create groups. Here is how you will be able to add more devices in the Web UI.
  14. Now go to your Pi's address on port 2221 in your web browser. Example: 192.168.0.18:2221, the web browser will show a page with all the devices found on your network

Everything is functional after the reboot and there are a few commands that will help you in the event you chose not to start the web ui after each user login.

How to begin?

  1. On your iOS device, start playing music then navigate to AirPlay in your Control Panel (swipe up from the bottom). Tap on the AirPlay, then locate the device that you named in the install script
  2. Now navigate to your web browser with the pi's address on port 2221, example 192.168.0.18:2221
  3. To change the output of the music (to different rooms aka sinks) simply click on the desired button (names are under the buttons), shortly music should begin streaming to your chromecast audio.

Commands

  • start_web_ui - this command will start the Web UI at your Pi's ip address on port 2221 inside your favorite web browser, i.e. 192.168.0.18:2221. The Web UI was made for use with chrome, some functionality may be missing in other browsers. For the time being, the volume control has not been setup properly and isn't working (this will be fixed shortly).
  • stop_web_ui - this command will stop the Web UI and no longer be visible in the browser
  • restart_web_ui - this command is essentially a combination of both start_web_ui and stop_web_ui. restart_web_ui is used mainly to refresh the sinks. This refreshing of sinks will be shortly available as a button inside the Web UI.

Thats it?

For the moment yes. That being said I am still working on getting a working bluetooth connection (without the hassle of having to pair manually each time), and integrate devices such as the Amazon Echo, or other devices that aren't iOS or Chromecast capatible.

Additionally, I am always looking to add new content and better features to my projects. So feel free to reach out and suggest some new ideas, or things that aren't quite working right.

Hope you all enjoy it!

-BaReinhard

Comments

JulienP38 (author)2017-09-29

I'm having the same problem as Zooks123 . VNC shows a black screen only after the reboot step. I can still login via SSH. Wish I had backed up my Pi SD card prior to this ... Any idea on how to clean this up ? Pi is DOA after this. Don't really feel like restarting setup from scratch, even though it wasn't used for much (no real work).

Zooks123 (author)2017-06-25

Im having some issues once i reboot my pi and log into ubuntu only the screen saver shows. also when i go to my pi's address with port 2221 it only shows the sinks you have set up in your tutorial any comments ? any help would be appreciated.

Swansong (author)2017-03-31

Thanks for sharing :)