Skip to content

Repository files navigation

SentinelCam-ESP32 banner

🛡️ SentinelCam-ESP32

Serverless ESP32-CAM + PIR Motion Security Alert System

Detect motion → Capture evidence → Upload to Google Drive → Alert your phone No Raspberry Pi. No local server. No computer left running.

Platform Backend Storage Alerts License

OverviewProof of ConceptArchitectureFeaturesHardwareQuick StartSetup GuideRoadmap


📖 Overview

SentinelCam-ESP32 turns a $6 ESP32-CAM board and a PIR motion sensor into a fully serverless physical security system. When motion is detected, the camera captures still images, uploads them straight to Google Drive through a Google Apps Script web app, and fires a Pushover push notification to your phone — all without a Raspberry Pi, a home server, or any machine that has to stay powered on.

Built for:

  • 🏠 Private rooms & home offices
  • 🏭 Warehouses & garages
  • 🖥️ Server rooms & labs
  • 🔐 Small offices and confidential areas
  • 🎓 Budget-friendly IoT / physical security learning

⚠️ Ethical use only. This project is intended for defensive monitoring of spaces you own or have explicit permission to monitor. Do not use it for unauthorized surveillance.


📸 Proof of Concept — Field Tested, Not Just a Diagram

This isn't a theoretical build. Below is the actual pipeline captured live, end to end, on July 2, 2026.

🔧 The Hardware

Full Build Wired & Powered System Armed
ESP32-CAM, PIR sensor, and spare modules laid out Breadboard wired and running on a power bank Close-up — LED lit, actively monitoring

☁️ Live Events in Google Drive

Auto-Generated Event Folders 3 Images Per Motion Event
Every motion trigger creates its own timestamped folder automatically Each event captures 3 evidence photos, saved instantly

📲 Real-Time Pushover Alerts

Live Alert Feed Alert Detail → Drive Link
A real stream of "ESP32-CAM Motion Alert" push notifications Tapping an alert links straight to the captured evidence on Drive

What this proves: motion at the PIR sensor → image captured on the ESP32-CAM → uploaded and folder-organized in Google Drive → push notification delivered to a phone, with a working link back to the evidence — the complete architecture, working, with timestamps to prove it.


🧠 Architecture

flowchart TD
    A[PIR Motion Sensor] -->|Motion HIGH on GPIO13| B[AI Thinker ESP32-CAM]
    B -->|Capture JPEG Image| C[Base64 Encode]
    C -->|HTTPS POST JSON| D[Google Apps Script Web App]
    D -->|Validate DEVICE_SECRET| E{Authorized?}
    E -->|No| F[Reject Request]
    E -->|Yes| G[Decode Base64 Image]
    G --> H[Create Event Folder in Google Drive]
    H --> I[Save JPEG Evidence]
    I --> J[Pushover API]
    J --> K[📱 Mobile Security Alert]
Loading

Flow in plain English: PIR sensor trips → ESP32-CAM wakes and shoots 2–3 JPEGs → images are Base64-encoded and POSTed to a Google Apps Script endpoint → the script verifies a shared secret, saves the images into a timestamped Drive folder, and pushes a Pushover notification with a direct link to the evidence.


✨ Features

  • 📸 Multi-image capture per motion event (configurable count & interval)
  • ☁️ Serverless backend — Google Apps Script + Drive, zero hosting cost
  • 🔔 Instant push alerts via Pushover, with a direct link to the Drive folder
  • 🔐 Shared-secret authentication between device and backend
  • ⏱️ PIR warm-up & cooldown logic to suppress false/duplicate triggers
  • 🪫 Brownout-safe boot and automatic WiFi reconnection
  • 💡 Status LED indicators for boot, WiFi connect, and motion events
  • 🛠️ Fully configurable — image size, quality, cooldown, flash, and more

🧰 Hardware

Component Required Notes
AI Thinker ESP32-CAM Main camera + WiFi board
PIR Motion Sensor (HC-SR501) Recommended module
FTDI USB-to-Serial Adapter Needed to flash the firmware
Jumper Wires Male-to-female recommended
5V / 1–2A Power Supply Stable power avoids brownouts
10kΩ Resistor (GPIO13 → GND) Recommended Prevents floating pin
Breadboard Optional Useful during testing
Enclosure / Case Optional For final installation

🖧 Tech Stack

Layer Technology
Firmware Arduino (C++) on ESP32-CAM
Transport HTTPS POST (JSON + Base64 image)
Backend Google Apps Script (serverless)
Storage Google Drive
Notifications Pushover API

⚡ Quick Start

# 1. Clone the repository
git clone https://github.com/yesalphahere/SentinelCam-ESP32.git
cd SentinelCam-ESP32

# 2. Open the firmware in Arduino IDE
#    File: ESP32CAM_PIR_Security_Alert_System.ino

# 3. Fill in your private values (WiFi, Web App URL, DEVICE_SECRET)

# 4. Deploy SentinelCam_CloudBridge_AppsScript.js to Google Apps Script
#    (Deploy → Web App → Execute as Me → Access: Anyone)

# 5. Flash the ESP32-CAM, power it up, and arm the system

📌 For the complete step-by-step walkthrough — wiring diagrams, Arduino IDE setup, Google Drive/Apps Script deployment, Pushover configuration, and troubleshooting — see the Full Setup Guide.


📁 Repository Structure

SentinelCam-ESP32/
│
├── ESP32CAM_PIR_Security_Alert_System.ino   # ESP32-CAM Arduino firmware
├── SentinelCam_CloudBridge_AppsScript.js    # Google Apps Script backend
├── SETUP_GUIDE.md                           # Full installation & setup guide
├── README.md                                # You are here
├── LICENSE                                  # MIT License
└── assets/
    ├── banner.svg                           # README hero banner
    ├── hardware/                            # Build photos
    └── screenshots/
        ├── drive/                           # Google Drive event proof
        └── pushover/                        # Pushover alert proof

📚 Full Setup Guide

This README is the project's front page. The complete, detailed instructions — wiring tables, PIR tuning, Arduino IDE configuration, Google Drive & Apps Script deployment, Pushover setup, first-boot testing, and a 15-point troubleshooting guide — live in:


🔒 Security Model

Device-to-cloud requests are authenticated with a shared secret (DEVICE_SECRET) validated on every upload before any file is written or notification sent. All example configuration values in this repository are placeholders by design — no live credentials, endpoints, or tokens are published.


🗺️ Roadmap

  • Telegram notification support as a Pushover alternative
  • Web dashboard for browsing captured events
  • Multi-camera / multi-zone support
  • Battery + solar power profile

🤝 Contributing

Issues and pull requests are welcome. If you build on this project, please keep the ethical-use guidance intact and avoid publishing real credentials in examples.


📜 License

Released under the MIT License — see LICENSE for details.


Project: SentinelCam-ESP32 Developed by: Sabir Ali (Alpha) Purpose: Defensive monitoring & educational IoT security automation

⭐ If this project helped you, consider starring the repo!

About

A lightweight ESP32-CAM + PIR motion security system for private rooms, restricted areas, warehouses, labs, and sensitive areas. Captures motion-triggered images, uploads them to Google Drive via Apps Script, and sends real-time Pushover alerts with link of captured pictures at google drive — no Raspberry Pi, no server, no Telegram.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages