The aim of this project was to have music synchronized across multiple speaker sets and rooms in my house. To achieve this I leveraged a piece of open source software called Logitech Media Server (LMS). Formerly distributed with Logitech hardware, it is now open source and has a large user base that keep it and it’s plugins updated. Along with this I used a piece of hardware called ESP32-A1S (along with sets of speakers) as clients for LMS.
The first step was getting LMS running was to get, this was easy as there are several Docker images already available. Once LMS was running, I then needed to get plugins installed for my various media services. In the end I installed the Deezer, TuneIn and BBC plugins. The LMS software simply coordinates sending audio to client devices for playback, as a result the next step is to add some playback devices to the system. To do this I installed SqueezePlay on my laptop and Desktop. I now had two devices in LMS and testing playback resulted in perfectly synced audio (at least to my non-audiophile ears).
The next step was to develop a piece of cheap hardware that could plug into off the shelf PC speaker sets. That’s when I came across https://github.com/sle118/squeezelite-esp32 which at the time supported the ESP32-WROVER chipset combined with a I2S DAC. After testing this chipset along with the firmware I knew this was the path to take. The performance of the ESP32-WROVER was good, the price was good but having to solder the I2S DAC onto the chipset manually wasn’t good.
I did some research and come across the ESP32-A1S, an audio development board with everything onboard that was required. The only issue with the board was that the firmware mentioned above didn’t support it but a short amount of coding latter I had added support for the board and opened a PR against the original code. Wonderful, I now had a $15 chipset that could be added to any set of speakers to convert them to LMS clients hence turning them into smart speakers.
As some of these devices were intended to be wet locations (such as the kitchen), I decided to design a 3D printed case for the board. Once again I got my callipers out of the cupboard and opened up Fusion 360. After I’d finished the design I sent it over the my 3D printer and got the result as shown in this post. I’m fairly happy with the end result and as an added bonus when the ESP32-A1S is plugged in the power light shines through the thin plastic of the case. You can print your own off by downloading the source from https://github.com/thomaspreece/ESP32-A1S_Squeezebox_Case.
The final thing I experimented with was different UIs in LMS. After testing several I found the Material Skin to be the best in my opinion and that is now my default skin. I also found the Squeezer Android app to be quite good for controlling LMS when I can’t be bothered to load up the Web UI.
As a result of this work I now have synchronised smart speakers in my kitchen, living room and bed room all beaming out perfectly synchronised music from my collect, Deezer and Radio. The best part about all of this is that the system is more flexible then Sonos speakers, cost a fraction of what Sonos would of cost and is just as user friendly to use.