esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

Api not connecting after update #6283

Open zumbefin opened 2 days ago

zumbefin commented 2 days ago

The problem

Hi, i have one esp32 device that after every ota update losts api connection, if i update that specific device from esp home ui. it gives error:

"WARNING Can't connect to ESPHome API for takapiha @ 10.1.1.40: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='10.1.1.40', port=6053))]: [Errno 111] Connect call failed ('10.1.1.40', 6053) (SocketAPIError)"

All other devices are working after updates.

i can ping the device and update with OTA so only api goes broken somehow.

i have swapped same type of esp32 to rule out hardware issue.

Usually it gets fixed when i do the download with usb cable.

Which version of ESPHome has the issue?

2024.9.1

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.9.3

What platform are you using?

ESP32

Board

No response

Component causing the issue

No response

Example YAML snippet

esphome:
  name: "takapiha"
  friendly_name: Takapiha 

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:
  baud_rate: 0

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

ota:
  - platform: esphome
    password: salasana

safe_mode:
  boot_is_good_after: 90s
  num_attempts: 3

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

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

  manual_ip:
    # Set this to the IP of the ESP
    static_ip: 10.1.1.40
    # Set this to the IP address of the router. Often ends with .1
    gateway: 10.1.1.1
    # The subnet of the network. 255.255.255.0 works for most home networks.
    subnet: 255.255.255.0  

captive_portal:

#web_server:
 # port: 80
  #version: 3    

# i2C pins and setup
i2c:
  sda: GPIO21 # D21
  scl: GPIO22 # D22
  scan: true
  id: bus_a  

#Valoisuus anturi BH1750
sensor:
  - platform: bh1750
    name: "takapiha valoisuus bh1750"
    address: 0x23
    update_interval: 60s

  - platform: sht4x
    temperature:
      name: "takapiha lämpötila sht40"
    humidity:
      name: "takapiha kosteus sht40"
    heater_max_duty: 0.05       

#sisäinen lämpötila
  - platform: internal_temperature
    name: "takapiha ESP lämpötila"    

  # BME280 Temperature, Pressure, Humidity sensor
  - platform: bme280_i2c
    temperature:
      name: "takapiha lämpötila bme280"
    pressure:
      name: "takapiha ilmanpaine bme280"
    humidity:
      name: "takapiha kosteus bme280"
    address: 0x76  

#restart nappi
switch:
  - platform: restart
    name: "Restart ESP32"
    id: restart_switch

Anything in the logs that might be useful for us?

No response

Additional information

No response

MiniBlister commented 1 day ago

I have the same issue. Going back to 2024.7 and the device is online again.

spudje commented 1 day ago

I also have the exact same issue. Reverted back to 2024.6.6 in my case and everything works again.

ssieb commented 1 day ago

That indicates that it is bootlooping. Why do you have serial logs disabled? You will need to get serial logs to find out why it's crashing.