That looks like the YAML I’d tried on my own that didn’t appear to do anything. How can I see if it’s working?
If it is working, it is fully transparent so you woudn’t notice a thing other than that HA discovers the devices the ESP sees. What devices do you expect to see through the proxy? A config like this is working fine for me to relay Inkbird temperature sensor, Xiaomi plant sensors, some Tiles and Oral-B toothbrushes.
I have a bunch of bluetooth govee thermometers (and soon inkbird fishtank temp) and a couple iBeacons on my trash cans that show thru the USB Bluetooth adapters but not reliably because I couldn’t get the dongle into an ideal location. It sounded like the bt-proxy would let me put a WiFi bluetooth ESP32 right by the location of the beacons or devices that I want to see, but it still reports the source as the MAC of the USB dongle and I don’t see anywhere it lists any of the devices that the ESP32 can see like I can see everything in range of the USB dongle on command line to verify it’s working.
I guess I could go remove the working USB adapter and see if it can still detect but that seems like a silly thing to have to do in order to verify something is receiving, it seems I ought to be able to look at a logfile or status or source and tell if it was used
I must say, once I figured out that ESPHome itself was totally not needed that Wizard was quite easy for the M5Stack Atom Lite I use just as a Proxy. Run the installer, HA automatically discovers it and that’s it. No configuration needed.
Ofc. if you want to do more with it or different things, it’s not the right way to go probably.
That is exactly how it should work. It does for me.
The devices that HA sees are indeed no different from what you’d get if they were connected directly through the bluetooth of HA itself. I read you didn’t need a bluetooth adapter in HA for it to work. So you could try to disable it and see if all still works as expected. If it does you can be sure it is the proxy. If it doesn’t then no conclusion possible, maybe disabeling it disables a bit too much…
If you increase the log level of the proxy, you can see it send stuff to HA. Same goes for logging in HA, but I’m not sure if you’ll be able to see where it came from. I think I remember you could.
I guess I was expecting I’d be able to see the source if it was working properly, similar to what shows on the beacons that come over USB
Or be able to se what all is in range as devices spam, like I can with bluetoothctl
command line for USB adapters.
I turned up the log verbosity (as in the YAML posted) in hopes of seeing that but got nothing
After several minutes waiting:
INFO Reading configuration /config/esphome/esp32_bt_proxy_dining_room.yaml...
WARNING 'bt_proxy_dining_room': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-name
WARNING GPIO2 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Starting log output from bt_proxy_dining_room.apt using esphome API
INFO Successfully connected to bt_proxy_dining_room.apt
[08:30:03][I][app:102]: ESPHome version 2022.11.5 compiled on Dec 9 2022, 20:19:11
[08:30:03][C][status_led:019]: Status LED:
[08:30:04][C][status_led:020]: Pin: GPIO2
[08:30:04][C][wifi:504]: WiFi:
[08:30:04][C][wifi:362]: Local MAC: 78:21:84:DF:49:C0
[08:30:04][C][wifi:363]: SSID: [redacted]
[08:30:04][C][wifi:364]: IP Address: 192.168.3.154
[08:30:04][C][wifi:366]: BSSID: [redacted]
[08:30:04][C][wifi:367]: Hostname: 'bt_proxy_dining_room'
[08:30:04][C][restart:022]: Restart Switch 'bt_proxy_dining_room Restart'
[08:30:04][C][restart:022]: Icon: 'mdi:restart'
[08:30:04][C][api:138]: API Server:
[08:31:07][D][esp32_ble_tracker:264]: Starting scan...
I know there’s a LOT of things spamming out in range of it some mine some not.
Debug will not show it (It won’t show anything in fact). Try VERBOSE or VERY_VERBOSE. But turn it off afterward because logging takes up too much time to be able to relay all info.
Also note, for trackers you also need the integration in HA:
AH, that looks like it was it, the guides and forums I’d been seeing said to use DEBUG
to see what it is sending to HA, upping it to VERBOSE
seems to now show it can in fact see devices.
INFO Successfully connected to bt_proxy_dining_room.apt
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from KA20IC 3388 - DF:87:7C:0D:F7:9C. RSSI: -78 dB
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from PN771M Pen - 10:DC:B6:EB:CA:3E. RSSI: -44 dB
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from PN771M Pen - 10:DC:B6:EB:CA:3E. RSSI: -46 dB
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from PN771M Pen - 10:DC:B6:EB:CA:3E. RSSI: -44 dB
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from - 42:7F:87:16:B3:C1. RSSI: -89 dB
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from KA20IC 3388 - DF:87:7C:0D:F7:9C. RSSI: -76 dB
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from PN771M Pen - 10:DC:B6:EB:CA:3E. RSSI: -43 dB
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from PN771M Pen - 10:DC:B6:EB:CA:3E. RSSI: -55 dB
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from PN771M Pen - 10:DC:B6:EB:CA:3E. RSSI: -43 dB
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from KA20IC 3388 - DF:87:7C:0D:F7:9C. RSSI: -73 dB
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from PN771M Pen - 10:DC:B6:EB:CA:3E. RSSI: -54 dB
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from KA20IC 3388 - DF:87:7C:0D:F7:9C. RSSI: -77 dB
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from PN771M Pen - 10:DC:B6:EB:CA:3E. RSSI: -45 dB
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from PN771M Pen - 10:DC:B6:EB:CA:3E. RSSI: -44 dB
[08:42:00][V][bluetooth_proxy:020]: Proxying packet from KA20IC 3388 - DF:87:7C:0D:F7:9C. RSSI: -77 dB
[08:42:01][V][bluetooth_proxy:020]: Proxying packet from PN771M Pen - 10:DC:B6:EB:CA:3E. RSSI: -55 dB
[08:42:01][V][bluetooth_proxy:020]: Proxying packet from KA20IC 3388 - DF:87:7C:0D:F7:9C. RSSI: -74 dB
[08:42:01][V][bluetooth_proxy:020]: Proxying packet from PN771M Pen - 10:DC:B6:EB:CA:3E. RSSI: -43 dB
[08:42:01][D][api:102]: Accepted ::FFFF:C0A8:3DD
[08:42:01][V][api.connection:899]: Hello from client: 'Home Assistant 2022.10.5 (::FFFF:C0A8:3DD)' | API Version 1.7
[08:42:01][D][api.connection:917]: Home Assistant 2022.10.5 (::FFFF:C0A8:3DD): Connected successfully
[08:42:01][V][bluetooth_proxy:020]: Proxying packet from KA20IC 3388 - DF:87:7C:0D:F7:9C. RSSI: -73 dB
[08:42:01][V][bluetooth_proxy:020]: Proxying packet from PN771M Pen - 10:DC:B6:EB:CA:3E. RSSI: -47 dB
[08:42:01][V][bluetooth_proxy:020]: Proxying packet from PN771M Pen - 10:DC:B6:EB:CA:3E. RSSI: -45 dB
[08:42:01][V][bluetooth_proxy:020]: Proxying packet from KA20IC 3388 - DF:87:7C:0D:F7:9C. RSSI: -76 dB
[08:42:01][V][bluetooth_proxy:020]: Proxying packet from PN771M Pen - 10:DC:B6:EB:CA:3E. RSSI: -44 dB
Which makes sense, as I sit looking at this “PN771M Pen” is my laptop stylus.
I have these already in my HA configuration.yaml, which I think should be it?:
device_tracker:
- platform: snmp
host: 192.168.1.1
community: public
baseoid: .1.3.6.1.2.1.4.22.1.2
interval_seconds: 5
consider_home: 360
- platform: bluetooth_tracker
interval_seconds: 3
track_new_devices: true
consider_home: 600
- platform: bluetooth_le_tracker
interval_seconds: 3
track_new_devices: true
consider_home: 600
Not totally sure why the beacons still show the source MAC of the USB dongle given this is so much closer ought to be stronger.
But it’s good to finally see it is actually able to see devices!
Last question, is there a more efficient way to toggle logging without re-flashing? Some variable or switch I could toggle at runtime instead of compile-time? If not I can comment it and leave it in the YAML for later but it’d be slick to have a “show details” on/off button.
OMG! How could I have missed this. All happening whithout me knowing anything about it it
Since now also Shelly plus devices can work as Bluetooth proxy (last HA release and latest Shelly firmware), do I need to do anything besides click “configure” by each device? What should I use for example to integrate xiaomi BLE thermometers? Xiaomi integration and it will automatically find thermometers connected to Shellys?
It is not totally clear how this bluetooth works. And if I want to configure Bluetooth integration, it asks for Bluetooth dongle…
You shouldn’t have to do anything more for the Shelly devices beyond hitting configure and turning on the Bluetooth scanner
But what else then to include supported devices as entities?
If you flashed your ESPHome proxy before 7:00AM UTC on Tuesday, December 13, 2022, please flash again as it should improve the connection times.
Please use the web flash tool below or ESPHome addon 2022.12.0b5 or later as the main line ESPHome addon does not yet have the connection time improvements or aarch64 flashing fix:
https://esphome.github.io/bluetooth-proxies/
If you use the ESPHome addon you MUST connect the device via serial to flash it or you will not see the performance improvements with active connections.
What exactly does this do?
I ended up on this thread because ever since I took mine down and re-flashed with the USB/Serial like the “repair” notifications in Home Assistant said I’ve been experiencing endless problems where they just stop reporting for no apparent reason.
Dont get it what active means Here.
Can I then pair it with a bt device that uses a Pin?
Would Like to Connect to ekey bt Home Module to Control the door.
However from the Ton of bt devices I only See my toothbrush
Hey guys, do you know how to ‘publish’ the online/offline status of these bluetooth proxies in HA? Right now, I’ve got to go to the ESPHome addon dashboard to see if a device is online. Was wondering if that status could be transferred to HA within the integration (I guess I could scan the house wifi to see if it’s online, but I’d rather not do that).
Brendan, I’m trying to do the opposite of what you described.
I already have a working ESPHome Bluetooth Proxy on an ESP32 installed from the ESPHome page (ESPHome Bluetooth Proxy). I’m trying to add a DHT22 temperature and humidity sensor, so my ESPHome configuration yaml looks like this:
substitutions:
name: esp32-bluetooth-proxy-c67b64
friendly_name: Bluetooth Proxy
packages:
esphome.bluetooth-proxy: github://esphome/bluetooth-proxies/esp32-generic.yaml@main
esphome:
name: ${name}
name_add_mac_suffix: false
friendly_name: ${friendly_name}
api:
encryption:
key: XXXXXXXXXXXXXXXXXXXXX
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
sensor:
- platform: dht
pin: GPIO21
model: dht22
temperature:
name: "Entrance Temperature"
humidity:
name: "Entrance Humidity"
update_interval: 60s
yet I get the following error when compiling:
collect2: error: ld returned 1 exit status
*** [/data/esp32-bluetooth-proxy-c67b64/.pioenvs/esp32-bluetooth-proxy-c67b64/firmware.elf] Error 1
========================= [FAILED] Took 101.23 seconds =========================
If I remove the sensor section, it all works fine. Any ideas?
BT monitoring is a big load on an esp board. You also can’t use wifi and BT at the same time so it can’t transmit temp/humidity data and do BT because they share the same antenna. It’s not impossible to do more than 1 thing at a time but, these are really meant to be standalone esp so it can do its proxy job. Just install a second board or an esp8266 d1 mini for the dht plus whatever other sensors you need.