How ilyakolos777/esp32-cam-security-system works
This is a desktop ESP32-CAM security-monitoring application. The principal workflow is to start a camera stream or motion detection from the UI, process incoming frames, and use MQTT commands to control camera-side actions; session activity is also presented as statistics and can be exported as a PDF. The graph includes the visible camera firmware and major UI/reporting modules. Some wiring is not shown in the excerpts, so uncertain firmware-to-broker links are omitted.
Main entry points: main_window.py Main window · main.py Application launcher · camera.py MJPEG stream client · mqtt_client.py MQTT manager
Components 15
Desktop application
- Application launcher
main.py - Main window
ui/main_window.py - Control panel
ui/control_panel.py - Runtime settings
config/settings.py
Video and detection
- MJPEG stream client
core/camera.py - Motion detector
core/detector.py - Video display
ui/video_display.py
Camera device
- ESP32 camera stream
- OV2640 driver
esp32_camera_mjpeg/src/OV2640.cpp - Camera firmware app
esp32_camera_mjpeg/esp32_camera_mjpeg.ino - MQTT manager
core/mqtt_client.py
Session reporting
- Session statistics
ui/stats_tab.py - PDF report exporter
utils/pdf_export.py
Other components
- Operator
- MQTT broker
Connections 16
- Operator → Application launcher: starts app
main.py - Application launcher → Runtime settings: reads settings
main.py - Application launcher → Main window: creates window
main.py - Main window → Control panel: hosts controls
ui/main_window.py - Main window → MJPEG stream client: uses stream client
ui/main_window.py - Main window → Motion detector: runs detection
ui/main_window.py - Main window → MQTT manager: sends commands
ui/main_window.py - Main window → Video display: updates display
ui/main_window.py - MJPEG stream client → ESP32 camera stream: requests MJPEG
core/camera.py - MJPEG stream client → Motion detector: yields frames
- Motion detector → Runtime settings: reads thresholds
core/detector.py - MQTT manager → MQTT broker: connects and publishes
core/mqtt_client.py - MQTT manager → MQTT broker: subscribes to status
core/mqtt_client.py - Main window → Session statistics: records activity
ui/main_window.py - Session statistics → PDF report exporter: exports report
ui/stats_tab.py - OV2640 driver → Camera firmware app: provides camera driver