How to make a cheaper Sonos speaker with a Raspberry Pi
How to make a cheaper Sonos speaker with a Raspberry Pi
The Sonos One is on our listing of the best smart speakers for a few reasons: Information technology makes everything sound amazing, and information technology works with dozens of audio streaming services — far more than y'all'd find with the Amazon Repeat, the Google Nest Audio, or the Apple tree HomePod Mini.
However, the Sonos 1 is a fairly pricey $200. But, if you accept a speaker you lot like just lying around, you can plow information technology into an inexpensive Sonos speaker using a Raspberry Pi. Here's how.
How I'thousand using the Raspberry Pi in my smart home
The Raspberry Pi kicked off a revolution, offering makers and tinkerers an cheap single-lath computer that packed a dial. Fast forward to at present and we're on the 4th iteration of the Pi. You can run basically annihilation on it, even Windows (though why you lot would is your own business).
For the longest fourth dimension, I wanted a Raspberry Pi, but I had no idea what I'd do with 1. But as I've expanded the technology in my house, and as I've locked everything downwards, I started having ideas for a Pi. The first project I did was to make a Pi-Hole device, which is basically a network-wide advertizing blocker. If you lot don't want your smart Tv set or streaming stick collecting information on your viewing habits, Pi-Hole is an accented must.
My second Raspberry Pi served as my Home Assistant host. Going into detail most Dwelling house Assistant is exterior the scope of this article, but it'southward basically a home automation and smart dwelling house platform. Simply I quickly learned that my Raspberry Pi 4 wasn't upwardly to the task. So I converted the XDO Pantera Pico I reviewed a while dorsum into my new Home Assistant host and it's been great.
But that left me with a spare Raspberry Pi, sitting in a drawer doing null. That was, until I stumbled on a new project to fill up my free time. Enter balenaSound.
balenaSound: What is information technology?
If the prefix 'balena' sounds familiar, it's probably considering you know the developer's well-nigh pop software, balenaEtcher. This is a flashing tool, perfect for making alive Linux USBs or Raspberry Pi SD cards. It's one of the default recommendations right now since it's cantankerous-platform. Windows, Mac, Linux, it doesn't affair.
Just Etcher isn't the only projection that balena has going on. In fact, there are several others, but one in item defenseless my eye (well, two, merely I digress). This is balenaSound, an audio streamer that supports single- and multi-room layouts. When coupled with a Raspberry Pi, it turns regular sometime speakers into Wi-Fi speakers with multi-room capabilities like Sonos.
It's a Docker container that runs on pinnacle of balenaOS, an operating system designed specifically for deploying Internet of Things (IoT) in containers. To manage your instance of balenaSound (or any other balena IoT project), y'all'll control information technology through the balenaCloud portal. The OS uses the OpenVPN protocol to create a secure connection to your dashboard for deployments and management.
Getting up and running is super easy. You'll walk through the steps of creating a project, customize the OS image, and flash it to your microSD bill of fare. Slap that into your Raspberry Pi, hook upward the speakers, and boom. Y'all accept Wi-Fi speakers that back up AirPlay, Spotify Connect, UPnP and Bluetooth (and there's snapcast support, likewise). In fact, the only affair I wish balenaSound had is Google Bandage. I'd exist more than happy to cover the licensing fee Google charges to turn my speakers into Cast targets.
Keep in mind that with the free tier, y'all're limited to 10 devices on balenaCloud. That should be fine for well-nigh residential purposes.
Assuming y'all have the parts I'll layout below, you tin exist up and running in about x minutes. There are configurations y'all can tinker with, but the basics are quite like shooting fish in a barrel to deploy. Information technology also helps that the documentation for balenaSound is quite solid, so don't exist afraid to practise some reading.
How to brand your own Sonos-like smart speaker using a Raspberry Pi
You will need the following parts to get started:
- Raspberry Pi (3B+ or 4B is best)
- A power supply (check which ane you need for your Pi)
- microSD carte du jour (8GB)
- Speakers
- 3.5mm or RCA sound cables (if using a supported DAC)
Furthermore, you will demand the post-obit software:
- An image author (like balenaEtcher)
- A free balenaCloud business relationship
- Your customized balenaSound image
1. Using the provided link, deploy balenaSound. This volition take you to a fleet cosmos dialog. Alter the name if you wish.
2. Select your device from the Default Device Blazon dropdown card. Use the search part to find it apace.
three. Click Create and deploy.
4. Y'all will meet your new dashboard for the fleet you merely created. To showtime provisioning your Raspberry Pi, click + Add together Device.
5. In the dialog that appears, change your device type if necessary. Leave Bone blazon, version and edition every bit default.
If you programme to connect your Raspberry Pi to Ethernet, click the Flash button to wink with Etcher, or click the arrow and select Download balenaOS to flash it the program of your option.
If you lot want your Raspberry Pi to instead piece of work off of Wi-Fi, click the Wifi + Ethernet radio button. Input your network'south SSID and countersign, and so click the Flash push button.
half-dozen. Insert your microSD into your reckoner. Wink the epitome, either through the Flash button or with the downloaded image file.
7. Eject the microSD card and install it into the Raspberry Pi'south slot (on the underside of the lath).
8. Plug in the ability supply and connect the audio cable to your speakers.
With the bones configuration, you will use the Raspberry Pi's onboard audio via the iii.5mm headphone jack. If you have a DAC hat like the IQAudio DAC Pro, you tin can utilize RCA audio cables.
balenaSound configuration and settings
Out of the box, balenaSound should work as long as y'all have the network settings correct. You lot should run into it appear on your dashboard later the Raspberry Pi boots (this tin can take a few minutes). From here, you can manage the balenaSound instance and control the host.
But you may not necessarily be satisfied with how things are. For me, I didn't like the random target name in Spotify Connect and AirPlay. I wanted to modify it to something different, which requires setting an environs variable.
From the left carte du jour of your balena-sound fleet dashboard, click Variables. Click the blue Add together a variable button. Get out the Service section as All services. In the Name section, type SOUND_DEVICE_NAME. In the Value box, set whatever your want your speaker group to be.
Carry in mind that this is global for the whole fleet. If you take multiple Raspberry Pis and you want them all to exist separate names, go back to the dashboard and click the blue hyperlink with the device's name. Click the Device Variables menu option You'll run across the SOUND_DEVICE_NAME variable here that y'all just set, but then there's an Override button. Click that, and prepare a new proper name for that particular Pi.
In improver to the fleet summary, there's a device summary section where you lot view each device's stats. This is where you lot'll notice the logs, access to the final (over SSH), service status, and the local (and public) IP address.
There are several more variables to play with, similar setting a custom input loopback latency to aid with skipping. I have noticed that at that place'southward a delay with Spotify Connect, just I'grand still playing with my config to run into what I can figure out. And when my DAC hat arrives, at that place are some things I demand to tweak to get balenaSound to play with that properly.
Making my own Sonos alternative
All told, I spent less than $80 on this project. Compare that to the entry-level Sonos One SL, which costs $199. I take two decent speakers running a multi-room server, with the just pain point beingness a lack of Cast back up.
Of course, with the chip shortage, you'll exist hard-pressed to find a Raspberry Pi — my two local Micro Centers are completely sold out. And on the resell market place, they command a pretty penny similar every other piece of tech these days.
I plan to run balenaSound on a separate machine in a Docker container to act as the multi-room master device and have each of my speaker Raspberry Pi groups act as clients. Thankfully, I have a dedicated server that is more than upward to the task (it also handles my Plex server and volition bear the brunt of my next project, Rhasspy).
I don't recall balenaSound is a perfect solution, but it's a work-in-progress. It's not quite every bit plug-and-play as Sonos, but you can choice up excellent standard speakers on Craigslist or Facebook Market and go with this method instead, probable saving money or outdoing what an price-equivalent Sonos can do. (Y'all might even get lucky and score a great deal on some older speakers.) Plus, you become to manage the whole thing and tweak information technology to your liking. You can't say that for Sonos.
When I started out on this project, I had no thought how much fun information technology would be. Now, I significantly upgraded the audio in my part and my Raspberry Pi's DAC chapeau hasn't even arrived all the same. I'one thousand looking forward to hearing the heave in sound quality.
I'm thrilled with how this turned out and I tin't await to deploy more Wi-Fi speakers. When I somewhen get rid of all of my Google Home speakers, I want to have hands streamable music in most rooms. Now I can sit down back and enjoy amend audio quality than what my MacBook Pro speakers or Nest Hub tin can provide.
Source: https://www.tomsguide.com/how-to/raspberry-pi-wifi-speaker
Posted by: smiththeaver.blogspot.com

0 Response to "How to make a cheaper Sonos speaker with a Raspberry Pi"
Post a Comment