AprilNEA/OpenLogi · error
no standalone light matches --device
Error message
no standalone light matches --device {query} What it means
When a `--device` query IS supplied, `select` case-insensitively filters standalone lights by display-name or identity substring. If the iterator yields nothing, no enumerated light matched the query, and this error is thrown. It is a user-input targeting failure, distinct from the no-device case (100).
Solutions
- List the standalone lights and copy the exact display name or identity substring.
- Shorten the query to a distinctive substring (e.g. `--device Glow`).
- Verify the light is attached and enumerated (`openlogi list`).
- If it is a receiver-connected device, note that only standalone lights are selectable here.
Example fix
// before $ openlogi light set-power on --device "litra glowe" error: no standalone light matches --device litra glowe // after $ openlogi light set-power on --device "glow"
Defensive patterns
Strategy: validation
Validate before calling
let q = device_query.to_ascii_lowercase();
let matches: Vec<_> = devices.iter().filter(|d| {
d.display_name.to_ascii_lowercase().contains(&q)
|| d.address.identity.to_ascii_lowercase().contains(&q)
}).collect();
if matches.is_empty() {
eprintln!("'{device_query}' matches no light; run the list command first");
} Prevention
- Copy --device values from the list command output instead of typing from memory.
- Prefer serial/identity substrings over display names for scripts.
- Match case-insensitively and keep queries short but unique.
When it happens
Trigger: Passing `--device <query>` to `set_power`, `set_brightness`, `set_temperature`, etc., where no standalone light's `display_name` or `address.identity` contains the query as a case-insensitive substring.
Common situations: Typo in the device name; using the full serial when only part of the identity is enumerated; the light is not attached or not visible to the backend; the query targets a device connected through a receiver and thus absent from the standalone list.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- multiple standalone lights match --device
- no online device matches `--device
- could not pick a device automatically. online devices
- no wired device matches `--device
- the selected direct device is absent from the Agent snapshot
AI-assisted analysis of AprilNEA/OpenLogi@e846e6f4b4 (2026-09-13).
Data as JSON: /api/errors/4e2f3bef649a6bcf.
Report an issue: GitHub.
Appendix: source
Thrown at crates/openlogi-cli/src/cmd/light.rs:201
return match devices {
[] => Err(anyhow!("no supported standalone light found")),
[device] => Ok(device),
_ => Err(anyhow!(
"multiple standalone lights found; select one with --device"
)),
};
};
let query = query.to_ascii_lowercase();
let mut matches = devices.iter().filter(|device| {
device.display_name.to_ascii_lowercase().contains(&query)
|| device
.address
.identity
.to_ascii_lowercase()
.contains(&query)
});
let Some(device) = matches.next() else {
return Err(anyhow!("no standalone light matches --device {query}"));
};
if matches.next().is_some() {
return Err(anyhow!(
"multiple standalone lights match --device {query}; use a more specific value"
));
}
Ok(device)
}
#[cfg(test)]
mod tests {
use super::select;
use openlogi_core::device::{DeviceKind, RawDeviceAddress, StandaloneDevice};
fn device(name: &str) -> StandaloneDevice {
StandaloneDevice {
address: RawDeviceAddress {
vendor_id: 0x046d,View on GitHub (pinned to e846e6f4b4)