Skip to content

M5 Atom Echo - crash on Announce #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
brettmiller opened this issue Feb 21, 2025 · 33 comments
Open

M5 Atom Echo - crash on Announce #71

brettmiller opened this issue Feb 21, 2025 · 33 comments

Comments

@brettmiller
Copy link

After #60 the Atom Echoes crash when Announcing.

[D][media_player:086]:  Announcement: yes
[D][voice_assistant:506]: State changed from IDLE to STREAMING_RESPONSE
[D][voice_assistant:512]: Desired state set to STREAMING_RESPONSE
[D][light:036]: 'M5Stack Atom Echo 80472c' Setting:
[D][light:051]:   Brightness: 100%
[D][light:059]:   Red: 0%, Green: 0%, Blue: 100%
[D][speaker_media_player:420]: State changed to ANNOUNCING

[23:01:14]***ERROR*** A stack overflow in task ann_read has been detected.
[23:01:14]
[23:01:14]
[23:01:14]Backtrace: 0x400833ed:0x3ffe4a70 0x4008ce89:0x3ffe4a90 0x4009022d:0x3ffe4ab0 0x4008ebb5:0x3ffe4b30 0x4008cf84:0x3ffe4b60 0x4008cf36:0x3ffb4210 0x733ffffc:0x00000000 |<-CORRUPTED
[23:01:14]
[23:01:14]
[23:01:14]
[23:01:14]
[23:01:15]ELF file SHA256: 05d7e199ca7540d4
[23:01:15]
[23:01:15]Rebooting...

I've test two Echoes, one setup with esphome locally with a yaml that includes w/ a remote_package and another setup via the ready made project on the esphome.io website. Both have the issue. Per comments on the PR it seems others are have this issue as well.

@awaldram
Copy link

awaldram commented Feb 21, 2025

Full cycle from boot to

  1. OK Nabu
  2. Whats the time
  3. Time found and ready to speak 'wav'
  4. start Media player 'announce'
  5. full hard crash
  6. rebooting
  7. ready to crash again ::

Checked that the URL is correct and it plays in my browser without issue (using correct duckdns url not xxx'd out).
Checked tls certificate is valid and working correctly .


[D][esp-idf:000][update_task]: I (18690) esp-x509-crt-bundle: Certificate validated

[D][update:011][update_task]: 'Firmware' - Publishing:
[D][update:012][update_task]:   Current Version: 25.2.1
[D][update:015][update_task]:   Latest Version: 25.2.1
[D][update:018][update_task]:   Firmware URL: https://firmware.esphome.io/wake-word-voice-assistant/m5stack-atom-echo/25.2.1/m5stack-atom-echo-esp32.ota.bin
[D][update:021][update_task]:   Title: m5stack.atom-echo-wake-word-voice-assistant
[D][update:023][update_task]:   Summary: ## What's Changed
[09:28:51]* Bump esphome/workflows from 2024.11.1 to 2024.11.3 by @dependabot in https://github.com/esphome/wake-word-voice-assistants/pull/37
[09:28:51]* Bump esphome/workflows from 2024.11.3 to 2024.12.0 by @dependabot in https://github.com/esphome/wake-word-voice-assistants/pull/40
[09:28:51]* Bump esphome/workflows from 2024.12.0 to 2025.1.0 by @dependabot in https://github.com/esphome/wake-word-voice-assistants/pull/55
[09:31:51]* define esp-idf version to 4
[D][update:026][update_task]:   Release URL: https://github.com/esphome/wake-word-voice-assistants/releases/tag/25.2.1
[D][api:103]: Accepted 192.168.0.10
[W][component:170]: Component api cleared Warning flag
[D][api.connection:1446]: Home Assistant 2025.2.4 (192.168.0.10): Connected successfully
[W][micro_wake_word:183]: Wake word is already stopped
[D][light:036]: 'M5Stack Atom Echo 9f6754' Setting:
[D][light:051]:   Brightness: 60%
[D][light:059]:   Red: 100%, Green: 89%, Blue: 71%
[D][ring_buffer:034]: Created ring buffer with size 2048
[D][micro_wake_word:399]: Resetting buffers and probabilities
[D][micro_wake_word:195]: State changed from IDLE to START_MICROPHONE
[W][component:237]: Component script took a long time for an operation (61 ms).
[W][component:238]: Components should block for at most 30 ms.
[D][micro_wake_word:107]: Starting Microphone
[D][micro_wake_word:195]: State changed from START_MICROPHONE to STARTING_MICROPHONE
[D][esp-idf:000]: I (31705) I2S: DMA Malloc info, datalen=blocksize=1024, dma_buf_count=4

[D][micro_wake_word:195]: State changed from STARTING_MICROPHONE to DETECTING_WAKE_WORD
[I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[D][esp32.preferences:114]: Saving 1 preferences to flash...
[D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[D][micro_wake_word:162]: The 'Okay Nabu' model sliding average probability is 0.980 and most recent probability is 1.000
[D][micro_wake_word:123]: Wake Word 'Okay Nabu' Detected
[D][micro_wake_word:195]: State changed from DETECTING_WAKE_WORD to STOP_MICROPHONE
[D][micro_wake_word:129]: Stopping Microphone
[D][micro_wake_word:195]: State changed from STOP_MICROPHONE to STOPPING_MICROPHONE
[D][esp-idf:000]: I (197191) I2S: DMA queue destroyed

[D][micro_wake_word:195]: State changed from STOPPING_MICROPHONE to IDLE
[D][voice_assistant:506]: State changed from IDLE to START_MICROPHONE
[D][voice_assistant:512]: Desired state set to START_PIPELINE
[D][voice_assistant:223]: Starting Microphone
[D][ring_buffer:034]: Created ring buffer with size 16384
[D][voice_assistant:506]: State changed from START_MICROPHONE to STARTING_MICROPHONE
[D][esp-idf:000]: I (197243) I2S: DMA Malloc info, datalen=blocksize=1024, dma_buf_count=4

[D][voice_assistant:506]: State changed from STARTING_MICROPHONE to START_PIPELINE
[D][voice_assistant:277]: Requesting start...
[D][voice_assistant:506]: State changed from START_PIPELINE to STARTING_PIPELINE
[D][voice_assistant:527]: Client started, streaming microphone
[D][voice_assistant:506]: State changed from STARTING_PIPELINE to STREAMING_MICROPHONE
[D][voice_assistant:512]: Desired state set to STREAMING_MICROPHONE
[D][voice_assistant:642]: Event Type: 1
[D][voice_assistant:645]: Assist Pipeline running
[D][voice_assistant:642]: Event Type: 3
[D][voice_assistant:656]: STT started
[D][light:036]: 'M5Stack Atom Echo 9f6754' Setting:
[D][light:059]:   Red: 0%, Green: 0%, Blue: 100%
[D][light:109]:   Effect: 'Slow Pulse'
[D][voice_assistant:642]: Event Type: 11
[D][voice_assistant:805]: Starting STT by VAD
[D][voice_assistant:642]: Event Type: 12
[D][voice_assistant:809]: STT by VAD end
[D][voice_assistant:506]: State changed from STREAMING_MICROPHONE to STOP_MICROPHONE
[D][voice_assistant:512]: Desired state set to AWAITING_RESPONSE
[D][voice_assistant:506]: State changed from STOP_MICROPHONE to STOPPING_MICROPHONE
[D][light:036]: 'M5Stack Atom Echo 9f6754' Setting:
[D][light:059]:   Red: 0%, Green: 0%, Blue: 100%
[D][light:109]:   Effect: 'Fast Pulse'
[D][esp-idf:000]: I (200020) I2S: DMA queue destroyed

[D][voice_assistant:506]: State changed from STOPPING_MICROPHONE to AWAITING_RESPONSE
[D][voice_assistant:642]: Event Type: 4
[D][voice_assistant:670]: Speech recognised as: " What time is it?"
[D][voice_assistant:642]: Event Type: 5
[D][voice_assistant:675]: Intent started
[D][voice_assistant:642]: Event Type: 6
[D][voice_assistant:642]: Event Type: 7
[D][voice_assistant:698]: Response: "9:31 AM"
[D][light:036]: 'M5Stack Atom Echo 9f6754' Setting:
[D][light:051]:   Brightness: 100%
[D][light:059]:   Red: 0%, Green: 0%, Blue: 100%
[D][light:109]:   Effect: 'None'
[D][voice_assistant:642]: Event Type: 8
[D][voice_assistant:720]: Response URL: "https://xxxxxx.duckdns.org:8123/api/tts_proxy/gZ1IzBF22rwsNc_AvihZHg.wav"
[D][voice_assistant:506]: State changed from AWAITING_RESPONSE to STREAMING_RESPONSE
[D][voice_assistant:512]: Desired state set to STREAMING_RESPONSE
[D][media_player:073]: 'M5Stack Atom Echo 9f6754' - Setting
[D][media_player:080]:   Media URL: https://xxxxxx.duckdns.org:8123/api/tts_proxy/gZ1IzBF22rwsNc_AvihZHg.wav
[D][media_player:086]:  Announcement: yes
[D][light:036]: 'M5Stack Atom Echo 9f6754' Setting:
[D][light:051]:   Brightness: 100%
[D][light:059]:   Red: 0%, Green: 0%, Blue: 100%
[D][speaker_media_player:420]: State changed to ANNOUNCING
[D][voice_assistant:642]: Event Type: 2
[D][voice_assistant:736]: Assist Pipeline ended

[09:31:51]***ERROR*** A stack overflow in task ann_read has been detected.
[09:31:51]
[09:31:52]
[09:31:52]Backtrace: 0x400833ed:0x3ffea860 0x4008ce89:0x3ffea880 0x4009022d:0x3ffea8a0 0x4008eb73:0x3ffea920 0x4008cf84:0x3ffea950 0x4008cf36:0x3ffea924 |<-CORRUPTED
[09:31:52]
[09:31:52]
[09:31:52]
[09:31:52]
[09:31:52]ELF file SHA256: 05d7e199ca7540d4
[09:31:52]
[09:31:52]Rebooting...
[09:31:52]ets Jun  8 2016 00:22:57
[09:31:52]
[09:31:52]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[09:31:52]configsip: 188777542, SPIWP:0xee
[09:31:52]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[09:31:52]mode:DIO, clock div:2
[09:31:52]load:0x3fff0030,len:6652
[09:31:52]ho 0 tail 12 room 4
[09:31:52]load:0x40078000,len:15052
[09:31:52]load:0x40080400,len:3836
[09:31:52]entry 0x4008069c
[09:31:52]I (29) boot: ESP-IDF 4.4.8 2nd stage bootloader
[09:31:52]I (29) boot: compile time 01:43:07
[09:31:52]I (29) boot: Multicore bootloader
[09:31:52]I (33) boot: chip revision: v1.1
[09:31:52]I (37) boot.esp32: SPI Speed      : 40MHz
[09:31:52]I (41) boot.esp32: SPI Mode       : DIO
[09:31:52]I (46) boot.esp32: SPI Flash Size : 4MB
[09:31:52]I (50) boot: Enabling RNG early entropy source...
[09:31:52]I (56) boot: Partition Table:
[09:31:52]I (59) boot: ## Label            Usage          Type ST Offset   Length
[09:31:52]I (67) boot:  0 otadata          OTA data         01 00 00009000 00002000
[09:31:52]I (74) boot:  1 phy_init         RF data          01 01 0000b000 00001000
[09:31:52]I (81) boot:  2 app0             OTA app          00 10 00010000 001c0000
[09:31:52]I (89) boot:  3 app1             OTA app          00 11 001d0000 001c0000
[09:31:52]I (96) boot:  4 nvs              WiFi data        01 02 00390000 0006d000
[09:31:52]I (104) boot: End of partition table
[09:31:52]I (108) esp_image: segment 0: paddr=001d0020 vaddr=3f400020 size=5bcfch (376060) map
[09:31:52]I (253) esp_image: segment 1: paddr=0022bd24 vaddr=3ffb0000 size=033cch ( 13260) load
[09:31:52]I (258) esp_image: segment 2: paddr=0022f0f8 vaddr=40080000 size=00f20h (  3872) load
[09:31:52]I (260) esp_image: segment 3: paddr=00230020 vaddr=400d0020 size=ecdcch (970188) map
[09:31:52]I (618) esp_image: segment 4: paddr=0031cdf4 vaddr=40080f20 size=17bdch ( 97244) load
[09:31:52]I (670) boot: Loaded app from partition at offset 0x1d0000
[09:31:52]I (670) boot: Disabling RNG early entropy source...
[09:31:52]I (682) cpu_start: Multicore app
[09:31:52]I (682) psram: This chip is ESP32-PICO
[09:31:52]E (682) psram: PSRAM ID read error: 0xffffffff
[09:31:52]E (684) spiram: SPI RAM enabled but initialization failed. Bailing out.
[09:31:52]I (691) cpu_start: Failed to init external RAM; continuing without it.
[09:31:52]I (698) cpu_start: Pro cpu up.
[09:31:52]I (702) cpu_start: Starting app cpu, entry point is 0x400828c0
[09:31:52]I (694) cpu_start: App cpu up.
[09:31:52]I (724) cpu_start: Pro cpu start user code
[09:31:52]I (724) cpu_start: cpu freq: 160000000
[09:31:52]I (724) cpu_start: Application information:
[09:31:52]I (729) cpu_start: Project name:     m5stack-atom-echo
[09:31:52]I (735) cpu_start: App version:      2025.2.0
[09:31:52]I (740) cpu_start: Compile time:     Feb 20 2025 03:18:41
[09:31:52]I (746) cpu_start: ELF file SHA256:  05d7e199ca7540d4...
[09:31:52]I (752) cpu_start: ESP-IDF:          4.4.8
[09:31:52]I (756) cpu_start: Min chip rev:     v0.0
[09:31:52]I (761) cpu_start: Max chip rev:     v3.99 
[09:31:52]I (766) cpu_start: Chip rev:         v1.1
[09:31:52]I (771) heap_init: Initializing. RAM available for dynamic allocation:
[09:31:52]I (778) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
[09:31:52]I (784) heap_init: At 3FFB7DD8 len 00028228 (160 KiB): DRAM
[09:31:52]I (790) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
[09:31:52]I (797) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
[09:31:52]I (803) heap_init: At 40098AFC len 00007504 (29 KiB): IRAM
[09:31:52]I (811) spi_flash: detected chip: gd
[09:31:52]I (814) spi_flash: flash io: dio
[09:31:52]I (819) cpu_start: Starting scheduler on PRO CPU.
[09:31:52]I (0) cpu_start: Starting scheduler on APP CPU.
[09:32:04][I][logger:171]: Log initialized
[C][safe_mode:079]: There have been 0 suspected unsuccessful boot attempts
[D][esp32.preferences:114]: Saving 1 preferences to flash...
[D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[I][app:029]: Running through setup()...
[C][esp32_rmt_led_strip:025]: Setting up ESP32 LED Strip...
[D][template.select:014]: Setting up Template Select
[D][template.select:023]: State from initial (could not load stored index): On device
[D][select:015]: 'Wake word engine location': Sending state On device (index 1)
[D][esp-idf:000]: I (275) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 

[D][binary_sensor:034]: 'Button': Sending initial state OFF
[C][light:021]: Setting up light 'M5Stack Atom Echo 9f6754'...
[D][light:036]: 'M5Stack Atom Echo 9f6754' Setting:
[D][light:041]:   Color mode: RGB
[D][template.switch:046]:   Restored state ON
[D][switch:012]: 'Use listen light' Turning ON.
[D][switch:055]: 'Use listen light': Sending state ON
[D][light:036]: 'M5Stack Atom Echo 9f6754' Setting:
[D][light:047]:   State: ON
[D][light:051]:   Brightness: 60%
[D][light:059]:   Red: 100%, Green: 89%, Blue: 71%
[D][template.switch:046]:   Restored state OFF
[D][switch:016]: 'timer_ringing' Turning OFF.
[D][switch:055]: 'timer_ringing': Sending state OFF
[D][media_player:073]: 'M5Stack Atom Echo 9f6754' - Setting
[D][media_player:077]:   Command: REPEAT_OFF
[D][media_player:086]:  Announcement: yes
[D][media_player:073]: 'M5Stack Atom Echo 9f6754' - Setting
[D][media_player:077]:   Command: STOP
[D][media_player:086]:  Announcement: yes
[C][i2s_audio:028]: Setting up I2S Audio...

@slackerbob
Copy link

slackerbob commented Feb 21, 2025

I can confirm the same thing:

[07:11:37][D][media_player:073]: 'Echo Assistant - Bathroom a02af0' - Setting
[07:11:37][D][media_player:080]:   Media URL: https://redacted/api/tts_proxy/5k8-zfpo3ncbRhHG1uqCpg.wav
[07:11:37][D][media_player:086]:  Announcement: yes
[07:11:37][D][voice_assistant:506]: State changed from IDLE to STREAMING_RESPONSE
[07:11:37][D][voice_assistant:512]: Desired state set to STREAMING_RESPONSE
[07:11:37][D][micro_wake_word:195]: State changed from DETECTING_WAKE_WORD to STOP_MICROPHONE
[07:11:37][D][light:036]: 'Echo Assistant - Bathroom a02af0' Setting:
[07:11:37][D][light:047]:   State: OFF
[07:11:37][D][light:036]: 'Echo Assistant - Bathroom a02af0' Setting:
[07:11:37][D][light:047]:   State: ON
[07:11:37][D][light:051]:   Brightness: 100%
[07:11:37][D][light:059]:   Red: 0%, Green: 0%, Blue: 100%
[07:11:37][D][speaker_media_player:420]: State changed to ANNOUNCING
[07:11:37][D][micro_wake_word:129]: Stopping Microphone
[07:11:37][D][micro_wake_word:195]: State changed from STOP_MICROPHONE to STOPPING_MICROPHONE
[07:11:37][D][esp-idf:000]: I (185328) I2S: DMA queue destroyed

[07:11:37][D][micro_wake_word:195]: State changed from STOPPING_MICROPHONE to IDLE
WARNING bathroom-assistant-a02af0 @ 192.168.x.y: Connection error occurred: [Errno 104] Connection reset by peer

LED turns blue, then a hard crash/reboot

Edit: I'm noticing that all of the reports, including mine, are using https. I wonder if that's the root of the problem.

@awaldram
Copy link

awaldram commented Feb 21, 2025

Edit: I'm noticing that all of the reports, including mine, are using https. I wonder if that's the root of the problem.

I thought similar but it can't be local setup as I use 'home built' voice assistant running arduino based esphome and re-speaker using IDF neither have any issue with playing from a tls source point.

Adding

http_request:
verify_ssl: false

to the config doesn't help at all

I notice that

My home brew uses mp3 and the respeaker FLAC.

Interestingly the re-speaker uses FLAC due to it low resource usage . probably worthe looking at the re-speaker code from formatBCE as it seems very close to the VA developers code base and does work :)

Here is my home brew running the same sequence as my M5 example above (without crashing) , Yes its seriously under resourced but is only used to run some night sequences from saying 'goodnight' so it only needs to manage 'Done'.

[14:22:58][D][voice_assistant:642]: Event Type: 8
[14:22:58][D][voice_assistant:720]: Response URL: "https://xxxxxx.duckdns.org:8123/api/tts_proxy/iaNFoHG--1_BCncmb0PCfw.mp3"
[14:22:58][D][voice_assistant:506]: State changed from AWAITING_RESPONSE to STREAMING_RESPONSE
[14:22:58][D][voice_assistant:512]: Desired state set to STREAMING_RESPONSE
[14:22:58][D][media_player:073]: 'Player' - Setting
[14:22:58][D][media_player:080]: Media URL: https://xxxxxxx.duckdns.org:8123/api/tts_proxy/iaNFoHG--1_BCncmb0PCfw.mp3
[14:22:58][D][media_player:086]: Announcement: yes
[14:22:58][D][voice_assistant:642]: Event Type: 2
[14:22:58][D][voice_assistant:736]: Assist Pipeline ended
[14:23:00][W][component:237]: Component i2s_audio.media_player took a long time for an operation (2106 ms).
[14:23:01][W][component:238]: Components should block for at most 30 ms.
[14:23:01][D][voice_assistant:506]: State changed from STREAMING_RESPONSE to IDLE
[14:23:01][D][voice_assistant:512]: Desired state set to IDLE
[14:23:01][D][light:036]: 'Light' Setting:
[14:23:01][D][light:047]: State: OFF
[14:23:01][D][light:085]: Transition length: 1.0s
[14:23:03][W][component:237]: Component i2s_audio.media_player took a long time for an operation (371 ms).
[14:23:03][W][component:238]: Components should block for at most 30 ms.
[14:23:03][W][component:237]: Component i2s_audio.media_player took a long time for an operation (368 ms).
[14:23:03][W][component:238]: Components should block for at most 30 ms.

@righteouskill100
Copy link

I am seeing the same thing after the latest update. I can get one response out of it before it crashes and resets itself. any idea how to roll the firmware back?

@awaldram
Copy link

I am seeing the same thing after the latest update. I can get one response out of it before it crashes and resets itself. any idea how to roll the firmware back?

The original project should still be the old build (was yesterday). So restart from the project page.

If not, then in the closed issue m5 won't compile I changed the code to use the speaker rather than media player.

Drop that into you m5 , make any changes needed to localise ( API keys, WiFi etc) and compile.

@neurove
Copy link

neurove commented Feb 23, 2025

I can confirm that the issue only occurs when using https.
My HA setup uses lets encrypt certificates and the M5 Echo reboots on announce.
When I remove the ssl certificates and update the network settings to use http, then announce and the setup wizard works normally.

@tescophil
Copy link

Same this for me, crash on announce

@rubin110
Copy link

rubin110 commented Feb 25, 2025

Just got an M5 Stack Atom Echo, delighted to get it setup, and are hitting the same issue. I've flashed both the bin provided through the ESPHome.io's ready-made projects page, Home Assistant's $13 voice assistant page, and rolling my own.

When I begin the HA "Set up voice assistant" wizard, I get this crash on the device...

12:36:32][C][micro_wake_word:021]:     - VAD Model
[12:36:32][C][micro_wake_word:022]:       Probability cutoff: 0.500
[12:36:32][C][micro_wake_word:023]:       Sliding window size: 5
[12:36:32][D][api:103]: Accepted 10.110.0.1
[12:36:32][W][component:170]: Component api cleared Warning flag
[12:36:32][D][api.connection:1446]: Home Assistant 2025.2.5 (10.110.0.1): Connected successfully
[12:36:35][W][micro_wake_word:183]: Wake word is already stopped
[12:36:36][D][light:036]: 'Sunroom Atom Echo fabe70' Setting:
[12:36:36][D][light:051]:   Brightness: 60%
[12:36:36][D][light:059]:   Red: 100%, Green: 89%, Blue: 71%
[12:36:36][D][ring_buffer:034]: Created ring buffer with size 2048
[12:36:36][D][micro_wake_word:399]: Resetting buffers and probabilities
[12:36:36][D][micro_wake_word:195]: State changed from IDLE to START_MICROPHONE
[12:36:36][W][component:237]: Component script took a long time for an operation (59 ms).
[12:36:36][W][component:238]: Components should block for at most 30 ms.
[12:36:36][D][micro_wake_word:107]: Starting Microphone
[12:36:36][D][micro_wake_word:195]: State changed from START_MICROPHONE to STARTING_MICROPHONE
[12:36:36][D][esp-idf:000]: I (11753) I2S: DMA Malloc info, datalen=blocksize=1024, dma_buf_count=4
[12:36:36]
[12:36:36][D][micro_wake_word:195]: State changed from STARTING_MICROPHONE to DETECTING_WAKE_WORD
[12:37:07][D][light:036]: 'Sunroom Atom Echo fabe70' Setting:
[12:37:07][D][light:051]:   Brightness: 100%
[12:37:07][D][light:059]:   Red: 0%, Green: 0%, Blue: 100%
[12:37:07][D][media_player:073]: 'Sunroom Atom Echo fabe70' - Setting
[12:37:07][D][media_player:080]:   Media URL: https://mixxx.xxxxxxxx.net:8123/api/esphome/ffmpeg_proxy/6fcda7500aaf5821c425ca85fb041202/GhMoXCaiieFJAlPoNTtxRg.wav
[12:37:07][D][media_player:086]:  Announcement: yes
[12:37:07][D][voice_assistant:506]: State changed from IDLE to STREAMING_RESPONSE
[12:37:07][D][voice_assistant:512]: Desired state set to STREAMING_RESPONSE
[12:37:07][D][micro_wake_word:195]: State changed from DETECTING_WAKE_WORD to STOP_MICROPHONE
[12:37:07][D][light:036]: 'Sunroom Atom Echo fabe70' Setting:
[12:37:07][D][light:051]:   Brightness: 60%
[12:37:07][D][light:059]:   Red: 100%, Green: 89%, Blue: 71%
[12:37:07][D][light:036]: 'Sunroom Atom Echo fabe70' Setting:
[12:37:07][D][light:051]:   Brightness: 100%
[12:37:07][D][light:059]:   Red: 0%, Green: 0%, Blue: 100%
[12:37:07][D][speaker_media_player:420]: State changed to ANNOUNCING
[12:37:07][D][micro_wake_word:129]: Stopping Microphone
[12:37:07][D][micro_wake_word:195]: State changed from STOP_MICROPHONE to STOPPING_MICROPHONE
[12:37:07][D][esp-idf:000]: I (43437) I2S: DMA queue destroyed
[12:37:07]
[12:37:07][D][micro_wake_word:195]: State changed from STOPPING_MICROPHONE to IDLE
[12:37:08]
[12:37:08]***ERROR*** A stack overflow in task ann_read has been detected.
[12:37:08]
[12:37:08]
[12:37:08]Backtrace: 0x400833ed:0x3ffefbd0 0x4008ce89:0x3ffefbf0 0x4009022d:0x3ffefc10 0x4008eb73:0x3ffefc90 0x4008cf84:0x3ffefcc0 0x4008cf36:0x3231383a |<-CORRUPTED
[12:37:08]
[12:37:08]
[12:37:08]
[12:37:08]
[12:37:08]ELF file SHA256: dd7172cf900e0e69
[12:37:08]
[12:37:08]Rebooting...
[12:37:08]ets Jun  8 2016 00:22:57
[12:37:08]
[12:37:08]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[12:37:08]configsip: 188777542, SPIWP:0xee
[12:37:08]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[12:37:08]mode:DIO, clock div:2
[12:37:08]load:0x3fff0030,len:6652
[12:37:08]ho 0 tail 12 room 4
[12:37:08]load:0x40078000,len:15052
[12:37:08]load:0x40080400,len:3836
[12:37:08]entry 0x4008069c
[12:37:08]I (29) boot: ESP-IDF 4.4.8 2nd stage bootloader
[12:37:08]I (29) boot: compile time 10:47:21
[12:37:08]I (29) boot: Multicore bootloader
[12:37:08]I (33) boot: chip revision: v1.1

And yes for HA I've set both my internet and local URL through the same https address, as I've got SSL setup in HA and not through a reverse proxy. Via my local DNS server, I've tied the local IP address of my HA machine to the public subdomain I use. Public DNS for the domain of course is tied my upstream internet IP address.

Image

The URL to the wav file downloads and plays just fine via my browser.

Edit: I can also confirm, I don't encounter the crash if I switch HA into HTTP mode.

@HarlemSquirrel
Copy link

Same issue after updating to 2025.2.1

@Taomyn
Copy link

Taomyn commented Feb 26, 2025

I have the same issue, in fact I also reported it here thinking it wasn't the same because I don't experience a crash - the device throws an error because it can't access the WAV file, but nothing else happens. My certificate is generated by a local CA and not a simple self-signed one, was hoping to get the "verify_ssl: false" to work but can't figure out where to place it as every example I have found doesn't get accepted.

@rubin110
Copy link

I should have noted, my cert comes from Let's Encrypt. I tried the M5 Atom Echo media player build from the ready-made projects page, and the device will play WAV files from HA over SSL just fine.

@HarlemSquirrel
Copy link

I am also using Let's Encrypt

@Taomyn
Copy link

Taomyn commented Feb 26, 2025

So for my situation it means that either I need a way to add my CA certificate to the store used so that it's trusted, or for the "verify_ssl: false" to be available so that it ignores the problem. Perhaps then it will be able to read the sound file but then crash out like yours are doing.

@HarlemSquirrel
Copy link

I think you can add a section below where the package is imported to override configs

https://esphome.io/components/http_request.html

Something like this

http_request:
  verify_ssl: false

@Taomyn
Copy link

Taomyn commented Feb 26, 2025

Something like this

http_request:
verify_ssl: false

I tried exactly that with 2025.2.0 and it would not compile, hence why I submitted the issue, but I now tried it again as I wanted to grab the complier error for putting here and would you believe it, the compile worked.

I'm away from device at the moment so I can test actual speech, but I will do so later and report if mine now crashes like is being reported.

@cineafx
Copy link

cineafx commented Feb 26, 2025

http_request:
verify_ssl: false

This seems to fix the issue for me. I just added it at the end of the yaml file and recompiled it. (Using version 2025.2.1 of esphome.)
Thanks!

@Taomyn
Copy link

Taomyn commented Feb 26, 2025

Unfortunately not for me, I still get:

[18:29:46][D][voice_assistant:675]: Intent started
[18:29:46][D][voice_assistant:642]: Event Type: 6
[18:29:46][D][voice_assistant:642]: Event Type: 7
[18:29:46][D][voice_assistant:698]: Response: "Turned off the light"
[18:29:46][D][light:036]: 'M5Stack Atom Echo 31' Setting:
[18:29:46][D][light:051]:   Brightness: 100%
[18:29:46][D][light:059]:   Red: 0%, Green: 0%, Blue: 100%
[18:29:46][D][light:109]:   Effect: 'None'
[18:29:46][D][voice_assistant:642]: Event Type: 8
[18:29:46][D][voice_assistant:720]: Response URL: "https://hass.mydomain.com/api/tts_proxy/WLOXHKib_IBW_oqYMXtc7g.wav"
[18:29:46][D][voice_assistant:506]: State changed from AWAITING_RESPONSE to STREAMING_RESPONSE
[18:29:46][D][voice_assistant:512]: Desired state set to STREAMING_RESPONSE
[18:29:46][D][media_player:073]: 'M5Stack Atom Echo 31' - Setting
[18:29:46][D][media_player:080]:   Media URL: https://hass.mydomain.com/api/tts_proxy/WLOXHKib_IBW_oqYMXtc7g.wav
[18:29:46][D][media_player:086]:  Announcement: yes
[18:29:46][D][light:036]: 'M5Stack Atom Echo 31' Setting:
[18:29:46][D][light:051]:   Brightness: 100%
[18:29:46][D][light:059]:   Red: 0%, Green: 0%, Blue: 100%
[18:29:46][D][speaker_media_player:420]: State changed to ANNOUNCING
[18:29:46][D][voice_assistant:642]: Event Type: 2
[18:29:46][D][voice_assistant:736]: Assist Pipeline ended
[18:29:46][D][esp-idf:000][ann_read]: E (21422) esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x7780

[18:29:46][D][esp-idf:000][ann_read]: E (21429) esp-tls: Failed to open new connection

[18:29:46][D][esp-idf:000][ann_read]: E (21435) TRANSPORT_BASE: Failed to open a new connection

[18:29:46][D][esp-idf:000][ann_read]: E (21445) HTTP_CLIENT: Connection failed, sock < 0

[18:29:46][E][speaker_media_player.pipeline:112]: Media reader encountered an error: ESP_ERR_HTTP_CONNECT

I made sure to clean the build files beforehand just to be sure, and confirmed the WAV could be played from another machine.

logs_m5ae-31_run.txt
m5ae-31.yaml.txt

@josephperry
Copy link

http_request:
verify_ssl: false

This seems to fix the issue for me. I just added it at the end of the yaml file and recompiled it. (Using version 2025.2.1 of esphome.) Thanks!

This also fixed it for me. It wasn't crashing, but there was no voice output until I made this addition.

@Taomyn
Copy link

Taomyn commented Feb 26, 2025

@cineafx @josephperry could you share your yaml file so I can compare it to mine? I must have something else that is blocking the command or it simply doesn't work even with my certificate.

@cineafx
Copy link

cineafx commented Feb 26, 2025

@cineafx @josephperry could you share your yaml file so I can compare it to mine? I must have something else that is blocking the command or it simply doesn't work even with my certificate.

Sure:

substitutions:
  name: m5stack-atom-echo-fde114
  friendly_name: M5Stack Atom Echo fde114
packages:
  m5stack.atom-echo-wake-word-voice-assistant: github://esphome/wake-word-voice-assistants/m5stack-atom-echo/m5stack-atom-echo.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
api:
  encryption:
    key: XXXXXXXX

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

http_request:
  verify_ssl: false

@Taomyn
Copy link

Taomyn commented Feb 26, 2025

Thanks @cineafx pretty much what I have, so it got me thinking about anything else that has recently changed. I recalled updating my proxy server but that made no sense because internally I should be talking directly to my HA server. Appears I'm not, and the change to the proxy included fixing SSL web connections to TLS1.3 - so for the internal proxy I set it to TLS1.2+ and bang, it started working.

So add another limitation: seems it does not support TLS1.3

No crashing but I do now hear the voice response, but it's extremely low volume and barely audible. It was perfectly loud before all the problems, so something else I need to look into now.

@cineafx
Copy link

cineafx commented Feb 26, 2025

but it's extremely low volume and barely audible. It was perfectly loud before all the problems

Due to the new media player usage there is now a volume control:
Image

@Taomyn
Copy link

Taomyn commented Feb 26, 2025

@cineafx you're a superstar, had not spotted that and works a treat. I was recalling this happening when I first got the M5AE last year and was going through old files to see if I had added anything to the yaml at the time.

@brettmiller
Copy link
Author

I was also able to get it working with:

http_request:
  verify_ssl: false

Though, it seems odd because I've got a valid Let's Encrypt TLS cert, so it should verify. My reverse proxy that hosts the cert supports TLSv1.2, so if v1.3 is also an issue I luckily didn't hit that.

@HarlemSquirrel
Copy link

Yeah same here. Even though I have Let's Encrypt certificates, turning off SSL verify worked. This wasn't a problem for me until a recent update.

@shtrom
Copy link

shtrom commented Mar 7, 2025

Another confirmation that disabling TLS verification works as a stopgap with a Let's Encrypt cert and TLS 1.3.

I'd suggest updating the ticket description to make it more specific to this issue.

@tescophil
Copy link

I think you can add a section below where the package is imported to override configs

https://esphome.io/components/http_request.html

Something like this

http_request:
verify_ssl: false

I have this problem on home assistant, forgive my ignorance, but where / which file is this added to exactly? (all my config is via the UI)

@shtrom
Copy link

shtrom commented Mar 7, 2025

I have this problem on home assistant, forgive my ignorance, but where / which file is this added to exactly? (all my config is via the UI)

Are you running the ESPHome dashboard locally?

Image

You should Edit the YAML file, add that at the bottom, and Install again.

I don't think you can change it on the pre-built binaries.

@tescophil
Copy link

No, just via home assistant...., guessed as much,.,, will have to wait for an actual fix to come out.

Thanks.

@bigboban
Copy link

For all with SSL/DNS/HTTP_CLIENT problem - i SOLVED this here: esphome/issues#6807.

@teekennedy
Copy link

teekennedy commented Apr 11, 2025

I got a Home Assistant Voice Preview Edition recently and it's connecting to my Home Assistant over https just fine. Digging into the HAVPE ESPHome config I noticed this line which is highly relevant to the errors we're seeing.

If TLS 1.3 is not enabled by default on esphome that's sure to cause problems. I don't have the time to test this myself right now, but I think if you add

esp32:
  framework:
    sdkconfig_options:
      CONFIG_MBEDTLS_SSL_PROTO_TLS1_3: "y"

to your configuration, it should work without the need to set verify_ssl: false.

@brettmiller
Copy link
Author

brettmiller commented Apr 11, 2025

I tested the CONFIG_MBEDTLS_SSL_PROTO_TLS1_3: "y" setting and it doesn't resolve the issue. It still crashes and doesn't play the announcement audio. I had to go back to using

http_request:
  verify_ssl: false

The issue only seems to be with the Atom Echo. I've never had issues with my ESP32-S3-Box.

@carrot016
Copy link

carrot016 commented Apr 20, 2025

Added this

http_request:
  verify_ssl: false

Updated but still does not work for me.
I'm using DuckyDNS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests