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
|
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
|
|
|
|
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
|
|
|
|
StateWifiFirmware - Packet 19
This packet is the reply to the GetWifiFirmware (18) message
|
|
|
|
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
|
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
|
|
|
StateInfo - Packet 35
This packet provides information about the device.
This packet is the reply to the GetInfo (34) message
|
|
|
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
|
|
|
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
|
|
|
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.
|
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
|
|
|
|
|
|
|
|
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
|
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
|
|
|
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
|
|
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
|
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
|
|
|
|
|
|
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
|
|
|
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
|
|
|
|
|
|
|
|
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
|
|
|
|
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
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
|
|
|
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
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SensorStateAmbientLight - Packet 402
**Note: This feature is experimental and potentially subject to change. **
This feature is only supported by a limited number of devices.
This packet shows the current levels of ambient light as detected by the target device, and is emitted by a device in response to a [SensorGetAmbientLight (401)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#sensorgetambientlight---packet-401)
message.
|
Updated 15 days ago