M5Stack Atom Speaker Kit

Hi,
I just reconfigured a m5stack Atom with the default “Media Player” template from the official webpage: Ready-Made Projects — ESPHome (Media Player > m5 stack)

Setup is OK (despite the compilation warnings wrt deprecated fastLED components –I got rid of the warnings by replacing the “light” section, cf. below)

Anyway, I can’t get any sound played out of the Echo device… only got instead some kind of white noise, letting me suspect that the sound can’t be properly decoded or sthg??

Eventually, i am loading this config on the Atom device:

substitutions:
  name: esphome-web-b87824-b87824
  friendly_name: M5Stack Atom Speaker Kit b87824
# packages:
#   m5stack.atom-speaker-kit: github://esphome/firmware/media-player/m5stack-atom-speaker-kit.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

esp32:
  board: m5stack-atom
  framework:
    type: arduino

api:
  encryption:
    key: !secret esp32_pico_echo_key

ota:
  
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  use_address: !secret esp32_pico_echo_ip
  domain: !secret domain

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: !secret wifi_fb_ssid
    password: !secret wifi_fb_password

web_server:
  port: !secret port

# # Enable logging
logger:
#   logs:
#     component: DEBUG

captive_portal:

improv_serial:

i2s_audio:
  i2s_lrclk_pin: GPIO21
  i2s_bclk_pin: GPIO22

media_player:
  - platform: i2s_audio
    id: media_out
    name: m5stack
    dac_type: external
    i2s_dout_pin: GPIO25
    mode: mono

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO39
      inverted: true
    name: Button
    on_click:
      - media_player.toggle: media_out
    on_press:
      then:
        - homeassistant.service:
            service: tts.google_translate_say
            data:
              entity_id: media_player.ipad
              message: !lambda |-
                return "this is a test";
        - homeassistant.service:
            service: tts.google_translate_say
            data:
              entity_id: media_player.esphome_web_b87824_b87824_m5stack
              message: !lambda |-
                return "this is a test, this is a test, this is a test";
        - light.toggle: ws2812b_led_strip


# light:
#   - platform: fastled_clockless
#     name: None
#     pin: GPIO27
#     chipset: SK6812
#     num_leds: 1
#     rgb_order: grb

light:
  - platform: esp32_rmt_led_strip         # Define a programable light for the onboard led
    rgb_order: GRB
    pin: GPIO27                           # Onboard LED PIN
    num_leds: 1
    rmt_channel: 0
    chipset: SK6812
    name: "Onboard LED"
    id: ws2812b_led_strip

When pressing the onboard button:

  • ‘media_player.ipad’ is properly playing the "this is a test’ sentence (so no issue with DNS routing, etc…)
  • but no sound on the Atom Echo device (or rather: some white/noisy sound)

Also: trying to play a wave file directly from HA service (developer tools > Services), give me the same outcome:

  • ok on the ipad
  • nok on the Atom device
 data:
   media_content_id: https://file-examples.com/storage/fe17d655216606dd89d5226/2017/11/file_example_WAV_1MG.wav
   media_content_type: audio/wav
 target:
   # entity_id: media_player.ipad
   entity_id: media_player.esphome_web_b87824_b87824_m5stack

my conclusion: mp3 format/codec can’t be the root cause.

Since I am pretty sure it was working fine “before” (well, actually: quote: "it’s playin’! " :wink: ), are you guys aware of any recent changes in ESP IDF / Arduino / ESP Home, about this? and is there a mitigation already ?

1 Like

When I try to output sound on the U055 speaker my M5StickC glitches, I think because the Display and Speaker consume too much power (despite being plugged into USB).

Have you seen this problem before?
If I turn off the display the speaker SEEMS to work.