Sentinel-T is a two-part harm-reduction system designed for Wear OS (Galaxy Watch 5/6) and Android phones. It provides continuous heart rate monitoring and automated emergency alerting without relying on cloud services, prioritizing user privacy and immediate local response.
- Watch OS App: Continuously reads heart rate, applies signal filtering, and transmits data to the paired phone.
- Android Phone App: Receives the data stream, evaluates vitals using the LifeWatch State Machine, and triggers SMS alerts with GPS coordinates if a medical emergency is detected.
sentinel-t/
├── flake.nix # NixOS dev-shell definition
├── .envrc # direnv auto-load
├── build.gradle # Root Gradle config
├── settings.gradle # Project settings
│
├── wearos-app/ # Wear OS Module
│ ├── src/main/java/com/sentinelt/watch/
│ │ ├── HeartRateService.kt # Sensor listener & foreground service
│ │ ├── SignalFilter.kt # MA/EMA smoothing
│ │ ├── Transmitter.kt # Wearable Data Layer sender
│ │ └── WatchMainActivity.kt # Permission handler & status UI
│ └── AndroidManifest.xml
│
└── android-app/ # Android Phone Module
├── src/main/java/com/sentinelt/phone/
│ ├── VitalReceiver.kt # Data Layer listener
│ ├── BaselineModel.kt # Rolling HR average
│ ├── LifeWatchStateMachine.kt # NORMAL -> SUSPICIOUS -> CRITICAL
│ ├── AlertEngine.kt # SMS + GPS trigger
│ └── MainActivity.kt # Settings UI & Alert reset
└── AndroidManifest.xml
This project uses a Nix flake to provide a consistent development environment with all necessary tools (Kotlin, Gradle, Android SDK, etc.).
- Clone the repo:
git clone <repo-url> sentinel-t cd sentinel-t
- Allow direnv:
You should see:
direnv allow
Welcome to Sentinel-T dev shell.
cd wearos-app
./gradlew assembleDebug
# Install to Watch:
adb install -r build/outputs/apk/debug/wearos-app-debug.apkcd ../android-app
./gradlew assembleDebug
# Install to Phone:
adb install -r build/outputs/apk/debug/android-app-debug.apkThe system operates on a three-state detection model:
- NORMAL: Vitals are within expected baseline range.
- SUSPICIOUS: Sudden drop (15+ bpm) or critically low (< 45 bpm) detected.
- CRITICAL: Critically low vitals persist for 3+ readings. Triggers emergency SMS.
- Local Only: No data is sent to external servers or cloud storage.
- Direct Alerting: SMS is sent directly from the device to the user-configured emergency contact.
- Manual Reset: Once in a CRITICAL state, the system remains active until the user manually resets it via the "I'M OK" button.
Developer: Talon Verdugo Version: 0.1 (Prism Invocation)