- Create metadata initializer to load sample data on application startup
- Add sample metadata file with realistic water system configuration
- Update main application to initialize metadata during startup
- Sample includes 2 stations, 4 equipment, 4 data types with descriptive tags
- Provides realistic data for protocol mappings UI testing
Co-authored-by: openhands <openhands@all-hands.dev>
- Update displayProtocolMappings to show station/equipment/data type names from tag metadata
- Ensure tag metadata is loaded before displaying protocol mappings
- Update table headers to indicate Name & ID format
- Users now see descriptive names instead of raw IDs in the mappings table
Co-authored-by: openhands <openhands@all-hands.dev>
- Remove legacy configuration classes: PumpStationConfig, PumpConfig, SafetyLimitsConfig
- Update ProtocolMapping model with tag metadata validators
- Replace text inputs with dropdowns in UI templates
- Add tag metadata loading functions to JavaScript
- Remove legacy API endpoints and add tag metadata endpoints
- Update security permissions to remove configure_safety_limits
- Clean up configuration manager and hardware discovery
- All integration tests pass successfully
Co-authored-by: openhands <openhands@all-hands.dev>
- Fix total_discovered_endpoints count to use DISTINCT device_id instead of counting all endpoints
- Fix apply_discovery_results endpoint to handle dictionary data correctly
- Replace object attribute access with dict.get() methods for scan results
Resolves issues where discovery count doubled with each scan and
apply results failed with '[object Object]' errors.
- Add persistent discovery service auto-initialization in start_dashboard.py
- Fix 'is_scanning' field in discovery status API
- Fix scan results API to handle dictionary data correctly
- Fix database schema issues for discovery_results table
- Add debugging for service initialization
Resolves issues with discovery service not persisting across restarts
and API endpoints returning incorrect data formats.
- Add discovery_results table to database schema
- Create persistent discovery service with database storage
- Update dashboard API to use persistent discovery service
- Initialize persistent discovery service on application startup
- Fix 404 errors when polling discovery scan results
- Fixed syntax error in dashboard.js (missing closing bracket for DOMContentLoaded)
- Added favicon.ico file to static directory
- Added favicon link to dashboard HTML template
- All JavaScript errors should now be resolved
- Dashboard should load without console errors
Fixed TypeError in SSHDeployer.execute_remote() method by adding 'silent' parameter
- Added silent parameter with default value False
- Modified print statements to respect silent mode
- Health checks now work correctly during deployment
This ensures the deployment script can properly wait for services to start and validate the deployment
Created detailed deployment guides:
- DEPLOYMENT.md: Complete step-by-step deployment guide with configuration and key management
- DEPLOYMENT_CHECKLIST.md: Quick reference checklist for deployment process
Both guides cover:
- SSH key configuration and management
- Environment setup and configuration
- Multiple deployment methods (Python SSH, shell script, manual)
- Post-deployment verification and health checks
- Troubleshooting and rollback procedures
- Security considerations
Documentation provides clear instructions for production, staging, and test deployments
Updated references in:
- deploy/deploy-onprem.sh: Fixed paths for test-deployment.sh and test_dashboard_local.py
- deploy/validate-deployment.sh: Fixed path for test-e2e-deployment.py
- tests/integration/test-e2e-deployment.py: Fixed paths for mock servers
All file references now point to correct locations in the new organized structure
- Add discovery protocol test files for debugging and direct testing
- Add remote test integration scripts and configuration
- Update deployment and monitoring scripts with recent changes
- Include test-remote.yml configuration for remote testing
- Updated discovery service import to use protocol_discovery_fast
- Fixed recent discoveries endpoint to properly extract endpoints from scan results
- Enhanced dashboard JavaScript with complete functionality
- Updated Docker configuration for discovery module inclusion
- Added remote deployment documentation
This resolves the discovery API 404 errors and ensures all dashboard features work correctly.
- Add ProtocolDiscoveryService with network scanning for all protocols
- Create discovery API endpoints for scan management and results
- Implement discovery UI components in dashboard
- Add comprehensive unit tests for discovery functionality
- Integrate discovery with configuration manager for automatic mapping creation
- Support background task execution for long-running discovery scans
- Include discovery status monitoring and recent discoveries endpoints
- Created 35 comprehensive tests covering ConfigurationManager, protocol validation, and database integration
- Added unit tests for ConfigurationManager with database persistence
- Added protocol-specific validation tests for all 4 protocols (Modbus TCP, Modbus RTU, OPC UA, REST API)
- Added integration tests for protocol server integration
- Enhanced existing API tests for protocol mapping endpoints
- Fixed database integration issues in ConfigurationManager
- Improved validation logic and error handling
- All tests passing with comprehensive coverage of Phase 1 functionality
- Extended Modbus server input register range from 300 to 400 registers
- Fixed IllegalAddress errors for performance registers (400-499)
- Added timeout protection for Modbus operations in dashboard API
- Added protocol architecture diagram to documentation
- Confirmed both OPC UA and Modbus servers are running correctly
- Protocol clients now successfully read real data with 0% error rate
Test Results:
- OPC UA: 15/15 signals active, 0% error rate
- Modbus: 18/18 signals active, 0% error rate
- REST: 3/3 signals active, 0% error rate
- Replace get_pump_data with direct register reads
- Read holding register 350 for pump speed
- Read input register 0 for flow rate
- Calculate derived values for power, pressure, and status
- Use real Modbus data when available
- Keep fallback for OPC UA until security policy issues are resolved
- Maintain graceful fallback to mock data if protocol clients fail
Only configure secure security policies when certificates are available. When certificates are not available, only offer the None security policy and skip certificate validation configuration.
- OPC UA client: Explicitly set security policy to 'None' to match server
- OPC UA client: Fix connection handling to check if connection succeeded
- Modbus client: Update register addresses to match server configuration
- Modbus client: Add proper connection success checking
- Updated test-deployment.sh to use port 8081 instead of 8080
- Updated test-e2e-deployment.py to use port 8081 instead of 8080
- Updated setup-test-environment.sh to use port 8081 instead of 8080
- All test scripts now work correctly with test environment configuration
- Changed DB_HOST from localhost to host.docker.internal
- Added extra_hosts configuration to enable host-gateway access
- This allows test container to connect to the existing PostgreSQL database
- Changed port mapping from 8080:8080 to 8081:8081
- Updated REST_API_PORT to 8081 in environment variables
- Updated HEALTH_MONITOR_PORT to 9091
- Set LOG_LEVEL to DEBUG for test environment
- Created test.yml configuration file for test environment
- Created .env.test environment file with protocol servers enabled
- Updated deployment script to handle test environment
- Test environment uses port 8081 and enables protocol servers for testing
- Removed the outer try-catch block that was catching HTTPException
- HTTPException now properly propagates to FastAPI error handler
- This ensures clear error messages are returned when protocol servers are disabled
- Added specific exception handling for HTTPException to prevent double-wrapping
- HTTPException instances are now re-raised directly without modification
- This ensures clear error messages are returned to the client
- Removed mock data fallback from /signals endpoint
- Now returns HTTP 503 with clear error messages when protocol servers are unavailable
- Protocol servers are disabled in production, so dashboard will show clear error messages
- This ensures we can properly test connectivity issues and don't mask real problems
- Added check for settings.opcua_enabled and settings.modbus_enabled before initializing ProtocolDataCollector
- This prevents connection attempts when protocol servers are disabled in production
- Reduces error logs and improves performance
- Created .env.production with OPCUA_ENABLED=false and MODBUS_ENABLED=false
- Created docker-compose.production.yml that uses production environment file
- Updated deployment script to use production docker-compose file when available
- This prevents connection issues when protocol servers are not available
- Created ProtocolDataCollector class to query OPC UA and Modbus servers
- Updated /signals endpoint to use real protocol data instead of mock data
- Added graceful fallback to mock data when protocol servers are unavailable
- Fixed Modbus client parameter issues and None value handling
- Enhanced dashboard to display real industrial data from protocol servers
- Fixed random register generation in signals endpoint
- Each pump now gets consistent register blocks (40011-40014, 40021-40024, etc.)
- Addresses now follow logical pattern for industrial SCADA systems
- Fixed signals endpoint to work without database dependency
- Fixed scada-config endpoint to use default stations and pumps
- Enhanced mock data now properly served from production server
- Enhanced OPC UA server with realistic pump simulation
- Enhanced Modbus server with simulated industrial data
- Updated SCADA API endpoints to query actual protocol servers
- Added realistic signal data based on actual stations and pumps
- Improved SCADA configuration with real device mapping
- Add /api/v1/dashboard/scada-config GET endpoint
- Add /api/v1/dashboard/scada-config POST endpoint
- Add /api/v1/dashboard/test-scada endpoint
- Fix JavaScript errors for SCADA configuration buttons
- All SCADA functions now work properly
- Add Signal Overview tab with protocol statistics and signal table
- Fix button visibility issues with improved CSS styling
- Add preconfigured Grafana dashboard with system monitoring
- Add signal export functionality (CSV download)
- Add protocol statistics cards (Modbus, OPC UA, Profinet, REST)
- Add signal filtering and search capabilities
- Update dashboard provisioning for Grafana
- Add mock signal data for demonstration