esphome-docs/components/sensor/ble_rssi.rst

80 lines
3.4 KiB
ReStructuredText
Raw Normal View History

ESP32 Bluetooth Low Energy RSSI Sensor
======================================
2018-11-14 22:12:27 +01:00
.. seo::
:description: Instructions for setting up RSSI sensors for the ESP32 BLE.
:image: bluetooth.svg
2018-11-14 22:12:27 +01:00
:keywords: ESP32
The ``ble_rssi`` sensor platform lets you track the RSSI value or signal strength of a
BLE device. See :ref:`the binary sensor setup <esp32_ble_tracker-setting_up_devices>` for
instructions for setting up this platform.
.. warning::
The BLE software stack on the ESP32 consumes a significant amount of RAM on the device.
**Crashes are likely to occur** if you include too many additional components in your device's
configuration. Memory-intensive components such as :doc:`/components/voice_assistant` and other
audio components are most likely to cause issues.
.. code-block:: yaml
# Example configuration entry
esp32_ble_tracker:
sensor:
# RSSI based on MAC address
- platform: ble_rssi
mac_address: AC:37:43:77:5F:4C
name: "BLE Google Home Mini RSSI value"
# RSSI based on Identity Resolving Key (IRK)
- platform: ble_rssi
irk: 1234567890abcdef1234567890abcdef
name: "BLE Tracker iPhone"
# RSSI based on Service UUID
- platform: ble_rssi
service_uuid: '11aa'
name: "BLE Test Service 16 bit RSSI value"
2022-08-31 06:42:51 +02:00
# RSSI based on iBeacon UUID
- platform: ble_rssi
ibeacon_uuid: '68586f1e-89c2-11eb-8dcd-0242ac130003'
name: "BLE Test Service iBeacon RSSI value"
.. note::
Service UUID can be 16 bit long, as in the example, but it can also be 32 bit long
like `1122aaff`, or 128 bit long like `11223344-5566-7788-99aa-bbccddeeff00`.
Configuration variables:
2018-08-24 22:44:01 +02:00
------------------------
- **name** (**Required**, string): The name of the sensor.
- **mac_address** (*Optional*, MAC Address): The MAC address to track for this
sensor. Note that exactly one of ``mac_address``, ``irk``, ``service_uuid`` or ``ibeacon_uuid``
must be present.
- **irk** (*Optional*, 16 byte hex string): The Identity Resolving Key (IRK) to track for this
sensor. Note that exactly one of ``mac_address``, ``irk``, ``service_uuid`` or ``ibeacon_uuid``
must be present.
- **service_uuid** (*Optional*, 16 bit, 32 bit, or 128 bit BLE Service UUID): The BLE
2022-08-31 06:42:51 +02:00
Service UUID which can be tracked if the device randomizes the MAC address. Note that exactly one of
``mac_address``, ``irk``, ``service_uuid`` or ``ibeacon_uuid`` must be present.
2022-08-31 06:42:51 +02:00
- **ibeacon_uuid** (*Optional*, string): The `universally unique identifier <https://en.wikipedia.org/wiki/Universally_unique_identifier>`__
to identify the beacon that needs to be tracked. Note that exactly one of ``mac_address``,
``irk``, ``service_uuid`` or ``ibeacon_uuid`` must be present.
2022-08-31 06:42:51 +02:00
- **ibeacon_major** (*Optional*, int): The iBeacon major identifier of the beacon that needs
to be tracked. Usually used to group beacons, for example for grouping all beacons in the
same building.
- **ibeacon_minor** (*Optional*, int): The iBeacon minor identifier of the beacon that needs
to be tracked. Usually used to identify beacons within an iBeacon group.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
2019-02-17 12:28:17 +01:00
- All other options from :ref:`Sensor <config-sensor>`.
See Also
2018-08-24 22:44:01 +02:00
--------
- :doc:`/components/esp32_ble_tracker`
- :doc:`/components/sensor/index`
2019-05-12 22:44:59 +02:00
- :apiref:`ble_rssi/ble_rssi_sensor.h`
- :ghedit:`Edit`