Sentinel Edge Smart Home
Systems Engineer24 weeksEn coursTeam of 2

Sentinel Edge Smart Home

Edge-first smart home. Voice, gesture, and gas alerts — no cloud required.

PPythonMMQTTRaspberry PiRaspberry PiNNodeMCUEESP8266VVoskMMediaPipeNNode-REDTypeScriptTypeScript
Voir en ligneCode source

Intelligence projet

Durée

24 weeks

Technologies

9

Statut

In Progress

Défi principal

Normalizing heterogeneous AI outputs to canonical MQTT tokens with hold-frame debouncing and FSM-safe routing

Compétences démontrées

IoTMQTTEdge AIEmbedded SystemsPython

En bref

Building an edge-first smart home where voice and gesture inputs normalize to MQTT tokens, route through a Guardian FSM dispatcher, and drive NodeMCU actuators (door, fan, gas sensor) with alert escalation and E2E test coverage.

Problème

Cloud-dependent smart home systems fail offline and add latency to safety-critical actuator commands

Solution

Edge-first pipeline with offline Vosk/MediaPipe and local MQTT dispatcher FSM

Résultat

Sub-second voice-to-actuator routing with automatic gas alert escalation

<1s

Voice-to-MQTT latency

6

Guardian FSM modes

Résultats clés

<1s

Voice-to-actuator latency

30–50ms

Gesture inference per frame

20–30 FPS

Camera throughput on Pi 4

30s

Alert→Emergency countdown

6

FSM modes

13

MQTT topic categories

Visuels sélectionnés

Operator dashboard with device states
1 / 15

Operator dashboard with device states

Résultats & impact

Working edge smart home pipeline with voice, gesture, gas sensor, and actuator control.

Demonstrated offline-capable home automation without cloud dependency.

<1s

Command latency

3

Input modalities

Architecture

Architecture diagram

Edge-first architecture with Raspberry Pi running voice/gesture publishers and the dispatcher ActionRouter.

All inputs normalize to canonical tokens before hitting MQTT. The Guardian FSM manages mode transitions with Alert→Emergency escalation after 30s countdown.

NodeMCU firmware modules subscribe to actuator topics and publish state feedback.

Infrastructure & déploiement

Raspberry Pi 4 on local network with Mosquitto MQTT broker. NodeMCU devices on WiFi. Flask dashboard on Pi. Node-RED for demo automation flows.

Fonctionnalités

Essentiel

Offline Voice Control

Vosk STT with expanded command vocabulary normalized to tokens.

Essentiel

Gesture Recognition

MediaPipe Hands with hold-frame debouncing and cooldown.

Essentiel

Guardian FSM

Six modes with Alert→Emergency escalation and cancel support.

Essentiel

NodeMCU Actuators

Modular firmware for door relay, fan relay, and gas sensor.

Secondaire

Operator Dashboard

Flask web UI for live device states and manual overrides.

Secondaire

Telegram Bot

Remote control and notifications via Telegram.

Planifié

PIR Motion Sensor

Motion detection integrated into FSM triggers.

Planifié

Temperature Telemetry

DHT11/22 readings published to MQTT.

Défis & solutions

1

Voice-to-token normalization

Le problème

Natural speech has infinite phrasings for the same intent (turn on the fan vs fan on please).

Comment je l'ai résolu

Expanded canonical vocabulary with fuzzy matching and phrase normalization before MQTT publish.

def normalize_command(text: str) -> str | None:
    text = text.lower().strip()
    for phrase, token in VOCABULARY.items():
        if phrase in text:
            return token
    return None
2

Gesture false positives

Le problème

Hand jitter and partial gestures triggered unintended commands.

Comment je l'ai résolu

Require GESTURE_HOLD_FRAMES (8) stable frames plus GESTURE_COOLDOWN_S (2.0) after each send.

if stable_frames >= HOLD_FRAMES and time.time() - last_sent > COOLDOWN:
    publish_token(token)
    last_sent = time.time()
3

Alert escalation timing

Le problème

Gas alerts need automatic response but users must be able to cancel false alarms.

Comment je l'ai résolu

FSM enters ALERT, triggers fan_on, starts 30s countdown to EMERGENCY; alert_cancel token resets state.

def on_gas_detected(self):
    self.transition('ALERT')
    self.publish('fan_on')
    self.start_countdown(30, target='EMERGENCY')
4

MCU state feedback loop

Le problème

Dispatcher didn't know if actuator commands actually executed.

Comment je l'ai résolu

NodeMCU publishes state feedback topics after relay actuation; dispatcher subscribes for confirmation.

Leçons apprises

  1. 1

    Token normalization is essential

    Voice phrases and gesture classifications must map to the same token set so the dispatcher treats all inputs identically.

  2. 2

    Hold frames prevent accidental triggers

    Requiring 8 stable gesture frames and 2s cooldown eliminated false positives from hand jitter.

  3. 3

    FSM modes need explicit escalation

    Alert mode with countdown-to-Emergency gives users time to cancel while ensuring safety fallback.

  4. 4

    E2E tests on MQTT topics

    Testing at the topic level catches routing bugs that unit tests miss.

Ce que je ferais différemment

Train a small gesture classifier instead of rule-based landmarks, and add motion/temperature sensors to complete the Guardian FSM sensor triggers.