Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 2.08 KB

ARCHITECTURE.md

File metadata and controls

56 lines (40 loc) · 2.08 KB

SecureSense architecture

SecureSense separates the trusted embedded decision path from the optional operator interface.

Device boundary

The Nano 33 BLE Sense Lite samples its onboard LSM9DS1 and APDS9960 sensors at 20 Hz. Every 20 readings form a non-overlapping one-second window. Firmware calculates 45 deterministic features and evaluates:

  1. a 100-tree binary random forest for normal versus suspicious;
  2. an experimental 23-node decision tree for event subtype;
  3. a five-window majority vote for output stability;
  4. a training-derived light-range safeguard for extreme enclosure-opening changes.

The built-in LED and USB Serial JSON are controlled by the device decision.

Console boundary

In device mode, the Flask application does not load or execute an ML model. It reads device JSON, displays telemetry and stores a capped local audit trail in SQLite.

replay and serial-host modes do run host inference, but the interface labels that boundary explicitly.

Optional phone-notification gateway

When explicitly enabled in device mode, the console forwards only stable security-state transitions to an ntfy topic. Publishing runs in a background thread and cannot block serial acquisition. Repeated suspicious states are suppressed by a cooldown, and raw IMU, light and proximity telemetry are not included.

This gateway is not part of the inference path. If the Internet, Mac, dashboard or third-party notification service is unavailable, the Arduino model, LED and serial output continue to operate locally.

Deployed modalities

Component Signals Purpose
LSM9DS1 x/y/z acceleration, magnitude movement and vibration context
APDS9960 clear light, proximity enclosure and near-device interaction

Temperature, camera and microphone data are outside the deployed feature pipeline.

Output contract

The securesense.device.v1 stream reports the security state, subtype, confidence values, temporal vote, safeguard state, telemetry and latency. The console treats these messages as device evidence rather than recomputing the final decision.