I have multiple ESP32 D1 Mini devices that run on ESPHome. I wanted to add a Bluetooth Proxy to them, but every time I try, the devices go offline and remain like that until I upload a clean install without the Bluetooth code using a USB cable.
To troubleshoot this issue, I tested it on a new ESP32 D1 Mini device that had no pre-existing code. I installed the basic code, and everything worked fine. However, as soon as I added the ESPHome Bluetooth proxy code and installed it, the device goes into offline mode, and I cannot not do anything until I installed a clean code without the Bluetooth code.
What could be causing this problem, and what am I doing wrong?
Here is my code with Bluetooth Proxy in the end.
esphome:
name: bluetooth-proxy-test
friendly_name: Bluetooth Proxy Test
esp32:
board: esp32dev
framework:
type: esp-idf
logger:
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
captive_portal:
### THE PROBLEM STARTS WHEN I ADD THE FOLLOWING CODE:
esp32_ble_tracker:
scan_parameters:
interval: 1100ms
window: 1100ms
active: true
bluetooth_proxy:
active: true
Not sure if it’s your problem or not, but I had to remove captive portal on all my BT Proxies (my memory is it wouldn’t even compile, but it’s been a long time).
Also, per the docs you shouldn’t be specifying the interval or window unless you’re using Ethernet. I doubt this is your problem though.
Is it possible that my ESP32 D1 Minis have problems with Bluetooth? Should I try to purchase them again? Does anyone can recommend me ESP32 D1 Mini that tested and works as a Bluetooth Proxy?
My logs in ESPHome add-in do not show me anything after the update started. When I use Logs on the web.esphome.io page, they freeze and I cannot download logs. I tried it multiple times and I tried it using Microsoft Edge and Google Chrome. It freezes here:
It just removes the files that were downloaded/generated to compile the firmware. Old files can lead to compile errors like you were seeing. It’s a good first step to troubleshoot issues during the firmware compile process like you were seeing in the logs.
It’s a good idea to do a clean build when adding or removing components, or after an esphome update.
Most of the time, the build will just fail for a random reason, but you were unlucky in that it failed at runtime instead.