{"record":{"id":"d061a5ca33b873af","repo":"AprilNEA/OpenLogi","slug":"no-supported-standalone-light-found","errorCode":null,"errorMessage":"no supported standalone light found","messagePattern":"no supported standalone light found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/openlogi-cli/src/cmd/light.rs","lineNumber":184,"sourceCode":"    let route = DeviceRoute::RawHid {\n        vendor_id: device.address.vendor_id,\n        product_id: device.address.product_id,\n        usage_page: device.address.usage_page,\n        usage_id: device.address.usage_id,\n        identity: device.address.identity.clone(),\n    };\n    openlogi_hid::apply_litra(&route, model, command)\n        .await\n        .context(\"failed to write the light command\")\n}\n\nfn select<'a>(\n    devices: &'a [StandaloneDevice],\n    query: Option<&str>,\n) -> Result<&'a StandaloneDevice> {\n    let Some(query) = query else {\n        return match devices {\n            [] => Err(anyhow!(\"no supported standalone light found\")),\n            [device] => Ok(device),\n            _ => Err(anyhow!(\n                \"multiple standalone lights found; select one with --device\"\n            )),\n        };\n    };\n    let query = query.to_ascii_lowercase();\n    let mut matches = devices.iter().filter(|device| {\n        device.display_name.to_ascii_lowercase().contains(&query)\n            || device\n                .address\n                .identity\n                .to_ascii_lowercase()\n                .contains(&query)\n    });\n    let Some(device) = matches.next() else {\n        return Err(anyhow!(\"no standalone light matches --device {query}\"));\n    };","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/AprilNEA/OpenLogi/blob/e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8/crates/openlogi-cli/src/cmd/light.rs#L166-L202","documentation":"The CLI's light `select` helper enumerates standalone (non-receiver) lights and picks one automatically only when exactly one is connected. When the enumeration result is empty and no `--device` query was supplied, there is nothing to auto-select, so it throws \"no supported standalone light found\". It is an upfront precondition failure, not an I/O failure: the command never reached a device.","triggerScenarios":"Calling any of the light commands (`set_power`, `set_brightness`, `set_temperature`, or `selection_requires_disambiguation_and_supports_name_queries`) without `--device` while the enumerated `StandaloneDevice` list is empty (a `[]` slice passed to `select`).","commonSituations":"No Logitech Litra (Glow/Litra Beam etc.) is plugged in; the light is connected via a receiver and thus not listed as standalone; the HID backend lacks permission to see the device (e.g. macOS Input Monitoring not granted) so enumeration returns nothing; or a typo in an unsupported product means it was filtered out as 'supported'.","solutions":["Plug in the Logitech light and confirm the OS sees it (check System Information / lsusb).","Run `openlogi list` to verify the light is enumerated as a standalone device.","On macOS, grant Input Monitoring to the OpenLogi agent process, then restart it.","If the light is a non-Litra product, confirm it is in the supported-model table; unsupported products are not enumerated as supported standalone lights."],"exampleFix":"// before (CLI invocation relying on auto-select with no device attached)\n$ openlogi light set-power on\nerror: no supported standalone light found\n\n// after\n$ openlogi light set-power on --device \"Litra Glow\"  # or plug the light in first","handlingStrategy":"validation","validationCode":"let devices = openlogi_cli::cmd::light::standalone_devices()?; // or your enumeration source\nif devices.is_empty() {\n    eprintln!(\"no supported standalone light attached; connect a Litra and retry\");\n    return Ok(());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always enumerate and check the standalone-light list before invoking a light command.","On macOS verify Input Monitoring is granted before first use.","Distinguish receiver-connected devices from standalone ones when scripting."],"tags":["cli","hid","device-enumeration","hardware"],"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"}