Hi all.
I installed ESP32 wroom32 to HA to find BT devices.
The esp seems to load but it doesn’t find any BT devices.
Is there a test I can perform to see that it actually is able to find devices?
Hi all.
I installed ESP32 wroom32 to HA to find BT devices.
The esp seems to load but it doesn’t find any BT devices.
Is there a test I can perform to see that it actually is able to find devices?
Did you activate the BT proxy in the ESPHome YAML file?
Assuming you did in fact compile in bluetooth proxy, it will only find BLE devices, and onky those with a HA integration.
Well your going to be dissapointed… You should read the documentation, it explains all of this, it explains how to view the log and what devices are being detected… I you gotta make an effort and put in the work or else your going to be right here asking questions that are already answered in the documentation.
I’m happy to reas the docs but which one is the right one to read out the hundreds in esp homeassitant?
The assumption was based on the fact that the esp device can bridge between BT devices so HA can see them.
You need the Bluetooth proxy as I linked to earlier.
Post your ESP32 code here so we can see what you’ve got.
The ESP will see and report any BLE broadcasts that are in-range, but you do need an Integration in HA to have any show up there. What BLE device are you trying to integrate into HA?
Well clearly you havnt bothered to look because there aren’t hundreds of them and it clearly tells you how to do what you were asking and likewise it tells you that this isn’t some universal BT hub and just because something is BT doesn’t mean it is supported. Just go read the documentation, geeze! It’s 1 damn page for each BT proxy, BT Server, etc. 1 PAGE! Anyone who bothered to even try would know this. All you have to do is try, it’s not hard to do…
Actually there are three methods by which ha can get bluetooth comms via esphome
Esphome bluetooth proxy Bluetooth Proxy — ESPHome. This requires a bluetooth device supported by ha. See also Bluetooth - Home Assistant. This also works via bluetooth hardware like is built into your computer. Esphome is just a conduit.
Esphome has some built in bluetooth components, like Xiaomi Mijia BLE Sensors — ESPHome
You can leverage esphome with arbitrary ble devices, if you can figure out the encoding. See this for example Chinese bluetooth BBQ meat probe with ESP32 - #8 by paulo.richards
I just realised I have not distinguished between BT proper and BLE in this post, but the difference is important.
Thank you for the links!
I didn’t know there’s a difference between BT and BLE.
I was hoping to use the ESP32 to bypass Xiaomi’s gateway so I can communicate directly with my Xiaomi Honeywell smoke alarms.
That’s the code:
esphome:
name: esp1
friendly_name: ESP1
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "*********"
ota:
password: "********"
esp32_ble_tracker:
scan_parameters:
active: true
bluetooth_proxy:
active: true
wifi:
ssid: ****
password: ****
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp1 Fallback Hotspot"
password: "fk5RFcMTpx44"
captive_portal:
Temporarily change your logging level so you can see what any nearby BLE devices are broadcasting. Use VERBOSE or VERY_VERBOSE
logger:
level: VERY_VERBOSE
here is the log file: ESp32logs - Pastebin.com
I also changed my ESP yml to:
esphome:
name: esp1
friendly_name: ESP1
esp32:
board: esp32dev
framework:
type: esp-idf
# Enable logging
logger:
#level: VERY_VERBOSE
# Enable Home Assistant API
api:
encryption:
key: "****"
ota:
password: "****"
esp32_ble_tracker:
scan_parameters:
interval: 1100ms
window: 1100ms
active: true
bluetooth_proxy:
active: true
wifi:
ssid: ***
password: ***
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp1 Fallback Hotspot"
password: "******"
captive_portal:
Unless you have a wired ethernet connected esp, this is incorrect. Readt the docs, you have been pointed to them. I specifically refer to this
For WiFi-based proxies, changing the
interval
orwindow
from their default values may result in an unstable WiFi connection. Using the default values forinterval
andwindow
will usually resolve any instability.
Anyway, your log clearly shows regular connections from BLE devices, eg
[02:46:17][V][bluetooth_proxy:058]: Proxying 2 packets
[02:46:17][VV][api.service:345]: send_bluetooth_le_raw_advertisements_response: BluetoothLERawAdvertisementsResponse {
[02:46:17] advertisements: BluetoothLERawAdvertisement {
[02:46:17] address: 15474406026451
[02:46:17] rssi: -79
[02:46:17] address_type: 1
[02:46:17] data: '\xff
[02:46:17][V][esp32_ble:178]: (BLE) gap_event_handler - 3
[02:46:17][V][bluetooth_proxy:058]: Proxying 1 packets
[02:46:17][VV][api.service:345]: send_bluetooth_le_raw_advertisements_response: BluetoothLERawAdvertisementsResponse {
[02:46:17] advertisements: BluetoothLERawAdvertisement {
[02:46:17] address: 119766204659473
[02:46:17] rssi: -82
[02:46:17] address_type: 1
[02:46:17] data: '\xff
[02:46:17][V][esp32_ble:178]: (BLE) gap_event_handler - 3
What are you not seeing that you expected to see?
to actually see the devices in Devices & Services and bypass Xiaomi gateway so HA can communicate with my Honeywell fire sensors
Is there an integration in home assistant for the honeywell fire sensor?
Is there an integration in esphome for the honeywell fire sensor?
Or are you trying to develop itself by the methods demonstrated by the 3rd option in my previous post?
Honestly, I thought that simply being a BT proxy, it would find them automatically.
The Mi gateway isn’t working well on HA with its current firmware version, so I thought I could bypass it by using ESP. Guess I was wrong.