Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Pytile | 150 | 89 | a day ago | 32 | February 03, 2022 | 2 | mit | Python | ||
📡 A simple Python API for Tile® Bluetooth trackers | ||||||||||
Esp32_loraprs | 146 | a month ago | 2 | gpl-3.0 | C++ | |||||
LoRa ESP32 KISS Bluetooth modem (for APRSDroid or aprs.fi iOS) + APRS-IS RX/TX iGate over WiFi + Digipeater + DV (with Codec2 Walkie-Talkie) | ||||||||||
Ha Tts Bluetooth Speaker | 114 | 4 years ago | 7 | Python | ||||||
TTS Bluetooth Speaker for Home Assistant | ||||||||||
Openimu Minilogger | 29 | a year ago | 4 | C++ | ||||||
OpenIMU - Open Hardware Mini Logger based on ESP32 | ||||||||||
Go Track | 25 | 6 years ago | mit | TypeScript | ||||||
Go-Jek Tracking as a Service | ||||||||||
Pycom Ruuvitag | 14 | 3 years ago | mit | Python | ||||||
Pycom MicroPython RuuviTag BLE Sensor Beacon scanner | ||||||||||
Raspberry Pi Gps Tracker | 14 | 11 years ago | Python | |||||||
Some scripts turning the Raspberry Pi into a GPS tracker | ||||||||||
Hass_bletracker | 12 | 5 years ago | Python | |||||||
Custom python3 script for better location tracking on HASS. Also enables using iTag bluetooth device as a tracker + smart home button | ||||||||||
Micropython Ruuvitag | 11 | 4 years ago | 2 | mit | Python | |||||
MicroPython RuuviTag BLE Sensor Beacon scanner | ||||||||||
Pytrack | 7 | 5 years ago | 3 | Python | ||||||
pytile
is a simple Python library for retrieving information on
Tile Bluetooth trackers (including last location and more).
This library is built on an unpublished, unofficial Tile API; it may alter or cease operation at any point.
Version 5.0.0 is a complete re-architecture of pytile
as such, the API has changed.
Please read the documentation carefully!
pytile
is currently supported on:
pip install pytile
pytile
usage starts with an aiohttp
ClientSession
note that this
ClientSession is required to properly authenticate the library:
import asyncio
from aiohttp import ClientSession
from pytile import async_login
async def main() -> None:
"""Run!"""
async with ClientSession() as session:
api = await async_login("<EMAIL>", "<PASSWORD>", session)
asyncio.run(main())
If for some reason you need to use a specific client UUID (to, say, ensure that the Tile API sees you as a client it's seen before) or a specific locale, you can do so easily:
import asyncio
from aiohttp import ClientSession
from pytile import async_login
async def main() -> None:
"""Run!"""
async with ClientSession() as session:
api = await async_login(
"<EMAIL>", "<PASSWORD>", session, client_uuid="MY_UUID", locale="en-GB"
)
asyncio.run(main())
Tile Premium Required: No
import asyncio
from aiohttp import ClientSession
from pytile import async_login
async def main() -> None:
"""Run!"""
async with ClientSession() as session:
api = await async_login("<EMAIL>", "<PASSWORD>", session)
tiles = await api.async_get_tiles()
asyncio.run(main())
The async_get_tiles
coroutine returns a dict with Tile UUIDs as the keys and Tile
objects as the values.
Tile
ObjectThe Tile object comes with several properties:
accuracy
: the location accuracy of the Tilealtitude
: the altitude of the Tilearchetype
: the internal reference string that describes the Tile's "family"dead
: whether the Tile is inactivefirmware_version
: the Tile's firmware versionhardware_version
: the Tile's hardware versionkind
: the kind of Tile (e.g., TILE
, PHONE
)last_timestamp
: the timestamp at which the current attributes were receivedlatitude
: the latitude of the Tilelongitude
: the latitude of the Tilelost
: whether the Tile has been marked as "lost"lost_timestamp
: the timestamp at which the Tile was last marked as "lost"name
: the name of the Tileuuid
: the Tile UUIDvisible
: whether the Tile is visible in the mobile appimport asyncio
from aiohttp import ClientSession
from pytile import async_login
async def main() -> None:
"""Run!"""
async with ClientSession() as session:
api = await async_login("<EMAIL>", "<PASSWORD>", session)
tiles = await api.async_get_tiles()
for tile_uuid, tile in tiles.items():
print(f"The Tile's name is {tile.name}")
# ...
asyncio.run(main())
In addition to these properties, the Tile
object comes with an async_update
coroutine
which requests new data from the Tile cloud API for this Tile:
import asyncio
from aiohttp import ClientSession
from pytile import async_login
async def main() -> None:
"""Run!"""
async with ClientSession() as session:
api = await async_login("<EMAIL>", "<PASSWORD>", session)
tiles = await api.async_get_tiles()
for tile_uuid, tile in tiles.items():
await tile.async_update()
asyncio.run(main())
Tile Premium Required: Yes
You can retrieve a Tile's history by calling its async_history
coroutine:
import asyncio
from datetime import datetime
from aiohttp import ClientSession
from pytile import async_login
async def main() -> None:
"""Run!"""
async with ClientSession() as session:
api = await async_login("<EMAIL>", "<PASSWORD>", session)
tiles = await api.async_get_tiles()
for tile_uuid, tile in tiles.items():
# Define a start and end datetime to get history for:
start = datetime(2023, 1, 1, 0, 0, 0)
end = datetime(2023, 1, 31, 0, 0, 0)
history = await tile.async_history(start, end)
# >>> { "version": 1, "revision": 1, ... }
asyncio.run(main())
Thanks to all of our contributors so far!
python3 -m venv .venv
source ./.venv/bin/activate
script/setup
poetry run pytest --cov pytile tests
README.md
with any new documentation.