Using external raspberry pi to scan for bluetooth devices

I have the following usecase.
I would like to have a raspberry pi in my garage, that continuously scans for bluetooth devices in range.
Reports this to my HA, so that I can trigger automations based on presence of a device in the garage.

Does anyone have good tips/links/etc for how this could be achieved in the best way?

Why a raspberry?
Use ESP-Home. Much cheaper, easier and support already exist.

Does the Raspberry Pi have Bluetooth? I don’t know. The only Raspberry Pi I have here is a Pi3 that is my MQTT broker.

Why don’t you just use an ESP32 as a Bluetooth proxy?

The pi 4 I run HA on has it.

I currently use a Raspberry Pi Zero 2 W.
This has bluetooth by default.

ESP32 sounds like a good idea.
However, then only BLE seems to be supported, which would limit my options.
Secondly, the combination with WIFI appears to give some challenges.
Thirdly, I can’t find solid information on whether a “continuous scanning mode” is supported, in which HA is constantly updated on (unpaired) available devices in the vicinity.
It’s important that devices are detected quickly.

Would an ESP32 do for my usecase?

We don’t know what devices you want to track.
But an ESP32 is a few $ and within a few minutes you get your answer.

Main usecase is opening the garagedoor when I arrive.
It has to detect my phone/motorcycle/guests so that an automation can open the garage when I arrrive. Preferably in a way that I don’t have to ‘wait’ for detection.

In that case it’s not a good option Bluetooth has a few seconds of wait

Any suggestions for better alternatives are of course welcome!

GPS with companion app in high accuracy mode.

Battery wise that doesn’t seem to be a good solution.
I might be out of home for days, but when I return I want the garage to respond quickly to my arrival.

You don’t need to have it on high accuracy all the time. Just when you arrive home.
So enable it when you are x distance away, and disable it when you connect to wifi.

Bluetooth proxy with Bermuda integration. Reaction time is very quick.

But here he wants it to react outside the home.
Not inside where you have triangulation.
Perhaps it works better with a few of them at the same-ish place.
But it can’t ever be quicker than normal BT if it’s just one node used with Bermuda.
I just can’t imagine how that would work.

I have a similar situation and question: I have a Bluetooth water timer:

in a location too far from my HA host for reliable BT connection.

First question: When I try to add the Melnor Bluetooth integration, I get:

Error

Config flow could not be loaded: {“message”:“Invalid handler specified”}

Is this a “because I’m running HA in a Docker container” thing, or because I don’t have a BT portal configured yet, or is there something just wrong with the integration / its installer?

Second question would be: if I put a ESP32 near to the BLE device with Bluetooth Proxy — ESPHome configured, WiFi coverage is good there, but is it going to be reliable to use WiFi as a bridge to BLE on that device? I have a Ras-Pi 2 W that I was thinking of configuring as the bridge, but haven’t dug into that yet…

@MangoCats, please don’t highjack this topic.
Your question is not the same as mine.

I recently made a RPi Zero 2W pose as a Shelly device and act as ble proxy for scanning,
The project is in PHP glued together from previous work published in GitHub and some parts not yet published.
Runs as cli script, uses hcitool, hciconfig, hcidump and can be started as a systemd service.
If somebody is interested, I can publish the thing as an example, otherwise I might not bother :slight_smile:

The two main pieces are:

and

The part that still exists only on my dev server is a virtual shelly device which will be pushed to shelly-connector in few days.