Add camera-manager service and Video-page camera selection#98
Draft
dakejahl wants to merge 1 commit into
Draft
Conversation
Adds a camera-manager FastAPI microservice (port 3005, proxied at /api/camera) that enumerates connected V4L2 capture devices — classifying CSI vs USB the same way the rtsp-server does — and selects which one the RTSP server streams by writing [camera].device into rtsp-server.toml and restarting the unit. The Video page gains a camera picker (shown only when more than one camera is connected) that lists detected cameras and switches the active source via the new API, then reconnects the WebRTC stream once the server restarts. Wires the service through assemble_tree.sh, the postinst enable list, the ark-ui-backend proxy, and the mypy contract set; seeds device = "" in the packaged rtsp-server.toml. Bumps the rtsp-server submodule to the commit that adds the matching USB-camera pipeline support. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EQxVPD2yiCqSQd8KeZsZfv
dakejahl
marked this pull request as draft
July 15, 2026 21:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lets you pick which camera the RTSP server streams from the web UI, the companion to USB-camera support in ARK-Electronics/rtsp-server#13.
Following the existing
*-managerpattern (each service exposes its own API + page; the TOML config is persistence, not a data channel), this adds a dedicated camera API and a picker on the Video page.camera-manager service
A new FastAPI microservice (port 3005, proxied at
/api/camera):GET /cameras— enumerates connected V4L2 capture devices viaVIDIOC_QUERYCAP, classifying CSI vs USB the same way the rtsp-server does (UVC metadata-only nodes filtered out), and flags the one currently being streamed.POST /select— writes[camera].deviceintortsp-server.tomland restartsrtsp-server.service(uses the existing service-user polkit grant, which already listsrtsp-server.service).Video page
A camera dropdown that appears only when more than one camera is connected. It lists each camera (CSI/USB + device path), switches the active source through the API, and reconnects the WebRTC stream once the server restarts. If the camera-manager is unreachable, the picker stays hidden and playback is unaffected.
Wiring
assemble_tree.sh(python services list),postinst(enable list),ark-ui-backend(proxy + health),mypy.ini(contract set).visible:falsemanifest (no Services-page tile / config editor).device = ""in the packagedrtsp-server.toml.rtsp-serversubmodule to the commit adding the matching USB pipeline. Note: once both PRs merge, the submodule should be re-pointed at the merged rtsp-server commit.Testing
mypypasses across all 5 contract services (including the new one);node --checkpasses on the changed JS.🤖 Generated with Claude Code
Generated by Claude Code