๐ฎ Client-side app with UI
๐ฏ Purposeโ
Provides local web-based interface for beekeepers to monitor entrance observer metrics and video streams when internet connectivity is unavailable.
๐ญ User Storyโ
- As a beekeeper working in remote locations
- I want to access live monitoring data and video streams locally on my device
- So that I can monitor my hives even without internet connectivity and have immediate access to critical information
๐ Key Benefitsโ
- Offline accessibility: Works without internet connection via local network
- Real-time monitoring: View live entrance metrics and video streams
- Familiar interface: Web-based UI accessible from any device with a browser
- Emergency access: Critical for troubleshooting and device management in field conditions
๐ง Technical Overviewโ
Flask web server (src/main.py) serving responsive HTML interface with real-time MJPEG video streaming. Provides camera controls, detection line adjustment, and live bee count display. Uses threading for frame capture and WebSocket-style streaming over HTTP with multipart response format.
๐ Acceptance Criteriaโ
- Flask server accessible on local network (default port configuration)
- Live MJPEG video stream with detection overlays and bee tracking visualization
- Real-time bee count display with historical data (3600 entry deque buffer)
- Camera property controls: brightness, contrast, saturation, gain, exposure, white balance
- Detection line adjustment via web interface (DETECTION_LINE coefficient)
- Responsive CSS design using system fonts and modern styling
- Automatic frame refresh without page reload using streaming response
๐ซ Out of Scopeโ
- Remote internet access (handled by main web application)
- Historical data storage (local cache only)
- Multi-device synchronization
- Advanced analytics and reporting
๐๏ธ Implementation Approachโ
- Backend: Flask web server with threading for concurrent frame processing
- Frontend: HTML with embedded CSS using system fonts (-apple-system, BlinkMacSystemFont)
- Video Streaming: MJPEG over HTTP with multipart/x-mixed-replace content type
- Real-time Data: Thread-safe frame_lock for concurrent access to video frames
- Camera Interface: OpenCV camera controls with configurable properties dictionary
- Detection Overlay: Real-time visualization of YOLO detections and tracking paths
๐ Success Metricsโ
- Flask server startup and accessibility within device boot sequence
- MJPEG stream latency optimized for real-time viewing
- Thread-safe frame access with proper locking mechanisms
- Camera property adjustment responsiveness via web controls
- Historical bee count display with 10-hour data retention (3600 entries)
๐ Related Featuresโ
- ๐ Count bees coming in and out - on the edge
- ๐ฅ Video streaming via API
- ๐ฎ Device management - Remote desktop
๐ Resources & Referencesโ
๐ฌ Notesโ
Actual Flask implementation with MJPEG streaming, camera controls, and real-time detection visualization. Essential for field operations where internet connectivity is unreliable.