Skip to content

Commands

busylight_core.vendors.kuando.implementation.commands

Kuando Busylight command classes.

This module defines the Step and Footer classes that form the core command structure for Kuando Busylight devices. Each Step represents a single instruction in the device's execution sequence.

Classes

busylight_core.vendors.kuando.implementation.commands.Step

Step()

Bases: Word

A single command step for Kuando Busylight devices.

The Step class represents one instruction in the device's command sequence. Each device supports up to 7 steps that can control LED colors, timing, ringtones, and other device behaviors.

Source code in src/busylight_core/vendors/kuando/implementation/commands.py
def __init__(self) -> None:
    super().__init__(0, 64)
Attributes
busylight_core.vendors.kuando.implementation.commands.Step.color property writable
color

Get the current RGB color as a tuple.

busylight_core.vendors.kuando.implementation.commands.Step.opcode class-attribute instance-attribute
opcode = OpCodeField()
busylight_core.vendors.kuando.implementation.commands.Step.operand class-attribute instance-attribute
operand = OperandField()
busylight_core.vendors.kuando.implementation.commands.Step.body class-attribute instance-attribute
body = BodyField()
busylight_core.vendors.kuando.implementation.commands.Step.repeat class-attribute instance-attribute
repeat = RepeatField()
busylight_core.vendors.kuando.implementation.commands.Step.red class-attribute instance-attribute
red = RedField()
busylight_core.vendors.kuando.implementation.commands.Step.green class-attribute instance-attribute
green = GreenField()
busylight_core.vendors.kuando.implementation.commands.Step.blue class-attribute instance-attribute
blue = BlueField()
busylight_core.vendors.kuando.implementation.commands.Step.duty_cycle_on class-attribute instance-attribute
duty_cycle_on = DutyCycleOnField()
busylight_core.vendors.kuando.implementation.commands.Step.duty_cycle_off class-attribute instance-attribute
duty_cycle_off = DutyCycleOffField()
busylight_core.vendors.kuando.implementation.commands.Step.update class-attribute instance-attribute
update = UpdateBit()
busylight_core.vendors.kuando.implementation.commands.Step.ringtone class-attribute instance-attribute
ringtone = RingtoneField()
busylight_core.vendors.kuando.implementation.commands.Step.volume class-attribute instance-attribute
volume = VolumeField()
busylight_core.vendors.kuando.implementation.commands.Step.initial_value instance-attribute
initial_value = value
busylight_core.vendors.kuando.implementation.commands.Step.length instance-attribute
length = length
busylight_core.vendors.kuando.implementation.commands.Step.bits instance-attribute
bits = array('B', [value >> n & 1 for n in range])
busylight_core.vendors.kuando.implementation.commands.Step.value property
value

Return the integer value of the word.

busylight_core.vendors.kuando.implementation.commands.Step.range property
range

Return the range of bit offsets for this word.

busylight_core.vendors.kuando.implementation.commands.Step.hex property
hex

Return a string hexadecimal representation of the word.

busylight_core.vendors.kuando.implementation.commands.Step.bin property
bin

Return a string binary representation of the word.

Functions
busylight_core.vendors.kuando.implementation.commands.Step.keep_alive
keep_alive(timeout)

Configure the step as a KeepAlive with timeout in seconds.

Source code in src/busylight_core/vendors/kuando/implementation/commands.py
def keep_alive(self, timeout: int) -> None:
    """Configure the step as a KeepAlive with timeout in seconds."""
    self.opcode = OpCode.KeepAlive
    self.operand = timeout & 0xF
    self.body = 0
busylight_core.vendors.kuando.implementation.commands.Step.boot
boot()

Configure the step as a Boot instruction.

Source code in src/busylight_core/vendors/kuando/implementation/commands.py
def boot(self) -> None:
    """Configure the step as a Boot instruction."""
    self.opcode = OpCode.Boot
    self.operand = 0
    self.body = 0
busylight_core.vendors.kuando.implementation.commands.Step.reset
reset()

Configure the step as a Reset instruction.

Source code in src/busylight_core/vendors/kuando/implementation/commands.py
def reset(self) -> None:
    """Configure the step as a Reset instruction."""
    self.opcode = OpCode.Reset
    self.operand = 0
    self.body = 0
busylight_core.vendors.kuando.implementation.commands.Step.jump
jump(
    color,
    target=0,
    repeat=0,
    on_time=0,
    off_time=0,
    update=0,
    ringtone=Off,
    volume=0,
)

Configure the step as a Jump instruction.

Source code in src/busylight_core/vendors/kuando/implementation/commands.py
def jump(
    self,
    color: tuple[int, int, int],
    target: int = 0,
    repeat: int = 0,
    on_time: int = 0,
    off_time: int = 0,
    update: int = 0,
    ringtone: Ring = Ring.Off,
    volume: int = 0,
) -> None:
    """Configure the step as a Jump instruction."""
    self.opcode = OpCode.Jump
    self.operand = target & 0xF
    self.repeat = repeat & 0xFF
    self.color = color
    self.duty_cycle_on = on_time & 0xFF
    self.duty_cycle_off = off_time & 0xFF
    self.update = update & 0x1
    self.ringtone = ringtone & 0xF
    self.volume = volume & 0x3
busylight_core.vendors.kuando.implementation.commands.Step.clear
clear()

Clear all bits in the word.

Source code in src/busylight_core/word.py
def clear(self) -> None:
    """Clear all bits in the word."""
    self.bits = array.array("B", [0] * self.length)

busylight_core.vendors.kuando.implementation.commands.Footer

Footer()

Bases: Step

Command footer with checksum and device-specific fields.

The Footer extends Step with additional fields specific to command validation and device configuration. It includes a checksum field that ensures command integrity.

Source code in src/busylight_core/vendors/kuando/implementation/commands.py
def __init__(self) -> None:
    super().__init__()
    self.checksum = 0
    self.pad = 0xFFF
Attributes
busylight_core.vendors.kuando.implementation.commands.Footer.sensitivity class-attribute instance-attribute
sensitivity = SensitivityField()
busylight_core.vendors.kuando.implementation.commands.Footer.timeout class-attribute instance-attribute
timeout = TimeoutField()
busylight_core.vendors.kuando.implementation.commands.Footer.trigger class-attribute instance-attribute
trigger = TriggerField()
busylight_core.vendors.kuando.implementation.commands.Footer.pad class-attribute instance-attribute
pad = BitField(16, 24)
busylight_core.vendors.kuando.implementation.commands.Footer.checksum class-attribute instance-attribute
checksum = ChecksumField()
busylight_core.vendors.kuando.implementation.commands.Footer.initial_value instance-attribute
initial_value = value
busylight_core.vendors.kuando.implementation.commands.Footer.length instance-attribute
length = length
busylight_core.vendors.kuando.implementation.commands.Footer.bits instance-attribute
bits = array('B', [value >> n & 1 for n in range])
busylight_core.vendors.kuando.implementation.commands.Footer.value property
value

Return the integer value of the word.

busylight_core.vendors.kuando.implementation.commands.Footer.range property
range

Return the range of bit offsets for this word.

busylight_core.vendors.kuando.implementation.commands.Footer.hex property
hex

Return a string hexadecimal representation of the word.

busylight_core.vendors.kuando.implementation.commands.Footer.bin property
bin

Return a string binary representation of the word.

busylight_core.vendors.kuando.implementation.commands.Footer.color property writable
color

Get the current RGB color as a tuple.

busylight_core.vendors.kuando.implementation.commands.Footer.opcode class-attribute instance-attribute
opcode = OpCodeField()
busylight_core.vendors.kuando.implementation.commands.Footer.operand class-attribute instance-attribute
operand = OperandField()
busylight_core.vendors.kuando.implementation.commands.Footer.body class-attribute instance-attribute
body = BodyField()
busylight_core.vendors.kuando.implementation.commands.Footer.repeat class-attribute instance-attribute
repeat = RepeatField()
busylight_core.vendors.kuando.implementation.commands.Footer.red class-attribute instance-attribute
red = RedField()
busylight_core.vendors.kuando.implementation.commands.Footer.green class-attribute instance-attribute
green = GreenField()
busylight_core.vendors.kuando.implementation.commands.Footer.blue class-attribute instance-attribute
blue = BlueField()
busylight_core.vendors.kuando.implementation.commands.Footer.duty_cycle_on class-attribute instance-attribute
duty_cycle_on = DutyCycleOnField()
busylight_core.vendors.kuando.implementation.commands.Footer.duty_cycle_off class-attribute instance-attribute
duty_cycle_off = DutyCycleOffField()
busylight_core.vendors.kuando.implementation.commands.Footer.update class-attribute instance-attribute
update = UpdateBit()
busylight_core.vendors.kuando.implementation.commands.Footer.ringtone class-attribute instance-attribute
ringtone = RingtoneField()
busylight_core.vendors.kuando.implementation.commands.Footer.volume class-attribute instance-attribute
volume = VolumeField()
Functions
busylight_core.vendors.kuando.implementation.commands.Footer.clear
clear()

Clear all bits in the word.

Source code in src/busylight_core/word.py
def clear(self) -> None:
    """Clear all bits in the word."""
    self.bits = array.array("B", [0] * self.length)
busylight_core.vendors.kuando.implementation.commands.Footer.keep_alive
keep_alive(timeout)

Configure the step as a KeepAlive with timeout in seconds.

Source code in src/busylight_core/vendors/kuando/implementation/commands.py
def keep_alive(self, timeout: int) -> None:
    """Configure the step as a KeepAlive with timeout in seconds."""
    self.opcode = OpCode.KeepAlive
    self.operand = timeout & 0xF
    self.body = 0
busylight_core.vendors.kuando.implementation.commands.Footer.boot
boot()

Configure the step as a Boot instruction.

Source code in src/busylight_core/vendors/kuando/implementation/commands.py
def boot(self) -> None:
    """Configure the step as a Boot instruction."""
    self.opcode = OpCode.Boot
    self.operand = 0
    self.body = 0
busylight_core.vendors.kuando.implementation.commands.Footer.reset
reset()

Configure the step as a Reset instruction.

Source code in src/busylight_core/vendors/kuando/implementation/commands.py
def reset(self) -> None:
    """Configure the step as a Reset instruction."""
    self.opcode = OpCode.Reset
    self.operand = 0
    self.body = 0
busylight_core.vendors.kuando.implementation.commands.Footer.jump
jump(
    color,
    target=0,
    repeat=0,
    on_time=0,
    off_time=0,
    update=0,
    ringtone=Off,
    volume=0,
)

Configure the step as a Jump instruction.

Source code in src/busylight_core/vendors/kuando/implementation/commands.py
def jump(
    self,
    color: tuple[int, int, int],
    target: int = 0,
    repeat: int = 0,
    on_time: int = 0,
    off_time: int = 0,
    update: int = 0,
    ringtone: Ring = Ring.Off,
    volume: int = 0,
) -> None:
    """Configure the step as a Jump instruction."""
    self.opcode = OpCode.Jump
    self.operand = target & 0xF
    self.repeat = repeat & 0xFF
    self.color = color
    self.duty_cycle_on = on_time & 0xFF
    self.duty_cycle_off = off_time & 0xFF
    self.update = update & 0x1
    self.ringtone = ringtone & 0xF
    self.volume = volume & 0x3