AprilNEA/OpenLogi · error

unsupported light product

Error message

unsupported light product {:04x}

What it means

Raised in `apply` when the device's vendor/product ID pair has no entry in the light product descriptor registry, so the CLI cannot map the raw-HID device to a known model. The product lookup by (vendor_id, product_id, usage_page, usage_id) returned None, meaning this specific hardware is not a supported lighting product.

Solutions

  1. Confirm the product is officially supported by the light subcommands; use a supported model
  2. Check for an updated OpenLogi release that added your product to the descriptor table
  3. Verify the device exposes the expected usage_page/usage_id (vendor interface) — try re-plugging or a different port/cable
  4. If the hardware is genuinely supported, add its descriptor to the light product registry
Defensive patterns

Strategy: validation

Validate before calling

let descriptor = light_descriptor(
    device.address.vendor_id,
    device.address.product_id,
    device.address.usage_page,
    device.address.usage_id,
);
if descriptor.is_none() {
    anyhow::bail!("product {:04x} has no light descriptor; use a supported light", device.address.product_id);
}

Type guard

fn supported_light(addr: &RawHidAddress) -> Option<&LightDescriptor> {
    light_descriptor(addr.vendor_id, addr.product_id, addr.usage_page, addr.usage_id)
}

Try / catch

match apply(device, cmd).await {
    Ok(()) => (),
    Err(e) if e.to_string().contains("unsupported light product") => {
        eprintln!("{}\nThis product is not in the light registry; update OpenLogi or use supported hardware.", e);
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Any light subcommand (`set_power`, `set_brightness`, `set_temperature` → `apply`) against a RawHID device whose product_id is absent from the light descriptor table — unsupported hardware, a product variant, or a cloned/rebranded device.

Common situations: Pointing light commands at non-Logitech or unsupported Logitech products; new hardware not yet added to the descriptor registry; a device exposing multiple HID interfaces where the wrong usage page/usage was selected.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of AprilNEA/OpenLogi@e846e6f4b4 (2026-09-13). Data as JSON: /api/errors/e044738fa314e0fa. Report an issue: GitHub.

Appendix: source

Thrown at crates/openlogi-cli/src/cmd/light.rs:161

    apply(device, command).await
}

async fn set_temperature(args: TemperatureArgs) -> Result<()> {
    let devices = standalone().await?;
    let device = select(&devices, args.device.device.as_deref())?;
    apply(device, LightCommand::TemperatureKelvin(args.kelvin)).await
}

async fn apply(device: &StandaloneDevice, command: LightCommand) -> Result<()> {
    let model = find_litra(
        device.address.vendor_id,
        device.address.product_id,
        device.address.usage_page,
        device.address.usage_id,
    )
    .map(|descriptor| descriptor.model)
    .ok_or_else(|| {
        anyhow!(
            "unsupported light product {:04x}",
            device.address.product_id
        )
    })?;
    let route = DeviceRoute::RawHid {
        vendor_id: device.address.vendor_id,
        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],

View on GitHub (pinned to e846e6f4b4)