Need help with update ESP8266

I have a water level esp devices. It’s online and no problem with log and functionality, but I cant update to lates esphome version. It’s shows this:

esphome:
  name: water-level
  friendly_name: Water Level

esp8266:
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "8fpgm........."

ota:
  password: "86402......."
  platform: esphome


wifi:
  networks:
   - ssid: !secret wifi_ssid
     password: !secret wifi_password
   - ssid: !secret second_wifi_ssid
     password: !secret second_wifi_password
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    #ssid: 
    password: "ORT....."

captive_portal:

binary_sensor:
  - platform: gpio
    pin: D5
    name: "Water Level"
    device_class: moisture
    filters:
    - delayed_on: 10ms
    - delayed_off: 200ms
    - invert:

web_server:
  port: 80

Can someone help me, please to understand what is going on. It’s not a big deal, if I will not update this device, but I would like to know why, to prevent this happened in a future. THANK YOU

Reboot your board.
Ota or Usb?

OTA
I clean the build file, same thing.
Will try to toggle power later on today. TY

I had some devices that failed in attempts to do an OTA update. A couple were not operational after the failed attempt. I also attempted a wired update via the ‘Plug into this computer’ from my desktop, which also failed when I couldn’t get the device to get recognized, regardless of button press before power. I was finally able to get them upgraded via the ‘Plug into the computer running ESPHome Device Builder’ method. That is now my goto method for the initial programming (and failed OTA upgrades), as it has always recognized the device being present.
I have finally learned the lesson, though, if the device is working the way it should, DO NOT UPGRADE, as upgrading just because you can often leads to headaches.

3 Likes

I don’t know where this “Error binary size…” error comes from, but whenever I’ve encountered it, I’ve been able to resolve the problem by briefly disconnecting the power supply, performing a “Clean Build Files”, rebuilding and flashing.

However, I have two ESP8266s, which are operating at near their maximum memory capacity. With every update, I have to check whether they’re still working or not.

A trick has often helped me during flashing. I disconnect them from the power supply and only reconnect it during the linking process, just before flashing. In many cases, this has allowed me to flash the ESP8266s without removing them and flashing them via cable on my PC (the 2025_10_4 ESPHome Version was working at this ESP8266, the 2025_10_5 Version not…).

1 Like

Same here… it happens with (very) recent esphome versions. Method mentioned above works (so far…). A bug in esphome?

1 Like

Thank you, guys, for all your suggestions and explanations. I will keep all this in mind. For some reason, today after I tried again to update , it’s updated without any problem :thinking: