Hi, I am new to the HomeAssistant (HA) and the ESP32 Game. Somehow. I am trying to integrate my ESP32 (ESP32-WROOM-32) to show me some temperature information I am retreiving from an Switchbot Temp Sensor. But that is far away. I am struggling to even integrate the ESP into HA. These are my steps:
- I Installed HA on an RaspberryPi 4 and added all my Smart Home Devices
- I installed the ESPHome Addon
- I connected the ESP32 via an Micro USB (Data-) Cable to my RaspberryPi which is running HA
- I am adding a new device via the ESPHome Builder and entered my correct Wifi information
- I am selecting âESP32â as target via the USB Port (CP2102 USB to UART Bridge Controller /dev/ttyUSB0) connected to the RPi
- It starts building and downloading all neccessary ressources
- At some point it starts flashing. After compiling it shows the following lines:
Linking .pioenvs/wetterstation/firmware.elf
RAM: [= ] 12.4% (used 40664 bytes from 327680 bytes)
Flash: [===== ] 49.5% (used 907697 bytes from 1835008 bytes)
Building .pioenvs/wetterstation/firmware.bin
Creating esp32 image...
Successfully created esp32 image.
esp32_create_combined_bin([".pioenvs/wetterstation/firmware.bin"], [".pioenvs/wetterstation/firmware.elf"])
SHA digest in image updated
Wrote 0xef040 bytes to file /data/build/wetterstation/.pioenvs/wetterstation/firmware.factory.bin, ready to flash to offset 0x0
esp32_copy_ota_bin([".pioenvs/wetterstation/firmware.bin"], [".pioenvs/wetterstation/firmware.elf"])
======================== [SUCCESS] Took 143.54 seconds ========================
INFO Successfully compiled program.
esptool.py v4.8.1
Serial port /dev/ttyUSB0
Connecting.....
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 7c:87:ce:30:c0:dc
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00010000 to 0x000effff...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Compressed 913472 bytes to 606442...
Wrote 913472 bytes (606442 compressed) at 0x00010000 in 14.4 seconds (effective 508.3 kbit/s)...
Hash of data verified.
SHA digest in image updated
Compressed 17440 bytes to 12128...
Wrote 17440 bytes (12128 compressed) at 0x00001000 in 0.7 seconds (effective 213.3 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 144...
Wrote 3072 bytes (144 compressed) at 0x00008000 in 0.1 seconds (effective 315.7 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.2 seconds (effective 431.2 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
INFO Successfully uploaded program.
INFO Starting log output from /dev/ttyUSB0 with baud rate 115200
After that it tries to connect to my Wifi. The first couple of tries are failing (with reason=âAuthentication Failedâ or reason=âAuth Expiredâ but in the end, it seems to connect to the Wifi and the ESP gets an IP Address. This then is the rest of the log:
[18:05:29][D][wifi:697]: Retrying with hidden networks...
[18:05:29][I][wifi:313]: WiFi Connecting to 'homezone'...
[18:05:30][I][wifi:617]: WiFi Connected!
[18:05:30][C][wifi:428]: Local MAC: 7C:87:CE:30:C0:DC
[18:05:30][C][wifi:433]: SSID: [redacted]
[18:05:30][C][wifi:436]: IP Address: 192.168.68.78
[18:05:30][C][wifi:440]: BSSID: [redacted]
[18:05:30][C][wifi:441]: Hostname: 'wetterstation'
[18:05:30][C][wifi:443]: Signal strength: -68 dB ââââ
[18:05:30][C][wifi:447]: Channel: 6
[18:05:30][C][wifi:448]: Subnet: 255.255.252.0
[18:05:30][C][wifi:449]: Gateway: 192.168.68.1
[18:05:30][C][wifi:450]: DNS1: 10.0.0.138
[18:05:30][C][wifi:451]: DNS2: 10.0.0.138
[18:05:30][D][wifi:626]: Disabling AP...
[18:05:30][C][api:026]: Setting up Home Assistant API server...
[18:05:30][I][app:062]: setup() finished successfully!
[18:05:30][W][component:170]: Component wifi cleared Warning flag
[18:05:30][W][component:157]: Component api set Warning flag: unspecified
[18:05:30][I][app:100]: ESPHome version 2025.3.1 compiled on Mar 23 2025, 18:03:16
[18:05:30][C][wifi:600]: WiFi:
[18:05:30][C][wifi:428]: Local MAC: 7C:87:CE:30:C0:DC
[18:05:30][C][wifi:433]: SSID: [redacted]
[18:05:30][C][wifi:436]: IP Address: 192.168.68.78
[18:05:30][C][wifi:440]: BSSID: [redacted]
[18:05:30][C][wifi:441]: Hostname: 'wetterstation'
[18:05:30][C][wifi:443]: Signal strength: -68 dB ââââ
[18:05:30][C][wifi:447]: Channel: 6
[18:05:30][C][wifi:448]: Subnet: 255.255.252.0
[18:05:30][C][wifi:449]: Gateway: 192.168.68.1
[18:05:30][C][wifi:450]: DNS1: 10.0.0.138
[18:05:30][C][wifi:451]: DNS2: 10.0.0.138
[18:05:30][C][logger:177]: Logger:
[18:05:30][C][logger:178]: Max Level: DEBUG
[18:05:30][C][logger:179]: Initial Level: DEBUG
[18:05:30][C][logger:181]: Log Baud Rate: 115200
[18:05:30][C][logger:182]: Hardware UART: UART0
[18:05:30][C][captive_portal:089]: Captive Portal:
[18:05:30][C][mdns:116]: mDNS:
[18:05:30][C][mdns:117]: Hostname: wetterstation
[18:05:30][C][esphome.ota:073]: Over-The-Air updates:
[18:05:30][C][esphome.ota:074]: Address: wetterstation.local:3232
[18:05:30][C][esphome.ota:075]: Version: 2
[18:05:30][C][esphome.ota:078]: Password configured
[18:05:30][C][safe_mode:018]: Safe Mode:
[18:05:30][C][safe_mode:020]: Boot considered successful after 60 seconds
[18:05:30][C][safe_mode:021]: Invoke after 10 boot attempts
[18:05:30][C][safe_mode:023]: Remain in safe mode for 300 seconds
[18:05:30][C][api:140]: API Server:
[18:05:30][C][api:141]: Address: wetterstation.local:6053
[18:05:30][C][api:143]: Using noise encryption: YES
[18:06:06][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[18:06:06][D][esp32.preferences:114]: Saving 1 preferences to flash...
[18:06:06][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
There is no success message in the end, no matter for how long I am waiting. Should there be one? I then clicked on âStopâ on the bottom right corner. The yaml file I created tells me the EPS is âonlineâ, but that is only because it is still connected via USB. A Wifi connection is not possible and it also does not show up as a device in my Wifi routers list.
I tried that procedure multiple times, tried also a second ESP32 Board (the same type), different cable, different flashing method (via Browser) but it does not matter what I do, i cant get it to work. At least I know the Wifi on the ESP is working because I connected to it via a simple program I coded within the Arduino IDE. What am I doing wrong?