Skip to content

stackzac22/m5stack-echo-pyramid-esphome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

M5Stack Echo Pyramid — ESPHome Voice Satellite (plain AtomS3, no PSRAM)

ESPHome config for an M5Stack Echo Pyramid base running a plain AtomS3 (ESP32-S3, no PSRAM) as a Home Assistant voice satellite, with a custom RGB-LED animation engine, a color status display with a state-reactive skull, and a Kismet security-alert pipeline.

The Echo Pyramid's official ESPHome example targets the AtomS3R (which has PSRAM + on-device wake words). This config makes it work on the cheaper plain AtomS3 with push-to-talk and a few non-obvious memory/streaming fixes (see Gotchas below).

Hardware

  • M5Stack Echo Pyramid base: ES8311 DAC + ES7210 AEC mic array + si5351 MCLK + AW87559 amp, 28× WS2812 RGB LEDs (4 channels × 7) and 2 capacitive touch sliders driven by an onboard STM32G030 co-processor (all on the external I²C bus, SDA=GPIO38 / SCL=GPIO39).
  • M5Stack AtomS3 (plain, no PSRAM) — 0.85" GC9107 LCD on internal SPI.

Features

  • Push-to-talk voice assistant (no PSRAM → no on-device wake word): tap the AtomS3 button to talk.
  • Spoken TTS out the pyramid speaker (Home Assistant Assist pipeline; tested with Google Gemini STT/LLM/TTS).
  • Custom LED animations keyed to state: idle cyan breathe · listening blue comet · thinking amber pulse · speaking green wave · alert red strobe · rainbow. Exposed as a LED Effect select + RGB Brightness number. LED writes are paused during audio playback to avoid bus/current contention.
  • Color status display with a Material Design Icons skull that recolors with the assistant state, a red skull-and-crossbones "KISMET" alert page, and a system page (IP/RSSI/uptime).
  • Touch sliders: left swipe = volume, right swipe = LED brightness.
  • Kismet alert page fed by a Home Assistant input_text helper.

Setup

  1. pip install esphome
  2. cp secrets.yaml.example secrets.yaml and fill in Wi-Fi + generated keys.
  3. First flash over USB: esphome run m5-voice.yaml --device /dev/ttyACM0 (the AtomS3 enumerates as a native USB CDC device, e.g. /dev/ttyACM0).
  4. Adopt in Home Assistant (ESPHome integration), then create/assign an Assist pipeline.
  5. Subsequent flashes are OTA: esphome run m5-voice.yaml --device <name>.local

Gotchas learned the hard way

  • STM32 RGB co-processor clock-stretches hard while driving the WS2812s, so ESPHome I²C write() logs -> FAIL even though the LEDs light. Set i2c: timeout: 10ms and silence the pyramidrgb logger. Touch reads succeed; LED writes "fail"-but-work.
  • Audio out is the hard part on a no-PSRAM board — the streamed-TTS pipeline is sized for PSRAM:
    • media_player: speaker defaults buffer_size to 1 MBESP_ERR_NO_MEM. Set it small (here 72000); too big starves the heap, too small clips long replies.
    • Decode 48 kHz FLAC needs more RAM than 16 kHz (-4 = FLAC_DECODER_ERROR_MEMORY_ALLOCATION); use sample_rate: 16000 to match the speaker (no resample) and shrink the decode buffer.
    • format: WAV breaks the streaming reader (ESP_FAIL); FLAC works.
    • If a reply is larger than buffer_size, the device pauses reading, HA closes the idle HTTP connection, and the reader loops on ESP_FAIL (stuck "playing"). Keep replies short (LLM prompt) or raise the buffer. An AtomS3R (PSRAM) removes the limit.
    • Set wifi: power_save_mode: none and Home Assistant's internal_url to a LAN address the device can route to (not a Tailscale/CGNAT address).
  • mdi.ttf is the Material Design Icons webfont (skull F068C, skull-crossbones F0BC6, radar F0437).

License

Config: MIT. mdi.ttf is redistributed under the SIL Open Font License (Material Design Icons).

About

ESPHome voice satellite for the M5Stack Echo Pyramid on a plain AtomS3 (no PSRAM): push-to-talk voice assistant, custom WS2812 LED animations, skull status display, Kismet alerts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors