Update/Edit: TL;DR: DO NOT RENAME YOUR BLUETOOTH PROXIES!
Original Post:
Adding to the growing list of people who can’t seem to get it working.
I flashed 3 ESP-WROOM-32 with esphome using the web flasher shortly before 2022.10 was released (passive-only proxies at that moment).
A few days later, when 2022.10 was released, I added them to Home Assistant and adpopted them in the esphome addon. At the time I did this an update was present, which I immediately applied. This brought all proxies to 2022.9.4.
I have four Mi thermostats, three of them still running on stock firmware, one with modified firmware set to use the “BTHome” broadcast mode (I triple checked this). None of them are turning up in the integrations tab and when I try to manually add an integration (either Xiamo BLE or BTHome), the software states that no devices could be found.
I configured one of the proxies to use verbose logging to validate visibility of the devices:
substitutions:
name: "bluetooth-proxy-asdf"
packages:
esphome.bluetooth-proxy: github://esphome/bluetooth-proxies/esp32-generic.yaml@main
esphome:
name: ${name}
name_add_mac_suffix: false
bluetooth_proxy:
active: true
logger:
level: VERBOSE
# Enable Home Assistant API
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
In its log, I can see the following lines, among others:
[...]
[00:13:54][V][bluetooth_proxy:023]: Proxying packet from ATC-Bed - A4:C1:38:22:D4:F2. RSSI: -54 dB
[00:14:04][V][bluetooth_proxy:023]: Proxying packet from LYWSD03MMC - A4:C1:38:A9:75:08. RSSI: -94 dB
[00:14:04][V][bluetooth_proxy:023]: Proxying packet from LYWSD03MMC - A4:C1:38:90:51:68. RSSI: -53 dB
[...]
The LYWSD03MMC devices seem to be two of the stock Mi thermostats, ATC-Bed is my bedroom thermostat flashed with ATC custom firmware.
So apparently the bluetooth proxy sees everything that it should (the range seems to be quite impressive, I don’t think I would have needed three proxies for my appartment), but Home Assistant somehow doesn’t pick it up.
Any idea what the problem could be in my case?
Edit:
There must have been a short timeframe in which it was working (either before I upgraded the ESP32 or even before I adopted them). A few days ago, I had integrations detected for the Mi thermostats. However, when I tried to add them it showed zero devices and zero entities, as if they had dissappeared in the meantime. I deleted these non-working integrations.
Edit2 and potential solution:
Aaaaaalright. It seems that, by chance, I found the solution to my problem.
While looking for something else, I found that my /config/home-assistant.log
was spammed with the following lines every minute:
2022-10-19 00:47:34.449 WARNING (MainThread) [homeassistant.components.esphome] Name of device esp32-bluetooth-proxy-cd350c changed to bluetooth-proxy-fancyname1, potentially due to IP reassignment
2022-10-19 00:47:48.889 WARNING (MainThread) [homeassistant.components.esphome] Name of device esp32-bluetooth-proxy-9e103c changed to bluetooth-proxy-fancyname2, potentially due to IP reassignment
2022-10-19 00:48:13.756 WARNING (MainThread) [homeassistant.components.esphome] Name of device esp32-bluetooth-proxy-fc5e8c changed to bluetooth-proxy-fancyname3, potentially due to IP reassignment
Two days earlier, the same log stated:
2022-10-16 23:26:08.419 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for esp32-bluetooth-proxy-9e103c @ 192.168.0.122: Server sent a different name 'bluetooth-proxy-fancyname2'
I went right back into ESPHome and changed all fancy names I had given back to the original ones (just copy them out of home-assistant.log) and almost immediately, my Mi thermostats showed up as available integrations.
I consider this a bug and would like to report it. Does anyone have an idea where the right place might be? Is this an issue in the Home Assistant core? Is this an ESPHome issue? Is it something entirely different?
Hopefully the last edit:
People have already identified this issue before. Here’s the related Github issue: renamed ESPHome entities cause endless 'potentially due to IP reassignment' Error in HA log · Issue #79917 · home-assistant/core · GitHub