presence: BLE proximity events for a kiosk screen
CI / check (push) Successful in 1m34s

A swayidle-shaped daemon: `present <cmd>` runs when a Bluetooth LE device
comes within an RSSI threshold, `absent <secs> <cmd>` once nobody has for
that long. Near means 3 of the last 5 advertisements at or above -58 dBm by
default; --calibrate prints the raw stream so the threshold is picked at the
installed screen, not guessed. Nothing is stored: a few seconds of samples in
memory, counted.

Packaged for the [uhhm] registry from the checkout itself, built natively per
arch on tag by Gitea Actions, with the version checked across Cargo.toml,
PKGBUILD and the tag.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Bendik Aagaard Lynghaug
2026-10-08 21:23:39 +02:00
co-authored by Claude Fable 5.1
commit 8fe75daad6
11 changed files with 1431 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
[package]
name = "presence"
version = "0.1.0"
description = "BLE proximity events for a kiosk screen, swayidle style"
license = "MIT"
edition = "2024"
[dependencies]
bluer = { version = "0.17", features = ["bluetoothd"] }
clap = { version = "4.6.7", features = ["derive"] }
futures = "0.3.34"
tokio = { version = "1.53.2", features = ["rt-multi-thread", "macros", "signal", "process", "time", "sync"] }