Asynchronous Python client for Tile trackers over Bluetooth.
This package talks to a Tile over Bluetooth Low Energy with bleak. It can:
- check that an auth key belongs to a Tile;
- make a Tile ring;
- read the Tile ID of a Tile, without an auth key;
- get the auth keys of the Tiles of an account from the Tile cloud.
This package is not affiliated with, endorsed by, or connected to Tile or Life360.
pip install tile-bleEach Tile has its own auth key. The key is a base64 string from the Tile cloud.
import asyncio
from bleak import BleakScanner
from tile_ble import TileBleDevice, TileVolume
async def main() -> None:
"""Ring a Tile."""
ble_device = await BleakScanner.find_device_by_address("D1:76:AA:BB:CC:DD")
assert ble_device is not None
tile = TileBleDevice(ble_device, "AAECAwQFBgcICQoLDA0ODw==")
await tile.async_authenticate()
await tile.async_ring(volume=TileVolume.MEDIUM)
if __name__ == "__main__":
asyncio.run(main())async_authenticate() proves that the key belongs to this Tile. It does not ring the Tile.
async_get_tiles() logs in to the Tile cloud with the account email and password. It returns a TileCloudTile with tile_id, name and auth_key for each Tile. auth_key is None when the cloud sends no key. Tile Labels are not returned.
from aiohttp import ClientSession
from tile_ble import async_get_tiles
async with ClientSession() as session:
tiles = await async_get_tiles(session, "user@example.com", "password")Use address_matches_tile_id() to find the Bluetooth device of each Tile.
Tiles advertise the TILE_SERVICE_UUID service. Use it to find Tiles in a scan.
The Tile cloud lists each Tile with its Tile ID. You can match a Tile ID to a Bluetooth address without a connection:
from tile_ble import address_matches_tile_id
address_matches_tile_id("D1:76:AA:BB:CC:DD", "5176aabbccdd0102") # TrueYou can also connect to a Tile and read its Tile ID. This does not need an auth key:
from tile_ble import async_read_tile_id
tile_id = await async_read_tile_id(ble_device)All exceptions derive from TileBleError.
| Exception | Raised when |
|---|---|
TileBleConnectionError |
The Tile cannot be reached, a Bluetooth call fails, or it times out. |
TileBleAuthenticationError |
The Tile rejects the auth key. |
TileBleError |
The Tile returns an error, or refuses to ring. |
TileCloudAuthenticationError |
The Tile cloud rejects the email or password. |
TileCloudError |
A Tile cloud request fails. |
TileBleDevice raises ValueError when the auth key is not a 16-byte base64 value.
- Only Tiles that support multi-endpoint TOA are supported.
- Newer Tiles (firmware 48.x) are reported to fail to enable notifications under BlueZ.
- It is unknown whether a Tile accepts a connection while the phone of the owner is connected to it.
- There is no command to stop a ring. A ring stops by itself after a time-out.
- The protocol is not documented. Tile can change it at any time.
address_matches_tile_id()uses a rule for Tiles with a Private ID that is inferred from two Tiles only.
The protocol implementation follows node-tile, MIT License, Copyright (c) 2024 Lesley De Keyser. jeretile uses the same sequence. The Tile header toa.h in the Nordic nRF5 SDK 16 and the paper "Security and Privacy Analysis of Tile's Location Tracking Protocol" also document parts of the protocol.
This repository keeps a change log using GitHub's releases functionality. The format of the log is based on Keep a Changelog.
Releases are based on Semantic Versioning, and use the format
of MAJOR.MINOR.PATCH. In a nutshell, the version will be incremented
based on the following:
MAJOR: Incompatible or major changes.MINOR: Backwards-compatible new features and enhancements.PATCH: Backwards-compatible bugfixes and package updates.
This is an active open-source project. We are always open to people who want to use the code or contribute to it.
We've set up a separate document for our contribution guidelines.
Thank you for being involved! 😍
This Python project is fully managed using the uv dependency manager. But also relies on the use of NodeJS for certain checks during development.
You need at least:
- Python 3.13+
- uv
- NodeJS 12+ (including NPM)
To install all packages, including all development requirements:
npm install
uv sync --all-groupsAs this repository uses the prek framework, all changes are linted and tested with each commit. You can run all checks and tests manually, using the following command:
uv run prek run --all-filesTo run just the Python tests:
uv run pytestThe content is by Joost Lekkerkerker.
For a full list of all authors and contributors, check the contributor's page.
MIT License
Copyright (c) 2026 Joost Lekkerkerker
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The protocol implementation is based on node-tile. See LICENSE.md for its copyright and permission notice.