Code doesn't update to ESP

Haha I don’t know either. Do you know what the error means? I only happens when I upload the code. When I afterwards power cycle it it is back online. To me it maybe looks like something is wrong with the esp, but im just a noob trying to get it working😅

To me it looks like the new code was never accepted, and it is still at the original code (hence the name scr_485 complete with all switches, buttons and sensors…)
It should reflect the new name esphome-web-4a92b8

Hey Aceindy, thanks for your answer. The photo I used was something of the internet to demonstrate what I am seeing in the browser when I type in the ip adres. The name is the same as my code. I can make a photo of that later. I have tried it to erase the esp and start from 0 again. The first bit everthing goes fine. In home assistant the esp gets discovered. But when I then upload my code it says: upload succesfull. And after that the log shows te message that I posted above earlier.

Have you tried flashing it using the usb port instead of OTA?

Yeah, tried that (using uart). Same result

That’s not the way to debug problems.
Anyway give it a try with pin 18 instead of 15 for the switch.
And follow the log that it confirms successful upload…

Hi Karosm,
sorry, I am new to the forum, and sometimes I don’t know how to explain things clearly to others here.

either way, Today I tried it again. first I did what you said. but it gave the same problem. after that I used the esphome web website, and selected “Prepare for first use” to just start over again. when that was finished and I typed in the IP of the esp I came to this screen:

when I then go to home assistant I saw that the esp was discovered. so I clicked: Take Control. after that I uploaded this code to it :

esphome:
  name: esphome-web-4a92b8
  friendly_name: ESPHome Web 4a92b8
  min_version: 2024.11.0
  name_add_mac_suffix: false

esp32:
  board: esp32dev
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:

# Allow Over-The-Air updates
ota:
- platform: esphome

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

so there are no sensors and no outputs in this code right?
when I then uploaded the code I was still prompted with this message when I check the log of the ESP32:

hope this clarifies it a bit.