firebit-logo
AS

ASHIM DAS

02/07/2025, 12:09 pm Loading...

πŸ›‘οΈ Sense-25: A Realtime IoT Security System Built with ESP32, React, Express and MQTT

πŸ” Overview

Sense-25 is a real-time security and intrusion detection system designed to provide reliable zone-based monitoring using digital output sensors, a secure password-protected arming system, and real-time event logs β€” all built from scratch with open technologies.

This project combines the power of ESP32, React, MQTT, WebSockets, and Node.js to create a fast, secure, and fully customizable home or lab security setup.

Demo Video Thumbnail

🎬 Demo Video

Watch video Check it's live πŸš€ iot-security-system-1.onrender.com


πŸ”„ System Workflow

  1. Configure Sensors & Zones

    • Enable required Zones and configure name and description.
    • There are 17 digital sensor input available (can be scaled up). Zone COnfiguration Zone COnfig
  2. Arming the System

    • You enter a password on device or click Arm on dashboard.
    • The system becomes "armed", meaning all active zones are now monitored. Realtime Arm Diarm
  3. Sensor Gets Triggered

    • A digital output sensor (e.g., PIR or door switch) detects activity.
    • It sends a signal to the ESP32, which publishes a secure MQTT message.
  4. Message Received

    • A Node.js server subscribed to the MQTT topic receives the alert.
    • It forwards the data to the frontend via WebSocket. Realtime Trigger Update
  5. Live Dashboard Update

    • The React dashboard instantly highlights the triggered zone.
    • The event is logged with a timestamp and marked as "Unresolved". Dashboard
  6. Manual Resolution

    • An admin can mark the event as "Resolved" with a note.
    • The log updates with the resolution details and time. Trigger Resolution
  7. Disarming the System

    • Entering the password again switches the system to "Disarmed" mode.
    • Sensor triggers are ignored until re-armed.
  8. Monitoring All Events Logs

    • Dashboard shows realtime logs.
    • Logs are saved in server, can be exported to excel sheet. Logs Management

🧠 Core Concepts

  • Digital Output Sensors – Send simple ON/OFF signals (motion, door open, etc.)
  • ESP32 Microcontroller – Reads sensors and sends data securely over MQTT
  • MQTT (TLS Secured) – Lightweight protocol for sending messages
  • WebSocket (HTTPS Secured) – Enables real-time updates to clients
  • Password-Based Arming – Prevents unauthorized use
  • Persistent Logs – Stored locally using node-persist for offline recovery

🧩 System Architecture

The system consists of the following components:

  • ESP32 Microcontroller: Interfaces with digital output sensors
  • MQTT over TLS: Used for secure, lightweight messaging
  • Node.js + Express Server: Receives MQTT messages and communicates via WebSocket
  • React Frontend: Live dashboard for zone control and log resolution
  • Local Persistent Storage: All logs are stored using node-persist

System Architecture


Note: For now anyone with the URL can access the dashboard! I know it's a security issue and I can fix it, this is a small prototype system so don't take it seriously.


πŸ§ͺ Technology Stack


πŸ™Œ Final Thoughts

Sense-25 is a online IoT security solution built with open technologies and no dependency on expensive cloud services or proprietary platforms. It has real world use cases but for now it is to showcase my works and skills.


πŸ“¬ Share Your Thoughts..

Want to replicate or expand this project?

  • Comment or DM me for the source code or architecture guide
  • Any ideaπŸ’‘?? Let's connect and discuss.

πŸ’₯ Thank You


    Loading comments

Team ⚑

Samrat Sarkar

Electronics Engineer

Developer

Ashim Das

Computer Engineer


Visual Stories 😲

story

Do you like pets? Welcome to pet zone!

story

Track Realtime Power Consumption 😱

story

Portable Fingerprint Attendance System 😱

story

Track Realtime BPM & Blood Oxygen Level 🧐