BLEProxy does not discover any new devices

Hi all,

this is a continuation of ESP32-C3 deplyoment: ESP32-C3 Bluetooth Proxy invalid header: 0xffffffff - #3 by nymare

BLE-Proxy seems to work (see logs below), but i don’t get any new devices Discovered.
Maybe i need to Discover devices via standard BLE and then only use Proxy to communicate with them later on? Two thermometers i’ve Discovered via standard BLE now work flawlessly via BLE Proxy. I did delete original LWMMM… BLE Discovered device integrations before they were flashed.

Let me share some more findings. I am using only this in ESPHome (removed BLE Tracker):

bluetooth_proxy:
active: true

I will try to add ATC thermometers i’ve flashed manually.
Flashing link: Telink Flasher
ESPHome ATC Thermometer sensor instructions: Xiaomi Mijia BLE Sensors — ESPHome

Verbose logs show ATC is visible, but does not popup as Discovered in HomeAssistant:
[13:44:15][C][logger:275]: Logger:
[13:44:15][C][logger:276]: Level: VERBOSE
[13:44:15][C][logger:277]: Log Baud Rate: 115200
[13:44:15][C][logger:278]: Hardware UART: UART0
[13:44:15][C][esp32_ble_tracker:793]: BLE Tracker:
[13:44:15][C][esp32_ble_tracker:794]: Scan Duration: 300 s
[13:44:15][C][esp32_ble_tracker:795]: Scan Interval: 320.0 ms
[13:44:15][C][esp32_ble_tracker:796]: Scan Window: 30.0 ms
[13:44:15][C][esp32_ble_tracker:797]: Scan Type: ACTIVE
[13:44:15][C][esp32_ble_tracker:798]: Continuous Scanning: True
[13:44:15][C][bluetooth_proxy:167]: Bluetooth Proxy:
[13:44:15][C][mdns:100]: mDNS:
[13:44:15][C][mdns:101]: Hostname: esp32ble-proxy1
[13:44:15][V][mdns:102]: Services:
[13:44:15][V][mdns:104]: - _esphomelib, _tcp, 6053
[13:44:15][V][mdns:106]: TXT: version = 2022.10.0
[13:44:15][V][mdns:106]: TXT: mac = 34b4724fxxx
[13:44:15][V][mdns:106]: TXT: platform = ESP32
[13:44:15][V][mdns:106]: TXT: board = esp32-c3-devkitm-1
[13:44:15][V][mdns:106]: TXT: network = wifi
[13:44:15][C][ota:089]: Over-The-Air Updates:
[13:44:15][C][ota:090]: Address: 192.xxxxx:3232
[13:44:15][C][ota:093]: Using Password.
[13:44:15][C][api:138]: API Server:
[13:44:15][C][api:139]: Address: 192.xxxxx:6053
[13:44:15][C][api:143]: Using noise encryption: NO
[13:44:16][V][bluetooth_proxy:026]: Proxying packet from - 41:8B:88:XXXXX RSSI: -74 dB
[13:44:23][V][bluetooth_proxy:026]: Proxying packet from - 41:8B:88:XXXX. RSSI: -83 dB
[13:44:23][V][bluetooth_proxy:026]: Proxying packet from ATC_FC9B19 - XXXX:FC:9B:19. RSSI: -54 dB
[13:44:24][V][bluetooth_proxy:026]: Proxying packet from - 53:14:CD:XXXX. RSSI: -38 dB
[13:44:24][V][bluetooth_proxy:026]: Proxying packet from - 2F:E2:EC:XXXX. RSSI: -29 dB
[13:44:24][V][bluetooth_proxy:026]: Proxying packet from - 63:EF:93:XXXX. RSSI: -52 dB
[13:44:26][V][bluetooth_proxy:026]: Proxying packet from - 53:14:CD:XXXXX. RSSI: -36 dB
[13:44:31][V][bluetooth_proxy:026]: Proxying packet from ATC_28195B - XXX:19:5B. RSSI: -69 dB

I only use Proxies. Maybe C3 issues

You need ad BTHome or xiaomi ble integration. If not autodiscovered

Thanks Nikito7, your pointers were good.

I already had XIAOMI BLE, but it did not find any thermometers. I then focused on your BTHome advice and that worked.

For anyone else who needs help, this are the steps:

Still not sure why Xiaomi BLE worked originally for first two flashed thermometers, but i don’t care as BTHome works well.

1 Like

My BLE found my thermometer. It shows as entities in ESPHOME but the results read “UNKNOWN”.

Scott, you mean you only get 1 entity? As this is what i got when i had FW that could push BLE out, but HomeAssistant was not able to read data. Changing FW setting to supported communication adds new entities.

In case you get entities, but not updated it means it is not receiving the device BLE messages.

Do you use BLE Proxy? As one useful feature is Verbose logging :slight_smile:

I setup via ESPHOME. What is FW?Screen Shot 2022-10-25 at 1.10.44 PM

I thought you have Xiaomi thermometer and then need to upload custom FW: Esphome Tutorial: for 4$ monitor your home temperature with esp32 and xiaomi mijia ·

Can you share your ESPHome code? As it looks like you don have BLE, but ESP32 based thermomether.

esphome:
  name: esphome-web-a2fff4

esp32_ble_tracker:

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
sensor:
  - platform: atc_mithermometer
    mac_address: "A4:C1:38:B1:CD:7F"
    temperature:
      name: "A Temperature"
    humidity:
      name: "A Humidity"
    battery_level:
      name: "A Battery-Level"
    battery_voltage:
      name: "A Battery-Voltage"
    signal_strength:
      name: "A Signal"




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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphome-Web-A2Fff4"
    password: "MVXZrCGYTf5A"

captive_portal:  
    

Bluetooth Proxy


esp32_ble_tracker:
  scan_parameters:
    active: true

bluetooth_proxy:

I added the code…nothing changed.


esp32_ble_tracker:
  scan_parameters:
    active: true

bluetooth_proxy:

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
sensor:
  - platform: atc_mithermometer
    mac_address: "A4:C1:38:B1:CD:7F"
    temperature:
      name: "A Temperature"
    humidity:
      name: "A Humidity"
    battery_level:
      name: "A Battery-Level"
    battery_voltage:
      name: "A Battery-Voltage"
    signal_strength:
      name: "A Signal"




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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphome-Web-A2Fff4"
    password: "MVXZrCGYTf5A"

captive_portal:  
    

ok…some progress…

I have stats but no temp or humidity

see pvvx stuff above.

Only work with Mi adv ou BThome adverts type

Pvvx site:

Ha:

@lorcott Just wait it takes some time to load.

@nikito7 BTHome has a lot decimal points. I don’t like BTHome because of that, and rather use the xiaomi or the Mijia advertising. I have 13 sensors all working well and battery life is good (over 1 year)

I also disable the voltage as it not required and it is just more data

1

1 Like

thx…now when I’m ready to add another thermo, do I need to change the MAC address in ESPHOME? FYI I just copied that MAC address from a setup sample so I don’t know where it points.

You just need Bluetooth proxy

currently my ESPHOME has

esp32_ble_tracker:
  scan_parameters:
    active: true

bluetooth_proxy:

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
sensor:
  - platform: atc_mithermometer
    mac_address: "A4:C1:38:B1:CD:7F"
    temperature:
      name: "A Temperature"

Do I not need the other stuff???

You dont need:

sensor:
  - platform: atc_mithermometer

After only in HA

  • BTHome
  • xiaomi ble