ESPhome bluetooth gateway doesn't find devices

I tried to create the bluetooth gateway today via the ESPhome website.
I see the device in my home assistant but it doesn’t detect any bluetooth devices.

Home assistant is on 2022.12
ESP32 wemos d1 mini with fresh install from the esphome website.

My openmqtt gateway detects the bluetooth devices immediately. The mqtt gateway is not active during the tests but I can’t see devices.

How can in troubleshoot this ?

Config file

substitutions:

  name: "esp32-bluetooth-proxy-1"

  device_description: "Bluetooth proxy"

packages:

  esphome.bluetooth-proxy: github://esphome/bluetooth-proxies/[email protected]

esphome:

  name: ${name}

  comment: ${device_description}

  name_add_mac_suffix: false

esp32:

  board: wemos_d1_mini32

  framework:

    type: esp-idf

    version: latest

# Enable logging

logger:

  level: DEBUG

wifi:

  ssid: !secret wifi_ssid

  password: !secret wifi_password

add this

# For Bluetooth Proxy
esp32_ble_tracker:
  scan_parameters:
    interval: 1100ms
    window: 1100ms
    active: true

Doesn’t look to help

[08:18:53][C][improv_serial:032]: Improv Serial:
[08:21:46][I][ota:113]: Boot seems successful, resetting boot loop counter.
[08:21:46][D][esp32.preferences:113]: Saving 1 preferences to flash...
[08:21:46][D][esp32.preferences:142]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[08:21:47][D][esp32_ble_tracker:264]: Starting scan...
[08:26:47][D][esp32_ble_tracker:264]: Starting scan...

you will not see the scan data… that looks correct.

see if your Bluetooth devices are responding to HA.

You should be good

no devices are being detected and I have 4 around here that are being detected if I use the openmqtt gateway (that gateway is off at the time)

that is strange all of mine work perfectly.

you have your gateway off at the time so it cant be that as Bluetooth only like connecting to one thing at a time.

Well the proxy is scanning now so that is good…

:thinking:

restart HA :pensive:

Restarted HA, BLE starts scanning but no detection. Even removed the battery from one of the BLE devices to force it to send something (even that they do it normally very frequently)
Doesn’t look to work.

Tested it and I see lines like :slight_smile:

[09:27:27][V][esp32_ble_tracker:781]: Unhandled type: advType: 0x1b
[09:27:27][V][bluetooth_proxy:020]: Proxying packet from [LG] webOS TV OLED65CX6LA - 58:88:27:56:DE:65. RSSI: -93 dB
[09:27:27][V][bluetooth_proxy:020]: Proxying packet from Raspberry Pi 3 Model B Plus R - 43:45:C0:00:1F:AC. RSSI: -94 dB
[09:27:27][V][bluetooth_proxy:020]: Proxying packet from ATC_D9F1B4 - A4:C1:38:D9:F1:B4. RSSI: -70 dB
[09:27:27][V][bluetooth_proxy:020]: Proxying packet from Raspberry Pi 3 Model B Plus R - 43:45:C0:00:1F:AC. RSSI: -91 dB
[09:27:28][V][bluetooth_proxy:020]: Proxying packet from Raspberry Pi 3 Model B Plus R - 43:45:C0:00:1F:AC. RSSI: -91 dB
[09:27:28][V][esp32_ble_tracker:781]: Unhandled type: advType: 0x1b
[09:27:28][V][bluetooth_proxy:020]: Proxying packet from [LG] webOS TV OLED65CX6LA - 58:88:27:56:DE:65. RSSI: -95 dB
[09:27:28][V][bluetooth_proxy:020]: Proxying packet from ClearGrass Temp & RH - 58:2D:34:10:B5:E3. RSSI: -73 dB

Strange thing is it looks only to see the RSSI packages or it only shows them in the verbose logging.

Looks like the xiaomi atc custom software does not populate home assistant. I had to flash the pvvx custom software and now it works. Important notice is that the sensors needs fresh batteries to flash and configure them. Lost a lot of time trying to flash the sensors but the programmer looks to very power intensive for the sensors. Battery percentage drops from 43% to 0%, does not accept the changes and even crashes the sensors. Took a while before I foud this out.

All my sensors use PVVX custom firmware but I am on V3.8. I think the new version is V3.9 beta and it had some battery upgrades where they changed the calculation of battery readings in %. I haven’t had the problem with flashing and battery dropping only on a new battery were it can drop fast then settle down. But I haven’t upgraded to the new firmware until it comes out of Beta (not broken don’t fix it kinda attitude). I think I have also read that you can have some cheap battery’s that don’t last long so a good well named brand may help. My battery’s with this custom firmware and MIJIA advertising are still going 14 + months later, one is at 28% and the others are 45% + so very happy.

Nice to know that the ATC firmware does not populate into the new Bluetooth of HA. Mabe ESPHome should remove the link on their website Xiaomi if that is true and the case.

What advertising did you use. I opted for MIJIA rather than BTHome as the advertising decimal places suit me. I know BTHome have a new version V2 and was wondering if they have changed it as I can see there are 2 options now for temp. Example MIJIA temp reads 20.1 and BTHome temp reads 20.11 and for me it is not necessary to have 0.01 degree of accuracy with all the extra data.

I have also read

For reliable connection and refirmware on LYWSD03MMC, the battery level must be more than 40%. This is a design feature - a cheaper version of the hardware.