2018-08-22 22:05:28 +02:00
|
|
|
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.
|
2021-11-16 03:19:33 +01:00
|
|
|
:image: bluetooth.svg
|
2018-11-14 22:12:27 +01:00
|
|
|
:keywords: ESP32
|
|
|
|
|
2018-08-22 22:05:28 +02:00
|
|
|
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.
|
|
|
|
|
2023-10-27 00:29:59 +02:00
|
|
|
.. 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.
|
|
|
|
|
2018-11-19 18:32:16 +01:00
|
|
|
.. code-block:: yaml
|
2018-08-22 22:05:28 +02:00
|
|
|
|
|
|
|
# Example configuration entry
|
|
|
|
esp32_ble_tracker:
|
|
|
|
|
|
|
|
sensor:
|
2019-10-31 15:34:28 +01:00
|
|
|
# RSSI based on MAC address
|
2018-08-22 22:05:28 +02:00
|
|
|
- platform: ble_rssi
|
|
|
|
mac_address: AC:37:43:77:5F:4C
|
|
|
|
name: "BLE Google Home Mini RSSI value"
|
2019-10-31 15:34:28 +01:00
|
|
|
# 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"
|
2019-10-31 15:34:28 +01:00
|
|
|
|
|
|
|
.. 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`.
|
2018-08-22 22:05:28 +02:00
|
|
|
|
|
|
|
Configuration variables:
|
2018-08-24 22:44:01 +02:00
|
|
|
------------------------
|
2018-08-22 22:05:28 +02:00
|
|
|
|
2019-10-31 15:34:28 +01:00
|
|
|
- **name** (**Required**, string): The name of the sensor.
|
|
|
|
- **mac_address** (*Optional*, MAC Address): The MAC address to track for this
|
2022-08-31 06:42:51 +02:00
|
|
|
sensor. Note that exactly one of ``mac_address``, ``service_uuid`` or ``ibeacon_uuid`` must be present.
|
2019-10-31 15:34:28 +01:00
|
|
|
- **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``, ``service_uuid`` or ``ibeacon_uuid`` must be present.
|
|
|
|
- **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``,
|
|
|
|
``service_uuid`` or ``ibeacon_uuid`` must be present.
|
|
|
|
- **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.
|
2018-08-22 22:05:28 +02:00
|
|
|
- **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>`.
|
2018-08-22 22:05:28 +02:00
|
|
|
|
|
|
|
See Also
|
2018-08-24 22:44:01 +02:00
|
|
|
--------
|
2018-08-22 22:05:28 +02:00
|
|
|
|
2019-02-07 13:54:45 +01: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`
|
2019-02-07 13:54:45 +01:00
|
|
|
- :ghedit:`Edit`
|