{"_id":"5a66886dddefb30012dfc2cf","project":"5581248904ae5b0d0026289a","version":{"_id":"57fdb17c4defec0e0064228b","project":"5581248904ae5b0d0026289a","__v":2,"createdAt":"2016-10-12T03:43:56.009Z","releaseDate":"2016-10-12T03:43:56.009Z","categories":["57fdb17c4defec0e0064228c","57fdb17c4defec0e0064228d","57fdb17c4defec0e0064228e","57fdb520bcc07b0e00d1ef41"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"category":{"_id":"57fdb17c4defec0e0064228e","project":"5581248904ae5b0d0026289a","__v":0,"version":"57fdb17c4defec0e0064228b","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-06-18T03:15:52.144Z","from_sync":false,"order":3,"slug":"message-types","title":"Protocol Messages"},"user":"57749b725b96cf0e00558ea6","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-01-23T00:57:17.364Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"These messages are specific to controlling and querying LIFX Tile devices. See the page on [Tiles](doc:tile-control) for more information about these products.\n[block:api-header]\n{\n  \"title\": \"Message Field Data Types\"\n}\n[/block]\n### Tile\n\n| Field | Type |\n|-------|------|\n| reserved | signed 16-bit integer |\n| reserved | signed 16-bit integer |\n| reserved | signed 16-bit integer |\n| reserved | signed 16-bit integer |\n| user_x | 32-bit float |\n| user_y | 32-bit float |\n| width | unsigned 8-bit integer |\n| height | unsigned 8-bit integer |\n| reserved | unsigned 8-bit integer |\n| device_version_vendor | unsigned 32-bit integer |\n| device_version_product | unsigned 32-bit integer |\n| device_version_version | unsigned 32-bit integer |\n| firmware_build | unsigned 64-bit integer |\n| reserved | unsigned 64-bit integer |\n| firmware_version | unsigned 32-bit integer |\n| reserved | unsigned 32-bit integer|\n\nThe `device_version` fields are the same as those in a [Device::StateVersion](doc:device-messages#section-stateversion-33)  message and the the `firmware_build` and `firmware_version` fields are the same as those in a [Device::StateHostFirmware](doc:device-messages#section-statehostfirmware-15) message.\n\nThe `width` and `height` fields are a number of pixels that are on each axis of the tile.\n\nThe `user_x` and `user_y` fields are used to record the position of each tile. See the page on [Tile Control](doc:tile-control) for more information about `user_x` and `user_y`\n[block:api-header]\n{\n  \"title\": \"Tile Messages\"\n}\n[/block]\n### GetDeviceChain - 701\n\nThis message returns information about the tiles in the chain. It responds with a StateDeviceChain message.\n\n### StateDeviceChain - 702\n\n| Field | Type |\n|-------|------|\n| start_index | unsigned 8-bit integer |\n| total_count | unsigned 8-bit integer |\n| tile_devices[16] | 16 [Tile](#section-tile) |\n\n### SetUserPosition - 703\n\nUsed to tell each tile what their position is.\n\n| Field | Type |\n|-------|------|\n| tile_index | unsigned 8-bit integer |\n| reserved | unsigned 16-bit integer |\n| user_x | 32-bit float |\n| user_y | 32-bit float |\n\nThe `tile_index` is a 0 based index used to address a particular tile in the chain.\n\nThe `user_x` and `user_y` fields are used to record the position of each tile. See the page on [Tile Control](doc:tile-control) for more information about `user_x` and `user_y`.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"Be very careful when setting these values, as it has the chance to greatly upset users if you get it wrong. Make sure you have read, and fully understand the information on the [Tile Control](doc:tile-control) page before setting these values.\",\n  \"title\": \"Warning!\"\n}\n[/block]\n### GetTileState64 - 707\n\nGet the state of 64 pixels in the tile in a rectangle that has a starting point and width.\n\n| Field | Type |\n|-------|------|\n| tile_index | unsigned 8-bit integer |\n| length | unsigned 8-bit integer |\n| reserved | unsigned 8-bit integer |\n| x | unsigned 8-bit integer |\n| y | unsigned 8-bit integer |\n| width | unsigned 8-bit integer |\n\nThe `tile_index` is used to control the starting tile in the chain and `length` is used to get the state of that many tiles beginning from the `tile_index`. This will result in a separate response from each tile.\n\nFor the LIFX Tile it really only makes sense to set `x` and `y` to zero, and `width` to 8.\n\n### StateTileState64 - 711\n\nReturned from a GetTileState64 and provides all the pixels in the specified rectangle for that tile.\n\n| Field | Type |\n|-------|------|\n| tile_index | unsigned 8-bit integer |\n| reserved | unsigned 8-bit integer |\n| x | unsigned 8-bit integer |\n| y | unsigned 8-bit integer |\n| width | unsigned 8-bit integer |\n| colors[64] | 64 [HSBK](doc:light-messages#section-hsbk) values |\n\n### SetTileState64 - 715\n\n| Field | Type |\n|-------|------|\n| tile_index | unsigned 8-bit integer |\n| length | unsigned 8-bit integer |\n| reserved | unsigned 8-bit integer |\n| x | unsigned 8-bit integer |\n| y | unsigned 8-bit integer |\n| width | unsigned 8-bit integer |\n| colors[64] | 64 [HSBK](doc:light-messages#section-hsbk) values |\n\nThis lets you set 64 pixels from a starting `x` and `y` for a rectangle with the specified `width`.\n\nFor the LIFX Tile it really only makes sense to set `x` and `y` to zero, and `width` to 8.","excerpt":"","slug":"tile-messages","type":"basic","title":"Tile Messages"}
These messages are specific to controlling and querying LIFX Tile devices. See the page on [Tiles](doc:tile-control) for more information about these products. [block:api-header] { "title": "Message Field Data Types" } [/block] ### Tile | Field | Type | |-------|------| | reserved | signed 16-bit integer | | reserved | signed 16-bit integer | | reserved | signed 16-bit integer | | reserved | signed 16-bit integer | | user_x | 32-bit float | | user_y | 32-bit float | | width | unsigned 8-bit integer | | height | unsigned 8-bit integer | | reserved | unsigned 8-bit integer | | device_version_vendor | unsigned 32-bit integer | | device_version_product | unsigned 32-bit integer | | device_version_version | unsigned 32-bit integer | | firmware_build | unsigned 64-bit integer | | reserved | unsigned 64-bit integer | | firmware_version | unsigned 32-bit integer | | reserved | unsigned 32-bit integer| The `device_version` fields are the same as those in a [Device::StateVersion](doc:device-messages#section-stateversion-33) message and the the `firmware_build` and `firmware_version` fields are the same as those in a [Device::StateHostFirmware](doc:device-messages#section-statehostfirmware-15) message. The `width` and `height` fields are a number of pixels that are on each axis of the tile. The `user_x` and `user_y` fields are used to record the position of each tile. See the page on [Tile Control](doc:tile-control) for more information about `user_x` and `user_y` [block:api-header] { "title": "Tile Messages" } [/block] ### GetDeviceChain - 701 This message returns information about the tiles in the chain. It responds with a StateDeviceChain message. ### StateDeviceChain - 702 | Field | Type | |-------|------| | start_index | unsigned 8-bit integer | | total_count | unsigned 8-bit integer | | tile_devices[16] | 16 [Tile](#section-tile) | ### SetUserPosition - 703 Used to tell each tile what their position is. | Field | Type | |-------|------| | tile_index | unsigned 8-bit integer | | reserved | unsigned 16-bit integer | | user_x | 32-bit float | | user_y | 32-bit float | The `tile_index` is a 0 based index used to address a particular tile in the chain. The `user_x` and `user_y` fields are used to record the position of each tile. See the page on [Tile Control](doc:tile-control) for more information about `user_x` and `user_y`. [block:callout] { "type": "danger", "body": "Be very careful when setting these values, as it has the chance to greatly upset users if you get it wrong. Make sure you have read, and fully understand the information on the [Tile Control](doc:tile-control) page before setting these values.", "title": "Warning!" } [/block] ### GetTileState64 - 707 Get the state of 64 pixels in the tile in a rectangle that has a starting point and width. | Field | Type | |-------|------| | tile_index | unsigned 8-bit integer | | length | unsigned 8-bit integer | | reserved | unsigned 8-bit integer | | x | unsigned 8-bit integer | | y | unsigned 8-bit integer | | width | unsigned 8-bit integer | The `tile_index` is used to control the starting tile in the chain and `length` is used to get the state of that many tiles beginning from the `tile_index`. This will result in a separate response from each tile. For the LIFX Tile it really only makes sense to set `x` and `y` to zero, and `width` to 8. ### StateTileState64 - 711 Returned from a GetTileState64 and provides all the pixels in the specified rectangle for that tile. | Field | Type | |-------|------| | tile_index | unsigned 8-bit integer | | reserved | unsigned 8-bit integer | | x | unsigned 8-bit integer | | y | unsigned 8-bit integer | | width | unsigned 8-bit integer | | colors[64] | 64 [HSBK](doc:light-messages#section-hsbk) values | ### SetTileState64 - 715 | Field | Type | |-------|------| | tile_index | unsigned 8-bit integer | | length | unsigned 8-bit integer | | reserved | unsigned 8-bit integer | | x | unsigned 8-bit integer | | y | unsigned 8-bit integer | | width | unsigned 8-bit integer | | colors[64] | 64 [HSBK](doc:light-messages#section-hsbk) values | This lets you set 64 pixels from a starting `x` and `y` for a rectangle with the specified `width`. For the LIFX Tile it really only makes sense to set `x` and `y` to zero, and `width` to 8.