feat: Geutebruck GeViScope/GeViSoft Action Mapping System - MVP
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>
This commit is contained in:
121
geutebruck-api/check_servers_simple.py
Normal file
121
geutebruck-api/check_servers_simple.py
Normal file
@@ -0,0 +1,121 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Simple script to check G-Core server configuration without Unicode"""
|
||||
|
||||
import asyncio
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add src/api to path
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src', 'api'))
|
||||
|
||||
import grpc
|
||||
from protos import configuration_pb2, configuration_pb2_grpc
|
||||
|
||||
async def check_servers():
|
||||
"""Check which G-Core servers are configured"""
|
||||
|
||||
# Connect to SDK Bridge
|
||||
channel = grpc.aio.insecure_channel('localhost:50051')
|
||||
stub = configuration_pb2_grpc.ConfigurationServiceStub(channel)
|
||||
|
||||
try:
|
||||
# Read configuration tree
|
||||
request = configuration_pb2.ReadConfigurationTreeRequest()
|
||||
response = await stub.ReadConfigurationTree(request, timeout=10.0)
|
||||
|
||||
# Find GeViGCoreServer folder
|
||||
gcore_servers = []
|
||||
for child in response.root.children:
|
||||
if child.name == "GeViGCoreServer":
|
||||
for server in child.children:
|
||||
if server.type == "folder":
|
||||
server_dict = {node.name: node for node in server.children}
|
||||
|
||||
# Extract server details
|
||||
server_info = {
|
||||
'id': server.name.split('_')[1] if '_' in server.name else server.name,
|
||||
'alias': server_dict.get('Alias').string_value if 'Alias' in server_dict else 'N/A',
|
||||
'host': server_dict.get('Host').string_value if 'Host' in server_dict else 'N/A',
|
||||
'enabled': None,
|
||||
'user': server_dict.get('User').string_value if 'User' in server_dict else 'N/A'
|
||||
}
|
||||
|
||||
# Check enabled (can be bool or int32)
|
||||
if 'Enabled' in server_dict:
|
||||
enabled_node = server_dict['Enabled']
|
||||
if hasattr(enabled_node, 'bool_value'):
|
||||
server_info['enabled'] = enabled_node.bool_value
|
||||
elif hasattr(enabled_node, 'int_value'):
|
||||
server_info['enabled'] = bool(enabled_node.int_value)
|
||||
|
||||
gcore_servers.append(server_info)
|
||||
|
||||
print("=" * 70)
|
||||
print("G-Core Servers Configuration (GeViSoft -> GeViScope connections)")
|
||||
print("=" * 70)
|
||||
print()
|
||||
|
||||
if not gcore_servers:
|
||||
print("WARNING: NO G-CORE SERVERS CONFIGURED!")
|
||||
print()
|
||||
print("This means GeViSoft is NOT connected to any GeViScope servers.")
|
||||
print("Cameras are on GeViScope servers, so you won't see any cameras.")
|
||||
print()
|
||||
print("To fix: Add a G-Core server pointing to your GeViScope:")
|
||||
print(' POST /api/v1/configuration/servers')
|
||||
print(' {')
|
||||
print(' "alias": "Local GeViScope",')
|
||||
print(' "host": "localhost",')
|
||||
print(' "user": "gevisoft",')
|
||||
print(' "password": "your_password",')
|
||||
print(' "enabled": true')
|
||||
print(' }')
|
||||
else:
|
||||
print(f"Found {len(gcore_servers)} G-Core server(s):")
|
||||
print()
|
||||
for server in gcore_servers:
|
||||
status = "[ENABLED]" if server['enabled'] else "[DISABLED]"
|
||||
localhost_marker = " <- LOCAL GEVISCOPE!" if server['host'] in ['localhost', '127.0.0.1'] else ""
|
||||
print(f" [{server['id']}] {server['alias']}")
|
||||
print(f" Host: {server['host']}{localhost_marker}")
|
||||
print(f" User: {server['user']}")
|
||||
print(f" Status: {status}")
|
||||
print()
|
||||
|
||||
# Check if localhost is in the list
|
||||
has_localhost = any(s['host'] in ['localhost', '127.0.0.1'] for s in gcore_servers)
|
||||
has_enabled_localhost = any(s['host'] in ['localhost', '127.0.0.1'] and s['enabled'] for s in gcore_servers)
|
||||
|
||||
if not has_localhost:
|
||||
print()
|
||||
print("WARNING: No G-Core server pointing to 'localhost'!")
|
||||
print("You have GSCServer.exe running locally but GeViSoft isn't configured to connect to it.")
|
||||
print()
|
||||
print("To connect to your local GeViScope, add a server with host='localhost'")
|
||||
elif has_localhost and not has_enabled_localhost:
|
||||
print()
|
||||
print("WARNING: G-Core server for 'localhost' exists but is DISABLED!")
|
||||
print("Enable it to see cameras from your local GeViScope.")
|
||||
else:
|
||||
print()
|
||||
print("OK: GeViSoft is configured to connect to local GeViScope (localhost)")
|
||||
print()
|
||||
print("If cameras list is still empty, check:")
|
||||
print(" 1. Is GSCServer.exe actually running? (check with Task Manager)")
|
||||
print(" 2. Are cameras configured in the local GeViScope?")
|
||||
print(" 3. Check GeViServer logs for connection errors")
|
||||
print(" 4. Check credentials are correct")
|
||||
|
||||
await channel.close()
|
||||
|
||||
except Exception as e:
|
||||
print()
|
||||
print(f"ERROR: {e}")
|
||||
print()
|
||||
print("Make sure:")
|
||||
print(" 1. SDK Bridge is running (port 50051)")
|
||||
print(" 2. GeViServer is running")
|
||||
print(" 3. Run: .\\status-services.ps1")
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(check_servers())
|
||||
Reference in New Issue
Block a user