{"_id":"57fec79458a93b0e00ed6a6f","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":"557e2561eb75d80d00af3dab","__v":2,"updates":["584dd1917cd82b1900c09ff7"],"next":{"pages":[],"description":""},"createdAt":"2016-10-12T23:30:28.199Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Enumerated Types\"\n}\n[/block]\n### Application Request\n\nThis type allows you to provide hints to the device about how the changes you make should be performed. For example you can send multiple zones and have them all apply at once. Application Request is stored as an unsigned 8-bit integer.\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Value\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"NO_APPLY\",\n    \"0-1\": \"0\",\n    \"0-2\": \"Don't apply the requested changes until a message with APPLY or APPLY_ONLY is sent.\",\n    \"1-0\": \"APPLY\",\n    \"1-1\": \"1\",\n    \"1-2\": \"Apply the changes immediately and apply any pending changes.\",\n    \"2-0\": \"APPLY_ONLY\",\n    \"2-1\": \"2\",\n    \"2-2\": \"Ignore the requested changes in this message and only apply pending changes.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Messages\"\n}\n[/block]\n### SetColorZones - 501\n\nThis 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 `APPLY` or `APPLY_ONLY` set.\n\n| Field | Type |\n|- - - ----|- - - ---|\n| start_index | unsigned 8-bit integer |\n| end_index | unsigned 8-bit integer |\n| color | HSBK |\n| duration | unsigned 32-bit integer |\n| apply | Application Request |\n\n### GetColorZones - 502\n\nGetColorZones is used to request the zone colors for a range of zones. The bulb will respond with either StateZone or 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.\n\n| Field | Type |\n|- - - ----|- - - ---|\n| start_index | unsigned 8-bit integer |\n| end_index | unsigned 8-bit integer |\n\n### StateZone - 503\n\nThe 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.\n\n| Field | Type |\n|- - - ----|- - - ---|\n| count | unsigned 8-bit integer |\n| index | unsigned 8-bit integer |\n| color | HSBK |\n\n### StateMultiZone - 506\n\nThe 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 `color[0]` and the rest of the colors are the consecutive zones thus the index of the `color[n]` zone will be `index + n`.\n\n| Field | Type |\n|- - - ----|- - - ---|\n| count | unsigned 8-bit integer |\n| index | unsigned 8-bit integer |\n| color[0] | HSBK |\n| color[1] | HSBK |\n| color[2] | HSBK |\n| color[3] | HSBK |\n| color[4] | HSBK |\n| color[5] | HSBK |\n| color[6] | HSBK |\n| color[7] | HSBK |","excerpt":"","slug":"multizone-messages","type":"basic","title":"MultiZone Messages"}

MultiZone Messages


[block:api-header] { "type": "basic", "title": "Enumerated Types" } [/block] ### Application Request This type allows you to provide hints to the device about how the changes you make should be performed. For example you can send multiple zones and have them all apply at once. Application Request is stored as an unsigned 8-bit integer. [block:parameters] { "data": { "h-0": "Name", "h-1": "Value", "h-2": "Description", "0-0": "NO_APPLY", "0-1": "0", "0-2": "Don't apply the requested changes until a message with APPLY or APPLY_ONLY is sent.", "1-0": "APPLY", "1-1": "1", "1-2": "Apply the changes immediately and apply any pending changes.", "2-0": "APPLY_ONLY", "2-1": "2", "2-2": "Ignore the requested changes in this message and only apply pending changes." }, "cols": 3, "rows": 3 } [block:api-header] { "type": "basic", "title": "Messages" } [/block] ### 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 `APPLY` or `APPLY_ONLY` set. | Field | Type | |- - - ----|- - - ---| | start_index | unsigned 8-bit integer | | end_index | unsigned 8-bit integer | | color | HSBK | | duration | unsigned 32-bit integer | | apply | Application Request | ### GetColorZones - 502 GetColorZones is used to request the zone colors for a range of zones. The bulb will respond with either StateZone or 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. | Field | Type | |- - - ----|- - - ---| | start_index | unsigned 8-bit integer | | end_index | unsigned 8-bit integer | ### 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. | Field | Type | |- - - ----|- - - ---| | count | unsigned 8-bit integer | | index | unsigned 8-bit integer | | color | HSBK | ### 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 `color[0]` and the rest of the colors are the consecutive zones thus the index of the `color[n]` zone will be `index + n`. | Field | Type | |- - - ----|- - - ---| | count | unsigned 8-bit integer | | index | unsigned 8-bit integer | | color[0] | HSBK | | color[1] | HSBK | | color[2] | HSBK | | color[3] | HSBK | | color[4] | HSBK | | color[5] | HSBK | | color[6] | HSBK | | color[7] | HSBK |