{"record":{"id":"bcc310ccaf899eac","repo":"AprilNEA/OpenLogi","slug":"no-logitech-camera-found","errorCode":null,"errorMessage":"no Logitech camera found","messagePattern":"no Logitech camera found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/openlogi-cli/src/cmd/camera.rs","lineNumber":44,"sourceCode":"    /// device.\n    Set {\n        /// zoom | focus | exposure | power_line_frequency |\n        /// low_light_compensation | brightness | contrast | saturation |\n        /// sharpness | white_balance | tint, or focus_auto | exposure_auto |\n        /// white_balance_auto\n        control: String,\n        value: i32,\n    },\n}\n\npub fn run(args: CameraArgs) -> Result<()> {\n    let uid = match args.camera {\n        Some(id) => id,\n        None => openlogi_camera::enumerate_cameras()\n            .into_iter()\n            .next()\n            .map(|c| c.unique_id)\n            .ok_or_else(|| anyhow!(\"no Logitech camera found\"))?,\n    };\n\n    match args.cmd.unwrap_or(CameraCmd::Get) {\n        CameraCmd::Get => {\n            println!(\"controls for {uid}:\");\n            match openlogi_camera::read_camera_state(&uid) {\n                Ok(state) if !state.controls.is_empty() => {\n                    for (control, r) in &state.controls {\n                        println!(\n                            \"  {}: min={} max={} default={} current={}\",\n                            control.name(),\n                            r.min,\n                            r.max,\n                            r.default,\n                            r.current\n                        );\n                    }\n                    for (toggle, st) in &state.autos {","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/AprilNEA/OpenLogi/blob/e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8/crates/openlogi-cli/src/cmd/camera.rs#L26-L62","documentation":"The `openlogi camera` CLI needs a camera unique id; when the user does not pass one, it takes the first camera from `openlogi_camera::enumerate_cameras()`. If enumeration returns nothing, there is no default to act on and the command fails with `no Logitech camera found`.","triggerScenarios":"Running any `openlogi camera` subcommand without `--camera <id>` (or equivalent) on a machine where `enumerate_cameras()` yields zero Logitech UVC devices.","commonSituations":"No Logitech webcam is plugged in; the camera is attached through a dock/hub that hid it; on macOS the terminal or OpenLogi lacks Camera permission so enumeration sees nothing; the device is a non-Logitech webcam and thus filtered out.","solutions":["Plug in a Logitech camera (directly, not through a hub) and re-run the command.","Pass the device explicitly: `openlogi camera --camera <unique-id> ...`.","On macOS, grant Camera permission to the terminal/OpenLogi (System Settings > Privacy & Security > Camera) and retry.","Verify enumeration with a plain camera listing to confirm the device is detected as a Logitech UVC device."],"exampleFix":"// before\n$ openlogi camera get\nno Logitech camera found\n// after\n$ openlogi camera get --camera BREC100-1234ABCD","handlingStrategy":"validation","validationCode":"let cams = openlogi_camera::enumerate_cameras();\nif cams.is_empty() {\n    eprintln!(\"no Logitech camera detected; connect one or pass --camera <id>\");\n    std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":"match enumerate_cameras().into_iter().next() {\n    Some(cam) => run_with(&cam.unique_id),\n    None => { eprintln!(\"no Logitech camera found — check connection and Camera permission\"); std::process::exit(1); }\n}","preventionTips":["Always pass `--camera <unique-id>` in scripts for deterministic behavior","Confirm the device is a Logitech UVC camera and connected directly (not via hub)","On macOS, grant Camera permission to the host terminal before enumerating"],"tags":["cli","camera","hardware","enumeration"],"backgroundTag":"entity-not-found","analyzedSha":"e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8","analyzedAt":"2026-09-13T03:07:16.451Z","contentChangedAt":"2026-09-13T03:07:16.451Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}