Atom M5Stack ESPHome 2024.6.6 OTA update problem

I’ve updated ESPHome to 2024.6.6 but when trying to install the update to my Atom M5Stack I am getting an error that I need help with.

I previously updated ESPHome to a different 2024.6.x version and had added the below per the new guidelines:

ota:
  platform: esphome

With this newest update I am getting the following error:

Component update.http_request requires ‘platform: http_request’ in component ‘ota’.

With this error I changed the code above to the following:

ota:
  platform: http_request

After trying to install this I now get the following error:

ERROR Cannot upload Over the Air as the ota configuration is not present or does not include platform: esphome

I’ve read through the documentation as best I know and can’t figure out what I’m doing wrong.

Anyone have any advice?

try (notice the - )

ota:
  - platform: esphome

I just tried that and it was able to proceed further but ultimately ended up with a different error:

/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: missing --end-group; added as last command line option
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/m5stack-atom-echo-30ea40/src/main.o:(.literal._Z5setupv+0x48): undefined reference to `vtable for esphome::ESPHomeOTAComponent'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/m5stack-atom-echo-30ea40/src/main.o:(.literal._Z5setupv+0x48c): undefined reference to `esphome::ESPHomeOTAComponent::set_port(unsigned short)'
/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/m5stack-atom-echo-30ea40/src/main.o: in function `esphome::http_request::OtaHttpRequestComponent* esphome::Application::register_component<esphome::http_request::OtaHttpRequestComponent>(esphome::http_request::OtaHttpRequestComponent*)':
/data/build/m5stack-atom-echo-30ea40/src/esphome/core/application.h:191: undefined reference to `esphome::ESPHomeOTAComponent::set_port(unsigned short)'
collect2: error: ld returned 1 exit status
*** [.pioenvs/m5stack-atom-echo-30ea40/firmware.elf] Error 1
========================= [FAILED] Took 107.59 seconds =========================

Please show the full code.

Here is the full code on the device:

substitutions:
  name: m5stack-atom-echo-xxxx
  friendly_name: M5 Echo - Doug Office
packages:
  m5stack.atom-echo-voice-assistant: github://esphome/firmware/voice-assistant/m5stack-atom-echo.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
api:
  encryption:
    key: hidden


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

ota:
  - platform: esphome

And here is the full message I am getting when trying to update:

INFO ESPHome 2024.6.6
INFO Reading configuration /config/esphome/m5stack-atom-echo-xxxx.yaml…
INFO Updating https://github.com/esphome/esphome.git@pull/5230/head
INFO Updating https://github.com/jesserockz/esphome-components.git@None
WARNING Found and merged multiple configurations for ota platform esphome port(s) [3232]
INFO Generating C++ source…
INFO Updating https://github.com/espressif/[email protected]
INFO Updating submodules (components/esp-sr, components/esp-adf-libs) for https://github.com/espressif/[email protected]
INFO Updating https://github.com/espressif/[email protected]
INFO Compiling app…
Processing m5stack-atom-echo-30ea40 (board: m5stack-atom; framework: espidf; platform: platformio/[email protected])


HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash

  • framework-espidf @ 3.40407.0 (4.4.7)
  • tool-cmake @ 3.16.9
  • tool-ninja @ 1.10.2
  • toolchain-esp32ulp @ 2.35.0-20220830
  • toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
    Reading CMake configuration…
    Dependency Graph
    |-- noise-c @ 0.1.4
    |-- ArduinoJson @ 6.18.5
    |-- Improv @ 1.2.3
    Linking .pioenvs/m5stack-atom-echo-30ea40/firmware.elf
    /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/…/lib/gcc/xtensa-esp32-elf/8.4.0/…/…/…/…/xtensa-esp32-elf/bin/ld: missing --end-group; added as last command line option
    /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/…/lib/gcc/xtensa-esp32-elf/8.4.0/…/…/…/…/xtensa-esp32-elf/bin/ld: .pioenvs/m5stack-atom-echo-xxxx/src/main.o:(.literal._Z5setupv+0x48): undefined reference to vtable for esphome::ESPHomeOTAComponent' /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/m5stack-atom-echo-xxxx/src/main.o:(.literal._Z5setupv+0x48c): undefined reference to esphome::ESPHomeOTAComponent::set_port(unsigned short)’
    /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/…/lib/gcc/xtensa-esp32-elf/8.4.0/…/…/…/…/xtensa-esp32-elf/bin/ld: .pioenvs/m5stack-atom-echo-xxx/src/main.o: in function esphome::http_request::OtaHttpRequestComponent* esphome::Application::register_component<esphome::http_request::OtaHttpRequestComponent>(esphome::http_request::OtaHttpRequestComponent*)': /data/build/m5stack-atom-echo-xxxx/src/esphome/core/application.h:191: undefined reference to esphome::ESPHomeOTAComponent::set_port(unsigned short)’
    collect2: error: ld returned 1 exit status
    *** [.pioenvs/m5stack-atom-echo-xxxx/firmware.elf] Error 1
    ========================= [FAILED] Took 112.04 seconds =========================

Great tip: the dash before “platform: esphome” worked for me !

Thank you.

I have the same issue. Interestingly, removing both the OTA and UPDATE sections results in the exact same error - I assume they’re pulled in from the linked file in the repository.