HubiBtPresence allows for reporting to Hubitat the proximity of Bluetooth devices (called from here on "BT device(s)") to a specific device (called from here on "the BT scanner"), via virtual presence devices in Hubitat.
This has been successfully tested with Tile Pro and Tile Mate trackers on a raspberry 3.
BT tracking is not an exact science. Here's a non-exhaustive list of issues that can impact the scanner's reliability:
- Not all BT devices advertise their existence.
- Those that do may not do so continuously (for example, phones may only advertise when in the BT settings).
- Devices may not be on all the time, or when on may regularly turn off their BT stack to conserve power.
- The strength of the BT signal (RSSI, Received Signal Strength Indicator) is affected by the environment (walls, other devices), the device's battery levels, etc.
- Some BT devices constantly randomize their MAC address for privacy reasons. If the BT device is not paired with the scanner device, the BT scanner may only see constantly changing MAC addresses from the BT device, which prevents from identifying/tracking the device.
- Some BT devices will stop advertising their presence when accessed. For example, Tile trackers will stop advertising their presence if the Tile app is opened on a nearby phone (this is also why only one phone can "Find" a given Tile at any given time).
- BT range is small (few rooms max). For long distance coverage, the BT presence needs to be completed by a cloud based-integration, such as this one for Tile trackers.
- A device (the BT scanner) on the same LAN as the Hubitat hub that will be performing the scanning.
- The BT scanner has a BT adapter. This can be an integrated one or a USB one. Note: raspberry 3 and later have an integrated BT adapter.
- Linux installed on the BT scanner: while Python is cross platform, this app depends on the
btmgmtutility that is only available on Linux.
btmgmtcommands are installed on the BT scanner. If missing,
apt install bluezmay fix it.
- Python 3.9 and pip3 installed on the BT scanner. Run
sudo apt-get install python3-pipif missing.
sudopermissions for the account running the app (a
- Note: app can run in a Docker container on the BT scanner (a pre-built image is provided). It is however recommended to do initial setup directly on the host for testing/troubleshooting.
Setup instructions are here