[SOLVED] ERROR Uploading YAML via OTA: [Errno 104]

Operating environment/Installation (Hass.io/Docker/pip/etc.)

  • HA on Docker

ESP (ESP32/ESP8266, Board/Sonoff)

  • ESP8266EX (ESP-01)

Affected component

  • ESPHome OTA

Description of problem

  • ERROR Uploading YAML via OTA: [Errno 104] Connection reset by peer
  • Tried two different modules, same result. Tried with Wemos D1, worked fine.

Problem-relevant YAML-configuration entries

esphome:
  name: esp01_am2320
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: ""
  password: ""

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Test Am2320 Fallback Hotspot"
    password: ""

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

i2c:
  sda: 0
  scl: 2
  scan: True
  
sensor:
  - platform: am2320
    temperature:
      name: "Living Room Temperature"
    humidity:
      name: "Living Room Humidity"
    update_interval: 10s

Logs (if applicable)

INFO Reading configuration /config/esphome/test_am2320.yaml...
INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d /config/esphome/esp01_am2320
Processing esp01_am2320 (board: esp01_1m; framework: arduino; platform: [email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.2
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncWebServer-esphome> 1.2.6
|   |-- <ESPAsyncTCP-esphome> 1.2.2
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <Wire> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
Compiling /data/esp01_am2320/.pioenvs/esp01_am2320/src/main.cpp.o
Linking /data/esp01_am2320/.pioenvs/esp01_am2320/firmware.elf
Building /data/esp01_am2320/.pioenvs/esp01_am2320/firmware.bin
Retrieving maximum program size /data/esp01_am2320/.pioenvs/esp01_am2320/firmware.elf
Checking size /data/esp01_am2320/.pioenvs/esp01_am2320/firmware.elf
DATA:    [=====     ]  45.0% (used 36888 bytes from 81920 bytes)
PROGRAM: [====      ]  39.8% (used 407556 bytes from 1023984 bytes)
Creating BIN file "/data/esp01_am2320/.pioenvs/esp01_am2320/firmware.bin" using "/data/esp01_am2320/.pioenvs/esp01_am2320/firmware.elf"
========================= [SUCCESS] Took 18.70 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of esp01_am2320.local
INFO Address in use when adding 192.168.1.50 to multicast group, it is expected to happen on some systems
INFO  -> 192.168.1.175
INFO Uploading /data/esp01_am2320/.pioenvs/esp01_am2320/firmware.bin (411712 bytes)
Uploading: [=                                                           ] 2% 
ERROR Error sending data: [Errno 104] Connection reset by peer

Solved: ESP does not have enough space to store OTA file