#M5 Stack Atom Echo installation
1 messages ยท Page 1 of 1 (latest)
cool ๐
I didn't copy paste the ecryption key.....so I'm re-flashing it now ๐
but I'll make sure not to change its name before I finished the whole thing this time
ok no probs ๐คฃ
when you do re-name do it in the config rather than HA as if you update in the future it won't keep the name change in HA and will revert back to what's in the config ๐
sorry my kid woke up and I got to start taking care of him, still vacation here ๐
I just did click install,n copied the encryption key this time...
no probs, i will be about most of the day so catch up when you can ๐
Well, I adopted it, clicked install, and now :
[10:53:21][D][api:102]: Accepted 192.168.3.11
[10:53:21][W][api.connection:092]: : Socket operation failed: BAD_INDICATOR errno=11
[10:53:21][D][api:102]: Accepted 192.168.3.11
[10:53:21][W][api.connection:092]: : Socket operation failed: BAD_INDICATOR errno=11
[10:53:21][D][api:102]: Accepted 192.168.3.11
[10:53:21][W][api.connection:092]: : Socket operation failed: BAD_INDICATOR errno=11
[10:53:22][D][api:102]: Accepted 192.168.3.11
[10:53:22][W][api.connection:092]: : Socket operation failed: BAD_INDICATOR errno=11
[10:54:15][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[10:54:15][D][esp32.preferences:114]: Saving 1 preferences to flash...
[10:54:15][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[10:54:22][D][api:102]: Accepted 192.168.3.11
[10:54:22][W][api.connection:092]: : Socket operation failed: BAD_INDICATOR errno=11
.11 is my HASS instance
ok clear
I had to reconfigure it and give it the encryption key, done through the integration
and now this again :
[10:57:55][E][voice_assistant:806]: Cannot receive audio, buffer is full
[10:57:55][E][voice_assistant:806]: Cannot receive audio, buffer is full
[10:57:55][E][voice_assistant:806]: Cannot receive audio, buffer is full
[10:57:56][E][voice_assistant:806]: Cannot receive audio, buffer is full
[10:57:56][E][voice_assistant:806]: Cannot receive audio, buffer is full
[10:57:57][E][voice_assistant:806]: Cannot receive audio, buffer is full
[10:57:57][E][voice_assistant:806]: Cannot receive audio, buffer is full
[10:57:58][E][voice_assistant:806]: Cannot receive audio, buffer is full
[10:57:58][E][voice_assistant:806]: Cannot receive audio, buffer is full
[10:57:58][E][voice_assistant:806]: Cannot receive audio, buffer is full
seriously.....this device....
try removing the VAD model from the config to see if that helps
but if you are going to output to a different audio device then that should fix that too thinking about it
yeah, I just added the on end section :
on_tts_start:
- light.turn_on:
id: led
blue: 100%
red: 0%
green: 0%
brightness: 100%
effect: none
on_tts_end:
- homeassistant.service:
service: media_player.play_media
data:
entity_id: media_player.airplay_cuisine_2
media_content_id: !lambda 'return x;'
media_content_type: music
announce: "true"
time to re-flash it
I've kept the name from my original code, + the ota and wifi sections
fingers crossed
I wont do it using wireless this time but I will generate the config file and inject it using usb cable
damnit, for whatever reason I can't load my HA content over cloudflared anymore since this morning ๐
there are days like that....
======================== [SUCCESS] Took 1260.57 seconds ========================
it works.....but it ain't playing sound on my airplay speaker
still playing it on the sh*t speaker of the atom itself
I can't see anything in the logs telling me it even tried to play the TTS to that speaker :
in the integration, next to the device click 'configure' and then tick the box to allow service calls
ah, true, I forgot to do that
it works ! I lack the start of the answer though
due to the time needed to connect the speaker
any way to avoid that ?
it's possibly a network delay... if you play something direct to the speaker, for example from HA 'Media' does it also have a delay ?
well as this is an airplay speaker, yep, there will always be a little delay
you could try adding - delay: 500ms to on_tts_end: before the - homeassistant line
but I believe there must be a way to wait for the aiplay speaker to connect before the TTS gets played
yeah a delay could be a good idea, trying this now
on_tts_end:
- delay: 500ms
- homeassistant.service:
service: media_player.play_media
data:
entity_id: media_player.airplay_cuisine
media_content_id: !lambda 'return x;'
media_content_type: music
announce: "true"
you may need to experiment with the delay time
I guess I don't have to re-flash the whole thing each time I'm changing such a setting right ?
or do I ?
because it takes 1200 freaking seconds to compile ๐
you do i'm affraid... but it shouldn't need to do a full recompile
ah and, is there a way to keep the assistant to listen ? re-saying ok nabu each time is a pain in the back that impacts the natural speaking experience
I'd like to keep the microphone open, to have a natural discussion with it, and if no input gets received at all for lets say 2 seconds, then the microphone will go of and the device is waiting for the wakeword again
I'm close to it, really, if I can train the wakeword to be more "frenchie friendly", if I can deal with the delay, and keep it listening to our requests, then this little 13$ device will finally be useable I guess
ooooh, you are so right :
========================= [SUCCESS] Took 49.50 seconds =========================
that's better ๐
AAAAAAH
========================= [SUCCESS] Took 49.50 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of m5stack-atom-echo-a15c28.local
ERROR Error resolving IP address of m5stack-atom-echo-a15c28.local. Is it connected to WiFi?
ERROR (If this error persists, please set a static IP address: https://esphome.io/components/wifi.html#manual-ips)
ERROR Error resolving IP address: Error resolving address with mDNS: Did not respond. Maybe the device is offline., [Errno -5] No address associated with hostname
...
it is now detected as offline in esphom dashboard
restarting it....but what a pain in the back it can be
wait....for whatever reason, it changhed its friendly name in the conf
the ID appears twice now
it is possible yes you could add a switch template, to turn on and off voice_assistant and then use it in an automation, the switch part I can do ... but the rest is not something I have tried.
switch:
- platform: template
id: cont_voice
name: continuous speech
optimistic: true
on_turn_on:
- micro_wake_word.stop
- voice_assistant.start_continuous
on_turn_off:
- micro_wake_word.start
I literally didn't change anything
look at the screenshot ! of course HA ain't connecting to it as it now is considered as another device (the name changed)
thats weird... delete it form the integration and add it back in
yeah, I only added the - delay: 500ms line, installed, and there we go...it's offline
as it is detected as offline in esphome as well, should I remove it from there as well ?
no just the integration
ok I deleted it from the integration, restarted it
and now it asks for the encrytption key again
Can't connect to ESP. Please make sure your YAML file contains an 'api:' line.
did you add the key to the full config ? in the add-on dash
here is my full config : https://pastebin.com/uJif664s
it gets discovered by HA, but for whatever reason, it ain't connecting and doesn't accept the encryption key that I paste from the code
wait, it worked now...
aaaand it ain't playing to my airplay speaker anymore
logs :
INFO Starting log output from m5stack-atom-echo-a15c28.local using esphome API
WARNING Can't connect to ESPHome API for m5stack-atom-echo-a15c28.local: Error resolving IP address: [Errno -5] No address associated with hostname (APIConnectionError)
INFO Trying to connect to m5stack-atom-echo-a15c28.local in the background
remove name_add_mac_suffix: true as that is adding part of the devices mac to the device name whne you change the name
you will need to flash with cable probably and again delete and re-add to the integration ๐
but I can't even flash it anymore :
========================= [SUCCESS] Took 49.55 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of m5stack-atom-echo-a15c28.local
ERROR Error resolving IP address of m5stack-atom-echo-a15c28.local. Is it connected to WiFi?
ERROR (If this error persists, please set a static IP address: https://esphome.io/components/wifi.html#manual-ips)
ERROR Error resolving IP address: Error resolving address with mDNS: Did not respond. Maybe the device is offline., [Errno -5] No address associated with hostname
as the ip address can't be resolved
yeah, I'm flashing it stock, again...
and I will then change the configuration, again
it trys to connect using the mDNS name, but because the name will have changed then it wont connect so have to use a cable ... it will all be stress free once this bits done ๐ (famous last words)
haha yeah I downloaded the bin file
and used esphome web to install it using a cable
fingers crossed
yes, that is the best way
it's back
still, I'm missing the first part of the answers that gets played on the airplay speaker, will try to double the delay, 1 second ain't that much, I rather hear the answer fully
surprisingly, there is no way to "train" the wakeword like you do on other devices (eg: you have to say hey siri like ten times during the initial configuration of the feature on your iphone). I think this would help improve the wakecord detection. Of course, I don't say the atom speaker ain't crap, it probably is
hahaha and now that the wifi works, I change the delay setting, down;load the bin file and : Failed to execute 'open' on 'SerialPort': Failed to open serial port.
have you got another browser tab open thats still connected
aaaah maybe, I have so many tabs open
still these buffer issues : [12:15:49][E][voice_assistant:806]: Cannot receive audio, buffer is full
[12:15:49][E][voice_assistant:806]: Cannot receive audio, buffer is full
[12:15:49][E][voice_assistant:806]: Cannot receive audio, buffer is full
[12:15:49][E][voice_assistant:806]: Cannot receive audio, buffer is full
[12:15:49][E][voice_assistant:806]: Cannot receive audio, buffer is full
[12:15:49][E][voice_assistant:806]: Cannot receive audio, buffer is full
[12:15:49][E][voice_assistant:806]: Cannot receive audio, buffer is full
[12:15:49][E][voice_assistant:806]: Cannot receive audio, buffer is full
[12:15:49][E][voice_assistant:806]: Cannot receive audio, buffer is full
how to completely disable the atom speaker output ?
now airplay seems to play right on time, with 1000ms delay setting
another issue, when it don't detect the ok nabu word :
[12:16:27][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[12:16:48][D][micro_wake_word:162]: The 'okay nabu' model sliding average probability is 0.980 and most recent probability is 0.953
[12:16:48][D][micro_wake_word:331]: Wake word model predicts okay nabu, but VAD model doesn't.
this is repeating quite a lot of times
ok so you can remove the speaker component from the config... but needs other changes too ... as speaker is required for the timer... but there is a way around it.
testing it now, and second time I've asked it something, i got the buffer issue, the speaker plays some white noise, and airplay won't play anything anymore
but... i need to shoot off for a couple of hours ... but we can fix that later if you are about
cool, i'll leave it as it is for now
thank you so much for your help !
this thing ain't the plug and play device we are all waiting for ๐
(and I bought two of these...)
no problem... i'll ping you when i'm back. yes they can be a bit 
Hello sorry to jump in I thought the links below might be helpful, a few months ago I wanted to step away from siri and google, i used those links to create my own version.
https://m.youtube.com/watch?v=o3yZWD_sFIE&pp=ygUXSG9tZWFzc2lzdGFudCBlc3AganVua3k%3D
@meaning i'm back.. can you paste your current config and I will make the adjustments and paste it back, that will be the easiest way ๐
sorry @severe yew yesterday was quite busy for me, I'm here now, thanks for pinging me back !
I updated to 2024.8.x and I eventually lost my voice assistants, see the following forum post I've created : https://community.home-assistant.io/t/this-assistant-cannot-control-your-home-since-2024-8-x/759320
my mobile app still works with assistants though, so I will try to reinstall the atom now
and see if it works or not
as a first step i'll try to get it to work using its own speaker, then lets see how we could achieve the airplay redirection)
no probs... see how you get on ... i am in and around most of the day
flashin it from scratch, again
here we go again, initial setup is done, I installed it, didn't change anything, and it works (I can use it, even if I'm unable to use my assistants using the webui since I updated to 2024.8.1)
but as far as I tested it, playing the answers to an airplay speaker always generated a noticeable lag, I think best thing to do is to figure out a way to add cheap speakers directly to these atom devices
and lets face it, they are not usable due to all these buffer issues, after 2 queries, they start to fail
I've removed the speaker from mine and it works with one of these sat next to it
So it is possible to pimp the speaker lol
I like the name you gave to the project. Makes me think to "atoms for peace", that band thom yorke founded. ๐
I've seen ways to add a mini jack, but one more time, it might be that the other thing I bought, developped by seeeeeed studio, will be better in every aspect
@tall flame that link isnt mine :p i found the yaml file that i used to use ,maybe u can look at it see if it can help https://pastebin.com/GwxbncqL line 120 is for ur mediaplayer, and line 186 u have the timing for continuous chat u might wanna tweak
cool I'll have a look at it, the delay is a must, it is not really useable now
I already got this configred :
on_tts_end:
- homeassistant.service:
service: media_player.play_media
data:
entity_id: media_player.airplay_cuisine
media_content_id: !lambda 'return x;'
media_content_type: music
announce: "true"
but the delay is too long, and the voice starts to play in the middle of an answer
so this :
- timing:
- ON for at least 10s
actually tells the esp to listen again for at least 10 seconds after it announced the TTS ?
also, strangely, the default GPIOs my atom is using seems to be different from yours
that timing is for when u have continous chat it means when u activate it u have atleast 10sec before it stops and then use the wakeword
and changing the i2s_dout_pin: GPIO22 to i2s_dout_pin: GPIO21 in the speaker: section stops the Atom Echo internal speaker from playing
yes ! that's it ! changing the gpio seemed to be the right thing to to to stop the speaker to play in parallel. thanks for the confirmation. I had a very very challenging set of days off (3 diners in a row, 3 hungovers), but I will dig this all back on monday I guess.
the biggest challenge will still be that, when I'm playing the answers on any of my airplay speakers, they usually start in the middle of the answer. So, lets say the sentence that the TTS "answers" is "the sun will shine today and the maximum temperature will be 25 degrees", the speaker will actually play something like "today and the maximum temperature will be 25 degrees"
I need to figure out how to make sure the TTS "waits" for the airplay speaker to be fully connected and ready before it starts the playback of the TTS
if i was u if u havent flashed the yaml file into the atom yet , i would do that first bcs i dont have problem with the responses i hear everything no delay