camera

Communication Schema

build Coverage license Current Version

✈️ Table of Pages

Below is a quick reference table of the main documentation pages.

Page Description
What Sets it Apart Why you should just do it yourself and the cost
MVP High level project goals and summary
Status Tracker Feature progress table
Unit Testing Test and coverage instructions
Build It Yourself Clone & Docker setup guide
Firmware Firmware API reference
Hub Guide Hub API reference
Communication Methods Communication and architecture

graph TD cam[ESP32 Camera] usb[USB Camera] localcam[Node LocalCam] hub[FastAPI Hub] db[(SQLite DB)] ui[Vue Frontend] cam -- REST / WebSocket --> hub usb --> localcam localcam -- WebSocket --> hub hub -- REST --> ui hub -- WebSocket relay --> ui hub -- queries --> db cam -- SD files --> hub

The ESP32 camera streams MJPEG frames over WebSocket. A USB webcam can use the optional Node localcam helper to send frames to the hub. The hub relays frames to the UI while serving a REST API and persisting data in SQLite. Cameras also report motion and status events over MQTT so Home Assistant can automate actions.

Wi-Fi credentials travel to the ESP32 over HTTPS and are stored encrypted on the SD card. Each camera can fall back to a secondary network or start its own AP if both connections fail, keeping the system accessible during outages.

Architecture Options

flowchart LR subgraph Standalone s_cam[ESP32 Cam] --> s_ui[Local UI] end subgraph Hub_Setup h_cam[ESP32 Cam] --> hub[Hub] hub --> h_ui[Central UI] end subgraph Hub_With_USB usb[USB Cam] --> helper[localcam] helper --> hub end