Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32-A1S Audio Kit - Sendspin Configuration

ESPHome Music Assistant License: MIT

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.

Features

  • 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

Requirements

  • 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.

Quick Start

1. Clone this repository

git clone https://github.com/el-bakkali/esp32-a1s-sendspin.git
cd esp32-a1s-sendspin

2. Create your secrets file

Copy the example secrets file and fill in your details:

cp secrets.yaml.example secrets.yaml

Edit 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

3. Flash to your device

esphome run esp32-a1s.yaml

Or use the ESPHome Dashboard in Home Assistant.

4. Configure Music Assistant

  1. Install Music Assistant in Home Assistant
  2. Add your ESP32-A1S as a player
  3. The device will appear as "Sendspin Media Player"
  4. Start streaming!

Hardware Pin Configuration

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

DIP Switch Configuration

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.

Troubleshooting

No Audio Output

  1. Check DAC Output setting - DAC Output is automatically set to BOTH on boot. If changed, verify it's set back to BOTH in Home Assistant
  2. Verify AMP Switch - Make sure "AMP Switch" is ON
  3. Check volume - Ensure media player volume is not at minimum
  4. Clear ESPHome cache - Delete .esphome/external_components/ folder and recompile

Compilation Errors

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

Sendspin Player Not Appearing in Music Assistant

  • 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

Connection Issues

  • 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

External Components

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.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • 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

Related Links

About

ESP32-A1S Audio Kit configuration with Sendspin for Music Assistant

Resources

Stars

22 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors