Commit Graph

137 Commits

Author SHA1 Message Date
Alireza Vaezi
ddecbf7baa feat(video-streaming): Implement video streaming feature with components, hooks, services, and utilities
- Added centralized exports for video streaming components and hooks.
- Implemented `useVideoInfo` hook for fetching and managing video metadata and streaming information.
- Developed `useVideoList` hook for managing video list state, fetching, filtering, and pagination.
- Created `useVideoPlayer` hook for managing video player state and controls.
- Established `videoApiService` for handling API interactions related to video streaming.
- Defined TypeScript types for video streaming feature, including video metadata, API responses, and component props.
- Added utility functions for video operations, formatting, and data processing.
- Created main entry point for the video streaming feature, exporting all public APIs.
2025-08-04 15:02:48 -04:00
Alireza Vaezi
dee6aea254 feat: Enhance camera streaming functionality with stop streaming feature and update UI for better user experience 2025-07-31 22:17:08 -04:00
Alireza Vaezi
6147958fab Enhance camera configuration and auto-recording functionality
- Updated CameraStreamer to configure streaming settings from config.json, including manual exposure, gain, image quality, noise reduction, and color settings.
- Added new methods in CameraStreamer for configuring image quality, noise reduction, color settings, and advanced settings.
- Extended CameraConfig to include manual white balance RGB gains.
- Improved AutoRecordingManager to handle camera status updates and ensure proper recording starts/stops based on machine state changes.
- Created detailed configuration documentation for blower and conveyor cameras, outlining settings and their mappings to config.json.
- Implemented a comprehensive test script for auto-recording functionality with simulated MQTT messages, verifying correct behavior on machine state changes.
2025-07-29 13:54:16 -04:00
Alireza Vaezi
5146103010 feat: Add camera preview functionality and recording controls to VisionSystem 2025-07-29 12:31:03 -04:00
Alireza Vaezi
6a7c51ee69 feat: Add CameraPreviewModal component for live camera streaming
feat: Implement useAuth hook for user authentication management

feat: Create useAutoRecording hook for managing automatic recording functionality

feat: Develop AutoRecordingManager to handle automatic recording based on MQTT events

test: Add test script to verify camera configuration API fix

test: Create HTML page for testing camera configuration API and auto-recording fields
2025-07-29 12:30:59 -04:00
Alireza Vaezi
6c978a9983 Enhance API server configuration: add auto-recording settings and improve image quality parameters 2025-07-29 11:28:04 -04:00
Alireza Vaezi
2b7528479f Remove compiled Python bytecode files from the __pycache__ directories 2025-07-29 11:27:58 -04:00
Alireza Vaezi
5b6eaa3831 Add comprehensive tests for camera streaming, time synchronization, and auto-recording functionality
- Implemented test script for camera streaming functionality, covering API endpoints and concurrent recording.
- Created time verification script to check system time synchronization against multiple APIs.
- Developed timezone utility tests to validate timezone functions and logging.
- Added integration tests for system components, including configuration, camera discovery, and API endpoints.
- Enhanced MQTT logging and API endpoint tests for machine and MQTT status.
- Established auto-recording tests to simulate state changes and verify automatic recording behavior.
- Created simple tests for auto-recording configuration and API model validation.
2025-07-29 11:15:10 -04:00
Alireza Vaezi
bdb5ee02b7 feat: Integrate auto-recording feature into USDA Vision Camera System
- Added instructions for implementing auto-recording functionality in the React app.
- Updated TypeScript interfaces to include new fields for auto-recording status and configuration.
- Created new API endpoints for enabling/disabling auto-recording and retrieving system status.
- Enhanced UI components to display auto-recording status, controls, and error handling.
- Developed a comprehensive Auto-Recording Feature Implementation Guide.
- Implemented a test script for validating auto-recording functionality, including configuration checks and API connectivity.
- Introduced AutoRecordingManager to manage automatic recording based on machine state changes with retry logic.
- Established a retry mechanism for failed recording attempts and integrated status tracking for auto-recording.
2025-07-29 09:43:14 -04:00
Alireza Vaezi
fc93e630f4 Refine camera settings: adjust sharpness, contrast, gamma, noise filter, and auto white balance 2025-07-29 07:58:41 -04:00
Alireza Vaezi
614599e05c Add USDA Vision Camera Streaming API and related functionality
- Implemented streaming API endpoints for starting, stopping, and retrieving live streams from cameras.
- Added support for concurrent streaming and recording operations.
- Created test scripts for frame conversion and streaming functionality.
- Developed a CameraStreamer class to manage live preview streaming without blocking recording.
- Included error handling and logging for camera operations.
- Added configuration endpoints for camera settings and real-time updates.
- Enhanced testing scenarios for various camera configurations and error handling.
2025-07-28 18:09:48 -04:00
Alireza Vaezi
cdcca280f2 feat(streaming): Add live streaming functionality for USDA Vision Camera system
- Introduced non-blocking live preview streaming that operates independently from recording.
- Implemented REST API endpoints for starting and stopping streams, and retrieving live streams.
- Developed a web interface (`camera_preview.html`) for users to control and view camera streams.
- Created TypeScript definitions for API integration in React projects.
- Added comprehensive testing script (`test_streaming.py`) to validate API endpoints and concurrent operations.
- Updated database migration to fix visibility of experiment repetitions for all authenticated users.
2025-07-28 17:53:59 -04:00
Alireza Vaezi
8cf0b9aec4 Add comprehensive test suite for USDA Vision Camera System
- Implemented main test script to verify system components and functionality.
- Added individual test scripts for camera exposure settings, API changes, camera recovery, maximum FPS, MQTT events, logging, and timezone functionality.
- Created service file for system management and automatic startup.
- Included detailed logging and error handling in test scripts for better diagnostics.
- Ensured compatibility with existing camera SDK and API endpoints.
2025-07-28 17:33:49 -04:00
Alireza Vaezi
7c7115a0f4 feat: Implement Vision System API Client with comprehensive endpoints and utility functions
- Added VisionApiClient class to interact with the vision system API.
- Defined interfaces for system status, machine status, camera status, recordings, and storage stats.
- Implemented methods for health checks, system status retrieval, camera control, and storage management.
- Introduced utility functions for formatting bytes, durations, and uptime.

test: Create manual verification script for Vision API functionality

- Added a test script to verify utility functions and API endpoints.
- Included tests for health check, system status, cameras, machines, and storage stats.

feat: Create experiment repetitions system migration

- Added experiment_repetitions table to manage experiment repetitions with scheduling.
- Implemented triggers and functions for validation and timestamp management.
- Established row-level security policies for user access control.

feat: Introduce phase-specific draft management system migration

- Created experiment_phase_drafts and experiment_phase_data tables for managing phase-specific drafts and measurements.
- Added pecan_diameter_measurements table for individual diameter measurements.
- Implemented row-level security policies for user access control.

fix: Adjust draft constraints to allow multiple drafts while preventing multiple submitted drafts

- Modified constraints on experiment_phase_drafts to allow multiple drafts in 'draft' or 'withdrawn' status.
- Ensured only one 'submitted' draft per user per phase per repetition.
2025-07-28 16:30:56 -04:00
Alireza Vaezi
80ae645a36 feat: Add MQTT publisher and tester scripts for USDA Vision Camera System
- Implemented mqtt_publisher_test.py for manual MQTT message publishing
- Created mqtt_test.py to test MQTT message reception and display statistics
- Developed test_api_changes.py to verify API changes for camera settings and filename handling
- Added test_camera_recovery_api.py for testing camera recovery API endpoints
- Introduced test_max_fps.py to demonstrate maximum FPS capture functionality
- Implemented test_mqtt_events_api.py to test MQTT events API endpoint
- Created test_mqtt_logging.py for enhanced MQTT logging and API endpoint testing
- Added sdk_config.py for SDK initialization and configuration with error suppression
2025-07-28 16:30:14 -04:00
Alireza Vaezi
ea30f82c2a holy shit a lot has changed! read the readme, I guess... 2025-07-28 16:29:41 -04:00
Alireza Vaezi
ffb7ffded1 Enhance time synchronization checks, update storage paths, and improve camera recording management 2025-07-25 22:38:33 -04:00
Alireza Vaezi
48949fc045 Add project completion documentation for USDA Vision Camera System 2025-07-25 21:40:51 -04:00
Alireza Vaezi
3458567d44 Implement code changes to enhance functionality and improve performance 2025-07-25 21:39:52 -04:00
Alireza Vaezi
5f012be651 Massive update - API and other modules added 2025-07-25 21:39:07 -04:00
Alireza Vaezi
0243e76df0 init commit 2025-07-25 12:07:30 -04:00
Alireza Vaezi
12d5c50a67 Initial commit 2025-07-25 12:06:17 -04:00
Alireza Vaezi
8a1b22234b data entry and draft system work 2025-07-23 21:21:59 -04:00
Alireza Vaezi
24c435a2f7 update dependencies and remove test credentials from Login component 2025-07-23 11:46:12 -04:00
Alireza Vaezi
1d3e993137 add scheduling functionality for experiments with new ScheduleModal component 2025-07-20 21:07:58 -04:00
Alireza Vaezi
35268ba4ea create new experiment works 2025-07-20 19:59:28 -04:00
Alireza Vaezi
2f21cd54e5 add new experiment 2025-07-20 17:04:51 -04:00
Alireza Vaezi
5793487da3 style improved 2025-07-20 12:06:13 -04:00
Alireza Vaezi
384950812b style changed 2025-07-20 11:59:15 -04:00
Alireza Vaezi
5826a2c156 can successfully add new users 2025-07-20 11:33:51 -04:00
Alireza Vaezi
ac960ccdfe css issue fixed 2025-07-20 11:10:52 -04:00
Alireza Vaezi
82976746e7 RBAC seems to be working 2025-07-20 11:05:58 -04:00
Alireza Vaezi
5a1cbe9789 Revert "RBAC in place. Tailwind CSS working."
This reverts commit b37c3a83bc.
2025-07-18 21:18:07 -04:00
Alireza Vaezi
b37c3a83bc RBAC in place. Tailwind CSS working. 2025-07-17 12:10:23 -04:00
Alireza Vaezi
06c2a7925f supabase added 2025-07-17 10:53:16 -04:00
Alireza Vaezi
63045f6cf8 blank Vite + React + Tailwind CSS project 2025-07-17 10:44:08 -04:00
Alireza Vaezi
68355bdaaf Initial commit 2025-07-17 10:39:47 -04:00