MuteMe Implementation¶
MuteMe devices with button input
This module contains the low-level implementation details for MuteMe devices, including enumerations, bit fields, and state management classes.
Available Components¶
MuteMe implementation details.
Classes¶
busylight_core.vendors.muteme.implementation.BlinkBit
¶
Bases: OneBitField
1-bit blink field for flashing control.
busylight_core.vendors.muteme.implementation.BlueBit
¶
Bases: OneBitField
1-bit blue color field that expands to 0xFF when set.
busylight_core.vendors.muteme.implementation.DimBit
¶
Bases: OneBitField
1-bit dim field for brightness control.
busylight_core.vendors.muteme.implementation.GreenBit
¶
Bases: OneBitField
1-bit green color field that expands to 0xFF when set.
busylight_core.vendors.muteme.implementation.OneBitField
¶
Bases: BitField
Base class for 1-bit fields that expand to full 8-bit values.
MuteMe devices expect 0xFF for "on" state and 0x00 for "off" state, but internally we work with boolean-like values for simplicity.
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
busylight_core.vendors.muteme.implementation.RedBit
¶
Bases: OneBitField
1-bit red color field that expands to 0xFF when set.
busylight_core.vendors.muteme.implementation.SleepBit
¶
Bases: OneBitField
1-bit sleep field for power management.
busylight_core.vendors.muteme.implementation.State
¶
Bases: Word
Complete device state for MuteMe commands.
MuteMe devices have a simple control scheme using 1-bit fields for each color component and behavior setting. Unlike other vendors, MuteMe uses pure on/off color control rather than full 8-bit RGB values.
Create a Word instance for binary data manipulation.
Initializes a binary word with the specified bit length and initial value. The length must be a multiple of 8 to align with byte boundaries. Use this to create state objects for devices that use binary communication protocols.
:param value: Initial integer value to store in the word :param length: Total bit length, must be multiple of 8 :raises ValueError: If length is not a positive multiple of 8
Attributes¶
busylight_core.vendors.muteme.implementation.State.initial_value
instance-attribute
¶
busylight_core.vendors.muteme.implementation.State.bits
instance-attribute
¶
busylight_core.vendors.muteme.implementation.State.value
property
¶
Return the integer value of the word.
busylight_core.vendors.muteme.implementation.State.range
property
¶
Return the range of bit offsets for this word.
busylight_core.vendors.muteme.implementation.State.hex
property
¶
Return a string hexadecimal representation of the word.
busylight_core.vendors.muteme.implementation.State.bin
property
¶
Return a string binary representation of the word.
busylight_core.vendors.muteme.implementation.State.red
class-attribute
instance-attribute
¶
red = RedBit()
busylight_core.vendors.muteme.implementation.State.green
class-attribute
instance-attribute
¶
green = GreenBit()
busylight_core.vendors.muteme.implementation.State.blue
class-attribute
instance-attribute
¶
blue = BlueBit()
busylight_core.vendors.muteme.implementation.State.dim
class-attribute
instance-attribute
¶
dim = DimBit()
busylight_core.vendors.muteme.implementation.State.blink
class-attribute
instance-attribute
¶
blink = BlinkBit()
busylight_core.vendors.muteme.implementation.State.sleep
class-attribute
instance-attribute
¶
sleep = SleepBit()
busylight_core.vendors.muteme.implementation.State.color
property
writable
¶
Get the current color state as RGB tuple.
Returns 8-bit RGB values (0x00 or 0xFF) based on the current bit field states.