ESP32 not change the code

Ciao a tutti giusto per smanettare, sto utilizzando un ESP32 ed un LCD 16X2 con i2c per capirne il funzionamento ed accoppiarlo, in seguito, ad una sonda di temperatura DS18B20, per controllare la temperatura dell’acqua del mipo acquario e creare, eventualmente, delle automazioni con Home Assistant.

Per il solo LCD ho utilizzato questo codice e sul display leggo Hello World !!!

esphome:
  name: lcd-test
  friendly_name: lcd_test

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

 # Enable Home Assistant API
api:
  encryption:
    key: "smzE4PLZrsI0LQ6V4vX1VMXuxpd53BIfnOU7b3uZcm0="

ota:
  - platform: esphome
    password: "4120598964af97c942418f94dc72f6e5"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip: 
    static_ip: 192.168.178.84
    gateway: 192.168.178.1
    subnet: 255.255.255.0
    dns1: 192.168.178.1

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

captive_portal:
i2c:
  sda: GPIO21
  scl: GPIO22
  scan: True

display:
  - platform: lcd_pcf8574
    dimensions: 16x2
    address: 0x3f
    id: lcd
    update_interval: 20s
    lambda: |-
      it.print("Lillo&Rosa");

web_server:
  port: 80 

Il problema è che qualsiasi modifica faccia al codice ed installi quindi, sull’ESP32 il nuovo codice, questo non viene caricato sulla scheda e resta tutto invariato (ad esempio ho cambiato Hello World !!! con Maxi Carota, ma sul display continuo a leggere Hello Word - lo stesso cambiando l’IP statico dell’esp da 192.168.178.84 a 192.168.178.80, ma resta a 84)

Considerate che l’ESP32 fisicamente non è collegato sul raspberry dove gira HA, ma sul PC ed utilizzo l’opzione “Plug on this computer”.

Ciao e grazie.

Hello everyone, just for fun, I’m using an ESP32 and a 16X2 LCD with i2c to understand how it works and to couple it with a DS18B20 temperature probe to control the water temperature in my aquarium and possibly create automations with Home Assistant.

For the LCD alone, I have used this code and on the display I read Hello World !!!

esphome:
  name: lcd-test
  friendly_name: lcd_test

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

 # Enable Home Assistant API
api:
  encryption:
    key: "smzE4PLZrsI0LQ6V4vX1VMXuxpd53BIfnOU7b3uZcm0="

ota:
  - platform: esphome
    password: "4120598964af97c942418f94dc72f6e5"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip: 
    static_ip: 192.168.178.84
    gateway: 192.168.178.1
    subnet: 255.255.255.0
    dns1: 192.168.178.1

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

captive_portal:
i2c:
  sda: GPIO21
  scl: GPIO22
  scan: True

display:
  - platform: lcd_pcf8574
    dimensions: 16x2
    address: 0x3f
    id: lcd
    update_interval: 20s
    lambda: |-
      it.print("Lillo&Rosa");

web_server:
  port: 80 

The problem is that whatever changes I make to the code and then install the new code on the ESP32, it is not loaded on the board and everything remains unchanged (for example, I changed Hello World !!! to Maxi Carrot, but on the display I still read Hello Word - the same when I changed the static IP of the ESP from 192.168.178.84 to 192.168.178.80, but it remains at 84)

Consider that the ESP32 is not physically connected on the raspberry where HA runs, but on the PC and I use the ‘Plug on this computer’ option.

Hello and thank you.

Can you capture the logs from both the compile and when the device is running an d post them?

So you plug your Esp with data cable to your computer and upload.
And what are you getting? Error? What kind of?

Did you use use_address when you did that?

use_address (Optional, string): Manually override what address to use to connect to the ESP. Defaults to auto-generated value. Example, if you have changed your static IP and want to flash OTA to the previously configured IP address

I managed to upload the initial script via EspHome Web and now via wireless I can change the code without any discomfort. The problem seems to be the connection of the ESP32 to the PC, which certainly gives some trouble.
Thanks for your help, very tanks

Logs needed.