Commit Graph

77 Commits

Author SHA1 Message Date
salirezav
00d4e5b275 Enhance video remote service and UI components
- Updated docker-compose.yml to include new media-api and mediamtx services for improved video handling.
- Modified package.json and package-lock.json to add TypeScript types for React and React DOM.
- Refactored video-related components (VideoCard, VideoList, VideoModal) for better user experience and responsiveness.
- Improved FiltersBar and Pagination components with enhanced styling and functionality.
- Added loading and error states in VideoList for better user feedback during data fetching.
- Enhanced CSS styles for a more polished look across the application.
2025-10-31 18:06:40 -04:00
salirezav
0b724fe59b Refactor video streaming feature and update dependencies
- Replaced npm ci with npm install in docker-compose for better package management.
- Introduced remote component loading for the VideoStreamingPage with error handling.
- Updated the title in index.html to "Experiments Dashboard" for clarity.
- Added new video remote service configuration in docker-compose for improved integration.
- Removed deprecated files and components related to the video streaming feature to streamline the codebase.
- Updated package.json and package-lock.json to include @originjs/vite-plugin-federation for module federation support.
2025-10-30 15:36:19 -04:00
salirezav
9f669e7dff Enhance scheduling and drag-and-drop functionality in the Calendar component
- Improved drag-and-drop experience for event scheduling with visual feedback and better cursor styles.
- Added state management for tracking repetitions, including locked schedules and currently scheduling repetitions.
- Implemented re-staggering logic to prevent overlap of scheduled events.
- Enhanced event generation to include time points for soaking, airdrying, and cracking phases.
- Updated the calendar to preserve and restore scroll position during event updates.
- Refactored event handling to ensure smooth interaction and improved user experience.
2025-10-29 14:16:19 -04:00
salirezav
98c93f9e0e Change video storage directory from /storage to /mnt/nfs_share
- Update StorageConfig default base_path in core/config.py
- Update base_path and camera storage_paths in config.json and config.compose.json
- Update Docker Compose volume mounts to use /mnt/nfs_share
- Update start_system.sh to create /mnt/nfs_share directory
- Update convert_avi_to_mp4.sh to use new NFS path
- Update all documentation files to reflect new storage paths
- Videos now stored on NFS server at 192.168.1.249:/mnt/nfs_share/
2025-10-14 16:28:00 -04:00
salirezav
e675423258 Remove deprecated CSV files and update experiment seeding scripts
- Deleted unused CSV files: 'meyer experiments.csv' and 'phase_2_experimental_run_sheet.csv'.
- Updated SQL seed scripts to reflect changes in experiment data structure and ensure consistency with the latest experiment parameters.
- Enhanced user role assignments in the seed data to include 'conductor' alongside 'data recorder'.
- Adjusted experiment seeding logic to align with the corrected data from the CSV files.
2025-09-28 21:10:50 -04:00
salirezav
853cec1b13 Add drag-and-drop scheduling functionality to the Scheduling component
- Integrated react-dnd and react-dnd-html5-backend for drag-and-drop capabilities.
- Enhanced the Scheduling component to allow users to visually manage experiment repetitions on the calendar.
- Added state management for scheduled repetitions and their timing.
- Implemented select-all checkboxes for conductors and repetitions for improved user experience.
- Updated calendar event generation to include new repetition markers with distinct styles.
- Refactored event handling to support draggable repetition markers and update their timing dynamically.
2025-09-24 21:23:38 -04:00
salirezav
aaeb164a32 Refactor experiment management and update data structures
- Renamed columns in the experimental run sheet CSV for clarity.
- Updated the ExperimentForm component to include new fields for weight per repetition and additional parameters specific to Meyer Cracker experiments.
- Enhanced the data entry logic to handle new experiment phases and machine types.
- Refactored repetition scheduling logic to use scheduled_date instead of schedule_status for better clarity in status representation.
- Improved the user interface for displaying experiment phases and their associated statuses.
- Removed outdated seed data and updated database migration scripts to reflect the new schema changes.
2025-09-24 14:27:28 -04:00
salirezav
08538c87c3 Implement availability management in Scheduling component
- Added functionality to load user availability from the database on component mount.
- Integrated create and delete availability features with the backend.
- Refactored event handling to manage availability slots dynamically.
- Updated supabase.ts to include methods for fetching, creating, and deleting availability records.
2025-09-22 11:34:58 -04:00
salirezav
44c8c3f6dd Update environment configuration and enhance user management features
- Changed VITE_SUPABASE_URL in .env.example for deployment consistency.
- Added new user management functionality to reset user passwords in UserManagement component.
- Updated supabase.ts to include first and last name fields in user profiles and added password reset functionality.
- Enhanced DashboardLayout to include a user profile view and improved user display in TopNavbar.
- Updated seed.sql to create additional users with roles for testing purposes.
2025-09-22 11:20:15 -04:00
salirezav
0ba385eebc update scheduling 2025-09-19 12:46:03 -04:00
salirezav
4e0e9f9d3f Update modal backdrop blur effect and Vite configuration
- Changed backdrop blur effect in multiple modal components from 32px to 2px for a more subtle appearance.
- Updated Vite configuration to use automatic JSX runtime for improved compatibility with React 17 and above.
2025-09-19 12:43:37 -04:00
salirezav
ed6c242faa Enhance scheduling features in management dashboard
- Added new scheduling functionality with a dedicated Scheduling component to manage availability and experiment scheduling.
- Integrated react-big-calendar for visual calendar representation of availability slots.
- Updated Dashboard and DashboardLayout components to handle current route and pass it to child components.
- Implemented route handling for scheduling sub-routes to improve user navigation.
- Added new dependencies: moment and react-big-calendar for date handling and calendar UI.
- Improved user experience with dynamic URL updates based on selected scheduling views.
2025-09-19 12:33:25 -04:00
salirezav
d1fe478478 Refactor: enhance dashboard layout and experiment management features
- Added functionality to save and retrieve the current dashboard view in localStorage for improved user experience.
- Updated DashboardLayout component to handle view changes with access control based on user roles.
- Renamed Experiments component to ExperimentManagement for clarity.
- Introduced new ExperimentPhase interface and related utility functions for managing experiment phases.
- Updated seed data to include initial roles and experiment phases for testing.
- Cleaned up unnecessary blank lines in various files for better code readability.
2025-09-19 12:03:46 -04:00
salirezav
843071eda7 Remove unnecessary blank lines in camera-test.html for cleaner code. 2025-09-11 14:28:54 -04:00
salirezav
f8d720964e Update API endpoints for camera2 and enhance logging options in USDA Vision System
- Changed camera1 references to camera2 in API endpoint documentation for start and stop recording.
- Added debug and verbose logging options in the USDA Vision System to improve debugging capabilities.
- Updated TopNavbar component for improved user experience with cursor pointer styling.
2025-09-11 14:25:20 -04:00
salirezav
8e7b5b054f Add development scripts and Docker Compose configuration for local environment setup
- Introduced `dev-start.sh`, `dev-stop.sh`, `dev-logs.sh`, and `dev-shell.sh` for managing the development environment.
- Added `docker-compose.dev.yml` to define services for API and web applications with appropriate configurations.
- Updated `README.md` to include instructions for development mode and commands for managing the environment.
2025-09-11 14:24:21 -04:00
salirezav
5bdb070173 Enhance camera management features: add debug endpoint for camera manager state, implement live camera routes without authentication, and improve logging for camera initialization and status checks. Update Docker configuration to include environment variables for the web app. 2025-09-02 15:31:47 -04:00
salirezav
62dd0d162b Refactor: enhance API response schemas for pagination; update environment variables for Supabase and Vision API; improve Vite configuration for proxy routing 2025-08-12 13:48:17 -04:00
salirezav
7a939920fa Chore: update environment configuration for local development; modify Dockerfile to streamline SDK installation and enhance startup script for better directory handling; add time verification script for system time synchronization 2025-08-08 16:18:37 -04:00
salirezav
20907509b1 Refactor camera management to conditionally import SDK and handle mock mode; update API base URL references to localhost in documentation and code. 2025-08-08 13:20:31 -04:00
Alireza Vaezi
fc2da16728 Chore: rename api->camera-management-api and web->management-dashboard-web-app; update compose, ignore, README references 2025-08-07 22:07:25 -04:00
Alireza Vaezi
28dab3a366 Build: ensure bash available for vendor install.sh 2025-08-07 21:28:12 -04:00
Alireza Vaezi
4c9e9445e4 Chore: minor compose tweaks for SDK install at runtime and env 2025-08-07 21:27:06 -04:00
Alireza Vaezi
00ea41e11c Build: install Huateng SDK from local tarball in api image; compose builds api image and sets LD_LIBRARY_PATH 2025-08-07 21:27:00 -04:00
Alireza Vaezi
cf0bb48fac API Dockerfile: install camera SDK from local tarball under camera_sdk; compose: build API image and set LD_LIBRARY_PATH fallback 2025-08-07 21:25:58 -04:00
Alireza Vaezi
458c04608c Dev: run full system via main.py in compose; add config.compose.json pointing MQTT to 'mqtt' service and map /storage 2025-08-07 21:07:07 -04:00
Alireza Vaezi
6255279d0d Docs: add subtree workflow and Docker Compose quick start to README 2025-08-07 21:03:12 -04:00
Alireza Vaezi
2b25413040 Add .env.example for local dev env vars 2025-08-07 20:58:54 -04:00
Alireza Vaezi
eaf509fbf8 Add api/ and web/ via git subtree; add docker-compose.yml and unified .gitignore 2025-08-07 20:58:28 -04:00
Alireza Vaezi
0b0e575080 Add 'web/' from commit '81828f61cf893039b89d3cf1861555f31167c37d'
git-subtree-dir: web
git-subtree-mainline: 7dbb36d619
git-subtree-split: 81828f61cf
2025-08-07 20:57:47 -04:00
Alireza Vaezi
7dbb36d619 Add 'api/' from commit '14ac229098e65aa643f84e8e17e0c5f1aaf8d639'
git-subtree-dir: api
git-subtree-mainline: 4743f19aef
git-subtree-split: 14ac229098
2025-08-07 20:57:34 -04:00
Alireza Vaezi
4743f19aef Initial commit: Add project README 2025-08-07 10:53:16 -04:00
Alireza Vaezi
81828f61cf feat(video-streaming): add ApiStatusIndicator, PerformanceDashboard, VideoDebugger, and VideoErrorBoundary components
- Implemented ApiStatusIndicator to monitor video API connection status with health check functionality.
- Created PerformanceDashboard for monitoring video streaming performance metrics in development mode.
- Developed VideoDebugger for diagnosing video streaming issues with direct access to test video URLs.
- Added VideoErrorBoundary to handle errors in video streaming components with user-friendly messages and recovery options.
- Introduced utility functions for performance monitoring and thumbnail caching to optimize video streaming operations.
- Added comprehensive tests for video streaming API connectivity and functionality.
2025-08-06 11:46:25 -04:00
Alireza Vaezi
14ac229098 streaming fix 2025-08-05 15:55:48 -04:00
Alireza Vaezi
07e8e52503 Add comprehensive video streaming module and AI agent integration guide
- Introduced a new video streaming module with endpoints for listing, streaming, and managing video files.
- Added detailed API documentation for video streaming, including features like HTTP range requests, thumbnail generation, and caching.
- Created a new AI Agent Video Integration Guide with step-by-step instructions for integrating with the video streaming API.
- Implemented a video reindexing script to update video statuses from "unknown" to "completed".
- Enhanced error handling and logging throughout the video streaming and reindexing processes.
2025-08-05 14:44:31 -04:00
Alireza Vaezi
228efb0f55 feat: add Pagination component for video list navigation
- Implemented a reusable Pagination component with first/last, previous/next, and numbered page buttons.
- Added PageInfo component to display current page and total items.
- Integrated pagination into VideoList component, allowing users to navigate through video pages.
- Updated useVideoList hook to manage current page and total pages state.
- Modified videoApi service to support pagination with offset-based API.
- Enhanced VideoCard styling for better UI consistency.
- Updated Tailwind CSS configuration to include custom colors and shadows for branding.
- Refactored video file settings to use 'h264' codec for better compatibility.
2025-08-05 13:56:26 -04:00
Alireza Vaezi
14757807aa Enhance video file handling: support multiple formats (AVI, MP4, WEBM) in storage manager 2025-08-05 13:53:28 -04:00
Alireza Vaezi
37553163db Implement video processing module with FFmpeg conversion, OpenCV metadata extraction, and file system repository
- Added FFmpegVideoConverter for video format conversion using FFmpeg.
- Implemented NoOpVideoConverter for scenarios where FFmpeg is unavailable.
- Created OpenCVMetadataExtractor for extracting video metadata.
- Developed FileSystemVideoRepository for managing video files in the file system.
- Integrated video services with dependency injection in VideoModule.
- Established API routes for video management and streaming.
- Added request/response schemas for video metadata and streaming information.
- Implemented caching mechanisms for video streaming.
- Included error handling and logging throughout the module.
2025-08-04 16:44:53 -04:00
Alireza Vaezi
7bc76d72f9 feat: Update camera configuration to support MP4 format with new settings
- Changed machine topic from "vibratory_conveyor" to "blower_separator" for camera1
- Updated exposure and gain settings for camera1
- Added new video recording settings: video_format, video_codec, video_quality, auto_start_recording_enabled, auto_recording_max_retries, auto_recording_retry_delay_seconds
- Enhanced documentation to reflect current configuration and API alignment
- Redesigned Camera Configuration UI to display read-only fields for system and auto-recording settings
- Improved handling of video format settings in the API and frontend
- Created CURRENT_CONFIGURATION.md for complete system configuration reference
2025-08-04 16:44:45 -04:00
Alireza Vaezi
1aaac68edd feat(video): Implement MP4 format support across frontend and backend
- Updated VideoModal to display web compatibility status for video formats.
- Enhanced VideoPlayer to dynamically fetch video MIME types and handle MP4 streaming.
- Introduced video file utilities for better handling of video formats and MIME types.
- Modified CameraConfig interface to include new video recording settings (format, codec, quality).
- Created comprehensive documentation for MP4 format integration and frontend implementation.
- Ensured backward compatibility with existing AVI files while promoting MP4 as the preferred format.
- Added validation and error handling for video format configurations.
2025-08-04 16:21:22 -04:00
Alireza Vaezi
551e5dc2e3 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
97f22d239d 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
28400fbfb8 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
1f47e89a4d feat: Add camera preview functionality and recording controls to VisionSystem 2025-07-29 12:31:03 -04:00
Alireza Vaezi
0d20fe189d 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
a6514b72c9 Enhance API server configuration: add auto-recording settings and improve image quality parameters 2025-07-29 11:28:04 -04:00
Alireza Vaezi
7e3169f336 Remove compiled Python bytecode files from the __pycache__ directories 2025-07-29 11:27:58 -04:00
Alireza Vaezi
ff7cb2c8f3 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
0c92b6c277 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
0a26a8046e Refine camera settings: adjust sharpness, contrast, gamma, noise filter, and auto white balance 2025-07-29 07:58:41 -04:00