---
updatedAt: 2026-08-06T06:07:58.000Z
agentTools:
  projectIndex: https://lan.developer.lifx.com/llms.txt
---

# Querying the device for data

The LIFX protocol supplies a number of `Get` messages for getting information from the LIFX devices. When you send these messages to the device with the `res_required` flag set to `0` you will get one or more `State` messages in response.

Below you will find the `type` of the message, the fields that make up the payload of the message, the information you get from the request, and how many `State` messages you should expect in response.

Note that unless specified these packets have an empty payload.

# Discovery

### GetService - Packet 2

This packet is used for Discovery of devices. Typically you would broadcast this message to the network (with `tagged` field in the header set to `0` and the `target` field in the header set to all zeros)

Each device on the network that receives this packet will send back multiple [StateService (3)](https://lan.developer.lifx.com/docs/information-messages#stateservice---packet-3) messages that say what services are available and the port those services are on.

The only [StateService (3)](https://lan.developer.lifx.com/docs/information-messages#stateservice---packet-3) message you care about will tell you that `UDP` is available on a port that is usually `56700`. You can determine the `IP` address of the device from information your `UDP` socket should receive when it gets those bytes.

# Device

### GetHostFirmware - Packet 14

This is used to determine the version of the firmware you have on your device. Typically you would use this information to determine the capabilities of your device as specified in our [Product Registry](https://lan.developer.lifx.com/docs/product-registry).

Will return one [StateHostFirmware (15)](https://lan.developer.lifx.com/docs/information-messages#statehostfirmware---packet-15) message

### GetWifiInfo - Packet 16

This packet is used to determine the signal strength of the device.

Will return one [StateWifiInfo (17)](https://lan.developer.lifx.com/docs/information-messages#statewifiinfo---packet-17) message

### GetWifiFirmware - Packet 18

Our first and second generation devices have separate wifi firmware to the host firmware. For these devices, this message will return the version of the wifi firmware on the device. This message can be used to determine the version of this firmware.

Will return one [StateWifiFirmware (19)](https://lan.developer.lifx.com/docs/information-messages#statewififirmware---packet-19) message

### GetPower - Packet 20

This packet can be used to determine the power level of the device.

Will return one [StatePower (22)](https://lan.developer.lifx.com/docs/information-messages#statepower---packet-22) message

### GetLabel - Packet 23

This packet can be used to determine the label set on the device.

Will return one [StateLabel (25)](https://lan.developer.lifx.com/docs/information-messages#statelabel---packet-25) message

### GetVersion - Packet 32

This packet can be used to determine the product type of the device.

Typically this information is used to determine what capabilities the device has as defined by our [Product Registry](https://lan.developer.lifx.com/docs/product-registry).

Will return one [StateVersion (33)](https://lan.developer.lifx.com/docs/information-messages#stateversion---packet-33) message

### GetInfo - Packet 34

This can be used to determine the uptime and downtime of the device. As well as the current time according to the device.

Will return one [StateInfo (35)](https://lan.developer.lifx.com/docs/information-messages#stateinfo---packet-35) message

### GetLocation - Packet 48

This packet can be used to determine the uuid and label of the location assigned to this device.

Will return one [StateLocation (50)](https://lan.developer.lifx.com/docs/information-messages#statelocation---packet-50) message

### GetGroup - Packet 51

This packet can be used to determine the uuid and label of the group assigned to this device.

Will return one [StateGroup (53)](https://lan.developer.lifx.com/docs/information-messages#stategroup---packet-53) message

### EchoRequest - Packet 58

This packet can be used to check that a device is online and responding to you.

Will return one [EchoResponse (59)](https://lan.developer.lifx.com/docs/information-messages#echoresponse---packet-59) message

<HTMLBlock>{`
<table style="width: 100%; border-collapse: collapse;">
<thead>
<tr>
  <th style="border: 1px solid #ddd; padding: 8px;"></th>
</tr>
</thead>
<tbody>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"></td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p><code>echoing</code>: 64 <a href="doc:field-types#bytes">Bytes</a><br>The bytes you want to receive in the <a href="doc:information-messages#echoresponse---packet-59">EchoResponse (59)</a> message.</p>
</td>
</tr>
</tbody>
</table>
`}</HTMLBlock>

# Light

### GetColor - Packet 101

This packet is used to get the current visual state of the device.

Will return one [LightState (107)](https://lan.developer.lifx.com/docs/information-messages#lightstate---packet-107) message

### GetLightPower - Packet 116

Like [GetPower (20)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#getpower---packet-20) this packet will return the current power level of the device.

Will return one [StateLightPower (118)](https://lan.developer.lifx.com/docs/information-messages#statelightpower---packet-118) message

### GetInfrared - Packet 120

This packet is used to determine the current infrared level of the device.

Will return one [StateInfrared (121)](https://lan.developer.lifx.com/docs/information-messages#stateinfrared---packet-121) message

This packet requires the device has the `infrared` capability. You may use [GetVersion (32)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#getversion---packet-32), [GetHostFirmware (14)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#gethostfirmware---packet-14) and the [Product Registry](https://lan.developer.lifx.com/docs/product-registry) to determine whether your device has this capability

### GetHevCycle - Packet 142

This packet is used to determine the state of the HEV LEDs on the device

Will return one [StateHevCycle (144)](https://lan.developer.lifx.com/docs/information-messages#statehevcycle---packet-144) message

This packet requires the device has the `hev` capability. You may use [GetVersion (32)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#getversion---packet-32), [GetHostFirmware (14)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#gethostfirmware---packet-14) and the [Product Registry](https://lan.developer.lifx.com/docs/product-registry) to determine whether your device has this capability

### GetHevCycleConfiguration - Packet 145

This packet is used to determine the default configuration for using the HEV LEDs on the device.

Will return one [StateHevCycleConfiguration (147)](https://lan.developer.lifx.com/docs/information-messages#statehevcycleconfiguration---packet-147) message

This packet requires the device has the `hev` capability. You may use [GetVersion (32)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#getversion---packet-32), [GetHostFirmware (14)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#gethostfirmware---packet-14) and the [Product Registry](https://lan.developer.lifx.com/docs/product-registry) to determine whether your device has this capability

### GetLastHevCycleResult - Packet 148

This packet is used to determine the result of the last HEV cycle that was run

Will return one [StateLastHevCycleResult (149)](https://lan.developer.lifx.com/docs/information-messages#statelasthevcycleresult---packet-149) message

This packet requires the device has the `hev` capability. You may use [GetVersion (32)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#getversion---packet-32), [GetHostFirmware (14)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#gethostfirmware---packet-14) and the [Product Registry](https://lan.developer.lifx.com/docs/product-registry) to determine whether your device has this capability

# MultiZone

### GetColorZones - Packet 502

There are two possible messages that this request may return. If the number of zones in the response is just one then you will get a single [StateZone (503)](https://lan.developer.lifx.com/docs/information-messages#statezone---packet-503). Otherwise you will get one or more [StateMultiZone (506)](https://lan.developer.lifx.com/docs/information-messages#statemultizone---packet-506) replies.

You can determine how many StateMultizone messages you will receive by looking at the request and the first reply.

Some pseudo code would look like this:

```
number_segments_of_8 = (request.end_index - request.start_index) / 8
count_from_request = maximum(1, floor(number_segements_of_8) + 1)

count_from_response = ceil(first_response.zone_count / 8)

expected_number_of_messages = minimum(count_from_request, count_from_response)
```

Note that if you want all the zones to be returned to you, you should set `start_index` to `0` and `end_index` to `255`

This packet requires the device has the `Linear Zones` capability. You may use [GetVersion (32)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#getversion---packet-32), [GetHostFirmware (14)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#gethostfirmware---packet-14) and the [Product Registry](https://lan.developer.lifx.com/docs/product-registry) to determine whether your device has this capability

<HTMLBlock>{`
<table style="width: 100%; border-collapse: collapse;">
<thead>
<tr>
  <th style="border: 1px solid #ddd; padding: 8px;"></th>
</tr>
</thead>
<tbody>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"></td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p><code>start_index</code>: <a href="doc:field-types#uint8">Uint8</a><br>The first zone you want to get information from</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p><code>end_index</code>: <a href="doc:field-types#uint8">Uint8</a><br>The second zone you want to get information from</p>
</td>
</tr>
</tbody>
</table>
`}</HTMLBlock>

### GetMultiZoneEffect - Packet 507

This packet can be used to determine if the device is currently running a multizone [Firmware Effect](https://lan.developer.lifx.com/docs/firmware-effects).

Will return one [StateMultiZoneEffect (509)](https://lan.developer.lifx.com/docs/information-messages#statemultizoneeffect---packet-509) message

This packet requires the device has the `Linear Zones` capability. You may use [GetVersion (32)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#getversion---packet-32), [GetHostFirmware (14)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#gethostfirmware---packet-14) and the [Product Registry](https://lan.developer.lifx.com/docs/product-registry) to determine whether your device has this capability

### GetExtendedColorZones - Packet 511

This packet can be used to get response packets containing the [HSBK](https://lan.developer.lifx.com/docs/representing-color-with-hsbk) values for every zone on your strip.

Will return [StateExtendedColorZones (512)](https://lan.developer.lifx.com/docs/information-messages#stateextendedcolorzones---packet-512) messages. If the light has more than 82 zones, then multiple responses shall be returned with different `zone_index` values. The value of the `zone_count` property shall indicate the total number of zones on the device.

This packet requires the device has the `Extended Linear Zones` capability. You may use [GetVersion (32)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#getversion---packet-32), [GetHostFirmware (14)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#gethostfirmware---packet-14) and the [Product Registry](https://lan.developer.lifx.com/docs/product-registry) to determine whether your device has this capability

# Relay

### GetRPower - Packet 816

Get the power state of a relay on a switch device.

Will return one [StateRPower (818)](https://lan.developer.lifx.com/docs/information-messages#staterpower---packet-818) message

This packet requires the device has the `Relays` capability. You may use [GetVersion (32)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#getversion---packet-32), [GetHostFirmware (14)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#gethostfirmware---packet-14) and the [Product Registry](https://lan.developer.lifx.com/docs/product-registry) to determine whether your device has this capability

<HTMLBlock>{`
<table style="width: 100%; border-collapse: collapse;">
<thead>
<tr>
  <th style="border: 1px solid #ddd; padding: 8px;"></th>
</tr>
</thead>
<tbody>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"></td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p><code>relay_index</code>: <a href="doc:field-types#uint8">Uint8</a><br>The relay on the switch starting from <code>0</code>.</p>
</td>
</tr>
</tbody>
</table>
`}</HTMLBlock>

# Button

### GetButtonConfig - Packet 909

Get the button configuration on a switch device. This includes the haptic feedback duration and the colors of the button backlight when it is `on` and `off`.

Will return one [StateButtonConfig (911)](https://lan.developer.lifx.com/docs/information-messages#statebuttonconfig---packet-911) message

This packet requires the device has the `Buttons` capability. You may use [GetVersion (32)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#getversion---packet-32), [GetHostFirmware (14)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#gethostfirmware---packet-14) and the [Product Registry](https://lan.developer.lifx.com/docs/product-registry) to determine whether your device has this capability

# Tile

### GetDeviceChain - Packet 701

This packet can be used to get information about all the devices in the chain. Note that for LIFX Tiles this will only ever be up to `5` devices and for the LIFX Candle it will only be `1` device.

Will return one [StateDeviceChain (702)](https://lan.developer.lifx.com/docs/information-messages#statedevicechain---packet-702) message

This packet requires the device has the `Matrix Zones` capability. You may use [GetVersion (32)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#getversion---packet-32), [GetHostFirmware (14)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#gethostfirmware---packet-14) and the [Product Registry](https://lan.developer.lifx.com/docs/product-registry) to determine whether your device has this capability

### Get64 - Packet 707

Used to get the [HSBK](https://lan.developer.lifx.com/docs/representing-color-with-hsbk) values of all the zones in devices connected in the chain.

this will return one or more [State64 (711)](https://lan.developer.lifx.com/docs/information-messages#state64---packet-711) messages. The maximum number of messages you will receive is the number specified by `length` in your request.

This packet requires the device has the `Matrix Zones` capability. You may use [GetVersion (32)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#getversion---packet-32), [GetHostFirmware (14)](https://lan.developer.lifx.com/docs/querying-the-device-for-data#gethostfirmware---packet-14) and the [Product Registry](https://lan.developer.lifx.com/docs/product-registry) to determine whether your device has this capability

<HTMLBlock>{`
<table style="width: 100%; border-collapse: collapse;">
<thead>
<tr>
  <th style="border: 1px solid #ddd; padding: 8px;"></th>
</tr>
</thead>
<tbody>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"></td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p><code>tile_index</code>: <a href="doc:field-types#uint8">Uint8</a><br>The first item in the chain you want zones</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p><code>length</code>: <a href="doc:field-types#uint8">Uint8</a><br>The number of tiles after <code>tile_index</code> you want <a href="doc:representing-color-with-hsbk">HSBK</a> values from.</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p><code>reserved6</code>: 1 <a href="doc:field-types#reserved">Reserved</a> bytes</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p><code>x</code>: <a href="doc:field-types#uint8">Uint8</a><br>The x value to start from. You likely always want this to be <code>0</code>.</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p><code>y</code>: <a href="doc:field-types#uint8">Uint8</a><br>The y value to start from. You likely always want this to be <code>0</code>.</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p><code>width</code>: <a href="doc:field-types#uint8">Uint8</a><br>The width of each item in the chain. For the LIFX Tile you want this to be <code>8</code> and for the LIFX Candle you want this to be <code>5</code>.</p>
</td>
</tr>
</tbody>
</table>
`}</HTMLBlock>

### GetTileEffect - Packet 718

Used to determine if the device is running a [Firmware Effect](https://lan.developer.lifx.com/docs/firmware-effects).

Will return one [StateTileEffect (720)](https://lan.developer.lifx.com/docs/information-messages#statetileeffect---packet-720) message

|                                                           |
| :-------------------------------------------------------- |
|                                                           |
| `reserved6`: 1 [Reserved](https://lan.developer.lifx.com/docs/field-types#reserved) bytes |
| `reserved7`: 1 [Reserved](https://lan.developer.lifx.com/docs/field-types#reserved) bytes |

### SensorGetAmbientLight - Packet 401

Used to get the current ambient light level from a device. Device will return a [SensorStateAmbientLight (402)](https://lan.developer.lifx.com/docs/information-messages#sensorstateambientlight---packet-402) message.