ESPhome Bluetooth BLE proxy stops working

Hello wonderful people!

I’m running the latest HA (2023.11.6) and ESPHome (2023.11.6) versions with the newest BLE Proxy repo (github://esphome/firmware/bluetooth-proxy/wt32-eth01.yaml).

My issue is that it does not work longer than a day or two.

When it works it’s flawless.
I’ve tried on 2 different ESP32 boards and a 3rd one with ethernet and all have the same issue.
The device is never offline and I can see the logs. Sometimes it gets suck at “Pausing scan to make connection…” and others at “Starting scan…” while other times the logs look as normal sending, connecting and receiving but the actual BLE devices do nothing and HA shows no updates either.

Any ideas?

Thanks!

That’s a common problem. I have two BT proxies running on different ESP32 hardware and I created an automation to get it running more than only for hours.
My automation activates “Safe Mode Boot” of the proxy under certain cirumstances. But in rare cases the proxy hangs completly (it’s no more visible on my WLAN) and a power reset is necessary :open_mouth:

That’s definitely not normal behavior. I have 6 all acting as BT Proxies in addition to whatever original purpose they had (some of which are reasonably demanding too) and have never had an issue with any of them like that.

To be honest, I’m not even sure what safe boot even does as it has already stopped responding. Power cycling sometimes solves the issue but many times it does not for me.

Woah, that’s a lot of BLE stuff going on xD
I’m not adding anything else to them even though I would like to. I don’t want to make it any more unstable than it is.
Are you using the github code or custom code?

You don’t need to do anything special. Just use a base YAML for your device, use the esp-idf framework (remove captive portal, if you have it) and add both the bluetooth-proxy and esp32_ble_tracker components.

Make sure you don’t add the scan parameters for the tracker configuration (unless you’re using an Ethernet board). Seems a lot of people misread the docs and add that rather than leaving it alone and letting it use th default settings.

I’ve simply added that to my already existing ESPHome projects (none of mine are/were dedicated BT Proxies).

I started from scratch on https://esphome.io/projects/ with two BT Proxies, one with M5Stack Atom Lite and the other on a generec ESP32 board.
Right now I cannot say, if both proxies are causing issues.
After Xmas I replace the generic ESP32 board with another M5Stack Atom Lite. My setup consists of 7 BTHome devices and 10 eQ-3 Bluetooth Smart Thermostats (dbuezas).
I know that two BT proxies are to less for my usecase, but nevertheless I wouldn’t expect that a BT proxy becomes unresponsive and needs a power reset to work again.

So I followed your suggestions and made a BLE proxy yaml file with esphome, esp32, ethernet, api, logger, ota. esp32_ble_tracker, bluetooth_proxy and nothing else and it seems to have held up for the past 2 days…
Maybe the Ready-Made Projects — ESPHome and the Github code have some slight issues?

Will keep an eye on it. It has run for a few days before so… who knows xD

Do you notice a group of radiators failing? I’m wondering if the internal bluetooth has anything to do with it too…

This is the key, I have a device that is basically all it does. I’ve thoroughly tested with arduino and esp-idf and the latter is quite stable in comparison.

Oh yeah, I’m using the esp-idf!

If one eQ-3 Bluetooth Smart Thermostats (dbuezas) fails, the others will follow if I don’t use my automation to reset all proxies. Since two days I use three Proxies, two with M5 Stack Atom Lite and one on a generic ESP32. But it’s nervertheless unstable and without my automation not usable.