I did install this using few several methods: using preinstaller from web, using manual yaml etc… there is no media player service endpoint created for it.
this my latest config from m5stack.yaml after adoption:
substitutions:
name: m5stack
packages:
m5stack.atom-echo: github://esphome/media-players/m5stack-atom-echo.yaml@main
esphome:
name: ${name}
name_add_mac_suffix: false
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Hi,
Probably , you have already sort this out but here it goes for anyone still looking for:
media_player:
- platform: i2s_audio
id: media_out
name: None
dac_type: external
i2s_dout_pin: GPIO22
mode: mono
This is an issue I am currently having. As I am new to Home Assistant I am fumbling my way around and learning. That said, I have no idea where this code is supposed to go. Can someone enlighten me, please?
@freedombeard I would say it goes into your ESPhome YAML code, which you can edit in the ESPHome dashboard by clicking “Edit” next to the device name
Ah, that was a major part of my problem; I hadn’t installed ESPhome. Home Assistant had automatically added the Atom Echos it found.
So, now I’ve installed ESPhome and added the device. My yaml file looks exactly like OP’s now. I can now add the above media_player code from @miguelromao but I get this error: “This feature is only available with frameworks [‘arduino’].”
My assumption is that media_player is already defined in (and copied/installed to the device itself):
If so, how do I call it in an automation? So far as Home Assistant is concerned a media_player.m5stack-atom-echo-xxxx does not exist. I can manually type it in (replacing - with _) and the automation runs without error. But, it does not actually play the text to speech phrase I’ve told it to (via PiperTTS.)
I added the following to my atom echo esphome configuration and the media player now shows up and works.
Can you paste the YAML code please. Makes it easier to copy/try out.
Just add this to your existing esphome yaml configuration and install it on the atom echo.
esp32:
board: m5stack-atom
framework:
type: arduino
media_player:
platform: i2s_audio
id: media_out
name: None
dac_type: external
i2s_dout_pin: GPIO22
mode: mono