
* Sets front matter defaults * Removes default front matter from section templates/pages * Removes default front matter from addon pages * Removes default front matter from integration pages * Removes default front matter from posts * Removes default front matter from docs pages * Removes default front matter from other pages * Fixes blog category pages
2.5 KiB
title, description, logo, ha_category, ha_iot_class, ha_release, redirect_from
title | description | logo | ha_category | ha_iot_class | ha_release | redirect_from | ||
---|---|---|---|---|---|---|---|---|
Bluetooth LE Tracker | Instructions for integrating bluetooth low-energy tracking within Home Assistant. | bluetooth.png |
|
Local Polling | 0.27 |
|
This tracker discovers new devices on boot and in regular intervals and tracks Bluetooth low-energy devices periodically based on interval_seconds value. It is not required to pair the devices with each other.
Devices discovered are stored with 'BLE_' as the prefix for device mac addresses in known_devices.yaml
.
This platform requires pybluez to be installed. On Debian based installs, run
$ sudo apt install bluetooth
Before you get started with this platform, please note that:
- This platform is incompatible with Windows
- This platform requires access to the bluetooth stack, see Rootless Setup section for further information
To use the Bluetooth tracker in your installation, add the following to your configuration.yaml
file:
# Example configuration.yaml entry
device_tracker:
- platform: bluetooth_le_tracker
{% configuration %} track_new_devices: description: If new discovered devices are tracked by default. required: false default: true type: boolean interval_seconds: description: Seconds between each scan for new devices. required: false default: 12 type: integer {% endconfiguration %}
As some BT LE devices change their MAC address regularly, a new device is only discovered when it has been seen 5 times. Some BTLE devices (e.g., fitness trackers) are only visible to the devices that they are paired with. In this case, the BTLE tracker won't see this device.
Rootless Setup
Normally accessing the Bluetooth stack is reserved for root, but running programs that are networked as root is a bad security wise. To allow non-root access to the Bluetooth stack we can give Python 3 and hcitool the missing capabilities to access the Bluetooth stack. Quite like setting the setuid bit (see Stack Exchange for more information).
$ sudo apt-get install libcap2-bin
$ sudo setcap 'cap_net_raw,cap_net_admin+eip' `readlink -f \`which python3\``
$ sudo setcap 'cap_net_raw+ep' `readlink -f \`which hcitool\``
A restart of Home Assistant is required.
For additional configuration variables check the Device tracker page.