I bought 8 pcs of the ESP32-C3 plugs. I need to enable MQTT in order to control these directly from Octoprint (to turn on/off 3D printers on demand). This worked successfully in ESPHome 2024.09 (although the storage use was high). With 2024.10 it seems the image has increased in size, so this is no longer possible:
INFO ESPHome 2024.10.0
INFO Reading configuration /config/esphome/athom-smart-plug-v3-50b32c.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing athom-smart-plug-v3-50b32c (board: esp32-c3-devkitm-1; framework: arduino; platform: platformio/espressif32@5.4.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
- toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.4
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.6
|-- ArduinoJson @ 6.18.5
|-- Improv @ 1.2.4
RAM: [== ] 17.5% (used 57452 bytes from 327680 bytes)
Flash: [==========] 99.2% (used 1820216 bytes from 1835008 bytes)
========================= [SUCCESS] Took 11.46 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 10.5.86.32
INFO Uploading /data/build/athom-smart-plug-v3-50b32c/.pioenvs/athom-smart-plug-v3-50b32c/firmware.bin (1835120 bytes)
ERROR Error binary size: Error: The OTA partition on the ESP is too small. ESPHome needs to resize this partition, please flash over USB.
So now I need to slim it down a bit. I'm thinking Improv is pulling in the entire BLE stack and could be omitted, but I can't see how to do it without disregarding the entire default configuration file. Are there any other options than doing that? Other suggestions on how to reduce the image size?
Commenting out the "Improv" section indeed was quite effective:
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 Dependency Graph |-- AsyncTCP-esphome @ 2.1.4 |-- WiFi @ 2.0.0 |-- FS @ 2.0.0 |-- Update @ 2.0.0 |-- ESPAsyncWebServer-esphome @ 3.2.2 |-- DNSServer @ 2.0.0 |-- ESPmDNS @ 2.0.0 |-- noise-c @ 0.1.6 |-- ArduinoJson @ 6.18.5 RAM: [= ] 11.6% (used 37876 bytes from 327680 bytes) Flash: [======= ] 65.9% (used 1209490 bytes from 1835008 bytes)
I'll also try the suggestions from support to see if I can make room for it again. Haven't tried using improv yet.