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.3.x or later
- Home Assistant
- Music Assistant 2.7.0 beta 19 or later
⚠️ Important Notice: This configuration relies on external components from unmerged ESPHome pull requests. These PRs are work-in-progress and may change or break at any time as upstream development continues. You will need to update commit references when breaking changes occur. If you prefer a stable, low-maintenance setup, consider waiting until these components are officially merged into an ESPHome stable release. This repo will be updated accordingly when that happens.
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 compilation errors with external components:
- Make sure you are running ESPHome 2026.3.x or later — earlier versions have known mDNS and audio component incompatibilities
- Delete your
.esphome/external_components/cache folder and recompile to clear stale component versions - Since this config uses pinned commit hashes from upstream PRs, updates to those PRs may require new commit references — check this repo for the latest tested config
- Verify your device logs show mDNS registration on boot (look for
[mdns:194]: mDNS:lines) - If running Music Assistant in Docker, it must be in host network mode to receive mDNS broadcasts
- If running as a Home Assistant add-on, mDNS should work automatically
- 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/Commit | Description |
|---|---|---|
| sendspin | PR#14933 | Sendspin protocol |
⚠️ Warning: These are work-in-progress PRs that have not yet been merged into ESPHome stable. The configuration uses pinned commit hashes for reproducibility, but upstream changes may require updates. If you experience issues after an ESPHome update, check this repo for updated references or consider waiting for these components to land in an official ESPHome release.
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