AprilNEA/OpenLogi · error
multiple standalone lights found; select one with --device
Error message
multiple standalone lights found; select one with --device
What it means
When no `--device` query is given and more than one supported standalone light is connected, `select` refuses to guess which one the command targets and fails with this message. The error exists to force explicit disambiguation rather than silently applying a command to an arbitrary device.
Solutions
- Re-run the command with `--device <name-or-serial-substring>` identifying the intended light.
- Run `openlogi list` (or the light list command) to see the display names/identities available for `--device`.
- Physically disconnect or power off the other lights if you prefer the auto-select convenience.
Example fix
// before — two lights attached, no selector $ openlogi light set-brightness 40 error: multiple standalone lights found; select one with --device // after $ openlogi light set-brightness 40 --device "Beam"
Defensive patterns
Strategy: validation
Validate before calling
let devices = /* enumerate */;
if devices.len() > 1 && device_query.is_none() {
eprintln!("{} lights attached; pass --device", devices.len());
// print names to pick from
} Prevention
- Make --device a required parameter in scripts when more than one light may be attached.
- List devices first and bake the chosen identity into automation configs.
- Keep only one light attached on interactive machines if you rely on auto-select.
When it happens
Trigger: Calling `set_power`, `set_brightness`, or `set_temperature` (or `selection_requires_disambiguation_and_supports_name_queries`) without `--device` while `select` receives a `devices` slice with two or more `StandaloneDevice` entries.
Common situations: Two Litra Glows (or a Glow plus a Litra Beam) are attached; a dock with multiple lights is connected; you intended to target one light but forgot the `--device` flag after adding a second unit.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 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/dc6ba78b98f9a3ce.
Report an issue: GitHub.
Appendix: source
Thrown at crates/openlogi-cli/src/cmd/light.rs:186
product_id: device.address.product_id,
usage_page: device.address.usage_page,
usage_id: device.address.usage_id,
identity: device.address.identity.clone(),
};
openlogi_hid::apply_litra(&route, model, command)
.await
.context("failed to write the light command")
}
fn select<'a>(
devices: &'a [StandaloneDevice],
query: Option<&str>,
) -> Result<&'a StandaloneDevice> {
let Some(query) = query else {
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!(View on GitHub (pinned to e846e6f4b4)