{"id":20774364,"url":"https://github.com/maxvfischer/sonos-streaming","last_synced_at":"2025-10-15T09:14:40.398Z","repository":{"id":169432926,"uuid":"622627800","full_name":"maxvfischer/sonos-streaming","owner":"maxvfischer","description":"How to stream vinyl (or any other analog RCA) to your Sonos system","archived":false,"fork":false,"pushed_at":"2025-03-06T21:13:20.000Z","size":7196,"stargazers_count":126,"open_issues_count":0,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-30T09:05:14.443Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxvfischer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-02T17:04:37.000Z","updated_at":"2025-03-30T05:23:22.000Z","dependencies_parsed_at":"2024-12-27T10:06:21.748Z","dependency_job_id":"3872ac1e-0134-4b4e-8f2e-3d7002e7db2e","html_url":"https://github.com/maxvfischer/sonos-streaming","commit_stats":{"total_commits":58,"total_committers":2,"mean_commits":29.0,"dds":"0.22413793103448276","last_synced_commit":"c3bc7f615e4aa8cceece55287d8d392a6e1caf52"},"previous_names":["maxvfischer/sonos_streaming","maxvfischer/sonos-streaming"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxvfischer%2Fsonos-streaming","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxvfischer%2Fsonos-streaming/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxvfischer%2Fsonos-streaming/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxvfischer%2Fsonos-streaming/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxvfischer","download_url":"https://codeload.github.com/maxvfischer/sonos-streaming/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247464186,"owners_count":20942966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T12:29:16.620Z","updated_at":"2025-10-15T09:14:35.340Z","avatar_url":"https://github.com/maxvfischer.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![main_gif](./images/main_banner.gif)\n\nThis guide goes through all the steps to stream music from an analog vinyl player (or any other RCA source) to your Sonos system, by using a Raspberry Pi.\n\nThe guide is based on this Instructable guide: https://www.instructables.com/Add-Aux-to-Sonos-Using-Raspberry-Pi/. But I've spent time simplifying the process, wrapping everything in a `docker-compose.yml` and creating a pre-built Raspberry Pi image where everything is set up using a `systemd` service. \n\n# Table of content\n1. [Needed hardware](#needed-hardware)\n2. [Overview software](#overview-software)\n\t1. [Darkice](#darkice)\n\t2. [Icecast2](#icecast2)\n3. [How to stream vinyl to your Sonos speakers](#how-to-stream-vinyl-to-your-sonos-speakers)\n\t1. [Download the pre-built Raspberry Pi image](#download-the-pre-built-raspberry-pi-image)\n\t2. [Unzip the Raspberry Pi image](#unzip-the-raspberry-pi-image)\n\t3. [Install Raspberry Pi Installer](#install-raspberry-pi-installer)\n\t4. [Install the Raspberry Pi image to the SD card](#install-the-raspberry-pi-image-to-the-sd-card)\n\t5. [Connect vinyl player to the Raspberry Pi](#connect-vinyl-player-to-the-raspberry-pi)\n\t6. [Point the Sonos speakers to the vinyl stream](#point-the-sonos-speakers-to-the-vinyl-stream)\n\n\n## Needed hardware\nTo stream the sound from a vinyl record player to the Sonos speakers, you will need:\n\n* 1x RaspberryPi (with USB Type-A)\n* 1x RaspberryPi power adapter (adjusted to the RaspberryPi you're using)\n* 1x 8GB MicroSD card\n* 1x SD card reader/adapter (if your computer doesn't already support it)\n* 1x Behringer U-PHONE UFO202\n\n## Overview software\n\n### Darkice\n\nDarkIce is a live audio streamer. It records audio from an audio interface (e.g. sound card), \nencodes it and sends it to a streaming server. This software is used to read the vinyl signals \ncoming from the U-PHONE UFO202.\n\nURL: [http://www.darkice.org](http://www.darkice.org)\n\n### Icecast2\n\nIcecast is a streaming media server which we will use to stream the live audio from Darkice and \nbroadcast it out in our local network. This is what the Sonos speakers will pick up and play.\n\nURL: [https://icecast.org](https://icecast.org)\n\n\n## How to stream vinyl to your Sonos speakers\n\n\u003e **Note**\n\u003e This section uses my pre-built Raspberry Pi image. If you wish to use the default Raspberry Pi image and set up the service yourself, that is also possible. This can be done by flashing the SD card with the default RPi image, clone down this repository on the RPi, `cd` into the repo, install docker by executing `install-docker.sh` and setting up the service by running `setup-service.sh`.\n\n### Download the pre-built Raspberry Pi image\n\nStart by downloading the pre-built Raspberry Pi image here: [https://github.com/maxvfischer/sonos-streaming/releases/download/v1.0/image_2025-03-06-sonos-streaming.img.xz](https://github.com/maxvfischer/sonos-streaming/releases/download/v1.0/image_2025-03-06-sonos-streaming.img.xz).\n\nThis image was built using `pi-gen`, by executing `build-pi-image.sh` inside a GitHub Action pipeline ([https://github.com/maxvfischer/sonos-streaming/actions/runs/12058015195](https://github.com/maxvfischer/sonos-streaming/actions/runs/12058015195)).\n\nThe image will automatically start the `systemd` service `sonos-streaming` on boot up, starting the streaming by executing `docker-compose.yml`. \n\n### Unzip the Raspberry Pi image\n\nAs both `pi-gen` and `GitHub Actions` apply compression, you will need to decompress it twice until you have the raw image file `image_2023-10-29-sonos-streaming.img`.\n\n### Install Raspberry Pi Installer\n\nThe Raspberry Pi Installer is a software developed by the Raspberry Pi Foundation to simplify the installation of the Raspberry Pi OS to a microSD card.\n\nDownload the Raspberry Pi Installer on your computer by following the instructions on this website: [https://www.raspberrypi.com/software/](https://www.raspberrypi.com/software/)\n\nAfter you've downloaded, installed and started the installer, you should see a page similar to this:\n\n![installer_1](./images/installer_1.png)\n\n\n### Install the Raspberry Pi image to the SD card\n\nStart of by inserting the microSD card you're planing to use into the computer.\n\n![installer_4](./images/installer_4.png)\n\n![installer_3](./images/installer_3.png)\n\nThen click on `CHOOSE OS` and choose `Use custom` at the very bottom. Look for and choose the downloaded Raspberry Pi image.\n\n![installer_2](./images/installer_2.png)\n\nAfter that, click on `CHOOSE STORAGE` and choose the microSD card you just inserted.\n\n![installer_5](./images/installer_5.png)\n\nBefore installing the OS, we want to change some configurations. This is done by clicking on the cogwheel in the lower right corner.\n\n![installer_6](./images/installer_6.png)\n\nDo the following:\n\n* Check `Enable SSH` and `Use password authentication`.\n* Check `Set username and password` and choose whatever username and password you want to use to log into the Raspberry Pi.\n* Check `Configure wireless LAN` and **fill in the name of the wifi your Sonos speakers are connected to, as well as the wifi password** (this is very important, if done incorrectly, the speakers won't find the music stream).\n\nThen click `SAVE`.\n\n![installer_7](./images/installer_7.png)\n\n![installer_7_1](./images/installer_7_1.png)\n\n\nTo install the OS to the microSD card, click `WRITE`. You might get prompted with a warning saying that all existing data will be erasted. If you're fine with this and want to proceed installing the OS, click `YES`.\n\n![installer_8](./images/installer_8.png)\n\nThe installation should take approx. 5-10 minutes.\n\n![installer_9](./images/installer_9.png)\n\nWhen the installation is done, remove the microSD card from your computer and insert it into the Raspberry Pi.\n\n![installer_10](./images/installer_10.png)\n\n\n### Connect vinyl player to the Raspberry Pi\n\nStart of by connecting the USB from Behringer U-PHONE UFO202 to the Raspberry Pi.\n\n![installer_11](./images/installer_11.png)\n\nThen connect the red and white RCA cable from the vinyl player to the equivalent **input** on the Behringer U-PHONE UFO202. Red to input red, white to input white.\n\n![installer_12](./images/installer_12.png)\n\nFinally, connect the power cable to the Raspberry Pi.\n\n![installer_13](./images/installer_13.png)\n\n### Point the Sonos speakers to the vinyl stream\n\nMake sure that you have the following apps installed on your phone:\n\n* Sonos\n* TuneIn Radio\n\nBoth can be found in the App store. Also make sure that your Sonos system is properly set up and that you can control your speakers from the Sonos app.\n\nSorry about the language in the upcoming images. I wasn't able to change the language in my app from German to English.\n\nOpening the TuneIn Radio app, where you need to start off by set up a free account.\n\n![installer_14](./images/installer_14.png)\n\nAfter you've created an account and logged in, click on `LIBRARY` (`BIBLIOTHEK` in the print screen).\n\n![installer_15](./images/installer_15.png)\n\nClick on `Custom URL` (`Benutzerdefinierte URL`)\n\n![installer_16](./images/installer_16.png)\n\nWrite the custom streaming url, http://raspberrypi.local:8000/rapi.mp3, and then click on it.\n\n![installer_17](./images/installer_17.png)\n\nYou will now see your vinal stream starting in the app. If you have a record playing on the vinyl, you should hear music streaming from the phone.\n\nClick on the heart symbol to add it as a favorite. Write whatever name you want to give it.\n\n![installer_18](./images/installer_18.png)\n\n![installer_19](./images/installer_19.png)\n\nYou should now see the stream visible under the `LIBRARY` tab.\n\n![installer_20](./images/installer_20.png)\n\nNow it's time to move to the Sonos app. Open the app and click on the plus under `Your services` (or similarly named, it's `Deine Dienste` in German).\n\n![installer_21](./images/installer_21.png)\n\nSearch for `TuneIn` and click on `TuneIn (New)`.\n\n![installer_22](./images/installer_22.png)\n\nAdd `TuneIn` to your Sonos app, by clicking on `Add to sonos` (or similarly named) and then `Authorize`.\n\n![installer_23](./images/installer_23.png)\n\n![installer_24](./images/installer_24.png)\n\nLog in with your TuneIn account.\n\n![installer_25](./images/installer_25.png)\n\nYou should now see `TuneIn` under `Your services`.\n\n![installer_26](./images/installer_26.png)\n\nAfter clicking on it, you will see the previously favourited stream.\n\n![installer_27](./images/installer_27.png)\n\nClick on it, click play and choose the Sonos speakers you want to stream to. You are now fully set up and should hear your vinyl streaming to your speakers!\n\n![installer_28](./images/installer_28.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxvfischer%2Fsonos-streaming","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxvfischer%2Fsonos-streaming","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxvfischer%2Fsonos-streaming/lists"}