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>
119 lines
5.0 KiB
PowerShell
119 lines
5.0 KiB
PowerShell
# Start Geutebruck API Services
|
|
# This script starts GeViServer, SDK Bridge, and Python API
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
Write-Host "========================================" -ForegroundColor Cyan
|
|
Write-Host "Starting Geutebruck API Services" -ForegroundColor Cyan
|
|
Write-Host "========================================" -ForegroundColor Cyan
|
|
Write-Host ""
|
|
|
|
# Paths
|
|
$geviServerExe = "C:\GEVISOFT\GeViServer.exe"
|
|
$sdkBridgePath = "C:\DEV\COPILOT\geutebruck-api\src\sdk-bridge\GeViScopeBridge\bin\Release\net8.0"
|
|
$sdkBridgeExe = "$sdkBridgePath\GeViScopeBridge.exe"
|
|
$apiPath = "C:\DEV\COPILOT\geutebruck-api\src\api"
|
|
$venvPython = "C:\DEV\COPILOT\geutebruck-api\.venv\Scripts\python.exe"
|
|
$uvicorn = "C:\DEV\COPILOT\geutebruck-api\.venv\Scripts\uvicorn.exe"
|
|
|
|
# Function to wait for port to be listening
|
|
function Wait-ForPort {
|
|
param(
|
|
[int]$Port,
|
|
[int]$TimeoutSeconds = 60
|
|
)
|
|
|
|
$elapsed = 0
|
|
while ($elapsed -lt $TimeoutSeconds) {
|
|
$connection = Get-NetTCPConnection -LocalPort $Port -State Listen -ErrorAction SilentlyContinue
|
|
if ($connection) {
|
|
return $true
|
|
}
|
|
Start-Sleep -Seconds 2
|
|
$elapsed += 2
|
|
Write-Host "." -NoNewline -ForegroundColor Gray
|
|
}
|
|
return $false
|
|
}
|
|
|
|
# Check if already running
|
|
$geviServerRunning = Get-Process -Name "GeViServer" -ErrorAction SilentlyContinue
|
|
$sdkBridgeRunning = Get-Process -Name "GeViScopeBridge" -ErrorAction SilentlyContinue
|
|
$uvicornRunning = Get-Process -Name "uvicorn" -ErrorAction SilentlyContinue
|
|
|
|
# Start GeViServer
|
|
if ($geviServerRunning) {
|
|
Write-Host "[SKIP] GeViServer is already running (PID: $($geviServerRunning.Id))" -ForegroundColor Yellow
|
|
} else {
|
|
Write-Host "[1/3] Starting GeViServer..." -ForegroundColor Green
|
|
Start-Process -FilePath $geviServerExe -ArgumentList "console" -WorkingDirectory "C:\GEVISOFT" -WindowStyle Hidden
|
|
|
|
# Wait for GeViServer to start listening on port 7700
|
|
Write-Host " Waiting for GeViServer to initialize" -NoNewline -ForegroundColor Gray
|
|
if (Wait-ForPort -Port 7700 -TimeoutSeconds 60) {
|
|
Write-Host ""
|
|
$process = Get-Process -Name "GeViServer" -ErrorAction SilentlyContinue
|
|
Write-Host " [OK] GeViServer started (PID: $($process.Id))" -ForegroundColor Green
|
|
} else {
|
|
Write-Host ""
|
|
Write-Host " [ERROR] GeViServer failed to start listening on port 7700" -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
}
|
|
|
|
# Start SDK Bridge
|
|
if ($sdkBridgeRunning) {
|
|
Write-Host "[SKIP] SDK Bridge is already running (PID: $($sdkBridgeRunning.Id))" -ForegroundColor Yellow
|
|
} else {
|
|
Write-Host "[2/3] Starting SDK Bridge..." -ForegroundColor Green
|
|
Start-Process -FilePath $sdkBridgeExe -WorkingDirectory $sdkBridgePath -WindowStyle Hidden
|
|
|
|
# Wait for SDK Bridge to start listening on port 50051
|
|
Write-Host " Waiting for SDK Bridge to connect" -NoNewline -ForegroundColor Gray
|
|
if (Wait-ForPort -Port 50051 -TimeoutSeconds 30) {
|
|
Write-Host ""
|
|
$process = Get-Process -Name "GeViScopeBridge" -ErrorAction SilentlyContinue
|
|
Write-Host " [OK] SDK Bridge started (PID: $($process.Id))" -ForegroundColor Green
|
|
} else {
|
|
Write-Host ""
|
|
Write-Host " [ERROR] SDK Bridge failed to start listening on port 50051" -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
}
|
|
|
|
# Start Python API
|
|
if ($uvicornRunning) {
|
|
Write-Host "[SKIP] Python API is already running (PID: $($uvicornRunning.Id))" -ForegroundColor Yellow
|
|
} else {
|
|
Write-Host "[3/3] Starting Python API..." -ForegroundColor Green
|
|
Start-Process -FilePath $uvicorn `
|
|
-ArgumentList "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload" `
|
|
-WorkingDirectory $apiPath `
|
|
-WindowStyle Hidden
|
|
|
|
# Wait for API to start listening on port 8000
|
|
Write-Host " Waiting for API to initialize" -NoNewline -ForegroundColor Gray
|
|
if (Wait-ForPort -Port 8000 -TimeoutSeconds 20) {
|
|
Write-Host ""
|
|
$process = Get-Process -Name "uvicorn" -ErrorAction SilentlyContinue
|
|
Write-Host " [OK] Python API started (PID: $($process.Id))" -ForegroundColor Green
|
|
} else {
|
|
Write-Host ""
|
|
Write-Host " [ERROR] Python API failed to start listening on port 8000" -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
}
|
|
|
|
Write-Host ""
|
|
Write-Host "========================================" -ForegroundColor Green
|
|
Write-Host "Services Started Successfully!" -ForegroundColor Green
|
|
Write-Host "========================================" -ForegroundColor Green
|
|
Write-Host ""
|
|
Write-Host "GeViServer: Running on ports 7700-7703" -ForegroundColor Cyan
|
|
Write-Host "SDK Bridge: Running on port 50051 (gRPC)" -ForegroundColor Cyan
|
|
Write-Host "Python API: http://localhost:8000" -ForegroundColor Cyan
|
|
Write-Host "Swagger UI: http://localhost:8000/docs" -ForegroundColor Cyan
|
|
Write-Host ""
|
|
Write-Host "To check status, run: .\status-services.ps1" -ForegroundColor Yellow
|
|
Write-Host "To stop services, run: .\stop-services.ps1" -ForegroundColor Yellow
|