Skip to content

Kuando Implementation

Busylight Alpha and Omega devices

This module contains the low-level implementation details for Kuando devices, including enumerations, bit fields, and state management classes.

Available Components

Kuando Busylight implementation details.

Classes

busylight_core.vendors.kuando.implementation.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.

Attributes
busylight_core.vendors.kuando.implementation.Footer.initial_value instance-attribute
initial_value = value
busylight_core.vendors.kuando.implementation.Footer.length instance-attribute
length = length
busylight_core.vendors.kuando.implementation.Footer.bits instance-attribute
bits = array('B', [value >> n & 1 for n in range])
busylight_core.vendors.kuando.implementation.Footer.value property
value

Return the integer value of the word.

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

Return the range of bit offsets for this word.

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

Return a string hexadecimal representation of the word.

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

Return a string binary representation of the word.

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

Get the current RGB color as a tuple.

busylight_core.vendors.kuando.implementation.Footer.opcode class-attribute instance-attribute
opcode = OpCodeField()
busylight_core.vendors.kuando.implementation.Footer.operand class-attribute instance-attribute
operand = OperandField()
busylight_core.vendors.kuando.implementation.Footer.body class-attribute instance-attribute
body = BodyField()
busylight_core.vendors.kuando.implementation.Footer.repeat class-attribute instance-attribute
repeat = RepeatField()
busylight_core.vendors.kuando.implementation.Footer.red class-attribute instance-attribute
red = RedField()
busylight_core.vendors.kuando.implementation.Footer.green class-attribute instance-attribute
green = GreenField()
busylight_core.vendors.kuando.implementation.Footer.blue class-attribute instance-attribute
blue = BlueField()
busylight_core.vendors.kuando.implementation.Footer.duty_cycle_on class-attribute instance-attribute
duty_cycle_on = DutyCycleOnField()
busylight_core.vendors.kuando.implementation.Footer.duty_cycle_off class-attribute instance-attribute
duty_cycle_off = DutyCycleOffField()
busylight_core.vendors.kuando.implementation.Footer.update class-attribute instance-attribute
update = UpdateBit()
busylight_core.vendors.kuando.implementation.Footer.ringtone class-attribute instance-attribute
ringtone = RingtoneField()
busylight_core.vendors.kuando.implementation.Footer.volume class-attribute instance-attribute
volume = VolumeField()
busylight_core.vendors.kuando.implementation.Footer.checksum class-attribute instance-attribute
checksum = ChecksumField()
busylight_core.vendors.kuando.implementation.Footer.pad class-attribute instance-attribute
pad = BitField(16, 24)
busylight_core.vendors.kuando.implementation.Footer.sensitivity class-attribute instance-attribute
sensitivity = SensitivityField()
busylight_core.vendors.kuando.implementation.Footer.timeout class-attribute instance-attribute
timeout = TimeoutField()
busylight_core.vendors.kuando.implementation.Footer.trigger class-attribute instance-attribute
trigger = TriggerField()
Functions
busylight_core.vendors.kuando.implementation.Footer.clear
clear()

Clear all bits in the word.

busylight_core.vendors.kuando.implementation.Footer.keep_alive
keep_alive(timeout)

Configure the step as a KeepAlive with timeout in seconds.

busylight_core.vendors.kuando.implementation.Footer.boot
boot()

Configure the step as a Boot instruction.

busylight_core.vendors.kuando.implementation.Footer.reset
reset()

Configure the step as a Reset instruction.

busylight_core.vendors.kuando.implementation.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.

busylight_core.vendors.kuando.implementation.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.

Attributes
busylight_core.vendors.kuando.implementation.Step.initial_value instance-attribute
initial_value = value
busylight_core.vendors.kuando.implementation.Step.length instance-attribute
length = length
busylight_core.vendors.kuando.implementation.Step.bits instance-attribute
bits = array('B', [value >> n & 1 for n in range])
busylight_core.vendors.kuando.implementation.Step.value property
value

Return the integer value of the word.

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

Return the range of bit offsets for this word.

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

Return a string hexadecimal representation of the word.

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

Return a string binary representation of the word.

busylight_core.vendors.kuando.implementation.Step.color property writable
color

Get the current RGB color as a tuple.

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

Clear all bits in the word.

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

Configure the step as a KeepAlive with timeout in seconds.

busylight_core.vendors.kuando.implementation.Step.boot
boot()

Configure the step as a Boot instruction.

busylight_core.vendors.kuando.implementation.Step.reset
reset()

Configure the step as a Reset instruction.

busylight_core.vendors.kuando.implementation.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.

busylight_core.vendors.kuando.implementation.OpCode

Bases: IntEnum

Operation code enumeration for Kuando Busylight commands.

Defines the available operation codes that control device behavior. These codes are used in the Step command structure to specify what action the device should perform.

Attributes
busylight_core.vendors.kuando.implementation.OpCode.Jump class-attribute instance-attribute
Jump = 1
busylight_core.vendors.kuando.implementation.OpCode.Reset class-attribute instance-attribute
Reset = 2
busylight_core.vendors.kuando.implementation.OpCode.Boot class-attribute instance-attribute
Boot = 4
busylight_core.vendors.kuando.implementation.OpCode.KeepAlive class-attribute instance-attribute
KeepAlive = 8

busylight_core.vendors.kuando.implementation.Ring

Bases: IntEnum

Ringtone enumeration for Kuando Busylight devices.

Defines the available ringtones that can be played on supported devices. Each ringtone has a specific numeric value that corresponds to the device's internal ringtone selection.

Attributes
busylight_core.vendors.kuando.implementation.Ring.Off class-attribute instance-attribute
Off = 0
busylight_core.vendors.kuando.implementation.Ring.OpenOffice class-attribute instance-attribute
OpenOffice = 136
busylight_core.vendors.kuando.implementation.Ring.Quiet class-attribute instance-attribute
Quiet = 144
busylight_core.vendors.kuando.implementation.Ring.Funky class-attribute instance-attribute
Funky = 152
busylight_core.vendors.kuando.implementation.Ring.FairyTale class-attribute instance-attribute
FairyTale = 160
busylight_core.vendors.kuando.implementation.Ring.KuandoTrain class-attribute instance-attribute
KuandoTrain = 168
busylight_core.vendors.kuando.implementation.Ring.TelephoneNordic class-attribute instance-attribute
TelephoneNordic = 176
busylight_core.vendors.kuando.implementation.Ring.TelephoneOriginal class-attribute instance-attribute
TelephoneOriginal = 184
busylight_core.vendors.kuando.implementation.Ring.TelephonePickMeUp class-attribute instance-attribute
TelephonePickMeUp = 192
busylight_core.vendors.kuando.implementation.Ring.Buzz class-attribute instance-attribute
Buzz = 216

busylight_core.vendors.kuando.implementation.BlueField

BlueField()

Bases: ScaledColorField

8-bit blue color component with automatic scaling.

Attributes
busylight_core.vendors.kuando.implementation.BlueField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.BlueField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.BlueField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.BodyField

BodyField()

Bases: BitField

56-bit body

Attributes
busylight_core.vendors.kuando.implementation.BodyField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.BodyField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.BodyField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.ChecksumField

ChecksumField()

Bases: BitField

16-bit checksum

Attributes
busylight_core.vendors.kuando.implementation.ChecksumField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.ChecksumField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.ChecksumField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.DutyCycleOffField

DutyCycleOffField()

Bases: BitField

8-bit duty cycle off time for LED pulsing patterns.

Attributes
busylight_core.vendors.kuando.implementation.DutyCycleOffField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.DutyCycleOffField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.DutyCycleOffField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.DutyCycleOnField

DutyCycleOnField()

Bases: BitField

8-bit duty cycle on time for LED pulsing patterns.

Attributes
busylight_core.vendors.kuando.implementation.DutyCycleOnField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.DutyCycleOnField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.DutyCycleOnField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.GreenField

GreenField()

Bases: ScaledColorField

8-bit green color component with automatic scaling.

Attributes
busylight_core.vendors.kuando.implementation.GreenField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.GreenField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.GreenField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.OpCodeField

OpCodeField()

Bases: BitField

4-bit opcode

Attributes
busylight_core.vendors.kuando.implementation.OpCodeField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.OpCodeField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.OpCodeField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.OperandField

OperandField()

Bases: BitField

4-bit operand

Attributes
busylight_core.vendors.kuando.implementation.OperandField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.OperandField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.OperandField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.RedField

RedField()

Bases: ScaledColorField

8-bit red color component with automatic scaling.

Attributes
busylight_core.vendors.kuando.implementation.RedField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.RedField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.RedField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.RepeatField

RepeatField()

Bases: BitField

8-bit repeat

Attributes
busylight_core.vendors.kuando.implementation.RepeatField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.RepeatField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.RepeatField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.RingtoneField

RingtoneField()

Bases: BitField

4-bit ringtone selection field.

Attributes
busylight_core.vendors.kuando.implementation.RingtoneField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.RingtoneField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.RingtoneField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.ScaledColorField

ScaledColorField(offset, width=1)

Bases: BitField

A scaled color field that converts between 0-255 RGB values and device scale.

The Kuando devices use a 0-100 internal scale for color values, but the public API uses standard 0-255 RGB values. This field handles the conversion automatically when getting and setting color values.

Create a read-only bit field descriptor.

Defines a named field that maps to specific bit positions within a Word. The field will be accessible as a regular attribute on Word instances but will raise AttributeError on assignment attempts.

:param offset: Starting bit position within the word (0-based from LSB) :param width: Number of consecutive bits to include in the field

Attributes
busylight_core.vendors.kuando.implementation.ScaledColorField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.ScaledColorField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.ScaledColorField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.SensitivityField

SensitivityField()

Bases: BitField

8-bit sensitivity

Attributes
busylight_core.vendors.kuando.implementation.SensitivityField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.SensitivityField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.SensitivityField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.TimeoutField

TimeoutField()

Bases: BitField

8-bit timeout

Attributes
busylight_core.vendors.kuando.implementation.TimeoutField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.TimeoutField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.TimeoutField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.TriggerField

TriggerField()

Bases: BitField

8-bit trigger

Attributes
busylight_core.vendors.kuando.implementation.TriggerField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.TriggerField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.TriggerField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.UpdateBit

UpdateBit()

Bases: BitField

1-bit update

Attributes
busylight_core.vendors.kuando.implementation.UpdateBit.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.UpdateBit.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.UpdateBit.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.VolumeField

VolumeField()

Bases: BitField

3-bit volume control for ringtone playback.

Attributes
busylight_core.vendors.kuando.implementation.VolumeField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.kuando.implementation.VolumeField.offset instance-attribute
offset = offset
busylight_core.vendors.kuando.implementation.VolumeField.width instance-attribute
width = width

busylight_core.vendors.kuando.implementation.State

State()

Complete device state for Kuando Busylight commands.

The State class manages the full command sequence sent to Kuando devices. It consists of 7 execution steps and a footer with checksum validation. The state is serialized to bytes for transmission to the hardware.

Attributes
busylight_core.vendors.kuando.implementation.State.steps instance-attribute
steps = [Step() for _ in range(7)]
busylight_core.vendors.kuando.implementation.State.footer instance-attribute
footer = Footer()
busylight_core.vendors.kuando.implementation.State.struct instance-attribute
struct = Struct('!8Q')