ESPHome BLE Scanner Arrival Presence Detection: Trigger a Scan on Demand

Can Home Assistant ask my ESPHome esp32_ble_tracker to trigger a BLE scan on demand?

I want a very fast arrival presence detection. I’m using a ESP32 to scan for my Mi Band 3 as I step out of my elevator and approach my door. I would like it to see me within 5 seconds and unlock my door. Setting a short scan interval is totally killing my wifi. My thought was to have a motion detector (Xiaomi) pointing at my elevator. These detect quickly. When motion is detected, Home Assistant could see this and (via hassio add-on) might then ask my ESP32 to kick-off a scan to confirm it is me (Scan for Mi Band). What do you think?

I posted this on the Discord thread too. Hope that’s ok…

Some general relevant links:

https://esphome.io/components/binary_sensor/esp32_ble_tracker.html

The monitor folk are tackling similar challenges:

1 Like

+1 , this would be awesome

1 Like

i also want to read the presence of some smartphones , but if esphome does it then it will be very easy ,

is it possible with esphome ?

There are many different options for detecting smart phones (wifi, traditional bluetooth, ble). Many people combine them all for best reliability. Esphome only does BLE. Some phones have native BLE broadcasting, others need app installed.

i want esphome with traditional bluetooth in smartphones ,
if it does not work then other tool without ble ?

Are you running home assistant on a raspberry pi? Just use that (below) . Or look at running “Monitor” on a pi zero (see other threads).

i think MONITOR can do what i want but i have tried to implement MONITOR but it is very complicated and i am unable to configure it with home assistant easily , so i decided to leave it ,

i am using RPI but the presence detection which i want to use is in my Office which is another location from my hassio server , so i think i need MQTT or any other API , that is why HOME ASSISTANT BLUETOOTH TRACKER will not work for me .

Have a look at Gpslogger or similar. That might do it for you?