AiSecam Team · July 8, 2026 · 9 min read

ESP32 + Browser Hybrid Security Setups

The ESP32-CAM is one of the most popular microcontrollers for DIY security projects. It costs under $10, has a built-in camera, Wi-Fi, and can stream video over HTTP. But its processing power is limited — running object detection on the chip itself is slow and unreliable.

A hybrid approach solves this: use the ESP32-CAM as a cheap, always-on camera node, and let a browser running AiSecam handle the AI inference. This gives you the hardware flexibility of ESP32 with the detection accuracy of a modern neural network.

Architecture Overview

The system works in two layers:

  1. ESP32-CAM — streams MJPEG video over your local network via its built-in HTTP server
  2. Browser (AiSecam) — connects to the ESP32 stream, processes frames through YOLO26n, and handles recording/alerts

The ESP32 acts as a dumb camera — it captures and streams video but does no analysis. The browser does all the intelligence: person detection, clip recording, and Telegram notifications. This separation of concerns means you can swap out either component independently.

Setting Up the ESP32-CAM

Popular ESP32-CAM boards include the AI-Thinker ESP32-CAM and the ESP32-S3-CAM. The setup process is similar for most boards:

  1. Flash firmware — use Arduino IDE, PlatformIO, or a pre-built binary. The CameraWebServer example from Espressif is a good starting point.
  2. Configure Wi-Fi — enter your network credentials in the firmware code or via the board's configuration portal.
  3. Access the stream — navigate to the ESP32's IP address in a browser (e.g., http://192.168.1.50). You should see a live video feed.
  4. Note the stream URL — the MJPEG stream is typically available at http://[ESP32_IP]/stream.

Connecting ESP32 to AiSecam

AiSecam's camera interface uses the browser's getUserMedia API to access cameras. To use an ESP32 stream instead, you can:

Benefits of the Hybrid Approach

Limitations

The ESP32-CAM has real constraints. The camera sensor (typically OV2640) produces 2MP images at best, which is lower resolution than most phone cameras. Frame rates over Wi-Fi are typically 5-15 FPS at VGA resolution. The built-in flashlight LED can help with low-light situations but produces harsh, direct illumination.

Network latency also matters. If the ESP32 and the browser are on different subnets or the Wi-Fi is congested, the stream may stutter. For reliable operation, keep the ESP32 on the same local network as the browser device, ideally within good Wi-Fi range.

Advanced: Multi-Node Monitoring

One interesting pattern is running multiple ESP32-CAM boards pointed at different areas, each streaming to a central browser session. You can open multiple browser tabs — one per camera — each running AiSecam's detection independently. This gives you a multi-camera security system for under $50 in hardware.

Each tab processes its camera feed independently, and you can configure different Telegram alert channels for different cameras. For example, the front door camera alerts to one Telegram chat, while the garage camera alerts to another.

Try browser-based detection

Open AiSecam and see how it handles your camera feed — whether it is a phone, webcam, or ESP32 stream.

Start AiSecam camera