mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-25 17:17:54 +01:00
Update ble_presence.rst (#4181)
The original example code to generate the list of discovered BLE devices was not up to date and didn't work for the last year since the following PR: https://github.com/esphome/esphome/pull/4049 With this update users can easily find out how to get this information.
This commit is contained in:
parent
5a077ecfab
commit
b9b975cc47
@ -82,35 +82,29 @@ Setting Up Devices
|
||||
------------------
|
||||
|
||||
To set up binary sensors for specific BLE beacons you first have to know which MAC address
|
||||
to track. Most devices show this screen in some setting menu. If you don't know the MAC address,
|
||||
to track. Most devices show this screen in some settings menu. If you don't know the MAC address,
|
||||
however, you can use the ``esp32_ble_tracker`` hub without any binary sensors attached and read through
|
||||
the logs to see discovered Bluetooth Low Energy devices.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry for finding MAC addresses
|
||||
esp32_ble_tracker:
|
||||
|
||||
Using the configuration above, first you should see a ``Starting scan...`` debug message at
|
||||
boot-up. Then, when a BLE device is discovered, you should see messages like
|
||||
``Found device XX:XX:XX:XX:XX:XX`` together with some information about their
|
||||
address type and advertised name. If you don't see these messages, your device is unfortunately
|
||||
currently not supported.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry for finding
|
||||
# Service UUIDs and iBeacon UUIDs and identifiers
|
||||
# MAC addresses, Service UUIDs, iBeacon UUIDs, and identifiers
|
||||
esp32_ble_tracker:
|
||||
on_ble_advertise:
|
||||
- then:
|
||||
|
||||
logger:
|
||||
level: VERY_VERBOSE
|
||||
|
||||
You can increase the :ref:`log level <logger-log_levels>` to ``VERY_VERBOSE`` to review detailed
|
||||
data for each discovered BLE device. This will make ESPHome print Service UUIDs, iBeacon UUIDs,
|
||||
iBeacon major and minor identifiers, BLE manufacturer data, RSSI and other data useful for
|
||||
debugging purposes. Note that this is useful only during set-up and a less verbose log level
|
||||
should be specified afterwards.
|
||||
Using the configuration above, first, you should see a ``Starting scan...`` debug message at
|
||||
boot-up. Then, when a BLE device is discovered, you should see messages like
|
||||
``Parse Result:`` together with some information about their MAC address, address type,
|
||||
advertised name, Service UUIDs, iBeacon UUIDs, iBeacon major and minor identifiers,
|
||||
BLE manufacturer data, RSSI, and other data useful for debugging purposes.
|
||||
Note that this is useful only during set-up and a less verbose log level
|
||||
should be specified afterwards. If you don't see these messages, your device is unfortunately
|
||||
currently not supported.
|
||||
|
||||
Please note that devices that show a ``RANDOM`` address type in the logs probably use a privacy
|
||||
feature called Resolvable Private Addresses to avoid BLE tracking. Since their MAC-address periodically
|
||||
|
Loading…
Reference in New Issue
Block a user