OpenLogi

0x8071 · rgbEffects

Modern per-cluster RGB effect engine — claim software control, apply effects with volatile or persistent storage per cluster, and manage power modes and sync events.

The modern per-cluster RGB effect engine, the successor to 0x8070 colorLedEffects. A device groups its LEDs into clusters, each advertising a set of effects. get_device_info, get_cluster_info, and get_effect_info query the three info modes of the polymorphic getInfo function (device, cluster, and per-effect detail respectively). set_rgb_cluster_effect applies a chosen effect, with up to 10 effect-specific parameter bytes, a RgbPersistence flag (volatile RAM or non-volatile EEPROM), and a PowerModeTarget (full-power or power-save mode).

Software must call set_sw_control first to claim ownership of clusters and/or power modes before any write call will be accepted. get_nv_config / set_nv_config read and write named non-volatile capabilities (boot-up effect, demo, active dimming, etc.). Power-mode timeouts are managed with get_power_mode_config / set_power_mode_config; the current mode with get_power_mode / set_power_mode. Three unsolicited events are decoded:

  • EffectSync — a periodic effect reached a synchronization point; carries the cluster index and current timing position in milliseconds.
  • UserActivity — activity detected or the no-activity timeout was reached (ActivityEventType).
  • ClusterChanged — mirrors a setRgbClusterEffect request; carries the full params, persistence, and power-mode target.

Key types: RgbDeviceInfo, RgbClusterInfo, RgbEffectInfo, RgbSwControl, RgbNvConfig, RgbPowerModeConfig, RgbPersistence, RgbPowerMode, SwControlFlags, RgbNvCapabilities, RgbExtCapabilities.

Spec: Logitech HID++ 2.0 — rgbEffects. Used by: Typed wrapper in openlogi-hidpp.

Function reference

The RgbEffectsFeature wrapper (0x8071) exposes methods for querying and configuring per-cluster RGB effects, managing software control and non-volatile capabilities, and receiving unsolicited lighting events.

Methods

FunctionHID++ fnSignatureReturns
get_device_info0()RgbDeviceInfo
get_cluster_info0(cluster_index: u8)RgbClusterInfo
get_effect_info0(cluster_index: u8, cluster_effect_index: u8)RgbEffectInfo
get_onboard_effect_info0(cluster_index: u8, cluster_effect_index: u8, slot: u8, slot_info_type: SlotInfoType)[u8; 13]
set_rgb_cluster_effect1(cluster_index: u8, cluster_effect_index: u8, params: [u8; 10], persistence: RgbPersistence, power_mode: PowerModeTarget)()
set_multi_led_cluster_pattern2(cluster_index: u8, pattern: u8)()
get_nv_config3(capability: RgbNvCapabilities)RgbNvConfig
set_nv_config3(capability: RgbNvCapabilities, state: u8, param1: u8, param2: u8)()
get_led_bin_info4(cluster_index: u8, led_bin_index: LedBinIndex, backup: bool)[u8; 8]
set_led_bin_info4(cluster_index: u8, led_bin_index: LedBinIndex, params: [u8; 8])()
get_sw_control5()RgbSwControl
set_sw_control5(control: SwControlFlags, events: EventsNotificationFlags)()
set_effect_sync_correction6(cluster_index: u8, drift_value: i16)()
get_power_mode_config7()RgbPowerModeConfig
set_power_mode_config7(config: RgbPowerModeConfig)()
get_power_mode8()RgbPowerMode
set_power_mode8(mode: RgbPowerMode)()
shutdown9()()
listen()async_channel::Receiver<RgbEffectsEvent>

All pub async fn methods return Result<…, Hidpp20Error>. listen is synchronous and returns a channel receiver directly.

Types

RgbDeviceInfo

Device-level information from get_device_info.

FieldTypeDescription
cluster_countu8Number of RGB clusters.
nv_capabilitiesRgbNvCapabilitiesSupported non-volatile capabilities.
ext_capabilitiesRgbExtCapabilitiesExtended capabilities.
multicluster_effect_countu8Number of multi-cluster effects.

RgbClusterInfo

Cluster-level information from get_cluster_info.

FieldTypeDescription
cluster_indexu8Index of the cluster.
locationu16Physical location of the cluster (raw locationEffect value).
effects_numberu8Number of effects the cluster supports.
display_persistencyDisplayPersistencyCapabilitiesDisplay persistency capabilities.
effect_persistencyboolWhether effect persistency to EEPROM is supported.
multiled_patternboolWhether multi-LED patterns are supported.

RgbEffectInfo

Effect-level information from get_effect_info.

FieldTypeDescription
cluster_indexu8Index of the cluster.
cluster_effect_indexu8Index of the effect within the cluster.
effect_idu16The effect type identifier (raw effectID).
effect_capabilitiesu16Effect capability bitmask (meaning depends on effect_id; 0 means Raptor-compatibility defaults).
effect_periodu16Effect period in milliseconds, or 0 when not available.

RgbSwControl

Software-control state from get_sw_control.

FieldTypeDescription
controlSwControlFlagsSoftware-control flags.
eventsEventsNotificationFlagsEvent-notification flags.

RgbNvConfig

A non-volatile configuration entry from get_nv_config.

FieldTypeDescription
capabilityRgbNvCapabilitiesThe capability this entry addresses.
stateu8The capability state (commonly 0 = no change, 1 = enabled, 2 = disabled).
param1u8First capability-specific parameter.
param2u8Second capability-specific parameter.

RgbPowerModeConfig

Power-mode configuration from get_power_mode_config.

FieldTypeDescription
flagsu16Power-mode flags (raw).
no_activity_timeout_to_power_saveu16No-activity timeout before entering power-save, in seconds.
no_activity_timeout_to_offu16No-activity timeout before turning off, in seconds.

RgbPowerMode

An overall RGB power mode.

VariantValueDescription
FullRgb1Full RGB.
PowerSave2Power-save.
PowerOff3Power-off.

PowerModeTarget

The power-mode target an effect applies to, packed into set_rgb_cluster_effect.

VariantValueDescription
FullPower0Full-power mode.
PowerSave1Power-save mode.

SlotInfoType

The kind of slot information requested for an onboard-stored effect.

VariantValueDescription
SlotState0Slot state (validity, length).
Defaults1Default playback parameters.
Uuid0To102UUID bytes 0..=10.
Uuid11To163UUID bytes 11..=16.
EffectName0To104Effect name characters 0..=10.
EffectName11To215Effect name characters 11..=21.
EffectName21To316Effect name characters 21..=31.

LedBinIndex

Selects which LED bin parameter a LED-bin call addresses.

VariantValueDescription
BinValueBrightness0Bin value: brightness.
BinValueColor1Bin value: color.
CalibrationFactors2Calibration factors.
Brightness3Brightness.
ColorimetricX4Colorimetric X.
ColorimetricY5Colorimetric Y.

ActivityEventType

The kind of user-activity event.

VariantValueDescription
NoActivityTimeoutReached0The no-activity timeout was reached.
UserActivityDetected1User activity was detected.

RgbPersistence

Persistence of a cluster effect, packed into the low two bits of the set_rgb_cluster_effect flags byte.

FlagBit/ValueDescription
VOLATILE1 << 0Apply to volatile RAM.
NON_VOLATILE1 << 1Store in non-volatile EEPROM.

RgbExtCapabilities

Extended device capabilities from get_device_info.

FlagBit/ValueDescription
GET_ZONE_EFFECT1 << 0getInfo for stored effects is supported.
SET_LED_BIN_INFO1 << 2Setting LED bin info is supported.
MONOCHROME_ONLY1 << 3Only monochrome effects are supported.
NO_EFFECT_SYNC1 << 4Effect-sync correction / events are not supported.
SHUTDOWN1 << 5The shutdown function is supported.
CLUSTER_CHANGED_EVENT1 << 6The cluster-changed event is supported.

RgbNvCapabilities

Supported non-volatile capabilities from get_device_info.

FlagBit/ValueDescription
BOOT_UP_EFFECT1 << 0Boot-up effect.
DEMO1 << 1Demo mode.
USER_DEMO_MODE1 << 2User demo mode.
EVENTS_DISPLAY1 << 3Events display.
ACTIVE_DIMMING1 << 4Active dimming.
RAMP_DOWN_TO_OFF1 << 5Ramp down to off.
SHUTDOWN_EFFECT1 << 6Shutdown effect.

SwControlFlags

Software-control flags for set_sw_control.

FlagBit/ValueDescription
ALL_CLUSTERS1 << 0Software controls all RGB clusters (required before set_rgb_cluster_effect).
POWER_MODES1 << 1Software controls power modes (required before set_power_mode).

EventsNotificationFlags

Event-notification flags for set_sw_control.

FlagBit/ValueDescription
EFFECTS_SYNC1 << 0Emit effect-sync events.
USER_ACTIVITY1 << 1Emit user-activity events.
NO_USER_ACTIVITY_TIMEOUT1 << 2Emit no-user-activity-timeout events.

DisplayPersistencyCapabilities

Display-persistency capabilities of a cluster from get_cluster_info.

FlagBit/ValueDescription
ALWAYS_ON1 << 0Can persist an "always on" state.
ALWAYS_OFF1 << 1Can persist an "always off" state.
ON_THEN_OFF1 << 2Can persist an "on then off" state.

Events

RgbEffectsFeature implements EmittingFeature<RgbEffectsEvent>; call listen() to receive an async_channel::Receiver<RgbEffectsEvent> channel.

RgbEffectsEvent

VariantFieldsDescription
EffectSynccluster_index: u8, effect_counter: u16A periodic effect reached a synchronization point. cluster_index 0xff means all clusters; effect_counter is the timing position in milliseconds.
UserActivityActivityEventTypeUser activity started or the no-activity timeout was reached.
ClusterChangedcluster_index: u8, cluster_effect_index: u8, params: [u8; 10], persistence: RgbPersistence, power_mode: PowerModeTargetA cluster's effect changed; mirrors a set_rgb_cluster_effect request.

Wire format

Short (3-byte) requests use call; long (16-byte) requests use call_long. All multi-byte fields are big-endian. Responses are read from the 16-byte extended payload.

get_device_info (fn 0)

Request: [0xff, 0xff, 0x00] (ALL_CLUSTERS, ALL_EFFECTS, typeOfInfo=0)

Response (byte → field):

ByteFieldNotes
2cluster_countNumber of clusters.
3–4nv_capabilitiesRgbNvCapabilities bitfield, big-endian u16.
5–6ext_capabilitiesRgbExtCapabilities bitfield, big-endian u16.
7multicluster_effect_countNumber of multi-cluster effects.

get_cluster_info (fn 0)

Request: [cluster_index, 0xff, 0x00] (ALL_EFFECTS, typeOfInfo=0)

Response (byte → field):

ByteFieldNotes
0cluster_indexEcho of requested cluster.
2–3locationBig-endian u16 location identifier.
4effects_numberNumber of supported effects.
5display_persistencyDisplayPersistencyCapabilities bitfield.
6effect_persistencyNon-zero = EEPROM persistency supported.
7multiled_patternNon-zero = multi-LED patterns supported.

get_effect_info (fn 0)

Request: [cluster_index, cluster_effect_index, 0x00] (typeOfInfo=0)

Response (byte → field):

ByteFieldNotes
0cluster_indexEcho.
1cluster_effect_indexEcho.
2–3effect_idBig-endian u16 effect type identifier.
4–5effect_capabilitiesBig-endian u16 capability bitmask.
6–7effect_periodBig-endian u16 period in ms; 0 = not available.

get_onboard_effect_info (fn 0)

Request (long, 16 bytes): [cluster_index, cluster_effect_index, 0x01, slot, slot_info_type, 0…] (typeOfInfo=0x01)

Response: bytes 3–15 → raw [u8; 13] onboard params (meaning depends on SlotInfoType).

set_rgb_cluster_effect (fn 1)

Request (long, 16 bytes):

ByteValue
0cluster_index
1cluster_effect_index
2–11params[0..10] (effect-specific)
12persistence.bits() | (u8::from(power_mode) << 2) — persistence in bits 0–1, power-mode target in bits 2–3
13–150x00

Response: acknowledged (no payload fields used).

set_multi_led_cluster_pattern (fn 2)

Request: [cluster_index, pattern, 0x00]

Response: acknowledged.

get_nv_config (fn 3)

Request: [0x00, cap_hi, cap_lo]getOrSet=0, capability bits as big-endian u16.

Response (byte → field):

ByteFieldNotes
1–2capabilityRgbNvCapabilities big-endian u16.
3stateCapability state byte.
4param1First capability parameter.
5param2Second capability parameter.

set_nv_config (fn 3)

Request (long, 16 bytes): [0x01, cap_hi, cap_lo, state, param1, param2, 0…]getOrSet=1.

Response: acknowledged.

get_led_bin_info (fn 4)

Request: [get_or_set, cluster_index, led_bin_index]get_or_set is 0x00 (active) or 0x02 (backup).

Response: bytes 3–10 → raw [u8; 8] LED bin params.

set_led_bin_info (fn 4)

Request (long, 16 bytes): [0x01, cluster_index, led_bin_index, params[0..8], 0…]

Response: acknowledged.

get_sw_control (fn 5)

Request: [0x00, 0x00, 0x00]getOrSet=0.

Response (byte → field):

ByteFieldNotes
1controlSwControlFlags bitfield.
2eventsEventsNotificationFlags bitfield.

set_sw_control (fn 5)

Request: [0x01, control.bits(), events.bits()]getOrSet=1.

Response: acknowledged.

set_effect_sync_correction (fn 6)

Request (long, 16 bytes): [cluster_index, 0x00, drift_hi, drift_lo, 0…]drift_value as big-endian i16; cluster_index=0xff targets all clusters.

Response: acknowledged.

get_power_mode_config (fn 7)

Request: [0x00, 0x00, 0x00]getOrSet=0.

Response (byte → field):

ByteFieldNotes
1–2flagsPower-mode flags, big-endian u16.
3–4no_activity_timeout_to_power_saveSeconds, big-endian u16.
5–6no_activity_timeout_to_offSeconds, big-endian u16.

set_power_mode_config (fn 7)

Request (long, 16 bytes): [0x01, flags_hi, flags_lo, psave_hi, psave_lo, off_hi, off_lo, 0…]getOrSet=1.

Response: acknowledged.

get_power_mode (fn 8)

Request: [0x00, 0x00, 0x00]getOrSet=0.

Response: byte 1 → RgbPowerMode (1=FullRgb, 2=PowerSave, 3=PowerOff).

set_power_mode (fn 8)

Request: [0x01, mode as u8, 0x00]getOrSet=1.

Response: acknowledged.

shutdown (fn 9)

Request: [0x00, 0x00, 0x00]

Response: acknowledged.

Events (unsolicited)

Sub-IDEventByte layout
0EffectSyncbyte 0 = cluster_index; bytes 1–2 = effect_counter big-endian u16 (ms)
1UserActivitybyte 0 = ActivityEventType (0=timeout, 1=detected)
2ClusterChangedbyte 0 = cluster_index; byte 1 = cluster_effect_index; bytes 2–11 = params[0..10]; byte 12 = flags (persistence in bits 0–1, power_mode in bits 2–3)

Usage (Rust)

use hidpp::{
    device::Device,
    feature::rgb_effects::{
        RgbEffectsFeature, RgbPersistence, PowerModeTarget, SwControlFlags,
        EventsNotificationFlags,
    },
};

// device: Device, obtained via Device::new(channel, index).await?
device.enumerate_features().await?;
if let Some(feat) = device.get_feature::<RgbEffectsFeature>() {
    // Claim software control of all clusters and enable effect-sync events.
    feat.set_sw_control(
        SwControlFlags::ALL_CLUSTERS,
        EventsNotificationFlags::EFFECTS_SYNC,
    )
    .await?;

    // Query cluster 0 and its first effect.
    let cluster = feat.get_cluster_info(0).await?;
    let effect = feat.get_effect_info(0, 0).await?;
    println!("cluster 0 has {} effects; first effect_id={:#06x}", cluster.effects_number, effect.effect_id);

    // Apply effect 0 to cluster 0 with default params, volatile, full-power mode.
    feat.set_rgb_cluster_effect(
        0,
        0,
        [0u8; 10],
        RgbPersistence::VOLATILE,
        PowerModeTarget::FullPower,
    )
    .await?;

    // Listen for unsolicited events.
    let rx = feat.listen();
    if let Ok(event) = rx.recv().await {
        println!("event: {event:?}");
    }
}

On this page