{"record":{"id":"006cd73de6b41ad8","repo":"AprilNEA/OpenLogi","slug":"no-wired-device-matches-device-q","errorCode":null,"errorMessage":"no wired device matches `--device {q}`","messagePattern":"no wired device matches `--device (.+?)`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/openlogi-cli/src/cmd/diag/lighting.rs","lineNumber":86,"sourceCode":"            let name = paired.codename.clone().unwrap_or_else(|| {\n                format!(\n                    \"{:04x}:{:04x}\",\n                    inv.receiver.vendor_id, inv.receiver.product_id\n                )\n            });\n            if let Some(ref n) = needle\n                && !name.to_lowercase().contains(n.as_str())\n            {\n                return None;\n            }\n            let route = DeviceRoute::Direct {\n                vendor_id: inv.receiver.vendor_id,\n                product_id: inv.receiver.product_id,\n            };\n            Some((route, name))\n        })\n        .ok_or_else(|| match &device_query {\n            Some(q) => anyhow!(\"no wired device matches `--device {q}`\"),\n            None => {\n                anyhow!(\"no wired (direct-USB) Logitech device found — is the keyboard plugged in?\")\n            }\n        })?;\n\n    let method: LightingMethod = args.method.into();\n    println!(\"setting {name} ({route}) to #{r:02x}{g:02x}{b:02x} via {method:?}\");\n    openlogi_hid::set_keyboard_color_with(&route, method, r, g, b).await?;\n    println!(\"done — {name} should now be solid #{r:02x}{g:02x}{b:02x}\");\n    Ok(())\n}\n\n#[cfg(test)]\nmod color_validation_tests {\n    use openlogi_core::color::RgbParseError;\n\n    use super::{LightingArgs, Method, run};\n","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/AprilNEA/OpenLogi/blob/e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8/crates/openlogi-cli/src/cmd/diag/lighting.rs#L68-L104","documentation":"Thrown by the lighting diagnostic `run` when the wired (direct-USB) device lookup over the enumerated inventory yields `None` and a `--device <q>` query was supplied. Keyboard RGB control only works over direct USB, so this error means no direct-USB Logitech device matching the query was found. Receiver-routed devices do not count here.","triggerScenarios":"Running the lighting command with `--device <q>` where the device-filtering fold over the inventory (matching vendor/product id of wired devices) produces no `(route, name)` pair for that query — wrong name, or the matching device is only reachable via a receiver.","commonSituations":"Querying a keyboard that is connected through a Bolt/Unifying receiver instead of direct USB; typo in the device name; keyboard connected via a USB hub that enumerates differently; scripting with an old device name.","solutions":["Plug the keyboard directly into a USB port (receiver-routed devices can't do RGB lighting via this path).","Check the query against the enumerated device names and fix any typo.","If the device is a wireless model without wired support, this command cannot target it.","Re-run without extra hubs/docks to rule out route changes, then retry the exact name."],"exampleFix":"// before: keyboard on a receiver\n$ openlogi diag lighting --device \"G915\" --method direct ...\n// error: no wired device matches `--device G915`\n// after: plug the keyboard in via USB directly, then\n$ openlogi diag lighting --device \"G915\" --method direct ...","handlingStrategy":"validation","validationCode":"// confirm the target is a wired (direct-USB) device before lighting commands\nlet inv = enumerate_inventory().await?;\nlet wired = inv.iter().filter(|i| i.is_direct_usb());\nif !wired.clone().any(|i| i.name.eq_ignore_ascii_case(query)) {\n    eprintln!(\"{query} is not online via direct USB; lighting needs a wired connection\");\n}","typeGuard":null,"tryCatchPattern":"match run_lighting(args).await {\n    Err(e) if msg_contains(&e, \"no wired device matches\") => {\n        eprintln!(\"plug the keyboard in via USB (receiver-only devices cannot set lighting)\");\n    }\n    other => other?,\n}","preventionTips":["Connect RGB-capable keyboards directly over USB, not through a Bolt/Unifying receiver.","Verify with `openlogi list` that the device shows a wired/direct-USB route first.","Avoid USB hubs/docks for lighting work; they can change enumeration routes.","Resolve `--device` from current enumeration output rather than remembered names."],"tags":["cli","lighting","usb","device-selection"],"backgroundTag":"resource-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"}