I can't get my esp32 connected with esphome on home assistant

I’m completely new to esphome but I found out about it a while ago and I decided that I wanted to hook up a temperature and humidity sensor to it and install esphome. It doesn’t seem to work at all after I installed it.
Here are the logs:

INFO ESPHome 2024.8.1
INFO Reading configuration /config/esphome/esp.yaml...
INFO Starting log output from /dev/ttyUSB0 with baud rate 115200
[12:47:55][I][logger:156]: Log initialized
[12:47:55][C][safe_mode:079]: There have been 8 suspected unsuccessful boot attempts
[12:47:55][D][esp32.preferences:114]: Saving 1 preferences to flash...
[12:47:55][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[12:47:55][I][app:029]: Running through setup()...
[12:47:55][C][wifi:048]: Setting up WiFi...
[12:47:55][C][wifi:061]: Starting WiFi...
[12:47:55][C][wifi:062]:   Local MAC: 3C:61:05:32:47:28
[12:47:55]
[12:47:55]Brownout detector was triggered
[12:47:55]
[12:47:55]ets Jun  8 2016 00:22:57
[12:47:55]
[12:47:55]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[12:47:55]configsip: 0, SPIWP:0xee
[12:47:55]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[12:47:55]mode:DIO, clock div:2
[12:47:55]load:0x3fff0030,len:1184
[12:47:55]load:0x40078000,len:13132
[12:47:55]load:0x40080400,len:3036
[12:47:55]entry 0x400805e4
[12:47:55][I][logger:156]: Log initialized
[12:47:55][C][safe_mode:079]: There have been 9 suspected unsuccessful boot attempts
[12:47:55][D][esp32.preferences:114]: Saving 1 preferences to flash...
[12:47:55][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[12:47:55][I][app:029]: Running through setup()...
[12:47:55][C][wifi:048]: Setting up WiFi...
[12:47:55][C][wifi:061]: Starting WiFi...
[12:47:55][C][wifi:062]:   Local MAC: 3C:61:05:32:47:28
[12:47:55]
[12:47:55]Brownout detector was triggered
[12:47:55]
[12:47:55]ets Jun  8 2016 00:22:57
[12:47:55]
[12:47:55]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[12:47:55]configsip: 0, SPIWP:0xee
[12:47:55]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[12:47:55]mode:DIO, clock div:2
[12:47:55]load:0x3fff0030,len:1184
[12:47:55]load:0x40078000,len:13132
[12:47:55]load:0x40080400,len:3036
[12:47:55]entry 0x400805e4
[12:47:56][I][logger:156]: Log initialized
[12:47:56][C][safe_mode:079]: There have been 10 suspected unsuccessful boot attempts
[12:47:56][D][esp32.preferences:114]: Saving 1 preferences to flash...
[12:47:56][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[12:47:56][E][safe_mode:086]: Boot loop detected. Proceeding to safe mode
[12:47:56][E][component:164]: Component safe_mode set Error flag: unspecified
[12:47:56][I][app:029]: Running through setup()...
[12:47:56][C][wifi:048]: Setting up WiFi...
[12:47:56][C][wifi:061]: Starting WiFi...
[12:47:56][C][wifi:062]:   Local MAC: 3C:61:05:32:47:28
[12:47:56]
[12:47:56]Brownout detector was triggered
[12:47:56]
[12:47:56]ets Jun  8 2016 00:22:57
[12:47:56]
[12:47:56]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[12:47:56]configsip: 0, SPIWP:0xee
[12:47:56]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[12:47:56]mode:DIO, clock div:2
[12:47:56]load:0x3fff0030,len:1184
[12:47:56]load:0x40078000,len:13132
[12:47:56]load:0x40080400,len:3036
[12:47:56]entry 0x400805e4
[12:47:57][I][logger:156]: Log initialized
[12:47:57][C][safe_mode:079]: There have been 0 suspected unsuccessful boot attempts
[12:47:57][D][esp32.preferences:114]: Saving 1 preferences to flash...
[12:47:57][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[12:47:57][I][app:029]: Running through setup()...
[12:47:57][C][wifi:048]: Setting up WiFi...
[12:47:57][C][wifi:061]: Starting WiFi...
[12:47:57][C][wifi:062]:   Local MAC: 3C:61:05:32:47:28
[12:47:57]
[12:47:57]Brownout detector was triggered
[12:47:57]
[12:47:57]ets Jun  8 2016 00:22:57
[12:47:57]
[12:47:57]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[12:47:57]configsip: 0, SPIWP:0xee
[12:47:57]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[12:47:57]mode:DIO, clock div:2
[12:47:57]load:0x3fff0030,len:1184
[12:47:57]load:0x40078000,len:13132
[12:47:57]load:0x40080400,len:3036
[12:47:57]entry 0x400805e4
[12:47:57][I][logger:156]: Log initialized
[12:47:57][C][safe_mode:079]: There have been 1 suspected unsuccessful boot attempts
[12:47:57][D][esp32.preferences:114]: Saving 1 preferences to flash...
[12:47:57][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[12:47:57][I][app:029]: Running through setup()...
[12:47:57][C][wifi:048]: Setting up WiFi...
[12:47:57][C][wifi:061]: Starting WiFi...
[12:47:57][C][wifi:062]:   Local MAC: 3C:61:05:32:47:28
[12:47:57]
[12:47:57]Brownout detector was triggered
[12:47:57]
[12:47:57]ets Jun  8 2016 00:22:57
[12:47:57]
[12:47:57]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[12:47:57]configsip: 0, SPIWP:0xee
[12:47:57]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[12:47:57]mode:DIO, clock div:2
[12:47:57]load:0x3fff0030,len:1184
[12:47:57]load:0x40078000,len:13132
[12:47:57]load:0x40080400,len:3036
[12:47:57]entry 0x400805e4
[12:47:58][I][logger:156]: Log initialized
[12:47:58][C][safe_mode:079]: There have been 2 suspected unsuccessful boot attempts
[12:47:58][D][esp32.preferences:114]: Saving 1 preferences to flash...
[12:47:58][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[12:47:58][I][app:029]: Running through setup()...
[12:47:58][C][wifi:048]: Setting up WiFi...
[12:47:58][C][wifi:061]: Starting WiFi...
[12:47:58][C][wifi:062]:   Local MAC: 3C:61:05:32:47:28
ERROR Serial port closed!
[details="Summary"]
This text will be hidden
[/details]

Your sensor?
Your yaml in esp ?

I haven’t connected the sensor yet but my yaml is:

esphome:
  name: esp
  friendly_name: Esp

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

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

ota:
  - platform: esphome
    password: "37a89c74076ad1566ebb22e3b8080646"

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

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

captive_portal:
    

What esp board are you using?
Try a different USB cable.

There is reference to brownout in the log, check your power supply, or it could be a faulty esp device.

2 Likes

It was my raspberry pi’s power supply

1 Like