Skip to content

Instantly share code, notes, and snippets.

@formatBCE
Last active February 26, 2026 21:57
Show Gist options
  • Select an option

  • Save formatBCE/a1eef482c2a5ed36dfbb22e273ee3d94 to your computer and use it in GitHub Desktop.

Select an option

Save formatBCE/a1eef482c2a5ed36dfbb22e273ee3d94 to your computer and use it in GitHub Desktop.
Sendspin example for ESP32S3 with 2 or 8 MB of PSRAM and DAC (like MAX98357 or UDA1334)
esphome:
name: sendspin-player-1
friendly_name: sendspin-player-1
min_version: 2026.2.0
esp32:
board: esp32-s3-devkitc-1
cpu_frequency: 240MHz
variant: esp32s3
flash_size: 16MB
framework:
type: esp-idf
version: recommended
sdkconfig_options:
CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"
CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB: "y"
CONFIG_SPIRAM_RODATA: "y"
CONFIG_SPIRAM_FETCH_INSTRUCTIONS: "y"
CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST: "y"
CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY: "y"
CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC: "y"
CONFIG_MBEDTLS_SSL_PROTO_TLS1_3: "y"
psram:
mode: octal
speed: 80MHz
ignore_not_found: false
api:
reboot_timeout: 0s # to avoid rebooting without HA
ota:
- platform: esphome
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "Sendspin-Player-1"
password: "HpNtkwZG6iMk"
captive_portal:
network:
enable_ipv6: true
http_request:
light:
- platform: esp32_rmt_led_strip
id: led_esp_onboard
name: LED onboard
disabled_by_default: true
internal: false
rgb_order: GRB
pin: GPIO48
num_leds: 1
rmt_symbols: 192
chipset: ws2812
entity_category: config
default_transition_length: 0s
logger:
level: debug
logs:
wifi: info
api: info
mdns: info
i2s_audio:
- id: i2s_output
i2s_lrclk_pin:
number: 13
allow_other_uses: false
i2s_bclk_pin:
number: 11
allow_other_uses: false
speaker:
# Hardware speaker output
- platform: i2s_audio
id: i2s_audio_speaker
sample_rate: 48000
i2s_mode: primary
i2s_dout_pin: 12
#mute_pin: 10
bits_per_sample: 32bit
i2s_audio_id: i2s_output
dac_type: external
channel: stereo
timeout: never
buffer_duration: 100ms
#audio_dac: aic3204_dac
# Virtual speakers to combine the announcement and media streams together into one output
- platform: mixer
id: mixing_speaker
output_speaker: i2s_audio_speaker
num_channels: 2
task_stack_in_psram: true
source_speakers:
- id: announcement_mixing_input
timeout: never
- id: media_mixing_input
timeout: never
# Virtual speakers to resample each pipelines' audio, if necessary, as the mixer speaker requires the same sample rate
- platform: resampler
id: announcement_resampling_speaker
output_speaker: announcement_mixing_input
sample_rate: 48000
bits_per_sample: 16
- platform: resampler
id: media_resampling_speaker
output_speaker: media_mixing_input
# output_speaker: i2s_audio_speaker
sample_rate: 48000
bits_per_sample: 16
sendspin:
id: sendspin_hub
task_stack_in_psram: true
kalman_process_error: 0.01
media_source:
- platform: sendspin
id: sendspin_source
- platform: http_request
id: http_source
buffer_size: 500000
media_player:
- platform: sendspin
id: sendspin_group_media_player
- platform: speaker_source
id: external_media_player
name: Media Player
announcement_speaker: announcement_resampling_speaker
media_speaker: media_resampling_speaker
announcement_pipeline:
format: FLAC # FLAC is the least processor intensive codec
num_channels: 1 # Stereo audio is unnecessary for announcements
sample_rate: 48000
media_pipeline:
format: FLAC # FLAC is the least processor intensive codec
num_channels: 2
sample_rate: 48000
volume_increment: 0.05
volume_min: 0.4
volume_max: 0.85
sources:
- http_source
- sendspin_source
external_components:
- source:
# https://github.com/esphome/esphome/pull/12256
type: git
url: https://github.com/esphome/esphome
ref: a2d98e1d5e020200db8f3caf27a74a939a661dc4
components: [audio]
- source:
# https://github.com/esphome/esphome/pull/12258
type: git
url: https://github.com/esphome/esphome
ref: b4b7c5b25ebe0f2ab988f700219fa3c57b2377b7
components: [media_player]
- source:
# https://github.com/esphome/esphome/pull/12284
type: git
url: https://github.com/esphome/esphome
ref: d48058e140c98f5c2d902661d851a6b712d62434
components: [sendspin]
- source:
# https://github.com/esphome/esphome/pull/14013
type: git
url: https://github.com/esphome/esphome
ref: 51dcce3d1f22865ebb458a5447bbc877ac946b5a
components: [mdns]
- source:
# https://github.com/esphome/esphome/pull/12429
type: git
url: https://github.com/esphome/esphome
ref: b49b09b6ae56502aa3ce51be86f90d732d019b2c
refresh: 0s
components: [file, http_request, media_source, speaker_source]
button:
- platform: factory_reset
id: factory_reset_button
name: "Factory Reset"
entity_category: diagnostic
internal: true
- platform: restart
id: restart_button
name: "Restart"
entity_category: config
disabled_by_default: true
icon: "mdi:restart"
debug:
update_interval: 5s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment