Most of my ESP32 stopped to work after update to esphome-2024-10-0

Hi all,
Not sure why but most of my ESP32 devices stopped to work.
Thanks for any suggestion?

Hi

Well without any logs neither yaml sketch impossible to help !

Vincèn

an example of logfile and yaml file

INFO ESPHome 2024.10.0
INFO Reading configuration /config/esphome/ld2410-ingresso.yaml...
INFO Starting log output from ld2410-ingresso.local using esphome API
INFO Successfully connected to ld2410-ingresso @ 192.168.1.250 in 10.046s
WARNING Can't connect to ESPHome API for ld2410-ingresso @ 192.168.1.250: Handshake timed out after 30.0s (TimeoutAPIError)
INFO Trying to connect to ld2410-ingresso @ 192.168.1.250 in the background
WARNING ld2410-ingresso @ 192.168.1.250: Connection error occurred: ld2410-ingresso @ 192.168.1.250: Connection lost
INFO Successfully connected to ld2410-ingresso @ 192.168.1.250 in 6.788s
INFO Successful handshake with ld2410-ingresso @ 192.168.1.250 in 6.488s
WARNING ld2410-ingresso @ 192.168.1.250: Connection error occurred: [Errno 104] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for ld2410-ingresso @ 192.168.1.250
WARNING Disconnected from API

The yaml file

substitutions:
  # Set the device name
  name: ld2410-ingresso
  # Set the friendly name
  friendly_name: ld2410 ingresso
  # Provide the wifi SSID
  wifi: !secret wifi_ssid
  #Provide the wifi password
  wifi_pass: !secret wifi_password
  #Provide an OTA password:
  ota_pass: "d5f51f4af1af194556f70bf803220b08"

### No modifications needed below here ###
####################################################################################

esphome:
  name: $name
  friendly_name: $friendly_name
  platformio_options:
    board_build.flash_mode: dio
    board_build.f_cpu: 80000000L
  name_add_mac_suffix: false

wifi:
  ssid: $wifi
  password: $wifi_pass
  power_save_mode: NONE
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "ld2410-ingresso"
    password: "recovery"    
  output_power: 15db

captive_portal:

web_server:
  port: 80

esp32:
  board: lolin_s2_mini
  framework:
    type: esp-idf
  
api:
  encryption:
    key: "thOuA4PpKklT38koJgASlo7EkfznEzvnrVa5I79eaNw="

ota:
  - platform: esphome
    password: $ota_pass

logger:
  level: DEBUG

uart:
  tx_pin: GPIO17
  rx_pin: GPIO16
  baud_rate: 256000
  parity: NONE
  stop_bits: 1

ld2410:

binary_sensor:
  - platform: ld2410
    has_target:
      name: Presence
    has_moving_target:
      name: Moving Target
    has_still_target:
      name: Still Target
    out_pin_presence_status:
      name: Out Pin Presence Status

sensor:
  - platform: ld2410
    light:
      name: Light
    moving_distance:
      name : Moving Distance
    still_distance:
      name: Still Distance
    moving_energy:
      name: Move Energy
    still_energy:
      name: Still Energy
    detection_distance:
      name: Detection Distance
    g0:
      move_energy:
        name: g0 move energy
      still_energy:
        name: g0 still energy
    g1:
      move_energy:
        name: g1 move energy
      still_energy:
        name: g1 still energy
    g2:
      move_energy:
        name: g2 move energy
      still_energy:
        name: g2 still energy
    g3:
      move_energy:
        name: g3 move energy
      still_energy:
        name: g3 still energy
    g4:
      move_energy:
        name: g4 move energy
      still_energy:
        name: g4 still energy
    g5:
      move_energy:
        name: g5 move energy
      still_energy:
        name: g5 still energy
    g6:
      move_energy:
        name: g6 move energy
      still_energy:
        name: g6 still energy
    g7:
      move_energy:
        name: g7 move energy
      still_energy:
        name: g7 still energy
    g8:
      move_energy:
        name: g8 move energy
      still_energy:
        name: g8 still energy
  - platform: internal_temperature
    name: ESP Temperature
    unit_of_measurement: °C
    device_class: TEMPERATURE
    update_interval: 30s
    entity_category: "diagnostic"
  - platform: uptime
    name: Uptime
    id: sys_uptime
    update_interval: 10s
  - platform: wifi_signal 
    name: WiFi RSSI
    id: wifi_signal_db
    update_interval: 30s
    entity_category: "diagnostic"

switch:
  - platform: ld2410
    engineering_mode:
      name: "LD2410 Engineering Mode"
    bluetooth:
      name: "LD2410 Bluetooth"

number:
  - platform: ld2410
    timeout:
      name: Timeout
    light_threshold:
      name: Light Threshold
    max_move_distance_gate:
      name: Max Move Distance Gate
    max_still_distance_gate:
      name: Max Still Distance Gate
    g0:
      move_threshold:
        name: g0 move threshold
      still_threshold:
        name: g0 still threshold
    g1:
      move_threshold:
        name: g1 move threshold
      still_threshold:
        name: g1 still threshold
    g2:
      move_threshold:
        name: g2 move threshold
      still_threshold:
        name: g2 still threshold
    g3:
      move_threshold:
        name: g3 move threshold
      still_threshold:
        name: g3 still threshold
    g4:
      move_threshold:
        name: g4 move threshold
      still_threshold:
        name: g4 still threshold
    g5:
      move_threshold:
        name: g5 move threshold
      still_threshold:
        name: g5 still threshold
    g6:
      move_threshold:
        name: g6 move threshold
      still_threshold:
        name: g6 still threshold
    g7:
      move_threshold:
        name: g7 move threshold
      still_threshold:
        name: g7 still threshold
    g8:
      move_threshold:
        name: g8 move threshold
      still_threshold:
        name: g8 still threshold

button:
  - platform: ld2410
    factory_reset:
      name: "LD2410 Factory Reset"
    restart:
      name: "LD2410 Reboot"
    query_params:
      name: "LD2410 Query Params"
  - platform: restart
    icon: mdi:power-cycle
    name: "ESP Reboot"

text_sensor:
  - platform: ld2410
    version:
      name: "LD2410 Firmware Version"
    mac_address:
      name: "LD2410 MAC Address"

select:
  - platform: ld2410
    distance_resolution:
      name: "Distance Resolution"
    baud_rate:
      name: "Baud Rate"
    light_function:
      name: Light Function
    out_pin_level:
      name: Out Pin Level

light:
  - platform: status_led
    name: sys_status
    pin: 
      number: GPIO15
      inverted: True
    internal: True
    restore_mode: ALWAYS_OFF

Why did you put that in your sketch ?

output_power: 15db

If no real reason remove it !

Are you sure your ESP is not in IP conflict with an other device in your network ?

Please share more of the logs ! as it’s missing the connection/attempt to connect at Wifi !

Hi Vincen,
I will try to remove it but everything was working until yesterday.
I’m now trying to install the version 2024-10-1 but without success.
It is like I don’t have the connection,

Registratore: aioesphomeapi.connection
Fonte: runner.py:189
Prima occorrenza: 13:25:17 (65 occorrenze)
Ultima registrazione: 14:11:43

* ld2410-ingresso-2 @ 192.168.1.229: Connection error occurred: [Errno 104] Connection reset by peer
* ld2410-ingresso @ 192.168.1.250: Connection error occurred: [Errno 104] Connection reset by peer
* ld2410-ingresso-2 @ 192.168.1.229: Connection error occurred: ld2410-ingresso-2 @ 192.168.1.229: EOF received
* sgabuzzino-ld2410 @ 192.168.1.7: Connection error occurred: sgabuzzino-ld2410 @ 192.168.1.7: EOF received
* ld2410-ingresso @ 192.168.1.250: Connection error occurred: ld2410-ingresso @ 192.168.1.250: EOF received

Look here


I’m trying to update it but they are always visible in the update section.
It is like the updating is not occuring

How do you use ESPHome ? because first lines of your logs looks confusing ! Is it the official add-on in HA ?

Hi Vincen,
Yes, it is!

Are the devices connecting to the network? Check your router.

You can try connecting directly via IP and uploading the firmware there.

I have updated manually ( in the ESPHome window) the version and nopw it seems to work correctly

To be honest I don’t know what the problem was but it has been solved with the version 10.1

Unfortunately, I was wrong;
my ESP32s continue to malfunction. I use them for my Human Sensor LD2410, and it’s as if the ESP32s go into hibernation after a period of inactivity.
In fact, at the first intervention, after some time of inactivity, they take a few seconds to respond, but then they are reactive and respond immediately until they go into ‘hibernation’ again."
This behavior started with the 2024-10.0

Try preventing power save?

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  fast_connect: true
  power_save_mode: none

Also, when they go into ‘hibernation’ have you checked your router whether they are still connected or not?

Not able to install the edited yaml file

INFO ESPHome 2024.10.1
INFO Reading configuration /config/esphome/ld2410-ingresso-2.yaml...
WARNING GPIO15 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing ld2410-ingresso-2 (board: esp32dev; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 80MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 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:   [=         ]  13.2% (used 43364 bytes from 327680 bytes)
Flash: [======    ]  56.2% (used 1031109 bytes from 1835008 bytes)
========================= [SUCCESS] Took 17.40 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of ld2410-ingresso-2.local
INFO  -> 192.168.1.229
INFO Uploading /data/build/ld2410-ingresso-2/.pioenvs/ld2410-ingresso-2/firmware.bin (1036880 bytes)
Uploading: [========================================                    ] 67% ERROR Error receiving acknowledge chunk OK: timed out

I have tried several time but when arrive to the uploading phase it will stop somewhere during the uploading process

I normally only have this with poor wifi. Are you able to connect thru usb and upload?

I think so but it would take time as they are placed in a not easily accessible places.

Another option is to get the router closer to some devices and see if they upload and function normally? I had to upgrade/rearrange my network as too many dead spots in coverage.

I will try.
Another strange thing is that this morning I downloaded version 2024-10-2. According to the log files, all ESP devices show the updated version, but they still appear to need updating.
For example, the Specchio LD2410 device seems not updated, but the log file indicates it is.”

By the way I will try to put the router close to the device

INFO ESPHome 2024.10.2
INFO Reading configuration /config/esphome/ld2410.yaml...
WARNING 'specchio_ld2410': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-name
WARNING GPIO15 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Starting log output from 192.168.1.166 using esphome API
INFO Successfully connected to specchio_ld2410 @ 192.168.1.166 in 0.008s
INFO Successful handshake with specchio_ld2410 @ 192.168.1.166 in 0.192s
[12:05:37][I][app:100]: ESPHome version 2024.10.1 compiled on Oct 22 2024, 19:20:40
[12:05:37][C][status_led:065]: Status Led Light:
[12:05:37][C][status_led:066]:   Pin: GPIO15
[12:05:37][C][wifi:600]: WiFi:
[12:05:37][C][wifi:428]:   Local MAC: D8:BC:38:F9:5D:0C
[12:05:37][C][wifi:433]:   SSID: 'ORBI12-IoT'[redacted]
[12:05:37][C][wifi:436]:   IP Address: 192.168.1.166
[12:05:37][C][wifi:440]:   BSSID: 16:36:C9:9E:3F:26[redacted]
[12:05:37][C][wifi:441]:   Hostname: 'specchio_ld2410'
[12:05:37][C][wifi:443]:   Signal strength: -63 dB ▂▄▆█
[12:05:37][C][wifi:447]:   Channel: 4
[12:05:37][C][wifi:448]:   Subnet: 255.255.255.0
[12:05:37][C][wifi:449]:   Gateway: 192.168.1.1
[12:05:37][C][wifi:450]:   DNS1: 192.168.1.1
[12:05:37][C][wifi:451]:   DNS2: 0.0.0.0
[12:05:37][C][logger:185]: Logger:

In these cases what I do is compile the firmware and send it to my phone, create a hotspot on my phone (same SSID and password), restart the esp so that it connects to the hotspot and send the firmware using the webserver.