I have recently set up an Atom Lite with the speaker kit attached, which I’m using as a basic media player for ambient sounds while working (think rain sounds, etc).
I’ve noted that it will only play one media source/file, and to play something else requires a reboot of the device, e.g. (testing with Media function in HA)
- Plug the device in
- Start playing a media file, plays ok
- Pause, play, pause, play, etc on that file, plays ok
- Start playing a different media file, doesn’t play
- Try playing the first media file again, doesn’t play
- Reboot the device
- Repeat from 2 above
I’m running on current versions of all components, and using the default “build” provided by the “ready made project” option on ESPHome, with a vanilla config:
Config
substitutions:
name: m5stack-atom-speaker-kit-315bd0
friendly_name: Study Atom Speaker 315bd0
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}
api:
encryption:
key: <snip>
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
fast_connect: true
Log entries for versions
[12:19:09][I][app:102]: ESPHome version 2024.2.2 compiled on Mar 6 2024, 11:26:22
[12:19:09][I][app:104]: Project m5stack.atom-speaker-kit version 1.0
Log entries for testing…
[12:19:27][D][media_player:059]: 'Study Atom Speaker 315bd0' - Setting
[12:19:27][D][media_player:066]: Media URL: http://a.b.c.d:8123/media/local/BlueyMedia/rain-and-thunder-16705.mp3?authSig=<snip>
[12:19:28][W][component:214]: Component i2s_audio.media_player took a long time for an operation (0.54 s).
[12:19:28][W][component:215]: Components should block for at most 20-30ms.
[12:19:47][D][media_player:059]: 'Study Atom Speaker 315bd0' - Setting
[12:19:47][D][media_player:063]: Command: PAUSE
[12:19:53][D][media_player:059]: 'Study Atom Speaker 315bd0' - Setting
[12:19:53][D][media_player:063]: Command: PLAY
[12:20:01][D][media_player:059]: 'Study Atom Speaker 315bd0' - Setting
[12:20:01][D][media_player:063]: Command: PAUSE
[12:20:05][D][media_player:059]: 'Study Atom Speaker 315bd0' - Setting
[12:20:05][D][media_player:066]: Media URL: http://a.b.c.d:8123/media/local/BlueyMedia/birds-in-the-morning-24147.mp3?authSig=<snip>
[12:20:15][D][media_player:059]: 'Study Atom Speaker 315bd0' - Setting
[12:20:15][D][media_player:063]: Command: PLAY
[12:20:25][D][media_player:059]: 'Study Atom Speaker 315bd0' - Setting
[12:20:25][D][media_player:063]: Command: PLAY
Tests timestamped 12:19:27 through 12:20:01 are successful (first file, 2&3 above).
Tests timestamped 12:20:05 through 12:20:25 fail (second file, 4 above).
Any idea here? I presume that it should be possible to switch back and forth between media files/streams without rebooting?