Fix weak Bluetooth in Home Assistant with a £5 ESP32 Bluetooth proxy
My Home Assistant runs on a small mini PC with weak built-in Bluetooth. It could see my robot mower at the bottom of the garden, but commands would register and then nothing would happen. A cheap ESP32 near the mower's dock fixed it by acting as a Bluetooth proxy: Home Assistant now talks to the mower through it over Wi-Fi.
- Parts
- About £5
- Skill
- Beginner
- Time
- About 30 minutes
- Needs
- Home Assistant with ESPHome
What you get
A Bluetooth proxy extends Home Assistant's Bluetooth to wherever you put the ESP32. Home Assistant treats all your proxies and Bluetooth adapters as one pool, so you can add more around the house and it uses whichever is nearest. It works with any Bluetooth Low Energy device Home Assistant supports: mowers, sensors, plant monitors, locks and more.
This uses the Bluetooth proxy feature built into ESPHome. No custom code is needed.
Parts list
| Part | Why you need it | |
|---|---|---|
| ESP32-WROOM-32 development board | The classic ESP32 with Wi-Fi and Bluetooth. Cheap and well supported. | Check price |
| Micro-USB data cable and USB plug | Powers the board where it sits and flashes it the first time. | Check price |
| ESP32 board with Ethernet (optional) | A wired network connection frees the radio for Bluetooth and is ESPHome's preferred option for proxies. | Check price |
Wiring
None. Place the ESP32 near the devices you want to reach, power it from a USB plug, and keep it at least 3 metres from your router, which can interfere with Bluetooth.
Setting it up
- In Home Assistant, install the ESPHome add-on if you haven't already.
- Create a new ESP32 device in ESPHome and add the Bluetooth proxy lines shown below.
- Flash the board over USB the first time. Home Assistant finds it; add it, and give it an area (mine is "Garden").
- Put it near the devices you want to reach. Home Assistant starts routing Bluetooth through it automatically.
esp32:
board: esp32dev
framework:
type: esp-idf
esp32_ble_tracker:
bluetooth_proxy:
active: trueAdd these to the device ESPHome creates, which already has Wi-Fi, the API and updates set up.
What I learned building it
Make sure it can send, not just listen
active: true lets Home Assistant send commands through the proxy, not just read broadcasts. It's the default on the ESP32, but I set it anyway, because sending commands was my whole problem.
Close the phone app
Many devices only allow one Bluetooth connection at a time. While my mower's phone app was connected, Home Assistant couldn't get through. Close the app when you're testing.
Keep ESPHome and Home Assistant files apart
If ESPHome complains that the "esphome section is missing", you've pasted Home Assistant automation code into an ESPHome device by mistake. The proxy file belongs in ESPHome, and automations belong in Home Assistant.
Use the esp-idf framework
It uses less memory than the Arduino option and is what ESPHome recommends for Bluetooth proxies.
Please read before you build. This page is for educational purposes and shares a hobby project I built for my own home. You build and use it at your own risk. Product and brand names mentioned belong to their owners, and none of them make, support or endorse this project. Adding home-made equipment may affect a product's warranty, so check with the manufacturer if that matters to you. The boards run on low-voltage USB power and nothing here involves mains wiring. Gadgets Galore accepts no responsibility for damage, loss or injury from following this guide.
Common questions
Will it work with Bluetooth speakers or headphones?
No. Bluetooth proxies only handle Bluetooth Low Energy devices, the kind smart home gadgets use.
How many proxies can I have?
As many as you need. Home Assistant pools them and uses whichever is nearest each device.
Wi-Fi or Ethernet?
Either works. Ethernet is better because it leaves the ESP32's radio free for Bluetooth.
Does it need custom code?
No. The Bluetooth proxy is a standard ESPHome feature.
More projects
- iBoost to Home Assistant (ESP8266)
- Power station to Home Assistant (ESP32)