First non-zigbee device m5stack Atom Echo - please point me in the right direction

So I’ve just gotten a m5stack Atom Echo. I bought after consulting on here and on reddit for a device that can play and also record. The goal is not quality music consumption via streaming platofrms (yet), but ad-hoc playback of announcements and feedback sounds.

I would just like a bit of “signposting” on whether I’m choosing the right direction and get a bit of bearing on the yaml. The thing is that this would be my first adventure into esp32, so I’m a little confused about which yaml goes where and the order of steps (flash, update, install yaml etc).

Based on what I’ve read, it seems there are two paths, either:

  1. The media player route
  2. Music assistant route

I am assuming I need to follow the first path. I am running HA in Hyper-V, so I don’t have direct USB support. I consulted with ChatGPT and it suggested that I install and run:

  • Install the M5Burner software.
  • Install the Arduino IDE (if you need custom firmware later).
  • Install Python (if using ESPHome).

But on the other hand, it seems some things can be done almost directly here: Ready-Made Projects — ESPHome and also a yaml resource here wake-word-voice-assistants/m5stack-atom-echo at main · esphome/wake-word-voice-assistants · GitHub

Thank you!

ESPhome has all the tools you need, please ignore what ChatGPT told you.

If you are using HAOS, then ESPhome is only a few clicks away in the add-on store.

ESPhome is like an integrated development environment for esp devices. It allows you to design and compile custom firmware images simply by writing YAML config files, and provides a dashboard to manage and update your devices over WiFi.

As you noted, lack of usb support means your first firmware install can’t happen via your server. That’s ok, it’s very common, so they have you covered: the esphome web flasher works on any machine with a usb port and a chromium-based browser to flash your device with a basic starter image, which you can then get onto your network and into the IDE to customize.

The basic steps look like this:

  1. Install esphome IDE. There are several ways to do it.
    • Easiest is the HAOS add-on
    • Next easiest is the docker container
    • expert users can install with python / pip commands
  2. Flash your device with its first image. Again, there are multiple ways to do it.
    • use the esphome web flasher on a pc with a usb port and a chromium-based browser
    • use your local esphome dashboard to create a YAML config and compile an image, but download it to your pc and use a flashing tool to install it.
  3. “Adopt” the device in the esphome dashboard, where you can further customize the YAML config which is used to build new firmware images which are then flashed over the air (OTA).
  4. Discover the device in Home Assistant, using the esphome integration, so that the features you created (switches, lights, media players) can be controlled inside HA.

Hi,

Thank you for the prompt response. So I tried a few things and it was definitely a dance of trial and error:

I write somewhat, because I did manage to register the device in the HA, but it’s not registered in the Esphome add-on. More like any other device.

I found two threads here: one stating that (I believe) Esphome add-on configuration doesn’t play well with https through cloudflare and (2) but on the other hand, one can’t interact with the device through the web browser without ssl.

Anyway, long story short… the flashing in the last bullet did work even through Chrome crashed, so my little cube is now online.

I will say I’m curious about your ESPHome - Home Assistant configuration suggestion, now that I understand that it’s also possible to download the config and using a flashing tool. I might return to that. I haven’t found any way for Esphome to adopt an existing device in its current form, despite I know it’s on the network. There are two New Device buttons, but don’t see any discovered devices - but maybe it’s part of that flow?

My current challenge with the current registered device is that there’s quite a lot of reproducible crackling during playback. I play an mp3 placed my HA server. It’s an 128 kbps file of 51KB, so it’s pretty light weight. Would you know what’s the current recommended approach to playback without error? Is it possible to place the file on the device, for example?

Thanks!

Going down the ESPHome path is a bigger personal tinkering investment that just setting up something to do announcements.

And I’m a bit skeptical of the advice you received about the Atom Echo - the speaker volume is not going to be great (I have a few from the early days of HA Voice tinkering).

A common solution for announcements is a Google Nest Mini or Alexa equivalent. Alternatively if you want to speak fairly random things to it, a Home Assistant Voice PE is an option, although more expensive.

Thank you for your input! Yeah, I kind of figured. But I felt I had to test it in some form, just to understand and get inspired about what the HA and esphome combination can do. Even with just a few hours the experiment has been good, I now have a better idea about the Media player commands etc.

By looking at the specifications before I bought one I definitely adjusted my expectations accordingly :smiley: I think it’ll work OK for the first simple use cases, such as a doorbell sound, a confirming bleep based on physical buttons input and such - like very local stuff. But it sure wont reach across the living room, unless just a simple sound.
For the price, I’d consider to get one or two more for the same type of use cases.

I was avoiding Google and Amazon products because it was my understanding that they’re dependent on cloud APIs? Is that still the case? I’d definitely be open if there’s a way to circumvent this by, say, flashing them.

Echo Atom and similar devices and their division of responsibilities speak the most to me: they’re smart enough to take commands (play etc), but all logic (when and what to play) is on the server.

I’d be open to brewing my own esp32 + amp + speaker combo, but i don’t have access to a 3d printer. And without a nice casing the Partner Approval Factor would be low… :slight_smile:

Which of the aforementioned devices do you primarily use now?

Btw, just a note on the choppy playback of the Atom Echo.

I searched for a solution and it seemed a lot of people were experiencing this. Never gave it a thought to research this before buying and it was never mentioned.

When I experience something like this, I do try all types of changes one byone (borderline obsessively) before giving up.

The solution that seems to work so far is counterintuitive:

I initially placed my tiny mp3, first 138KB then shortened to 51KB, on the HA server in the www folder. This made sense to me, as this would keep audio resources together with the HA server, all in one backup.
But there was (almost) always reproducible chopping of the audio.

As a last effort I thought, dang it, why not try and place the audio file on a completely different location? So I placed on my publicly available website.
I ran the audio many times yesterday and again today, the latter to check if I had just been lucky or the echo was performing well because it was warmed up.
In all cases the atom echo played back the audio without any chopping.

Too many parameters changed to conclude what the technical solution really is. I would normally speculate network speed or HA server delivery speed, or that maybe the publicly available file is served with proper cache headers, if it weren’t because of the fact that the file is so small it shouldn’t make any difference at all.

Anyway, for now I’m just happy with lean playback and hope it’ll stay that way for the rest of the use cases I’d like to implement.

Just to follow up on this. Tested Google tts now and yes, you’re absolutely right. Even after setting the media player volume at 100% the loudness of the tts output is just not really audible. I checked if it would be possible to increase the volume on the google side, but I didn’t find anything options I could pass.

I can still see it work OK with pre-made sounds, because I can add gentle distortion and limiting to boost loudness.