pub enum Message {
Show 44 variants
GetService,
StateService {
port: u32,
service: Service,
},
GetHostInfo,
StateHostInfo {
signal: f32,
tx: u32,
rx: u32,
reserved: i16,
},
GetHostFirmware,
StateHostFirmware {
build: u64,
reserved: u64,
version: u32,
},
GetWifiInfo,
StateWifiInfo {
signal: f32,
tx: u32,
rx: u32,
reserved: i16,
},
GetWifiFirmware,
StateWifiFirmware {
build: u64,
reserved: u64,
version: u32,
},
GetPower,
SetPower {
level: PowerLevel,
},
StatePower {
level: PowerLevel,
},
GetLabel,
SetLabel {
label: LifxString,
},
StateLabel {
label: LifxString,
},
GetVersion,
StateVersion {
vendor: u32,
product: u32,
version: u32,
},
GetInfo,
StateInfo {
time: u64,
uptime: u64,
downtime: u64,
},
Acknowledgement {
seq: u8,
},
GetLocation,
SetLocation {
location: LifxIdent,
label: LifxString,
updated_at: u64,
},
StateLocation {
location: LifxIdent,
label: LifxString,
updated_at: u64,
},
GetGroup,
SetGroup {
group: LifxIdent,
label: LifxString,
updated_at: u64,
},
StateGroup {
group: LifxIdent,
label: LifxString,
updated_at: u64,
},
EchoRequest {
payload: EchoPayload,
},
EchoResponse {
payload: EchoPayload,
},
LightGet,
LightSetColor {
reserved: u8,
color: HSBK,
duration: u32,
},
SetWaveform {
reserved: u8,
transient: bool,
color: HSBK,
period: u32,
cycles: f32,
skew_ratio: i16,
waveform: Waveform,
},
LightState {
color: HSBK,
reserved: i16,
power: PowerLevel,
label: LifxString,
reserved2: u64,
},
LightGetPower,
LightSetPower {
level: u16,
duration: u32,
},
LightStatePower {
level: u16,
},
SetWaveformOptional {
reserved: u8,
transient: bool,
color: HSBK,
period: u32,
cycles: f32,
skew_ratio: i16,
waveform: Waveform,
set_hue: bool,
set_saturation: bool,
set_brightness: bool,
set_kelvin: bool,
},
LightGetInfrared,
LightStateInfrared {
brightness: u16,
},
LightSetInfrared {
brightness: u16,
},
SetColorZones {
start_index: u8,
end_index: u8,
color: HSBK,
duration: u32,
apply: ApplicationRequest,
},
GetColorZones {
start_index: u8,
end_index: u8,
},
StateZone {
count: u8,
index: u8,
color: HSBK,
},
StateMultiZone {
count: u8,
index: u8,
color0: HSBK,
color1: HSBK,
color2: HSBK,
color3: HSBK,
color4: HSBK,
color5: HSBK,
color6: HSBK,
color7: HSBK,
},
}Expand description
Decoded LIFX Messages
This enum lists all of the LIFX message types known to this library.
Note that other message types exist, but are not officially documented (and so are not available here).
Variants§
GetService
GetService - 2
Sent by a client to acquire responses from all devices on the local network. No payload is required. Causes the devices to transmit a StateService message.
StateService
StateService - 3
Response to Message::GetService message.
Fields
GetHostInfo
GetHostInfo - 12
Get Host MCU information. No payload is required. Causes the device to transmit a Message::StateHostInfo message.
StateHostInfo
Fields
GetHostFirmware
GetHostFirmware - 14
Gets Host MCU firmware information. No payload is required. Causes the device to transmit a Message::StateHostFirmware message.
StateHostFirmware
StateHostFirmware - 15
Response to Message::GetHostFirmware message.
Provides host firmware information.
Fields
GetWifiInfo
GetWifiInfo - 16
Get Wifi subsystem information. No payload is required. Causes the device to transmit a Message::StateWifiInfo message.
StateWifiInfo
Fields
GetWifiFirmware
GetWifiFirmware - 18
Get Wifi subsystem firmware. No payload is required. Causes the device to transmit a Message::StateWifiFirmware message.
StateWifiFirmware
StateWifiFirmware - 19
Response to Message::GetWifiFirmware message.
Provides Wifi subsystem information.
Fields
GetPower
GetPower - 20
Get device power level. No payload is required. Causes the device to transmit a Message::StatePower message
SetPower
SetPower - 21
Set device power level.
Fields
level: PowerLevelnormally a u16, but only 0 and 65535 are supported.
Zero implies standby and non-zero sets a corresponding power draw level.
StatePower
Fields
level: PowerLevelGetLabel
GetLabel - 23
Get device label. No payload is required. Causes the device to transmit a Message::StateLabel message.
SetLabel
SetLabel - 24
Set the device label text.
Fields
label: LifxStringStateLabel
Fields
label: LifxStringGetVersion
GetVersion - 32
Get the hardware version. No payload is required. Causes the device to transmit a Message::StateVersion message.
StateVersion
StateVersion - 33
Response to Message::GetVersion message.
Provides the hardware version of the device.
GetInfo
GetInfo - 34
Get run-time information. No payload is required. Causes the device to transmit a Message::StateInfo message.
StateInfo
Fields
Acknowledgement
Acknowledgement - 45
Response to any message sent with ack_required set to 1. See message header frame address.
(Note that technically this message has no payload, but the frame sequence number is stored here for convenience).
GetLocation
GetLocation - 48
Ask the bulb to return its location information. No payload is required. Causes the device to transmit a Message::StateLocation message.
SetLocation
SetLocation – 49
Set the device location
Fields
label: LifxStringtext label for location
StateLocation
StateLocation - 50
Device location.
GetGroup
GetGroup - 51
Ask the bulb to return its group membership information. No payload is required. Causes the device to transmit a Message::StateGroup message.
SetGroup
SetGroup - 52
Set the device group
StateGroup
StateGroup - 53
Device group.
EchoRequest
EchoRequest - 58
Request an arbitrary payload be echoed back. Causes the device to transmit an Message::EchoResponse message.
Fields
payload: EchoPayloadEchoResponse
EchoResponse - 59
Response to Message::EchoRequest message.
Echo response with payload sent in the EchoRequest.
Fields
payload: EchoPayloadLightGet
Get - 101
Sent by a client to obtain the light state. No payload required. Causes the device to transmit a Message::LightState message.
LightSetColor
SetColor - 102
Sent by a client to change the light state.
If the Frame Address res_required field is set to one (1) then the device will transmit a State message.
SetWaveform
SetWaveform - 103
Apply an effect to the bulb.
Fields
LightState
State - 107
Sent by a device to provide the current light state.
LightGetPower
GetPower - 116
Sent by a client to obtain the power level. No payload required. Causes the device to transmit a StatePower message.
LightSetPower
SetPower - 117
Sent by a client to change the light power level.
Field Type level unsigned 16-bit integer duration unsigned 32-bit integer The power level must be either 0 or 65535.
The duration is the power level transition time in milliseconds.
If the Frame Address res_required field is set to one (1) then the device will transmit a StatePower message.
LightStatePower
StatePower - 118
Sent by a device to provide the current power level.
Field Type level unsigned 16-bit integer
SetWaveformOptional
SetWaveformOptional - 119
Apply an effect to the bulb.
Fields
LightGetInfrared
GetInfrared - 120
Gets the current maximum power level of the Infraed channel
LightStateInfrared
StateInfrared - 121
Indicates the current maximum setting for the infrared channel.
LightSetInfrared
SetInfrared – 122
Set the current maximum brightness for the infrared channel.
SetColorZones
SetColorZones - 501
This message is used for changing the color of either a single or multiple zones. The changes are stored in a buffer and are only applied once a message with either ApplicationRequest::Apply or ApplicationRequest::ApplyOnly set.
GetColorZones
GetColorZones - 502
GetColorZones is used to request the zone colors for a range of zones. The bulb will respond with either Message::StateZone or Message::StateMultiZone messages as required to cover the requested range. The bulb may send state messages that cover more than the requested zones. Any zones outside the requested indexes will still contain valid values at the time the message was sent.
StateZone
StateZone - 503
The StateZone message represents the state of a single zone with the index field indicating
which zone is represented. The count field contains the count of the total number of zones
available on the device.
StateMultiZone
StateMultiZone - 506
The StateMultiZone message represents the state of eight consecutive zones in a single message.
As in the StateZone message the count field represents the count of the total number of
zones available on the device. In this message the index field represents the index of
color0 and the rest of the colors are the consecutive zones thus the index of the
color_n zone will be index + n.