Pure-Python parser for Apple Continuity BLE proximity-pairing adverts (AirPods battery + Apple device presence)
Project description
apple-ble
Pure-Python parser for Apple Continuity BLE proximity-pairing advertisements. Reads AirPods battery (case / left / right) and charging state from the unencrypted manufacturer-76 advert. No connection required, no HA dependency.
Install
pip install apple-ble # core (parsing only)
pip install "apple-ble[cli]" # + bleak scanner CLI
Use as a library
from apple_ble import parse_proximity_pairing, APPLE_MANUFACTURER_ID
# `payload` is manufacturer_data[76] from any BLE stack (bleak, HA, etc.)
data = parse_proximity_pairing(payload)
if data:
print(data.model, data.left_battery, data.right_battery, data.case_battery)
Scan from the terminal
apple-ble # opens a 15s BLE scan, prints AirPods it sees
Limitations
- Only AirPods expose battery over BLE. Apple Watch / iPhone do not.
- Apple rotates the BLE MAC (~15 min); there is no stable per-device id in the advert.
- Battery is reported in coarse 10% steps.
Reverse-engineering credit: furiousMAC/continuity, kavishdevar/librepods, delphiki/AirStatus, d4rken-org/capod.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file apple_ble-0.1.0.tar.gz.
File metadata
- Download URL: apple_ble-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
913fec9ed794c4e4ea729cc3dbf0d7313170585f8ee6b6995e7fcc8ae62b806e
|
|
| MD5 |
6237e9b1ea1866fa8c44eed845c2bd74
|
|
| BLAKE2b-256 |
d4efc1d5a0df4fb39a79e8e8dbe0b23a73715b5be0071cae525b830730495c29
|
File details
Details for the file apple_ble-0.1.0-py3-none-any.whl.
File metadata
- Download URL: apple_ble-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4a13accf12493220e5ea2f0ea81253056a4612885a7833f126794cc003437c2
|
|
| MD5 |
77b66238e84b7f8c50da0b890ddff1b3
|
|
| BLAKE2b-256 |
cc43b2f00d4694ef0ee8b7b258230ea77591511874e37d3024decfc27bd1e676
|