Bluetooth Proxy

Home Assistant can expand its Bluetooth reach by communicating through the Bluetooth proxy component in ESPHome. The individual device integrations in Home Assistant (such as BTHome) will receive the data from the Bluetooth Integration in Home Assistant which automatically aggregates all ESPHome Bluetooth proxies with any USB Bluetooth Adapters you might have. This exceptional feature offers fault tolerant connection between the Bluetooth devices and Home Assistant.

Note that while this component is named bluetooth_proxy, only BLE devices (and their Home Assistant integrations) are supported.

If you’re looking to create an ESPHome node that is just a Bluetooth Proxy, see our Bluetooth Proxy installer website.

Warning

Active connections

The Bluetooth proxy of ESPHome provides Home Assistant with a maximum number of 3 simultaneous active connections. Devices which maintain a continuous active connection will consume one of these constantly, whilst devices which do periodic disconnections and reconnections will permit using more than 3 of them (on a statistical basis). Passively broadcasted sensor data (that is advertised by certain devices without active connections) is received separately from these, and is not limited to a specific number.

The ESP32 Platform component should be configured to use the esp-idf framework, as the arduino framework uses significantly more memory and performs poorly with the Bluetooth proxy enabled. When switching from arduino to esp-idf, make sure to update the device with a serial cable as the partition table is different between the two frameworks as Over-the-Air Updates updates will not change the partition table.

The Web Server Component component should be disabled as the device is likely to run out of memory and will malfunction when both components are enabled simultaneously.

Not all devices are supported and ESPHome does not decode or keep a list. To find out if your device is supported, please search for it in the Home Assistant Integrations list.

Configuration:

bluetooth_proxy:
  • active (Optional, boolean): Enables proxying active connections. Defaults to false.

  • cache_services (Optional, boolean): Enables caching GATT services in NVS flash storage which significantly speeds up active connections. Defaults to true when using the ESP-IDF framework.

The Bluetooth proxy depends on ESP32 Bluetooth Low Energy Tracker Hub so make sure to add that to your configuration.

Improving reception performance

Use a board with an Ethernet connection to the network, to offload ESP32’s radio module from WiFi traffic, this gains performance on Bluetooth side. To maximize the chances of catching advertisements of the sensors, you can set interval equal to window in ESP32 Bluetooth Low Energy Tracker Hub scan parameter settings:

esp32_ble_tracker:
  scan_parameters:
    interval: 1100ms
    window: 1100ms

Note

For WiFi-based proxies, changing the interval or window from their default values may result in an unstable WiFi connection. Using the default values for interval and window will usually resolve any instability.

Avoid placing the ESP node in racks, close to routers/switches or other network equipment as EMI interference will degrade Bluetooth signal reception. For best results put as far away as possible, at least 3 meters distance from any other such equipment. Place your ESPHome devices close to the Bluetooth devices that you want to interact with for the best experience.

See Also