Music assistant - esp32 running squeezelite sends music to bluetooth speaker

Hi All,

This is a quick writeup to do exactly what the title says. I wasn’t able to find a full explainer for the whole process, so i’ve had to piece together Github info, reddit info, & HA community info, and am providing it all here in hopes it helps someone interested in the same use case to get through the whole process.

I started this process looking for an open-source version of syncing up speakers in several rooms (like sonos). I’ve used both the ESP32 WROVER (not wroom) for bluetooth speakers and the ESP32 AIS with a headphone out jack (and bluetooth) for various speakers. I’m streaming my own mp3’s from a NAS through the house. (NAS setup, MA setup, etc. not included here, this is just for the esp32 hardware)

Instructions:
install the music assistant add-on to home assistant and purchase an esp32-a1s and/or an esp32wrover
connect usb to uart usb port
flash an esp32-a1s OR esp32 wrover with
squeezelite esp32 installer

follow “software configuration” at the bottom of this page
squeezelite software config

Setup WiFi
Boot the esp, look for a new wifi access point showing up and connect to it. Default build ssid and passwords are “squeezelite”/“squeezelite”.
Once connected, navigate to 192.168.4.1 (if connecting from laptop, it’ll open a new tab automatically)
Wait for the list of access points visible from the device to populate in the web page.
Choose an access point and enter any credential as needed
Once connection is established, note down the address the device received (also in bottom right corner); this is the address you will use to configure it going forward

my own instructions below

optional: set a dhcp reservation for the local IP
go to that address in new browser tab

Under Audio; Set the player name
(I2S Dac radio button should be selected for headphone jack)
(or select bluetooth for a bluetooth speaker)
add the server and NO port to the “audio” tab under “server”
192.168.1.200 is my home assistant / music assistant local IP
save and then apply
at the bottom, there’s a button to exit the recovery mode.

then (for the a1s only), on the “hardware” tab, select “ESP32 A1S V.2. variant 1” and hit save and then apply
the esp will restart. the wroom may need to be restarted more than once

in music assistant, enable “squeezelite slimproto players” in player providers- only need to do this once
the player will now appear in home assistant

for a bluetooth audio output, in audio, select bluetooth radio button, and then at the bottom, click on a device in “bluetooth audio device name” for a dropdown list of available bluetooth devices

for esp wroom i had trouble with the stream quality.
my solution for this aspect (which may be specific to my network)
in home assistant, go to player properties. advanced settings. scroll down to output codec to use for streaming audio to the player
select MP3

2 Likes

Hi, thank you for this writeup. I tried with with my ESP32-WROOM, and after flashing, it never starts up its own Wifi (squeezelite) because it sees no PSRAM. So I’m thinking this doesn’t work on all ESP32-WROOM boards?

Yes, you’re correct. it’s only the ESP32-WROVER boards that will run after flashing. (it explicitly says this on the flashing page, i just mixed them up). I’ll edit my post.

1 Like