Preambula. Feel free to skip.
I started looking into Music Assistant (MASS) several months ago. The paradigm of having all music - and all players - in single place is brilliant, and MASS went pretty far to make it convenient and easy to setup.
We love music in our home, but we’re not audiophiles of any kind, so words “Bluetooth”, MP3 320kbps" and “Spotify on Alexa Echo” don’t make us feel dizzy. We used Alexa to listen music from Spotify.
However, lately i got rid of all Alexa devices in our home, moving all-hands-down to HA Assist. Somewhere in the middle of that process i realized, that Assist satellites and actual music players will have to be different devices (at least on current stage). Also, selling our Echoes and Dots left us without half dozen of decent (to my ear) speakers. So in parallel to creating Assist satellites, i started to think on robust and reproducible solution to MASS satellite players.
Something (like GoogleCast enabled speakers) was easy, something (like old Samsung DA-E750) required more attention. I tried Moode, and it was decent, but took whole Raspberry Pi, which hit my frugality pretty strong.
Then i found Squeezelite port for ESP32 chips, and it was the thing!
After several attemts to build enclosed speaker with 3D-printed enclosure, i gave up. PLA isn’t great for acoustic chambers, and my skills in this area are far from even average. So i started lazily looking into something i can retrofit. Some day, browsing IKEA (we love their ice cream), i stumbled on “new price on VAPPEBY”, bought one, broke it in attempt to disassemble, and bought several more after.Here’s what i’ve done to them.
This small project is using IKEA VAPPEBY Bluetooth speaker for enclosure and speaker part, replacing its internals with DIY Squeezelite based player. It will be able to play music from Music Assistant, and also work as dedicated player in Spotify app.
Parts list:
- IKEA VAPPEBY
- Seeed Studio XIAO ESP32S3 chip (any S3 or WROVER with PSRAM would do, but this one is neat)
- MAX98357 DAC (Aliexpress, or Amazon)
- simple 6x6 mm normally-open button like this
- (highly recommended) some better antenna for ESP32, the one it’s coming with is pretty meh. I use these
- access to 3D-printer, if you want it to look good
- isopropyl alcohol, wires, soldering iron, led, flux etc.
Step 1: Disassemble
The disassembly process isn’t hard.
First, soak front part (with the mesh) in isopropyl alcohol. It will loose adhesive, holding the square with mesh to the enclosure. I just added thin layer of alcohol into the flat plate, and placed the speaker face down for couple minutes.
Then, use razor blade or any other thin instrument to carefully pry the angle of mesh square up. After that, use any flat instrument to pry it open completely.
After that is done, you’ll see 4 screw holes (don’t confuse them with speaker screws, we don’t need to remove that). Use Philips screwdriver for them, and open the enclosure carefully.
You will see internals. Unplug speaker from the board, pull the battery (it’s not attached there and held by friction), and pull the board itself. Take the small rubber ellipse from USB port - we’ll need it. Feel free to reuse battery or board elsewhere, we don’t need them.
Step 2: Hardware
a) Cradle
To place all internals in same places they were, i created simple cradle in Onshape. It aligns USB port of ESP32 board with corresponding hole in enclosure, and the button with rubber button cap.
You can see/fork/change the cradle here on Onshape, or just grab STL from Thingiverse.
I recommend printing vertically, with supports enaboled only for bottom part of button slot. The part is small enough to give troubles with supports removal.
After printing, you may need to sand the cradle down a bit in the places it is touching the enclosure. Try inserting it into the place and see if it fits. It should be pretty hard to take out, i use pliers for that.
b) Cables and pins
Solder wires to the ESP32 board. Do not solder them to anything else yet!
I used D8, D9 and D10 (also you’ll need 5V and GND) for DAC connection, and D7 (also 3V3) for the button. I’m aware that usually buttons are using GND+pin schema, but didn’t want to solder 2 wires to GND on ESP32, as i wanted it to be as flat as possible. Also i chose pins on one side of the board, to leave more room for antenna connector.
You may see that i used some connectors there - thought it might be useful in the future for disassembling. If using something like that, make sure that they will fit into ESP32 cradle opening, and be advised that button slot doesn’t allow for connector to come through, so solder wires to the button first, then place the button in the slot, and then put the connector on.
c) Assembly
Place ESP32 (wires first) into cradle. It should snap to the end, and leave USB port sticking.
Put the rubber ellipse on the USB slot. It will help USB port alignment in the future.
Solder cables to the DAC and button. It doesn’t matter which pins you use on DAC, just make sure that 5V and GND are connected correctly, and LRC, BCLK and DIN pins are connected to the ESP32 pins. I used following pinout:
LRC → D10 → GPIO09
BCLK → D9 → GPIO08
DIN → D8 → GPIO07
GND → GND
VIN → 5V
Place the button into the slot. Push it hard, make sure its metal part sticks just a bit above the slot surface.
Solder its pins to D7(GPIO44) and 3V3.
Insert the cradle to the slots in the enclosure. Make sure that USB port is aligned, and button is clicking properly.
Cut off the socket on the speaker wire, and solder red wire to DAC “+”, and black one - to “-”.
You can use some header pins to make that connection serviceable. I did so - but in general it’s recommended to directly solder everything audio-related, and avoid long cables.
Do not assemble the speaker completely - we still have some work to do!
Step 3: Installing software
As the support for S3 is still experimental, we will use Louder S3 variant from this awesome fork by Andriy Malyshenko (aka anabolyc) and Sonocotta.
Pull out the cradle from enclosure, and pull the ESP chip from cradle far enough to see the buttons beside USB slot.
Head to the web installer, and choose Louder-ESP32-S3.
Now, the flashing process will be the same as for any web-flasher for ESP32.
Don’t forget to connect the antenna to antenna slot on ESP32.
Press and hold BOOT button on ESP (it’s teeny-tiny, but you will definitely feel the click), connect USB cable, press “Connect to device”, choose your device from list, release BOOT button.
Then choose “Install louder-esp32” and “Erase device”.
In few minutes it’ll be done.
Next, re-plug USB to ESP board, and use this instructions on Squeezelite repository to connect the board to WiFi.
After it’s done, reboot ESP and open its IP in browser.
Step 4: Configuration
On device page, there’s just couple things we need to do. Bear with me, be patient and cautious.
First, open tab “System”:
-
Enter the device name and save by clicking the button in corresponding section.
-
Tick “Spotify (cspot)” (if you use Spotify), untick Bluetooth (it doesn’t work so far on S3) and Airplay (i didn’t try it, maybe it actually works, but i have no info on that, and seemingly it’s Airplay 1 protocol).
-
Set Telnet option to “Disabled”. This is crucial, as it might lead to boot loop, if you don’t.
-
Save this section.
Next, on tab “Hardware”, under DAC options section:
- make sure DAC Model name is “I2S”
- set Clock GPIO to GPIO value of pin that BCLK DAC pin is soldered to. In my example, it’s D9 (GPIO08), so i put “8”
- set Word Select GPIO to GPIO value of pin that LRC DAC pin is soldered to. In my example, it’s D10 (GPIO09), so i put “9”
- set Data GPIO to GPIO value of pin that DIN DAC pin is soldered to. In my example, it’s D8 (GPIO07), so i put “7”
- Save this section.
No other changes on this tab, just save this section.
And finally, we need to configure our button.
For this, go to tab “NVS Editor”. If it’s not visible, go to tab “Credits” and switch “Show NVS Editor” on.
Be very careful on this tab, it contains raw config.
We need to make two actions.
First, on the very bottom of the page, find the row with “new key” and “new value” hints.
Put “button” as key, and following string as value:
[{"gpio":44,"type":"BUTTON_HIGH","pull":true,"long_press":1000,"normal":{"pressed":"ACTRLS_TOGGLE"},"longpress":{"pressed":"ACTRLS_NEXT"}}]
(replace "gpio":44
with your GPIO, which has button on it)
This will add config for play/pause on short click, and next song on long click. You may prepare your own config with instructions here.
Hit “Commit” button.
Next, find in list option with key “actrls_config” (it should be empty) and put word button
in there. It will set our button config to the controls array.
Press “Commit” button again.
After all this is done, on the bottom press button “Exit recovery”. This will reboot device, and launch all services.
Now you can check it’s working:
-
Head to Music Assistant, and add Squeezelite player provider, if you don’t have it yet. Your player should pop up in available list right away. If it doesn’t, reboot ESP chip. Choose it and play something.
-
If you use Spotify, launch app, go to players list and choose your new player there. Try playing any audio.
Step 5: Final assembly
Hooray, it’s working! Now it’s time to put it into the enclosure.
- Insert cradle into fittings.
- Place antenna somewhere in the corner. (Hint: after placing it and right before closing the lid, press antenna connector firmly, i had it unplugged several times, which led to loosing WiFi, which is bummer, if you already put everything together.)
- Put the DAC inside carefully. You can use 3M tape or hot glue to place it fixed, but i just threw it inside, it’s fine.
- Close the lid with speaker.
- Before screwing it down, attach power and check that it’s working and everything went good.
- Screw that four screws down
- Reattach the sticky mesh cover.
Congratulations! You’ve done it! Now find a good place for it, and enjoy!
Plans and possible improvements
- LED could be placed inside, to have the device status visible, but for now i guess it’s good enough.
- That same setup can be flashed with ESPHome, making it Home Assistant player instead of Squeezelite.
- Also, by screwing some hole and placing the microphone to it could make it Voice Satellite. However, newer XMOS-based microphone solutions seem to be superior, and they’re too big for such a small enclosure. UDA1334 mics are ok, but showing very poor noise suppression, so i won’t use that for satellites so far.
Hope you will enjoy this little device as much as i do.