Can't enable ESPHome bluetooth proxy

Hello all! Fairly new to HA and ESPHome but I’ve been learning and making steady progress. Hit a bit of a roadblock yesterday and figured it may be time to ask for help.

I’m trying to configure ESPHome bluetooth proxy in HA. Flashed the module, installed ESPHome Add-on, successfully adopted the proxy and even OTA update worked fine after tuning the HA swap file. Now the proxy is shopn as ONLINE in ESPHome but I can’t seem to enable it - whenever I try to, it just goes back in disabled state. Haven’t found any issue in the log, but I probably don’t know where to look.

Here are the proxy logs:

> INFO ESPHome 2023.11.2
> INFO Reading configuration /config/esphome/esp32-bluetooth-proxy-687ec8.yaml...
> INFO Starting log output from esp32-bluetooth-proxy-687ec8.local using esphome API
> INFO Successfully connected to esp32-bluetooth-proxy-687ec8 in 0.527s
> INFO Successful handshake with esp32-bluetooth-proxy-687ec8 in 0.211s
> [08:22:37][I][app:102]: ESPHome version 2023.11.2 compiled on Nov 20 2023, 00:08:34
> [08:22:37][I][app:104]: Project esphome.bluetooth-proxy version 1.0
> [08:22:37][C][wifi:559]: WiFi:
> [08:22:37][C][wifi:391]:   Local MAC: C0:49:EF:68:7E:C8
> [08:22:37][C][wifi:396]:   SSID: [redacted]
> [08:22:37][C][wifi:397]:   IP Address: 192.168.178.65
> [08:22:37][C][wifi:399]:   BSSID: [redacted]
> [08:22:37][C][wifi:400]:   Hostname: 'esp32-bluetooth-proxy-687ec8'
> [08:22:37][C][wifi:402]:   Signal strength: -17 dB ▂▄▆█
> [08:22:37][C][wifi:406]:   Channel: 1
> [08:22:37][C][wifi:407]:   Subnet: 255.255.255.0
> [08:22:37][C][wifi:408]:   Gateway: 192.168.178.1
> [08:22:37][C][wifi:409]:   DNS1: 192.168.178.1
> [08:22:37][C][wifi:410]:   DNS2: 0.0.0.0
> [08:22:37][C][logger:416]: Logger:
> [08:22:37][C][logger:417]:   Level: DEBUG
> [08:22:37][C][logger:418]:   Log Baud Rate: 115200
> [08:22:37][C][logger:420]:   Hardware UART: UART0
> [08:22:37][C][bluetooth_proxy:088]: Bluetooth Proxy:
> [08:22:37][C][bluetooth_proxy:089]:   Active: YES
> [08:22:37][C][safe_mode.button:022]: Safe Mode Button 'Safe Mode Boot'
> [08:22:37][C][safe_mode.button:022]:   Icon: 'mdi:restart-alert'
> [08:22:37][C][esp32_ble:374]: ESP32 BLE:
> [08:22:37][C][esp32_ble:376]:   MAC address: C0:49:EF:68:7E:CA
> [08:22:37][C][esp32_ble:377]:   IO Capability: none
> [08:22:37][C][esp32_ble_tracker:645]: BLE Tracker:
> [08:22:37][C][esp32_ble_tracker:646]:   Scan Duration: 300 s
> [08:22:37][C][esp32_ble_tracker:647]:   Scan Interval: 320.0 ms
> [08:22:37][C][esp32_ble_tracker:648]:   Scan Window: 30.0 ms
> [08:22:37][C][esp32_ble_tracker:649]:   Scan Type: ACTIVE
> [08:22:37][C][esp32_ble_tracker:650]:   Continuous Scanning: True
> [08:22:37][C][mdns:115]: mDNS:
> [08:22:37][C][mdns:116]:   Hostname: esp32-bluetooth-proxy-687ec8
> [08:22:37][C][ota:097]: Over-The-Air Updates:
> [08:22:37][C][ota:098]:   Address: esp32-bluetooth-proxy-687ec8.local:3232
> [08:22:37][C][api:139]: API Server:
> [08:22:37][C][api:140]:   Address: esp32-bluetooth-proxy-687ec8.local:6053
> [08:22:37][C][api:142]:   Using noise encryption: YES
> [08:22:37][C][improv_serial:032]: Improv Serial:

And the configuration file:

substitutions:
  name: esp32-bluetooth-proxy-687ec8
  friendly_name: Bluetooth Proxy
packages:
  esphome.bluetooth-proxy: github://esphome/firmware/bluetooth-proxy/esp32-generic.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
api:
  encryption:
    key: nhFioQM+qIqs564JklMWe/14L5xS6j6s2jL4QAlRGlY=


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

What am I missing?

Thanks!

Sounds like you didn’t integrate the esphome device with HA.

Open your Home Assistant instance and show your integrations.

Click Add Integration, choose esphome, enter the details.

I have ESPHome in integrations, here is what I see inside. All seems fine, except I can’t enable the bluetooth proxy by flipping the toggle in the proxy card.

I do not see a switch in the respective package to enable/disable the Bluetooth proxy:

There is no switch to disable the proxy. Once it’s configured in HA, it should just work.

Check the diagnostics to see if it’s discovering devices

Thanks - no, no bluetooth devices have been discovered, I was assuming it is because this needs to be enabled.
Screenshot 2023-11-20 at 13.10.12

If I am reading the proxy logs correctly it is suggesting that it is scanning for bluetooth devices but none are found. Bad ESP board?

[13:12:04][I][app:102]: ESPHome version 2023.11.2 compiled on Nov 20 2023, 00:08:34
[13:12:05][I][app:104]: Project esphome.bluetooth-proxy version 1.0
[13:12:05][C][wifi:559]: WiFi:
[13:12:05][C][wifi:391]:   Local MAC: C0:49:EF:68:7E:C8
[13:12:05][C][wifi:396]:   SSID: [redacted]
[13:12:05][C][wifi:397]:   IP Address: 192.168.178.65
[13:12:05][C][wifi:399]:   BSSID: [redacted]
[13:12:05][C][wifi:400]:   Hostname: 'esp32-bluetooth-proxy-687ec8'
[13:12:05][C][wifi:402]:   Signal strength: -14 dB ▂▄▆█
[13:12:05][C][wifi:406]:   Channel: 1
[13:12:05][C][wifi:407]:   Subnet: 255.255.255.0
[13:12:05][C][wifi:408]:   Gateway: 192.168.178.1
[13:12:05][C][wifi:409]:   DNS1: 192.168.178.1
[13:12:05][C][wifi:410]:   DNS2: 0.0.0.0
[13:12:05][C][logger:416]: Logger:
[13:12:05][C][logger:417]:   Level: DEBUG
[13:12:05][C][logger:418]:   Log Baud Rate: 115200
[13:12:05][C][logger:420]:   Hardware UART: UART0
[13:12:05][C][bluetooth_proxy:088]: Bluetooth Proxy:
[13:12:05][C][bluetooth_proxy:089]:   Active: YES
[13:12:05][C][safe_mode.button:022]: Safe Mode Button 'Safe Mode Boot'
[13:12:05][C][safe_mode.button:022]:   Icon: 'mdi:restart-alert'
[13:12:05][C][esp32_ble:374]: ESP32 BLE:
[13:12:05][C][esp32_ble:376]:   MAC address: C0:49:EF:68:7E:CA
[13:12:05][C][esp32_ble:377]:   IO Capability: none
[13:12:05][C][esp32_ble_tracker:645]: BLE Tracker:
[13:12:05][C][esp32_ble_tracker:646]:   Scan Duration: 300 s
[13:12:05][C][esp32_ble_tracker:647]:   Scan Interval: 320.0 ms
[13:12:05][C][esp32_ble_tracker:648]:   Scan Window: 30.0 ms
[13:12:05][C][esp32_ble_tracker:649]:   Scan Type: ACTIVE
[13:12:05][C][esp32_ble_tracker:650]:   Continuous Scanning: True
[13:12:05][C][mdns:115]: mDNS:
[13:12:05][C][mdns:116]:   Hostname: esp32-bluetooth-proxy-687ec8
[13:12:05][C][ota:097]: Over-The-Air Updates:
[13:12:05][C][ota:098]:   Address: esp32-bluetooth-proxy-687ec8.local:3232
[13:12:05][C][api:139]: API Server:
[13:12:05][C][api:140]:   Address: esp32-bluetooth-proxy-687ec8.local:6053
[13:12:05][C][api:142]:   Using noise encryption: YES
[13:12:05][C][improv_serial:032]: Improv Serial:

I believe that what you are seeing is the entity for the firmware update.

From a different thread:

1 Like

The proxy itself is just that - a proxy… Now you have the equivalent of a Bluetooth stick… over there.

Now you use other integrations such as iBeacon tracker to actually find your tags, etc.

What devices are you expecting it to find? Only ones that have an integration in HA will be discovered.

1 Like

That’s a fair point. There are a bunch of bluetooth devices around, mobile phones, airtag, BLE thermometer, and this is just from the top of my head. I assumed, maybe a bit naively, that at least some of them would pop up. I’ll check the list of supported devices and then test wioth something that is documented to work.

The switch you see is from the fritzbox integration. (you see 2 integrations on the left for the device). It shows if the device is allowed internet access, and this particular switch doesn’t allow changing from HA. It is off for me too, and the proxy works just fine. (It should have been a binary sensor, not a switch in the first place).

That is not to say you may not have a problem if the esp disconnects, it just isn’t related to the switch, nor can you set it other than from the fritzbox by assigning it a profile. In general it is good practice that iot devices have no internet access if they do not need it, and this one does not.

The safe mode boot entity is unknown for me too, I think buttons are always in that state? What makes you think the proxy is not connected? The router says it is online (home), according to the other fritzbox added entity. My working proxys look the same.

So the question goes back to: what bluetooth device where you hoping to discover? Mobile phones you can probably add if they have a fixed mac. They are not autodiscovered unless you autodiscover any ble device (not recommended, it will explode with entities). You need to add them to known_devices.yaml if you want to track them:

ble_track_mydevice:
  mac: BLE_40:92:28:59:E5:5A
  name: 'MyDevice'
  icon: mdi:bluetooth
  track: true

BLE thermometers could be autodetected, depends on which one. I have Inkbird, those were found.

1 Like

Thanks a lot for clearing things up! From the BT devices I guess the thermometer and the electric fireplace are of interest, the thermometer is an old BeeWi unit and the fireplace is Evonic. I don’t think there is integration for the latter but maybe something I can try to get running. There is integration for their wifi models but this one is Bluetooth only.

In any case I’m trying to stick with Zigbee as much as possible so at the end I may forgo the BT proxy and use the ESP32 for a custom sensor.

Thanks again!

1 Like