A working ESPHome configuration for the AI-Thinker ESP32-A1S Audio Kit with Sendspin protocol support for synchronized multi-room audio playback via Music Assistant.
- ✅ Sendspin Protocol - Synchronized multi-room audio playback
- ✅ ES8388 Audio Codec - High-quality audio DAC/ADC
- ✅ Music Assistant Integration - Stream music from various sources
- ✅ Track Metadata - Display track title, artist, album info
- ✅ Hardware Controls - 6 physical buttons on the board
- ✅ Jack Detection - Automatic headphone jack status
- ✅ Microphone Support - Built-in microphone input
- ✅ LED Control - Onboard status LED
- Hardware: AI-Thinker ESP32-A1S Audio Kit (with ES8388 codec)
- Software:
- ESPHome 2026.1.x or later
- Home Assistant
- Music Assistant 2.7.0 beta 19 or later
git clone https://github.com/el-bakkali/esp32-a1s-sendspin.git
cd esp32-a1s-sendspinCopy the example secrets file and fill in your details:
cp secrets.yaml.example secrets.yamlEdit secrets.yaml with your credentials:
wifi_ssid: "Your-WiFi-Name"
wifi_password: "Your-WiFi-Password"
api_encryption_key: "your-32-character-base64-key"
ota_password: "your-ota-password"
ap_password: "fallback-ap-password"Tip: Generate an API encryption key using:
openssl rand -base64 32
esphome run esp32-a1s.yamlOr use the ESPHome Dashboard in Home Assistant.
- Install Music Assistant in Home Assistant
- Add your ESP32-A1S as a player
- The device will appear as "Sendspin Media Player"
- Start streaming!
| Function | GPIO | Notes |
|---|---|---|
| I2C SDA | GPIO33 | ES8388 control |
| I2C SCL | GPIO32 | ES8388 control |
| I2S LRCLK | GPIO25 | Word select |
| I2S BCLK | GPIO27 | Bit clock |
| I2S MCLK | GPIO0 | Master clock |
| I2S DOUT | GPIO26 | Speaker output |
| I2S DIN | GPIO35 | Microphone input |
| AMP Enable | GPIO21 | Amplifier switch |
| LED | GPIO22 | Red status LED |
| Jack Detect | GPIO39 | Headphone detection |
| Key 1 | GPIO36 | Button |
| Key 2 | GPIO13 | Button |
| Key 3 | GPIO19 | Button |
| Key 4 | GPIO23 | Button |
| Key 5 | GPIO18 | Button |
| Key 6 | GPIO5 | Button |
For the ESP32 Audio Kit V2.2, set the DIP switches as follows:
| Switch | Position | Purpose |
|---|---|---|
| 1 | ON | |
| 2 | ON | |
| 3 | ON | |
| 4 | OFF | |
| 5 | OFF |
Note: Incorrect DIP switch settings can prevent audio output or interfere with flashing/serial communication.
- Check DAC Output setting - DAC Output is automatically set to
BOTHon boot. If changed, verify it's set back toBOTHin Home Assistant - Verify AMP Switch - Make sure "AMP Switch" is ON
- Check volume - Ensure media player volume is not at minimum
- Clear ESPHome cache - Delete
.esphome/external_components/folder and recompile
If you encounter include_builtin_idf_component errors:
- This config uses a specific audio component commit that works with ESPHome 2026.1.x
- Once ESPHome 2026.2.0 is released, the external components can be simplified
- Ensure your WiFi credentials are correct in
secrets.yaml - Check that Music Assistant 2.7.0 beta 19 or later is installed
- Verify the device appears in Home Assistant
This configuration uses several external components from ESPHome pull requests:
| Component | PR | Description |
|---|---|---|
| audio | commit 9148832 | Audio processing |
| mixer | #12253 | Audio mixer |
| resampler | #12254 | Sample rate conversion |
| media_player | #12258 | Media player platform |
| sendspin | #12284 | Sendspin protocol |
| speaker_source | #12429 | Speaker source media player |
Note: These are work-in-progress PRs. Configuration may need updates as they are merged into ESPHome.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- ESPHome team for the amazing platform
- Music Assistant team for Sendspin protocol
- @kahrendt for the Sendspin ESPHome implementation
- The ESPHome community for testing and feedback