Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Sentinel-T v0.1

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.

Core Objective

  • 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.

Project Structure

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

Dev Environment (Nix + direnv)

This project uses a Nix flake to provide a consistent development environment with all necessary tools (Kotlin, Gradle, Android SDK, etc.).

  1. Clone the repo:
    git clone <repo-url> sentinel-t
    cd sentinel-t
  2. Allow direnv:
    direnv allow
    You should see: Welcome to Sentinel-T dev shell.

Build & Installation

Build Wear OS App

cd wearos-app
./gradlew assembleDebug
# Install to Watch:
adb install -r build/outputs/apk/debug/wearos-app-debug.apk

Build Android Phone App

cd ../android-app
./gradlew assembleDebug
# Install to Phone:
adb install -r build/outputs/apk/debug/android-app-debug.apk

LifeWatch Logic

The 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.

Privacy & Security

  • 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)

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages