Information messages

You will receive a State message to your request when you send a Get message or if your Set message has the res_required flag set to 1. Though typically you would only require acknowledgement from Set messages.

Core

Acknowledgement - Packet 45

This packet is returned when you specify ack_required=1.

Discovery

StateService - Packet 3

This packet is used to tell you what services are available and the port each service is on.

This packet is the reply to the GetService (2) message

service: Uint8 using Services Enum

port: Uint32
The port of the service. This value is usually 56700 but you should not assume this is always the case.

Device

StateHostFirmware - Packet 15

This packet will tell you what version of firmware is on the device.

Typically you would use this information along with StateVersion (33) to determine the capabilities of your device as specified in our Product Registry.

The version_major and version_minor should be thought of as a pair of (major, minor). So say major is 3 and minor is 60, then the version is (3, 60). This means that (2, 80) is considered less than (3, 60) and (3, 70) is considered greater.

LIFX products will specify a different major for each generation of our devices.

This packet is the reply to the GetHostFirmware (14) message

build: Uint64
The timestamp of the firmware that is on the device as an epoch

reserved6: 8 Reserved bytes

version_minor: Uint16
The minor component of the firmware version

version_major: Uint16
The Major component of the firmware version

StateWifiInfo - Packet 17

This packet will give you information about the signal strength of the device.

The units of this field varies between different products, You can use the following pseudo code to determine the signal strength of your device.

rssi = int(floor(10 * Log10(signal) + 0.5))

if rssi < 0 or rssi == 200:
    if rssi == 200:
        status = "No signal"
    else if rssi <= -80:
        status = "Very bad signal"
    else if rssi <= -70:
        status = "Somewhat bad signal"
    else if rssi <= -60:
        status = "Alright signal"
    else:
        status = "Good signal"

if rssi == 4 or rssi == 5 or rssi == 6:
    status = "Very bad signal"

elif rssi >= 7 and rssi <= 11:
    status = "Somewhat bad signal"

elif rssi >= 12 and rssi <= 16:
    status = "Alright signal";

elif rssi > 16:
    status = "Good signal"

else:
    status = "No signal"

This packet is the reply to the GetWifiInfo (16) message

signal: Float
The signal strength of the device.

reserved6: 4 Reserved bytes

reserved7: 4 Reserved bytes

reserved8: 2 Reserved bytes

StateWifiFirmware - Packet 19

This packet is the reply to the GetWifiFirmware (18) message

build: Uint64
The timestamp when the wifi firmware was created as an epoch, This is only relevant for the first two generations of our products.

reserved6: 8 Reserved bytes

version_minor: Uint16
The minor component of the version.

version_major: Uint16
The major component of the version.

StatePower - Packet 22

This packet tells us the current power level of the device. 0 means off and any other value means on. Note that 65535 is full power and during a power transition (i.e. via SetLightPower (117)) the value may be any value between 0 and 65535.

This packet is the reply to the GetPower (20) and SetPower (21) messages

level: Uint16
The current level of the device's power.

StateLabel - Packet 25

This packet tells us the label of the device.

This packet is the reply to the GetLabel (23) and SetLabel (24) messages

label: 32 bytes String

StateVersion - Packet 33

This packet tell us the version of the firmware on the device. This information can be used with our Product Registry to determine what capabilities are supported by the device.

This packet is the reply to the GetVersion (32) message

vendor: Uint32
For LIFX products this value is 1. There may be devices in the future with a different vendor value.

product: Uint32
The product id of the device. The available products can be found in our Product Registry.

reserved6: 4 Reserved bytes

StateInfo - Packet 35

This packet provides information about the device.

This packet is the reply to the GetInfo (34) message

time: Uint64
The current time according to the device. Note that this is most likely inaccurate.

uptime: Uint64
The amount of time in nanoseconds the device has been online since last power on

downtime: Uint64
The amount of time in nanseconds of power off time accurate to 5 seconds.

StateLocation - Packet 50

This packet provides the details of the location set on the device.

To determine the label of a location you need to send a GetLocation (48) to all the devices you can find and for each location uuid determine which label is accompanied by the latest updated_at value.

This packet is the reply to the GetLocation (48) and SetLocation (49) messages

location: 16 Bytes
The unique identifier of this group as a uuid.

label: 32 bytes String
The name assigned to this location

updated_at: Uint64
An epoch in nanoseconds of when this location was set on the device

StateGroup - Packet 53

This packet provides the details of the group set on the device.

To determine the label of a group you need to send a GetGroup (51) to all the devices you can find and for each group uuid determine which label is accompanied by the latest updated_at value.

This packet is the reply to the GetGroup (51) and SetGroup (52) messages

group: 16 Bytes
The unique identifier of this group as a uuid.

label: 32 bytes String
The name assigned to this group

updated_at: Uint64
An epoch in nanoseconds of when this group was set on the device

EchoResponse - Packet 59

This tells you the same value you specified when you sent an EchoRequest (58) to the device.

echoing: 64 Bytes

StateUnhandled - Packet 223

For some firmware, this packet is returned when the device receives a packet it does not know how to handle. For now, only the LIFX Switch has this behaviour.

It will return the type of packet it couldn't handle. For example, if you send a GetColor (101) to a LIFX switch, then you would receive one of these with a unhandled_type of 101.

unhandled_type: Uint16
The type of the packet that was ignored.

Light

LightState - Packet 107

The current visual state of the device and it's label

This packet is the reply to GetColor (101), SetColor (102), SetWaveform (103) and SetWaveformOptional (119) messages

hue: Uint16

saturation: Uint16

brightness: Uint16

kelvin: Uint16

reserved6: 2 Reserved bytes

power: Uint16
The current power level of the device.

label: 32 bytes String
The current label on the device.

reserved7: 8 Reserved bytes

StateLightPower - Packet 118

This says the current power level of the device.

This packet is the reply to the GetLightPower (116) and SetLightPower (117) messages

level: Uint16

StateInfrared - Packet 121

This says the current brightness of the infrared output from the device

This packet requires the device has the infrared capability. You may use GetVersion (32), GetHostFirmware (14) and the Product Registry to determine whether your device has this capability

This packet is the reply to the GetInfrared (120) and SetInfrared (122) messages

brightness: Uint16
The amount of infrared. 0 is no infrared output and 65535 is full infrared output.

StateHevCycle - Packet 144

This says whether a HEV cycle is running on the device.

This packet requires the device has the hev capability. You may use GetVersion (32), GetHostFirmware (14) and the Product Registry to determine whether your device has this capability

This packet is the reply to the GetHevCycle (142) and SetHevCycle (143) messages

duration_s: Uint32
The duration, in seconds, this cycle was set to.

remaining_s: Uint32
The duration, in seconds, remaining in this cycle

last_power: BoolInt
The power state before the HEV cycle started, which will be the power state once the cycle completes. This is only relevant if remaining_s is larger than 0.

StateHevCycleConfiguration - Packet 147

This packet lets you set default values for a HEV cycle on the device

This packet requires the device has the hev capability. You may use GetVersion (32), GetHostFirmware (14) and the Product Registry to determine whether your device has this capability

This packet is the reply to the GetHevCycleConfiguration (145) and SetHevCycleConfiguration (146) messages

indication: BoolInt
Whether a short flashing indication is run at the end of an HEV cycle.

duration_s: Uint32
This is the default duration that is used when SetHevCycle (143) is given 0 for duration_s.

StateLastHevCycleResult - Packet 149

This packet tells you the result of the last HEV cycle that was run

This packet requires the device has the hev capability. You may use GetVersion (32), GetHostFirmware (14) and the Product Registry to determine whether your device has this capability

This packet is the reply to the GetLastHevCycleResult (148) message

result: Uint8 using LightLastHevCycleResult Enum
An enum saying whether the last cycle completed or interrupted.

MultiZone

StateZone - Packet 503

This represents the HSBK value of a single zone on your strip.

This packet requires the device has the Linear Zones capability. You may use GetVersion (32), GetHostFirmware (14) and the Product Registry to determine whether your device has this capability

This packet is the reply to the GetColorZones (502) and SetColorZones (501) messages

zones_count: Uint8
The total number of zones on the strip.

zone_index: Uint8
The zone this packet refers to.

hue: Uint16

saturation: Uint16

brightness: Uint16

kelvin: Uint16

StateMultiZone - Packet 506

This represents a segment of 8 HSBK values on your strip.

This packet requires the device has the Linear Zones capability. You may use GetVersion (32), GetHostFirmware (14) and the Product Registry to determine whether your device has this capability

This packet is the reply to the GetColorZones (502) and SetColorZones (501) messages

zones_count: Uint8
The total number of zones on your strip

zone_index: Uint8
The first zone represented by this packet

colors: 8 Color structures
The HSBK values of the zones this packet refers to.

StateMultiZoneEffect - Packet 509

This packet tells us what Firmware Effect is current running on the device.

This packet requires the device has the Linear Zones capability. You may use GetVersion (32), GetHostFirmware (14) and the Product Registry to determine whether your device has this capability

This packet is the reply to the GetMultiZoneEffect (507) and SetMultiZoneEffect (508) messages

instanceid: Uint32
The unique value identifying this effect

type: Uint8 using MultiZoneEffectType Enum

reserved6: 2 Reserved bytes

speed: Uint32
The time it takes for one cycle of the effect in milliseconds

duration: Uint64
The amount of time left in the current effect in nanoseconds

reserved7: 4 Reserved bytes

reserved8: 4 Reserved bytes

parameters: 32 Bytes
The parameters that was used in the request.

StateExtendedColorZones - Packet 512

The HSBK values of the zones specified in the request

This packet requires the device has the Extended Linear Zones capability. You may use GetVersion (32), GetHostFirmware (14) and the Product Registry to determine whether your device has this capability

This packet is the reply to the GetExtendedColorZones (511) and SetExtendedColorZones (510) messages

zones_count: Uint16
The number of zones on your strip

zone_index: Uint16
The first zone represented in the packet

colors_count: Uint8
The number of HSBK values in the colors array that map to zones.

colors: 82 Color structures
The HSBK values currently set on each zone.

Relay

StateRPower - Packet 818

Current models of the LIFX switch do not have dimming capability, so the two valid values are 0 for off and 65535 for on.

This packet requires the device has the Relays capability. You may use GetVersion (32), GetHostFirmware (14) and the Product Registry to determine whether your device has this capability

This packet is the reply to the GetRPower (816) and SetRPower (817) messages

relay_index: Uint8
The relay on the switch starting from 0.

level: Uint16
The new value of the relay

Tile

StateDeviceChain - Packet 702

Information about each device in the chain.

This packet requires the device has the Matrix Zones capability. You may use GetVersion (32), GetHostFirmware (14) and the Product Registry to determine whether your device has this capability

This packet is the reply to the GetDeviceChain (701) message

start_index: Uint8
The index of the first device in the chain this packet refers to

tile_devices: 16 Tile structures
The information for each device in the chain

tile_devices_count: Uint8
The number of device in tile_devices that map to devices in the chain.

State64 - Packet 711

The current HSBK values of the zones in a single device.

This packet requires the device has the Matrix Zones capability. You may use GetVersion (32), GetHostFirmware (14) and the Product Registry to determine whether your device has this capability

This packet is the reply to the Get64 (707) and Set64 (715) messages

tile_index: Uint8
The index of the device in the chain this packet refers to. This is 0 based starting from the device closest to the controller.

reserved6: 1 Reserved bytes

x: Uint8
The x coordinate the colors start from

y: Uint8
The y coordinate the colors start from

width: Uint8
The width of each row

colors: 64 Color structures

StateTileEffect - Packet 720

The current Firmware Effect running on the device

This packet requires the device has the Matrix Zones capability. You may use GetVersion (32), GetHostFirmware (14) and the Product Registry to determine whether your device has this capability

This packet is the reply to the GetTileEffect (718) and SetTileEffect (719) messages

reserved8: 1 Reserved bytes

instanceid: Uint32
The unique value identifying the request

type: Uint8 using TileEffectType Enum

speed: Uint32
The time it takes for one cycle in milliseconds.

duration: Uint64
The amount of time left in the current effect in nanoseconds

reserved6: 4 Reserved bytes

reserved7: 4 Reserved bytes

parameters: 32 Bytes
The parameters as specified in the request.

palette_count: Uint8
The number of colors in the palette that are relevant

palette: 16 Color structures
The colors specified for the effect.