Working with Volumio has been pretty great, but it still lacks one of the primary features of my current audio system: it doesn’t include my local radio stations. Maybe I’m just old, but I like to able to listen to my local stations from time to time. However, tunein.com provides access to pretty much all of my local stations via web radio streams. You would usually need to go to their webpage to listen to the streams, but we can grab those stream URLs from tunein and add them directly to Volumio.
The following resources are used or referenced in this guide:
- Raspberry Pi 3 (this includes all of the accessories necessary to get the Pi running, too)
- Volumio Music Player
- HiFiBerry DAC+ (greatly improves the Raspberry Pi sound quality)
Adding Tunein Web Radio Stations to Volumio
If you have already setup your Raspberry Pi to use Volumio, you may have noticed that the tab for “My Web Radios” has an options menu on the far right. Clicking on that button will give you the ability to add custom radio streams as long as you have the stream’s URL.
A lot of local radio stations (especially small local stations) aren’t going to be interested in streaming their station online. Even those stations that do offer online streaming probably aren’t going out of their way to make the stream URL easily available – instead offering the stream through some player embedded on their website. However, modern websites that are using HTML5’s new audio tag will often list their stream URL as the source for the element. Tunein.com happens to be one of those websites.
If you browse Tunein, find a station (local or otherwise), and view the page source code (on Chrome, the F12 key will get you to the webmaster tools, which includes the option to view the source), you can do a quick search (Ctrl+F) for the audio element and view the URL that is included in the “src” attribute. By copying and pasting this URL into Volumio, you will be able to stream the station directly with Volumio without using any third-party service. There isn’t even any need to sign-up with tunein to view or stream these URLs.
If you have any trouble finding the audio element on the page or getting the URL to work, be sure that you have hit the play button. Tunein uses a default URL when the audio isn’t playing, and that default URL will not point to the stream that you want. Also, if Tunein doesn’t have a direct URL (perhaps because the station doesn’t make it available), then tunein will link you to the station’s flash player or whatever else the station may offer for streaming purposes. These older players will probably not make the stream’s URL available, unfortunately.
Some folks also report that the Raspberry Pi’s audio quality is not ideal. For those folks, adding a DAC (Digital-Analog Converter) to the Raspberry Pi can dramatically improve the small device’s sound quality without breaking the bank.