prefixkit Ask an engineerAsk Support RU

Smart home

Bluetooth proxy on an ESP32

Turn a $5 ESP32 into a Bluetooth proxy so Home Assistant reaches Xiaomi BLE thermometers, plant sensors and SwitchBot locks anywhere in the house. A ready ESPHome config for ESP32, C3 and S3.

ESP32 DevKit (ESP32-WROOM-32)
esphome:
  name: bluetooth-proxy
  friendly_name: "Bluetooth proxy"

esp32:
  board: esp32dev
  framework:
    type: esp-idf

logger:
api:
  encryption:
    key: !secret api_key
ota:
  - platform: esphome
    password: !secret ota_password
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap: {}
captive_portal:

esp32_ble_tracker:
  scan_parameters:
    active: true

bluetooth_proxy:
  active: true

button:
  - platform: restart
    name: "Restart"
ESP32-C3 (DevKitM-1, SuperMini)
esphome:
  name: bluetooth-proxy
  friendly_name: "Bluetooth proxy"

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: esp-idf

logger:
api:
  encryption:
    key: !secret api_key
ota:
  - platform: esphome
    password: !secret ota_password
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap: {}
captive_portal:

esp32_ble_tracker:
  scan_parameters:
    active: true

bluetooth_proxy:
  active: true

button:
  - platform: restart
    name: "Restart"
ESP32-S3 DevKitC-1
esphome:
  name: bluetooth-proxy
  friendly_name: "Bluetooth proxy"

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf

logger:
api:
  encryption:
    key: !secret api_key
ota:
  - platform: esphome
    password: !secret ota_password
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap: {}
captive_portal:

esp32_ble_tracker:
  scan_parameters:
    active: true

bluetooth_proxy:
  active: true

button:
  - platform: restart
    name: "Restart"

Keys and Wi-Fi come from secrets.yaml in ESPHome. Want sensors on the same board? Tick Bluetooth proxy in the ESPHome generator.

Why

Bluetooth has a short range: the server’s adapter hears sensors in one or two rooms. An ESP32 proxy picks up BLE devices around it and passes them to Home Assistant over Wi-Fi. A few proxies around the house and Bluetooth works everywhere. Home Assistant finds the proxy by itself; active mode (active: true) also lets it connect to devices such as locks, bulbs and buttons.

Tips

  • It has to be an ESP32 (plain, C3 or S3): the ESP8266 has no Bluetooth.
  • Wi-Fi and Bluetooth share one radio: keep only simple sensors on a proxy board, no cameras or heavy logic.
  • The most stable proxies run on Ethernet boards (Olimex ESP32-POE, WT32-ETH01); ESPHome publishes ready firmware for them in its Bluetooth Proxy section.
  • Free pins: ESP32 pinout.

What to buy

ESP32: AliExpress · ESP32-C3: AliExpress · BLE thermometer: AliExpress

Links open a search in the shop; some are affiliate links: buying through them costs you nothing extra and supports this site. We do not sell devices or get them from manufacturers.

Idea?