Basic Senttinel modules + SD plugins
Find a file
2026-03-17 17:02:56 +01:00
core Upload files to "core" 2026-03-17 16:31:50 +01:00
dashboard Upload files to "dashboard/static/js" 2026-03-17 16:35:46 +01:00
event_recorder Upload files to "event_recorder" 2026-03-17 16:37:30 +01:00
ingestion Upload files to "ingestion" 2026-03-17 16:37:59 +01:00
metrics Upload files to "metrics" 2026-03-17 16:38:40 +01:00
plugins Upload files to "plugins" 2026-03-17 16:39:24 +01:00
utils Upload files to "utils" 2026-03-17 16:39:54 +01:00
main.so Upload files to "/" 2026-03-17 16:40:33 +01:00
README.md Update README.md 2026-03-17 17:02:56 +01:00
requirements.txt Upload files to "/" 2026-03-17 16:40:33 +01:00

Senttinel SD

Real-time multi-camera smoke detection platform. Analyses live RTSP video streams to identify smoke events using physics-based detection algorithms.

Designed for industrial, commercial, and residential environments where early visual smoke detection is critical.


Repository Structure

├── main.so                              ← Application entry point
│
├── core/                                ← Detection engine and system configuration
│   ├── __init__.py
│   ├── camera_config.so                 ← Per-camera settings, resolution, scheduling
│   ├── detection.so                     ← State machine: monitoring → suspect → alarm → cooldown
│   ├── frame_buffer.so                  ← Circular frame buffer for pre-event recording
│   ├── license.so                       ← Ed25519 license validation (Cloudflare Workers)
│   ├── models.so                        ← Data models, detection states, configuration schema
│   ├── plugin_interface.so              ← Plugin loader — discovers and validates plugins at startup
│   └── settings.so                      ← Global settings, persistence, runtime config updates
│
├── ingestion/                           ← Camera stream management
│   ├── __init__.py
│   ├── gst_pipeline.so                  ← GStreamer pipeline builder (RTSP → I420 → Y-plane)
│   ├── manager.so                       ← Multi-camera orchestrator, lifecycle management
│   ├── rtsp_worker.so                   ← Per-camera worker thread: connects, extracts frames
│   └── types.so                         ← Frame packet types, stream metadata
│
├── dashboard/                           ← Web interface
│   ├── __init__.py
│   ├── app.so                           ← Flask application, WebSocket endpoints, authentication
│   ├── log_handler.so                   ← Real-time log streaming to browser
│   ├── templates/                       ← Jinja2 HTML templates
│   └── static/                          ← CSS, JavaScript, images
│
├── metrics/                             ← System monitoring
│   ├── __init__.py
│   └── collector.so                     ← Prometheus-compatible metrics (CPU, memory, FPS, detections)
│
├── event_recorder/                      ← Evidence capture on detection
│   ├── __init__.py
│   ├── clip_writer.so                   ← Pre/post-event video clip assembly (AVI)
│   ├── event_scanner.so                 ← Event directory management, retention policy
│   └── snapshot_manager.so              ← JPEG snapshot capture at moment of detection
│
├── utils/                               ← Shared utilities
│   ├── __init__.py
│   ├── notifier.so                      ← Twilio SMS alerts on smoke detection
│   └── schedule_utils.so               ← Detection scheduling (time windows, on/off per camera)
│
├── plugins/                             ← Smoke detection algorithms
│   ├── __init__.py
│   ├── smoke_detector.py                ← Wasserstein distance-based patch comparison (Dr. Gustavo Rohde, code optimised by Dr. Henrique Hayes Hesse)
│   └── patch_utils.py                   ← Patch extraction, statistical distance computation (Dr. Gustavo Rohde, code optimised by Dr. Henrique Hayes Hesse)
│
└── requirements.txt                     ← Python dependencies

Module Overview

Module Responsibility
core/ Detection state machine, configuration management, license validation, plugin loading
ingestion/ RTSP stream handling via GStreamer, per-camera worker threads, automatic reconnection
dashboard/ Flask web interface with live camera feeds, detection stages, event history, settings
metrics/ System health monitoring — CPU, memory, per-camera FPS and detection counts
event_recorder/ Automated evidence capture: JPEG snapshots, AVI clips with pre-event buffer
utils/ SMS notifications (Twilio), detection scheduling
plugins/ Pluggable detection algorithms — loaded dynamically at startup

Compiled Modules

Core, ingestion, dashboard, metrics, event recorder, and utility modules are distributed as compiled shared objects (.so). This is standard practice for production deployments:

  • Performance — native execution, no interpretation overhead
  • Consistency — identical behaviour across all deployments
  • Protection — prevents accidental modification of production code

Plugins remain as plain Python to allow configuration and algorithm adjustments in the field.


Dashboard URL

Dashboard: http://localhost:5050

Configuration

File Purpose
config/cameras.json Camera RTSP URLs and per-camera settings
config/settings.json System settings, notifications, recording
config/license.json License key (pre-provisioned)
plugins/ Detection algorithms

Build

Generated by build.sh. To rebuild from source:

bash build.sh

Requires Python 3.11+ and a C compiler. Dependencies are installed automatically.

Note: .so files are architecture-specific. Binaries compiled on ARM will not run on x86_64 (Intel/AMD).


Senttinel SD v1.0 — 2026

Author: Dr. Henrique Hayes Hesse — Systems Architecture, Core Platform, Ingestion, Dashboard, Metrics, Event Recorder, Licensing, Deployment