Transforming a Raspberry Pi Into a Media Hub

This open source project transforms a Raspberry Pi and a display into a dedicated Sonos controller and weather station.

A Raspberry Pi-powered media hub (📷: Adam Spain)

Not every electronics project needs to have a lengthy bill of materials and complex circuit design. Sometimes the most useful and interesting builds have just a few parts. Consider all the things that you can do with nothing more than a single-board computer and a display, for instance.

Adam Spain is an engineer who used this combination of components to create a media center and weather dashboard. It is not a particularly complex build, but it is the sort of thing that is going to get used every day. That's more than we can say about most of our projects, which tend to find their way into the spare parts bin almost as soon as the build is complete.

The media hub doubles as a weather station (📷: Adam Spain)

Spain’s project runs on a Raspberry Pi 4 paired with a 7.9-inch LCD panel. The screen primarily shows what is currently playing on a Sonos system, including artist name, track title, and album artwork. A dynamic background color extracted from the artwork gives the interface a polished look that feels closer to a commercial product than a weekend hack.

At preset times, the display automatically switches to a weather dashboard powered by the OpenWeather API, providing a quick forecast at a glance. The screen can also sleep and wake depending on playback activity and schedule, making it blend naturally into daily routines rather than becoming another always-on distraction.

On the software front, Spain assembled a collection of locally hosted services, including a Sonos HTTP API, a custom Spotify “add current track” microservice, and web interfaces built with Vue and React. Together, they allow users to control speakers, group rooms, adjust volume, and skip tracks through simple iOS shortcuts—effectively replacing the official Sonos app for common tasks.

The "Now Playing" screen (📷: Adam Spain)

One particularly clever feature is the ability to add the currently playing song to a Spotify playlist with a single tap while automatically preventing duplicates. Presets can also trigger multiple actions at once, such as grouping rooms and starting a shuffled playlist at a preset volume.

The entire project is open source and designed to run autonomously using system services that start at boot. If you want to try it out for yourself, the source code and installation instructions are available on GitHub.

nickbild

R&D, creativity, and building the next big thing you never knew you wanted are my specialties.

Latest Articles