| Crates.io | bthome-scan |
| lib.rs | bthome-scan |
| version | 0.1.1 |
| created_at | 2025-07-31 14:27:44.586722+00 |
| updated_at | 2025-07-31 14:52:39.75756+00 |
| description | A CLI utility to scan and decode BTHome BLE advertisements |
| homepage | |
| repository | https://github.com/ducktec/bthome-scan-rs |
| max_upload_size | |
| id | 1775147 |
| size | 154,997 |
A Rust CLI utility that scans for BTHome Bluetooth Low Energy (BLE) advertisements and decodes their data. Both encrypted and unencrypted BTHome advertisements are supported.
cargocargo install bthome-scan
# Clone the repository
git clone https://github.com/ducktec/bthome-scan-rs.git
cd bthome-scan-rs
# Build with Cargo
cargo build --release
# Install the binary
cargo install --path .
# or alternatively
cargo run -- <options>
CLI to scan BThome advertisement BLE packets
Usage: bthome-scan [OPTIONS]
Options:
-v, --verbose Enable verbose output
-n, --name <NAME> Only show devices with this name (optional)
-r, --raw Print raw advertisement data
-t, --timeout <TIMEOUT> Timeout in seconds (0 = run forever) [default: 0]
-k, --key <KEY> BTHome encryption key (32 hex characters for 16 bytes)
-j, --json Output data in JSON format
-o, --output <OUTPUT> Write output to a file instead of stdout
-h, --help Print help
-V, --version Print version
Device: MySensor (D8:14:52:AB:CD:EF), RSSI: -67dBm
BTHome v2 | Not Encrypted
Data:
temperature: 22.50 °C
humidity: 45.50 %
battery: 87 %
-j){
"name": "MySensor",
"address": "D8:14:52:AB:CD:EF",
"rssi": -67,
"data": {
"version": 2,
"is_trigger_based": false,
"encryption_status": "NotEncrypted",
"data": [
{
"measurement_type": "temperature",
"value": 22.5,
"unit": "°C"
},
{
"measurement_type": "humidity",
"value": 45.5,
"unit": "%"
},
{
"measurement_type": "battery",
"value": 87,
"unit": "%"
}
]
},
"timestamp": "2025-07-29T12:34:56+00:00"
}
Due to privacy restrictions in macOS, device addresses will be shown as device UUIDs instead of MAC addresses. This also means that decryption will not work on macOS, as the MAC address is part of the decryption process. See the BTHome page on encryption for more details.
This library is licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.