Unable to connect to the ESPHome device

Hi All,

I flashed a ESP32-Wroom-32 successfully using the official bluetooth proxy project: Ready-Made Projects — ESPHome

The device connects to wifi and I’m able to ping in console.
When I try to add the device using the ESP Home integration adding the device IP I get: Unable to connect to the ESPHome device. Make sure the device’s YAML configuration includes an api section.

This should be the configuration: bluetooth-proxies/esp32-generic/esp32-generic.yaml at 0a0b5bd9ef369be649b7902b4720d665e5370b1e · esphome/bluetooth-proxies · GitHub

Below the device log:

[19:31:12][I][wifi:617]: WiFi Connected!
[19:31:12][C][wifi:428]:   Local MAC: 08:D1:F9:26:53:40
[19:31:12][C][wifi:433]:   SSID: [redacted]
[19:31:12][C][wifi:436]:   IP Address: 192.168.0.129
[19:31:12][C][wifi:439]:   BSSID: [redacted]
[19:31:12][C][wifi:441]:   Hostname: 'esp32-bluetooth-proxy-265340'
[19:31:12][C][wifi:443]:   Signal strength: -31 dB ▂▄▆█
[19:31:12][C][wifi:447]:   Channel: 11
[19:31:12][C][wifi:448]:   Subnet: 255.255.255.0
[19:31:12][C][wifi:449]:   Gateway: 192.168.0.1
[19:31:12][C][wifi:450]:   DNS1: 8.8.8.8
[19:31:12][C][wifi:451]:   DNS2: 8.8.4.4
[19:31:12][D][wifi:626]: Disabling AP...
[19:31:12][D][esp-idf:000][sys_evt]: I (11318) esp_netif_handlers: sta ip: 192.168.0.129, mask: 255.255.255.0, gw: 192.168.0.1
[19:31:13][D][esp-idf:000]: I (11373) mdns_mem: mDNS task will be created from internal RAM
[19:31:13][C][api:030]: Setting up Home Assistant API server...
[19:31:13][I][app:066]: setup() finished successfully!
[19:31:13][W][component:182]: Component wifi cleared Warning flag
[19:31:13][W][component:167]: Component api set Warning flag: unspecified
[19:31:13][I][app:115]: ESPHome version 2025.5.0 compiled on May 21 2025, 23:44:59
[19:31:13][I][app:117]: Project esphome.bluetooth-proxy version 25.5.1
[19:31:13][C][wifi:600]: WiFi:
[19:31:13][C][wifi:428]:   Local MAC: 08:D1:F9:26:53:40
[19:31:13][C][wifi:433]:   SSID: [redacted]
[19:31:13][C][wifi:436]:   IP Address: 192.168.0.129
[19:31:13][C][wifi:439]:   BSSID: [redacted]
[19:31:13][C][wifi:441]:   Hostname: 'esp32-bluetooth-proxy-265340'
[19:31:13][C][wifi:443]:   Signal strength: -32 dB ▂▄▆█
[19:31:13][C][wifi:447]:   Channel: 11
[19:31:13][C][wifi:448]:   Subnet: 255.255.255.0
[19:31:13][C][wifi:449]:   Gateway: 192.168.0.1
[19:31:13][C][wifi:450]:   DNS1: 8.8.8.8
[19:31:13][C][wifi:451]:   DNS2: 8.8.4.4
[19:31:13][C][logger:224]: Logger:
[19:31:13][C][logger:225]:   Max Level: DEBUG
[19:31:13][C][logger:226]:   Initial Level: DEBUG
[19:31:13][C][logger:228]:   Log Baud Rate: 115200
[19:31:13][C][logger:229]:   Hardware UART: UART0
[19:31:13][C][logger:233]:   Task Log Buffer Size: 768
[19:31:13][C][bluetooth_proxy:148]: Bluetooth Proxy:
[19:31:13][C][bluetooth_proxy:149]:   Active: YES
[19:31:13][C][bluetooth_proxy:150]:   Connections: 3
[19:31:13][C][bluetooth_proxy:151]:   Raw advertisements: NO
[19:31:13][C][safe_mode.button:024]: Safe Mode Button 'Safe Mode Boot'
[19:31:13][C][safe_mode.button:024]:   Icon: 'mdi:restart-alert'
[19:31:13][C][factory_reset.button:011]: Factory Reset Button 'Factory reset'
[19:31:13][C][factory_reset.button:011]:   Icon: 'mdi:restart-alert'
[19:31:13][C][esp32_ble:411]: ESP32 BLE:
[19:31:13][C][esp32_ble:412]:   MAC address: 08:D1:F9:26:53:42
[19:31:13][C][esp32_ble:414]:   IO Capability: none
[19:31:13][C][esp32_ble_tracker:733]: BLE Tracker:
[19:31:13][C][esp32_ble_tracker:734]:   Scan Duration: 300 s
[19:31:13][C][esp32_ble_tracker:735]:   Scan Interval: 320.0 ms
[19:31:13][C][esp32_ble_tracker:736]:   Scan Window: 30.0 ms
[19:31:13][C][esp32_ble_tracker:737]:   Scan Type: ACTIVE
[19:31:13][C][esp32_ble_tracker:738]:   Continuous Scanning: YES
[19:31:13][C][esp32_ble_tracker:747]:   Scanner State: RUNNING
[19:31:13][C][esp32_ble_tracker:759]:   Connecting: 0, discovered: 0, searching: 0, disconnecting: 0
[19:31:13][C][bluetooth_proxy.connection:017]: BLE Connection:
[19:31:13][C][esp32_ble_client:048]:   Address: 
[19:31:13][C][esp32_ble_client:049]:   Auto-Connect: FALSE
[19:31:13][C][esp32_ble_client:083]:   State: IDLE
[19:31:13][C][bluetooth_proxy.connection:017]: BLE Connection:
[19:31:13][C][esp32_ble_client:048]:   Address: 
[19:31:13][C][esp32_ble_client:049]:   Auto-Connect: FALSE
[19:31:13][C][esp32_ble_client:083]:   State: IDLE
[19:31:13][C][bluetooth_proxy.connection:017]: BLE Connection:
[19:31:13][C][esp32_ble_client:048]:   Address: 
[19:31:13][C][esp32_ble_client:049]:   Auto-Connect: FALSE
[19:31:13][C][esp32_ble_client:083]:   State: IDLE
[19:31:13][C][mdns:120]: mDNS:
[19:31:13][C][mdns:121]:   Hostname: esp32-bluetooth-proxy-265340
[19:31:13][C][esphome.ota:073]: Over-The-Air updates:
[19:31:13][C][esphome.ota:074]:   Address: esp32-bluetooth-proxy.local:3232
[19:31:13][C][esphome.ota:075]:   Version: 2
[19:31:13][C][safe_mode:018]: Safe Mode:
[19:31:13][C][safe_mode:019]:   Boot considered successful after 60 seconds
[19:31:13][C][safe_mode:021]:   Invoke after 10 boot attempts
[19:31:13][C][safe_mode:022]:   Remain in safe mode for 300 seconds
[19:31:13][W][safe_mode:028]: Last reset occurred too quickly; safe mode will be invoked in 8 restarts
[19:31:13][C][http_request.ota:026]: Over-The-Air updates via HTTP request
[19:31:13][C][api:170]: API Server:
[19:31:13][C][api:171]:   Address: esp32-bluetooth-proxy.local:6053
[19:31:13][C][api:178]:   Using noise encryption: NO
[19:31:13][C][improv_serial:032]: Improv Serial:
[19:31:13][C][http_request:013]: HTTP Request:
[19:31:13][C][http_request:014]:   Timeout: 4500ms
[19:31:13][C][http_request:015]:   User-Agent: ESPHome/2025.5.0 (https://esphome.io)
[19:31:13][C][http_request:016]:   Follow redirects: YES
[19:31:13][C][http_request:017]:   Redirect limit: 3
[19:31:13][C][http_request.idf:029]:   Buffer Size RX: 512
[19:31:13][C][http_request.idf:030]:   Buffer Size TX: 512

This is how I can see the device from the bluetooth project page (connect):
Connected to esp32-bluetooth-proxy-265340
esphome.bluetooth-proxy 25.5.1 (ESP32)

Also I run HA in docker on a mac machine (not sure it’s relevant)
I really need some help :slight_smile:

Thanks

1 Like

Can you ping 192.168.0.129 from HA container in docker?

You may want to add an API key

api:
  encryption:
    key: <random string>

This is not causing you current issue, unless the “api” part is missing

Thank you for your reply! I managed to connect the ESP to HA by changing the wifi network. I used a meshed 2.4/5ghz settings. Tried to connect the ESP to another router with a dedicated 2.4 and now it works like a charm.

hope it helps someone

1 Like