Commit Graph

54 Commits

Author SHA1 Message Date
Miguel 1b6528977a feat: Update PLC configuration to support absolute and relative paths for records and symbols
- Changed records_directory in plc_config.json to an absolute path.
- Enhanced plc.schema.json to allow absolute and relative paths for records_directory and symbols_path with path-browser widget.
- Updated ui schema to reflect changes in records_directory and symbols_path with appropriate help texts.
- Modified ConfigManager to handle symbols_path in PLC configuration updates.
- Added functionality in PLCDataStreamer and schema_manager to manage symbols_path.
- Implemented Load Symbols button in PLCConfigManager and Dashboard components to load symbols from ASC files.
- Created new PathBrowserWidget for browsing files and directories, supporting both absolute and relative paths.
- Added SimpleFilePathWidget for simplified file path selection.
- Introduced DirectoryBrowserWidget for directory selection.
- Updated main.py to handle loading symbols from ASC files and browsing directories.
2025-08-27 09:24:41 +02:00
Miguel e77a5c3932 Refactor dataset variable schemas and UI handling in Dashboard component for improved clarity and external schema compatibility; streamline variable configuration process. 2025-08-25 18:43:43 +02:00
Miguel 551ec8b4a5 Refactor dataset variable areas to uppercase, update plot definitions and variables, and enhance UI schema for better clarity and consistency
- Changed memory area identifiers in dataset_variables.json and related schemas from lowercase to uppercase (e.g., "db" to "DB").
- Added new plot definition for "CTS306 Conductivimeter" in plot_definitions.json.
- Updated plot_variables.json to include new variables for "HMI_Instrument.QTM306.PVFiltered" and "HMI_Instrument.QTM307.PVFiltered".
- Enhanced dataset-variables.schema.json to enforce required fields based on area and type.
- Improved ui schema for dataset variables to provide clearer guidance on field usage.
- Updated PLC client to utilize new snap7.type module and improved error handling.
- Added support for new data types (DWORD) in PlcDataTypeWidget.
- Updated Dashboard.jsx to reflect changes in memory area identifiers and improve default configurations.
- Upgraded python-snap7 dependency to version 2.0.2 for enhanced functionality.
- Modified system_state.json to reflect changes in connection status and last update timestamp.
- Implemented optimized batch reading logic in optimized_batch_reader.py to support new area mappings.
- Added VSCode configuration files for improved development experience.
- Introduced ConditionalObjectFieldTemplate.jsx for dynamic field visibility based on PLC-specific logic.
2025-08-25 18:02:24 +02:00
Miguel aba83f843a Refactor dataset definitions and variables; update plot configurations and add system tray support
- Updated dataset definitions in `dataset_definitions.json` to change prefix for DAR and removed unused datasets.
- Modified dataset variables in `dataset_variables.json` to update variable names and added a new variable for CTS306_PEW.
- Simplified plot definitions in `plot_definitions.json` by removing old plots and updating the DAR plot configuration.
- Enhanced `main.py` to include system tray functionality using pystray, allowing users to manage the application from the tray.
- Updated `requirements.txt` to include dependencies for system tray support.
- Adjusted `system_state.json` to reflect changes in active datasets and removed references to obsolete datasets.
2025-08-25 16:02:15 +02:00
Miguel 9dae98bfdc Update plot definitions and frontend configurations for time window adjustments
- Changed the default time window in plot_definitions.json from 37 to 20 seconds.
- Updated the PlotRealtimeSession component to reflect the new default time window of 10 seconds instead of 60 seconds in multiple instances.
- Modified the time window input field to have a placeholder of 10 and adjusted the parsing logic to handle empty values.
- Updated system_state.json to reflect the latest timestamp and reordered active datasets.
- Added application_events.json to log significant application events, including application startup and CSV recording status.
- Created a new system_state.json file to track the last state of the application with relevant flags and timestamps.
2025-08-22 16:50:53 +02:00
Miguel 9bbf299826 fix: Address gap between historical and real-time data in ChartjsPlot
- Updated time_window in plot_definitions.json from 60 to 37 seconds to improve data continuity.
- Compensated for frontend processing delays by adjusting lastPushedX timestamp in ChartjsPlot.jsx.
- Enhanced logging for better visibility into data continuity issues, including filtering and ingestion logs.
- Modified system_state.json to reorder active datasets and updated last_update timestamp.
- Added comprehensive documentation in GAP_FIX_SOLUTION.md detailing the problem, root cause, solution, benefits, and testing procedures.
2025-08-22 16:23:30 +02:00
Miguel 12106a9fe9 feat: Implement dataset-specific optimization configuration
- Added `use_optimized_reading` parameter to dataset definitions for per-dataset control over reading methods.
- Updated JSON schema and UI schema to include the new parameter with appropriate descriptions and defaults.
- Modified `ConfigManager`, `PLCClient`, and `PLCDataStreamer` to handle the new optimization setting.
- Enhanced batch reading logic to prioritize dataset-specific settings over global configurations.
- Improved logging to indicate which reading method is being used for each dataset.
- Created comprehensive tests to validate the new functionality and ensure backward compatibility.
- Added documentation detailing the new feature, its benefits, and usage examples.
2025-08-20 00:28:07 +02:00
Miguel a1c004f11b Update configuration and directory handling
- Increased time_window in plot_definitions.json from 10 to 60.
- Added external_path function in config_manager.py to handle paths for records and logs, ensuring compatibility with both development and PyInstaller executable environments.
- Updated PLCDataStreamer to use the new get_csv_directory_path method for retrieving the records directory.
- Refactored main.py to include get_records_directory function for consistent records directory path retrieval.
- Modified system_state.json to set should_connect to false and updated last_update timestamp.
2025-08-18 18:51:18 +02:00
Miguel ac87ce2568 feat: Update dataset configurations and improve PLC communication
- Changed sampling interval for "Fast" dataset from 0.1 to 0.5 seconds.
- Updated variable definitions for "Fast" dataset, including renaming and modifying properties for AUX Blink and M50 variables.
- Adjusted plot definitions to reduce time window from 36 to 10 seconds.
- Enhanced plot variables to ensure correct labeling and enablement of variables.
- Increased inter-read delay in PLCClient for improved stability and added batch reading functionality to optimize variable reads.
- Implemented asynchronous CSV writing system in DataStreamer to reduce I/O operations and improve performance.
- Updated ChartjsPlot component to modify refresh rates for real-time data handling.
- Adjusted system state to disable automatic connection and clear active datasets.
2025-08-17 11:41:31 +02:00
Miguel 61365240d6 Update dataset definitions and chart configuration for improved performance
- Changed the sampling interval for the "Fast" dataset from 1 to 0.1 for finer granularity.
- Adjusted the Chart.js plot configuration by setting the delay to 0 for real-time updates.
- Removed "Test" from the active datasets in the system state and updated the last update timestamp.
2025-08-17 11:00:22 +02:00
Miguel ca6d39cb06 feat: Add import/export functionality for configuration and dataset variables
- Implemented reusable ImportExportButtons component for handling JSON file import/export across various components.
- Enhanced PlotManager, Dashboard, and DatasetManager to support importing and exporting configurations and variables.
- Added validation for JSON structure during import to ensure data integrity.
- Updated dataset_variables.json to include new variable UR29_max.
- Modified system_state.json to reorder active datasets and update last_update timestamp.
2025-08-16 22:35:50 +02:00
Miguel be2df781cf Implementación del sistema de monitoreo de rendimiento y gestión de prioridades para el recording de PLC
- Se creó el archivo PERFORMANCE_MONITORING.md que detalla el sistema de monitoreo de rendimiento en tiempo real, incluyendo métricas, logs y APIs de monitoreo.
- Se desarrolló el archivo PRIORITY_SYSTEM.md que describe la arquitectura de prioridades para asegurar que el recording de CSV tenga máxima prioridad.
- Se implementó el PerformanceMonitor en core/performance_monitor.py para registrar métricas de rendimiento, incluyendo tiempos de lectura, uso de CPU y errores.
- Se creó el PriorityThreadManager en core/priority_manager.py para gestionar la prioridad de los hilos y asegurar que las operaciones de recording no sean interrumpidas.
- Se implementó un sistema de logging rotativo en core/rotating_logger.py que permite la rotación automática de archivos de log y limpieza de archivos antiguos.
2025-08-16 18:34:31 +02:00
Miguel 0f2b9b8fb4 feat: Enhance logging and error handling in symbol processing, update system state and dataset variables, and add symbol data expansion functionality 2025-08-15 21:05:58 +02:00
Miguel 3a830fe100 feat: Add PlotJuggler integration with UDP streaming support, update system state and dataset variables for streaming, and enhance dashboard functionality 2025-08-15 20:23:10 +02:00
Miguel 4481eb33a7 feat: Enhance logging for plot sessions, update UI widgets to use switches, and reorder active datasets in system state 2025-08-15 19:55:57 +02:00
Miguel 696b79ba0d feat: Implement coordinated connection and polling for real-time data updates across tabs
- Introduced `useCoordinatedConnection` and `useCoordinatedPolling` hooks to manage data fetching and state synchronization between tabs.
- Refactored `DatasetCompleteManager`, `PlotRealtimeViewer`, and `VariableSelectorWidget` components to utilize SSE and polling for live data updates.
- Added `TabCoordinationDemo` component to visualize tab coordination status and leadership.
- Updated `Dashboard` to leverage coordinated polling for status updates, improving performance and reducing redundant connections.
- Enhanced `TabCoordinator` utility to manage leadership and data broadcasting between tabs effectively.
2025-08-15 18:55:58 +02:00
Miguel e97cd5260b feat: Implement multi-browser support for plot sessions
- Enhanced session ID generation to include browser tab identifiers, allowing multiple instances of the same plot in different tabs.
- Updated PlotManager to manage sessions more effectively, including cleanup of inactive sessions.
- Modified frontend components to handle dynamic session IDs and ensure independent operation across tabs.
- Added new API endpoints for retrieving sessions by plot ID and manual cleanup of inactive sessions.
- Improved error handling and logging for better debugging and user experience.
2025-08-15 16:56:02 +02:00
Miguel 405edd682e feat: Enhance logging and configuration for plot sessions, update dataset handling, and improve chart rendering logic 2025-08-15 15:49:13 +02:00
Miguel 5caa74fa27 feat: Add detailed logging for plot sessions, update plot configuration, and enhance chart handling 2025-08-15 13:17:08 +02:00
Miguel 6cd5f36c7c feat: Enhance application event logging, add stacked Y-axis support, and update plot session configurations 2025-08-15 13:06:14 +02:00
Miguel 14089cdc2e feat: Add detailed application event logging, enhance plot session configurations, and support stacked Y-axes in Chart.js 2025-08-15 12:55:43 +02:00
Miguel 3514218ff2 feat: Normalize timestamps for chart data and update time window for plot configuration 2025-08-15 12:13:42 +02:00
Miguel addd9fa6bc feat: Enhance event logging for plot sessions, improve zoom functionality, and update dataset configurations 2025-08-15 11:01:20 +02:00
Miguel 438ebc1462 feat: Enhance event logging for plot sessions and improve zoom reset functionality with data reload 2025-08-15 00:54:01 +02:00
Miguel b864e81aa3 feat: Enhance event logging, improve CSV handling, and optimize Chart.js zoom functionality 2025-08-15 00:42:14 +02:00
Miguel e517f40a5d feat: Enhance application event logging, improve CSV handling, and add CSV validator utility 2025-08-15 00:28:21 +02:00
Miguel ea2006666f feat: Enhance application event logging, add CSV header validation, and implement fullscreen mode for charts 2025-08-14 22:57:42 +02:00
Miguel 032959f491 feat: Implement CSV header validation and automatic renaming for dataset files 2025-08-14 22:33:39 +02:00
Miguel d99d439455 feat: Enhance application event logging and add max_hours configuration option 2025-08-14 18:32:49 +02:00
Miguel fd8efecae4 Enhance dataset variable handling and expand symbolic variables
- Updated dataset_variables.json to include new variables and adjust configurations.
- Modified plot_variables.json to add visualization settings for new variables.
- Enhanced ConfigManager to support expansion of symbolic variables, improving variable management.
- Updated PLCClient to handle additional memory types for variable reading.
- Refactored VariableSelectorWidget to utilize expanded dataset variables for better selection.
- Added new API endpoint to retrieve expanded dataset variables.
- Adjusted system_state.json to reflect changes in active datasets and last update timestamp.
2025-08-14 18:28:37 +02:00
Miguel 31cb5cc515 feat: Enhance dataset variable configuration with manual and symbol-based options
- Updated the dataset variables UI schema to support two configuration types: manual and symbol-based.
- Implemented a new DatasetVariableSymbolWidget for symbol selection with auto-fill capabilities.
- Modified the DatasetManager to handle the new schema structure and UI layout.
- Integrated the new widget into the DatasetVariablesRJSF component for improved user experience.
- Updated the SymbolSelectorWidget to support callbacks for symbol selection.
- Refactored the FormTable component to utilize the new allWidgets import for better widget management.
- Added error handling and loading states for improved user feedback during data fetching.
2025-08-14 17:34:32 +02:00
Miguel e3b1b48556 feat: Add symbol loading functionality from ASC files
- Implemented a new utility class `SymbolLoader` to parse Siemens ASC symbol files and save the output in JSON format.
- Created a `SymbolProcessor` class to handle symbol-based variable processing, including loading symbols and expanding configurations.
- Developed frontend components `FilePathWidget` and `SymbolSelectorWidget` for file selection and symbol selection respectively.
- Added API endpoints for loading symbols and browsing files.
- Introduced test scripts for validating the symbol loader and endpoint functionality.
- Added sample ASC and JSON files for testing purposes.
2025-08-14 16:53:31 +02:00
Miguel 16355c4106 feat: Update application events and system state management with new plot session events, enhanced plot definitions, and improved PlotManager component for better session control and configuration handling. 2025-08-14 16:02:10 +02:00
Miguel f5db758698 feat: Implement Plot Manager and Plot Manager Simple components with collapsible forms for plot definitions and variables configuration 2025-08-14 14:48:02 +02:00
Miguel 087a9458ce feat: Enhance plot configuration with visual style options
- Added line tension, stepped lines, point radius, and point hover radius to plot definitions.
- Updated plot variables to include labels for better clarity.
- Modified plot definitions schema to accommodate new visual style properties.
- Enhanced UI schema to support new configuration options in the settings panel.
- Improved ChartjsPlot component to utilize new visual style properties for rendering.
- Implemented refresh functionality for plot configuration in PlotRealtimeSession.
- Updated VariableSelectorWidget to remove unnecessary required attribute.
- Adjusted system state to reflect changes in active datasets and last update timestamp.
2025-08-14 13:12:04 +02:00
Miguel d0d675d804 Enhance variable management and plotting features. Introduced VariableContext for managing variable updates, updated dataset variables and application events, improved plot variable schema, and refined UI components for better usability and performance. 2025-08-14 12:07:07 +02:00
Miguel 09263d39f8 Update application event logging, refine plot session management, and enhance configuration handling. Removed obsolete session_id fields, added new application start events, and improved session creation logic for better user experience. 2025-08-14 11:36:22 +02:00
Miguel 2845d71efe Refactor dataset and plot management to support new array format
- Updated dataset definitions to use a sampling interval of 0.5 seconds.
- Changed plot definitions to reduce the time window to 25 seconds and added a new plot for "Brix".
- Removed deprecated variable configurations from plot variables.
- Refactored ConfigManager to load datasets and variables from new array format, eliminating legacy save methods.
- Updated PLCDataStreamer and PlotManager to reflect changes in dataset and plot management, removing automatic save calls.
- Enhanced ChartjsPlot component to handle variable configurations and session management more efficiently.
- Improved PlotRealtimeSession to ensure backend commands are verified before applying local state changes.
- Adjusted system state to reflect active datasets and connection status.
2025-08-14 11:16:52 +02:00
Miguel 748e8d5b0e Update application event logging, refine PLC configuration, and enhance PlotManager functionality. Added multiple application start events, corrected PLC rack configuration, and introduced PlotRealtimeSession for improved real-time plotting capabilities. 2025-08-14 00:06:43 +02:00
Miguel bb275dd279 Update application event logging and dataset variable configurations. Removed obsolete PLC connection event, added new application start event, and refined variable definitions for clarity and consistency. 2025-08-13 23:42:34 +02:00
Miguel 2ed5acf039 Refactor configuration management and schema handling
- Updated JSON schema for plot variables to improve clarity and structure.
- Modified UI schema for dataset variables to enhance user experience and layout.
- Revamped plot definitions UI schema for better organization and usability.
- Enhanced dataset manager to support filtered variable configuration based on selected datasets.
- Implemented a unified JSON manager for streamlined CRUD operations on configuration files.
- Improved error handling and validation for JSON schema loading and configuration management.
- Updated main application logic to utilize new JSON and schema managers for configuration operations.
- Added validation for dataset definitions and PLC configuration schemas.
2025-08-13 23:31:47 +02:00
Miguel 276efb117d Refactor configuration schemas and UI schemas for datasets and plots
- Changed dataset_variables schema from object to array format, adding dataset_id property.
- Updated plc schema by removing cleanup_interval_hours and max_hours properties, and added sampling_interval to udp_config.
- Modified plot_variables schema from object to array format, adding plot_id property.
- Enhanced UI schemas for dataset definitions and variables, improving layout and descriptions.
- Updated PLC configuration UI schema to reflect changes in the underlying schema.
- Improved error handling and logging in the ConfigManager for better diagnostics.
- Added helper methods in PLCClient for reconnection status and connection info.
- Unified API endpoints for configuration management, allowing direct file access and validation against schemas.
- Introduced a validation script for schema compliance checks.
2025-08-13 22:12:11 +02:00
Miguel e115bd7d55 Enhance UI schema layout support across components. Updated PlotManager and DashboardNew to utilize a comprehensive widget collection and layout templates. Created AllWidgets for improved widget management and added demo schemas showcasing new layout capabilities. 2025-08-13 16:29:38 +02:00
Miguel 8656b4a6a6 Update application event logging and configuration schemas. Added multiple entries for application start events in application_events.json, updated last_updated and total_entries fields. Adjusted sampling_interval in plc_config.json and removed schema references in dataset and plot schema files for consistency. 2025-08-13 16:18:46 +02:00
Miguel 972a965335 Update system state configuration, add cursor ignore file, and implement PlotRealtimeViewer component for real-time plot management 2025-08-13 15:15:25 +02:00
Miguel 04f5122cc6 Actualización de la gestión de eventos de aplicación en application_events.json, añadiendo múltiples entradas para registrar eventos de inicio y errores de conexión al PLC. Se ajustaron las fechas de última actualización y se incrementó el total de entradas. Además, se implementó un nuevo endpoint de verificación de salud en main.py, mejorando la monitorización del estado del sistema. Se realizaron mejoras en la interfaz de usuario y se optimizó la carga de datos en el Dashboard, asegurando una experiencia más fluida y consistente. 2025-08-13 00:21:44 +02:00
Miguel d31f0819e2 Actualización de la gestión de datasets y variables, eliminando campos estáticos innecesarios y optimizando la estructura de datos. Se implementó un nuevo formato para las variables de plot, permitiendo la configuración de colores y estado de habilitación. Además, se mejoró la interfaz de usuario con componentes RJSF y se ajustaron los esquemas de configuración para reflejar estos cambios. Se realizaron mejoras en la lógica de carga y guardado en los gestores de configuración y plots, asegurando una experiencia más fluida y consistente. 2025-08-12 23:41:16 +02:00
Miguel bacc9933b3 Actualización de la gestión de datasets y plots en el Dashboard, integrando nuevos componentes que respetan los layouts definidos en los schemas UI. Se mejoró la presentación de formularios y se implementaron logs de debugging para facilitar la verificación de esquemas. Además, se ajustaron los esquemas de configuración y se eliminaron campos estáticos innecesarios, optimizando la interfaz para el usuario. 2025-08-12 21:22:20 +02:00
Miguel 500b68c4d5 Actualización del Dashboard para integrar la gestión de datasets y plots mediante nuevos componentes. Se implementaron tablas editables para la visualización y manipulación de datos, mejorando la experiencia del usuario. Además, se realizaron ajustes en los esquemas de configuración y se optimizó la presentación de formularios, asegurando una interfaz más intuitiva y funcional. 2025-08-12 20:50:53 +02:00
Miguel 724af8afdf Implementación de mejoras significativas en la gestión de datasets y variables, incluyendo la creación de nuevos componentes para DatasetManager y DatasetVariableManager. Se actualizaron los esquemas de configuración para mejorar la usabilidad, añadiendo descripciones y ayudas contextuales. Se integraron widgets personalizados de Chakra UI en formularios RJSF, optimizando la experiencia del usuario. Además, se realizaron ajustes en las rutas de navegación y se mejoró la consistencia visual en toda la aplicación. 2025-08-12 19:26:47 +02:00