This MVP release provides a complete full-stack solution for managing action mappings in Geutebruck's GeViScope and GeViSoft video surveillance systems. ## Features ### Flutter Web Application (Port 8081) - Modern, responsive UI for managing action mappings - Action picker dialog with full parameter configuration - Support for both GSC (GeViScope) and G-Core server actions - Consistent UI for input and output actions with edit/delete capabilities - Real-time action mapping creation, editing, and deletion - Server categorization (GSC: prefix for GeViScope, G-Core: prefix for G-Core servers) ### FastAPI REST Backend (Port 8000) - RESTful API for action mapping CRUD operations - Action template service with comprehensive action catalog (247 actions) - Server management (G-Core and GeViScope servers) - Configuration tree reading and writing - JWT authentication with role-based access control - PostgreSQL database integration ### C# SDK Bridge (gRPC, Port 50051) - Native integration with GeViSoft SDK (GeViProcAPINET_4_0.dll) - Action mapping creation with correct binary format - Support for GSC and G-Core action types - Proper Camera parameter inclusion in action strings (fixes CrossSwitch bug) - Action ID lookup table with server-specific action IDs - Configuration reading/writing via SetupClient ## Bug Fixes - **CrossSwitch Bug**: GSC and G-Core actions now correctly display camera/PTZ head parameters in GeViSet - Action strings now include Camera parameter: `@ PanLeft (Comment: "", Camera: 101028)` - Proper filter flags and VideoInput=0 for action mappings - Correct action ID assignment (4198 for GSC, 9294 for G-Core PanLeft) ## Technical Stack - **Frontend**: Flutter Web, Dart, Dio HTTP client - **Backend**: Python FastAPI, PostgreSQL, Redis - **SDK Bridge**: C# .NET 8.0, gRPC, GeViSoft SDK - **Authentication**: JWT tokens - **Configuration**: GeViSoft .set files (binary format) ## Credentials - GeViSoft/GeViScope: username=sysadmin, password=masterkey - Default admin: username=admin, password=admin123 ## Deployment All services run on localhost: - Flutter Web: http://localhost:8081 - FastAPI: http://localhost:8000 - SDK Bridge gRPC: localhost:50051 - GeViServer: localhost (default port) Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
65 lines
1.8 KiB
Python
65 lines
1.8 KiB
Python
"""
|
|
Examine the JSON structure to understand the format
|
|
"""
|
|
import grpc
|
|
import sys
|
|
import io
|
|
import json
|
|
|
|
sys.path.append(r'C:\DEV\COPILOT\geutebruck-api\src\api')
|
|
|
|
if sys.platform == 'win32':
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
|
|
|
|
from protos import configuration_pb2
|
|
from protos import configuration_pb2_grpc
|
|
|
|
print("="*70)
|
|
print("EXAMINING JSON STRUCTURE")
|
|
print("="*70)
|
|
|
|
channel = grpc.insecure_channel('localhost:50051')
|
|
stub = configuration_pb2_grpc.ConfigurationServiceStub(channel)
|
|
|
|
# Export configuration as JSON
|
|
print("\n1. Exporting configuration as JSON...")
|
|
export_request = configuration_pb2.ExportJsonRequest()
|
|
export_response = stub.ExportConfigurationJson(export_request)
|
|
|
|
if not export_response.success:
|
|
print(f" [ERROR] {export_response.error_message}")
|
|
sys.exit(1)
|
|
|
|
print(f" JSON size: {export_response.json_size} bytes")
|
|
|
|
# Parse JSON
|
|
config = json.loads(export_response.json_data)
|
|
|
|
# Show top-level structure
|
|
print("\n2. Top-level JSON keys:")
|
|
for key in config.keys():
|
|
print(f" - {key}: {type(config[key]).__name__}")
|
|
|
|
# If it's a simple structure, show first few entries
|
|
if isinstance(config, dict):
|
|
print("\n3. Sample of data:")
|
|
count = 0
|
|
for key, value in config.items():
|
|
if count < 5:
|
|
print(f" {key}: {str(value)[:100]}...")
|
|
count += 1
|
|
|
|
# Save to file for manual inspection
|
|
output_file = "config_structure_sample.json"
|
|
with open(output_file, 'w', encoding='utf-8') as f:
|
|
# Just save first 50 entries to keep it manageable
|
|
if isinstance(config, dict):
|
|
sample = dict(list(config.items())[:50])
|
|
json.dump(sample, f, indent=2)
|
|
else:
|
|
json.dump(config, f, indent=2)
|
|
|
|
print(f"\n4. Saved sample to {output_file} for inspection")
|
|
print("="*70)
|