Optimize KC processing and add reactive HAOS state updates

- Optimize KC frame processing: downsample to 160x90 with cv2.resize
  before rectangle extraction, pre-compute pixel coords, vectorize
  smoothing with numpy arrays
- Add WebSocket event stream for server state changes: processor manager
  fires events on start/stop, new /api/v1/events/ws endpoint streams
  them to connected clients
- Add HAOS EventStreamListener that triggers coordinator refresh on
  state changes for near-instant switch updates
- Reduce HAOS polling interval from 10s to 3s for fresher FPS metrics
- Fix overlay button tooltips: flatten nested JSON keys in locale files
  to match flat dot-notation lookup used by t() function

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 14:21:47 +03:00
parent 67da014684
commit 3ee17ed083
7 changed files with 232 additions and 61 deletions

View File

@@ -440,16 +440,10 @@
"pattern.description.hint": "Optional notes about where or how this pattern is used",
"pattern.visual_editor.hint": "Click + buttons to add rectangles. Drag edges to resize, drag inside to move.",
"pattern.rectangles.hint": "Fine-tune rectangle positions and sizes with exact coordinates (0.0 to 1.0)",
"overlay": {
"button": {
"show": "Show overlay visualization",
"hide": "Hide overlay visualization"
},
"started": "Overlay visualization started",
"stopped": "Overlay visualization stopped",
"error": {
"start": "Failed to start overlay",
"stop": "Failed to stop overlay"
}
}
"overlay.button.show": "Show overlay visualization",
"overlay.button.hide": "Hide overlay visualization",
"overlay.started": "Overlay visualization started",
"overlay.stopped": "Overlay visualization stopped",
"overlay.error.start": "Failed to start overlay",
"overlay.error.stop": "Failed to stop overlay"
}