{"id":13574397,"url":"https://github.com/noctarius/lightify-binary-protocol","last_synced_at":"2025-04-30T06:11:07.672Z","repository":{"id":145585892,"uuid":"81803556","full_name":"noctarius/lightify-binary-protocol","owner":"noctarius","description":"Documentation of the OSRAM Lightify Binary Protocol for communication between Lightify Gateway and applications","archived":false,"fork":false,"pushed_at":"2019-01-04T13:33:29.000Z","size":105,"stargazers_count":28,"open_issues_count":1,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-30T13:22:36.339Z","etag":null,"topics":["binary","gateway","lightify","osram","proprietary","protocol"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noctarius.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-02-13T08:46:14.000Z","updated_at":"2024-02-26T20:02:26.000Z","dependencies_parsed_at":"2024-01-16T20:26:08.523Z","dependency_job_id":"faeaa6fa-b83c-407f-81aa-a37d30d737d0","html_url":"https://github.com/noctarius/lightify-binary-protocol","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noctarius%2Flightify-binary-protocol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noctarius%2Flightify-binary-protocol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noctarius%2Flightify-binary-protocol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noctarius%2Flightify-binary-protocol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noctarius","download_url":"https://codeload.github.com/noctarius/lightify-binary-protocol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251651231,"owners_count":21621716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary","gateway","lightify","osram","proprietary","protocol"],"created_at":"2024-08-01T15:00:51.242Z","updated_at":"2025-04-30T06:11:07.650Z","avatar_url":"https://github.com/noctarius.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"= OSRAM Lightify Binary Protocol Documentation\nChristoph Engelbert \u003chttps://github.com/noctarius[@noctarius2k]\u003e\n// Settings:\n:compat-mode!:\n:idseperator: -\n// Aliases:\n:project-name: OSRAM Lightify Binary Protocol\n:project-handle: osram-lightify-binary-protocol\n:toc:\n\nOSRAM\nlink:https://www.osram.com/osram_com/tools-and-services/tools/lightify---smart-connected-light/[Lightify] is a smart home, connected lightning technology. Lights, switches and other paired devices are controlled using the Lightify gateway device. This gateway is an always-on, always-connected device which can be controlled using the official Lightify REST API on the Lightify Cloud. That, however, means that all commands need to be routed through the internet.\n\nThe official Lightify app, on the other hand, communicates directly with the gateway and uses a proprietary binary protocol which is not publicly specified.\n\nThis document is meant to create a public specification of the known facts about how to discover gateway devices, paired devices and zones/groups, as well as how to control those devices.\n\n== Disclaimer\n\nAll information in this document are collected using *reverse engineering practices* or are available by other implementations / people on the internet. Certain *information might be incorrect, outdated or unspecific*. Any help completing this document is appreciated, please file pull requests.\n\nUsing and/or implementing information in this document *might brick your device*, *render it unfunctional*, *change behavior of any connected device* and/or *may void your warranty*. Any action taken upon information in this document is *strictly at your own risk*. *The author(s) are not liable* for any losses and damages in connection with the use of this document.\n\nThe author(s) are *not affiliated* to OSRAM Light AG in any way. Furthermore is this document *not official publicated or approved* by OSRAM Licht AG.\n\n== Basics about the Protocol\n\nThe OSRAM Lightify gateway protocol is a binary protocol with a specified header.\n\nThe underlying protocol is a persistent TCP connection which does not seem to support multiplexing, therefore multiple requests should be sent one after another. To support multithreading, multiple connections should be used.\n\nThe TCP protocol works over port _4000_ and discovery can be implemented using mDNS (multicast DNS, aka Bonjour). Further information in \u003c\u003cLightify Gateway Discovery\u003e\u003e.\n\nMultibyte values encoded using little-endian encoding and considered unsigned values.\n\nString values are encoded using UTF-8 encoding and of fixed length. Unused bytes are filled with _0x00_ and should be trimmed out to get the real string.\n\n=== Headers\n\nThe protocol defines a common header for both requests and responses. The header consists of the packet's length, a packet type and the command id.\n\nFurthermore the header contains a request id which is recommended, but not required, to be monotonly increasing but must wrapping around to startover when surpassing _0xFFFFFFFF_. The response will feature the same request id and can be used to correlate responses with requests.\n\n.Packet Header\n|===\n| Byte(s) | Description | Data type\n\n| 0-1\n| Length of the packet, excl header length\n| uint16_t\n\n| 2\n| Packet type (flag)\n| uint8_t: enum { +\n  _0x00_: Light Device +\n  _0x01_: Device response? +\n  _0x02_: Broadcast / Zone Command +\n  _0x03_: Zone Response? +\n}\n\n| 3\n| Command Id\n| uint8_t: See \u003c\u003cLightify Commands\u003e\u003e\n\n| 4-7\n| Unique, increasing request id\n| uint32_t\n\n|===\n\nResponse packets have an additional field in the header, which seems to return a status / error code for the request.\n\n.Response Header Status Code\n|===\n| Byte(s) | Description | Data type\n\n| 8\n| Status code?\n| uint8_t: enum { +\n_0x00_: No error? +\n_0x01_: Wrong (number of) parameter(s)? +\n_0x14_: ? +\n_0x15_: Command is not a broadcast? +\n_0x16_: Resync required (gateway expects the next packet to be \u003c\u003cPACKET_LIST_PAIRED_DEVICES\u003e\u003e)\n_0xA7_: ? +\n_0x0B_: ? +\n_0xC2_: ? +\n_0xD1_: ? +\n_0xFF_: Unknown command? +\n}\n\n|===\n\nIf the packet is not a broadcast (addressing type != _0x02_), the device or zone address header is following up right after the header. In case of a broadcast, the header is followed by the commands data. Addressing of specific zones or devices is defined in the following section.\n\n=== Error Response\n\nIn case of an illegally addressed packet or any other type of error, an error response packet is returned from the gateway. The packet consists of the header only and the last byte seems to define an error code. See previous table for a list of known? error codes.\n\n== Device Types\n\nThe OSRAM Lightify gateway uses the Zigbee Light Link communication protocol, however it is also able to communicate with certain other device types of the Lightify series, such as switches, motion sensors and power plugs / sockets.\n\nA device type is sent with status updates to identify the type of the device as well as the capabilities of a specific device.\n\n.Device Type\n|===\n| Id | Description\n\n| 1\n| Bulb: Fixed white, dimmable, non-softswitch\n\n| 2\n| Bulb: Tunable white, dimmable, soft-switchable\n\n| 4\n| Bulb: Fixed white, dimmable, soft-switchable\n\n| 10\n| Bulb: RGB, tunable white, dimmable, soft-switchable\n\n| 16\n| Plug / Power socket\n\n| 32\n| Motion Sensor\n\n| 64\n| Switch (2 switches)\n\n| 65\n| Switch (4 switches)\n\n|===\n\n== Device and Zone Addressing\n\nEach paired device has a unique address (MAC). Multiple paired devices can be controlled at once by adding them to zones / groups, which are addressed using the zone's id.\n\nAn address always contains 8 byte, no matter it's adressing a device or zone and is directly followed by the command's specific data.\n\n.Addressing Header\n|===\n| Byte(s) | Description | Data type\n\n| 8-15\n| Address\n| uint64_t: See the following specification\n\n| 16-...\n| Command specific data\n| See \u003c\u003cLightify Commands\u003e\u003e\n\n|===\n\n=== Device address\n\nDevices are addressed by, what seems to be, a hardware address, similar to MAC addresses used in networking devices.\n\n.Device Addressing\n|===\n| Byte(s) | Description | Data type\n\n| 0-7\n| Device address\n| uint64_t\n\n|===\n\nWhile discovering devices the device's address is made known to the application, controlling the gateway, and the paired device can be addressed directly (whereas the command packet is still routed through the gateway).\n\n*Attention:* Device addresses are transmitted as 8 bytes, not as strings!\n\n=== Zone address\n\nZones are identified by their zone id. Addressing itself, however, is still using 8 bytes, even if zone ids seem to be limited to _0xFFFF_. That said, the addressing is built as following:\n\n.Zone Addressing\n|===\n| Byte | Data type\n\n| 1\n| uint8_t: lower significant byte\n\n| 2\n| uint8_t: higher significant byte\n\n| 3-7\n| uint8_t[6]: _0x00_\n\n|===\n\n*Attention:* Also note, that zone commands have a packet type of _0x02_ at byte position _2_ in the packet's header.\n\n== Lightify Gateway Discovery\n\nTo discover the OSRAM Lightify gateway's IP address, a link:https://en.wikipedia.org/wiki/Multicast_DNS[mDNS (multicast DNS)] request is used. mDNS is also known as Bonjour and is originally developed by Apple.\n\nTo find the gateway's address a SSDP lookup request is sent to the UDP broadcast address _224.0.0.251_ (IPv4) or _FF02::FB_ (IPv6). The service type to search for is `_http._tcp` which will find a Lightify device named as `Lightify-XXXXXXXX`, where `XXXXXXXX` is a part of the gateway's serial number (`S/N: OSRXXXXXXXX-YY`) which is also used in the gateway's own SSID (last 6 numbers of the code).\n\nSince more items, especially of other vendors, might be found, the instance name should be tested for starting with `Lightify-` to make sure only the Lightify gateway is discovered.\n\nAccording to the search type and the mDNS response, there is supposed to be a HTTP service on port 80, which does not seem to exist. However, the gateway seems to communicate over link:https://en.wikipedia.org/wiki/QUIC[QUIC] to the OSRAM servers, so maybe the port 80 is also available using QUIC.\n\nAfter discovering the gateway's IP address, the communication port to use the described protocol is TCP/4000.\n\nLightify devices and zones will be discovered using the gateway binary protocol, using tge commands \u003c\u003cPACKET_LIST_PAIRED_DEVICES\u003e\u003e and \u003c\u003cPACKET_LIST_ZONES\u003e\u003e.\n\n== Lightify Commands\n\nLightify commands are either used for broadcasts, like device or zone discovery, or contain information to control a specfic device or zone.\n\nThe following table is most probably incomplete and more commands are available. Response packets often follow a very similar scheme, therefore it should be easy to find new packets and analyze their content.\n\nKnown command ids are put into the following list:\n\n.Commands\n|===\n| Command Id | Description | Addressing | Packet Definition\n\n| _0x02_\n| Unknown, 1 byte data =\u003e no error\n| BROADCAST?\n| ???\n\n| _0x0A_\n| Unknown,  byte data =\u003e no error\n| BROADCAST?\n| ???\n\n| _0x0B_\n| Unknown, 1 byte data =\u003e error 0x01\n| BROADCAST?\n| ???\n\n| _0x13_\n| List paired devices\n| BROADCAST\n| \u003c\u003cPACKET_LIST_PAIRED_DEVICES\u003e\u003e\n\n| _0x15_\n| Unknown, 1 byte data =\u003e no error\n| BROADCAST?\n| ???\n\n| _0x16_\n| Unknown, error code 15 (wrong addressing)\n| ZONE?, DEVICE?\n| ???\n\n| _0x1C_\n| Unknown, 1 byte data =\u003e error 0x0B, 0x19\n| BROADCAST?\n| ???\n\n| _0x1D_\n| Unknown, 1 byte data =\u003e no error\n| BROADCAST?\n| ???\n\n| _0x1E_\n| List configured zones\n| BROADCAST\n| \u003c\u003cPACKET_LIST_ZONES\u003e\u003e\n\n| _0x1F_\n| List defined scenes\n| BROADCAST\n| \u003c\u003cPACKET_LIST_SCENES\u003e\u003e\n\n| _0x20_\n| Add Device to Zone\n| DEVICE?\n| ???\n\n| _0x21_\n| Remove Device from Zone\n| DEVICE?\n| ???\n\n| _0x26_\n| Get Zone information\n| ZONE\n| \u003c\u003cPACKET_GET_ZONE_INFO\u003e\u003e\n\n| _0x27_\n| Set Zone name\n| ZONE?\n| ???\n\n| _0x28_\n| Set Device name\n| DEVICE?\n| ???\n\n| _0x29_\n| Unknown, 1 byte data =\u003e ~1k bytes returned (all zero)\n| BROADCAST?\n| ???\n\n| _0x31_\n| Set luminance of light or zone\n| ZONE, DEVICE\n| \u003c\u003cPACKET_SET_LUMINANCE\u003e\u003e\n\n| _0x32_\n| Set power switch on/off (also set default???)\n| ZONE, DEVICE\n| \u003c\u003cPACKET_SET_SWITCH\u003e\u003e\n\n| _0x33_\n| Set white light temperature\n| ZONE, DEVICE\n| \u003c\u003cPACKET_SET_TEMPERATURE\u003e\u003e\n\n| _0x34_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x36_\n| Set light color (RGB)\n| ZONE, DEVICE\n| \u003c\u003cPACKET_SET_COLOR\u003e\u003e\n\n| _0x37_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x38_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x51_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x52_\n| Activate scene\n| BROADCAST\n| \u003c\u003cPACKET_ACTIVATE_SCENE\u003e\u003e\n\n| _0x53_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x54_\n| Unknown, returned actual data (uint16_t(0,0))\n| BROADCAST?\n| ???\n\n| _0x55_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x56_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x57_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x58_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x61_\n| Unknown, retured unknown error code 0xD1, 0xC2\n| BROADCAST?\n| ???\n\n| _0x62_\n| Unknown, retured unknown error code 0xD1\n| BROADCAST?\n| ???\n\n| _0x63_\n| Unknown, retured unknown error code 0xD1\n| BROADCAST?\n| ???\n\n| _0x64_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x66_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x67_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x68_\n| Get device information\n| DEVICE\n| \u003c\u003cPACKET_GET_DEVICE_INFO\u003e\u003e\n\n| _0x6A_\n| Unknown, retured unknown error code 0xD1\n| BROADCAST?\n| ???\n\n| _0x6B_\n| Unknown, retured unknown error code 0xD1\n| BROADCAST?\n| ???\n\n| _0x6D_\n| Unknown, retured unknown error code 0xD1\n| BROADCAST?\n| ???\n\n| _0x6F_\n| Gateway Firmware version\n| BROADCAST\n| \u003c\u003cPACKET_GET_GATEWAY_FIRMWARE_VERSION\u003e\u003e\n\n| _0x70_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x71_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x76_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x79_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x7A_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x7B_\n| Unknown, 1 byte data =\u003e no error\n| BROADCAST?\n| ???\n\n| _0x7C_\n| Unknown, 1 byte data =\u003e wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0x7D_\n| Unknown, retured unknown error code 0x16 - no return with data, maybe firmware update?\n| ???\n| ???\n\n| _0x91_\n| Unknown, retured unknown error code 0xA7, 0xC2\n| ???\n| ???\n\n| _0xC0_\n| Unknown, no error\n| BROADCAST?\n| ???\n\n| _0xC1_\n| Unknown, no error\n| BROADCAST?\n| ???\n\n| _0xC3_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0xC4_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0xC6_\n| Unknown, no error\n| BROADCAST?\n| ???\n\n| _0xC7_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0xC8_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0xD0_\n| Unknown, retured unknown error code 0xD1\n| ???\n| ???\n\n| _0xD1_\n| Unknown, no response, system reset?\n| ???\n| ???\n\n| _0xD2_\n| Unknown, 1 byte data =\u003e 0xD1, crashed? needs restart\n| ???\n| ???\n\n| _0xD3_\n| Unknown, no answer (0x00), firmware update or more data?\n| ???\n| ???\n\n| _0xD4_\n| Unknown, no answer (0x00), firmware update or more data?\n| ???\n| ???\n\n| _0xD5_\n| Set Color Wheel? HSL?\n| ZONE?, DEVICE?\n| ???\n\n| _0xD6_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0xD8_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0xD9_\n| Unknown, wrong addressing (scene builder???)\n| ZONE?, DEVICE?\n| ???\n\n| _0xDA_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0xDB_\n| Soft on, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0xDC_\n| Soft off, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0xDD_\n| Remove all scenes and groups\n| ZONE?, BROADCAST?\n| ???\n\n| _0xD0_\n| Unknown, no error (0x00)\n| BROADCAST?\n| ???\n\n| _0xE1_\n| Unknown, wrong addressing\n| ZONE?, DEVICE?\n| ???\n\n| _0xE2_\n| Unknown, no answer\n| BROADCAST?\n| ???\n\n\n| _0xE3_\n| Get / Scan / Set  Wifi Configuration\n| BROADCAST\n| \u003c\u003cPACKET_GET_WIFI_CONFIGURATION\u003e\u003e\n\n| _0xE4_\n| Unknown, activates light (with 1 byte data) - seems to reset the light\n| BROADCAST?\n| ???\n\n| _0xE5_\n| Unknown, returned actual data (uint64_t(1,0,0,0))\n| BROADCAST?\n| ???\n\n| _0xE6_\n| Unknown, returned actual data (uint16_t(1,15))\n| BROADCAST?\n| ???\n\n| _0xE6_\n| Unknown, returned actual data (uint16_t(1,15))\n| BROADCAST?\n| ???\n\n| _0xE7_\n| Unknown, no answer\n| BROADCAST?\n| ???\n\n| _0xE8_\n| Unknown, retured unknown error code 0x16\n| BROADCAST?\n| ???\n\n| _0xE9_\n| Unknown, retured unknown error code 0xD1\n| BROADCAST?\n| ???\n\n| _0xEA_\n| Unknown, retured unknown error code 0xD1\n| BROADCAST?\n| ???\n\n|===\n\nAs visible from the list, a lot of command ids seem either unused or, what is more presumable, unknown at the current point in time.\n\n== Command data\n\nMost commands carry additional information starting after the header (for broadcast packets) or after the addressing header (non-broadcast packets).\n\nThe following sections define the packet's structure after either of both headers, according to the command type.\n\n=== PACKET_LIST_PAIRED_DEVICES\n\nReturns a list of all paired devices.\n\n.Request data\n|===\n| Byte(s) | Description | Data type\n\n| 16\n| Unknown\n| uint8_t: always? _0x01_\n\n|===\n\n.Response data\n|===\n| Byte(s) | Description | Data type\n\n| 9-10\n| Number of devices\n| uint16_t\n\n| ...50 bytes each device\n| Device status information\n| See following table\n\n|===\n\n.Device status information\n|===\n| Byte(s) | Description | Data type\n\n| 0-1\n| Device id?\n| uint16_t\n\n| 2-9\n| Device address\n| uint64_t: See \u003c\u003cDevice address\u003e\u003e\n\n| 10\n| Device type?\n| uint8_t: See \u003c\u003cDevice Types\u003e\u003e\n\n| 11-14\n| Firmware version\n| uint8_t[5]: Translation into firmware version string -\u003e +\n{%02d, uint8_t[0]}+{%02d, uint8_t[1]}+{%02d, uint8_t[2]}+uint8_t[3]\n\n| 15\n| Reachable\n| uint8_t: _0x00_ online, _0xFF_ offline\n\n| 16-17\n| Zone Id\n| uint16_t\n\n| 18\n| Power switch status\n| uint8_t: bool\n\n| 19\n| Luminance value / Battery value (Motion Detector)\n| uint8_t\n\n| 20-21\n| Temparature value (in Kelvin)\n| uint16_t: _2,000_ \u003e= x \u003c= _6,500_\n\n| 22\n| Red value / Enabled value (Motion Detector)\n| uint8_t\n\n| 23\n| Green value / Triggered value (Motion Detector)\n| uint8_t\n\n| 24\n| Blue value\n| uint8_t\n\n| 25\n| Alpha value\n| uint8_t: always? _0xFF_\n\n| 26-41\n| Device name\n| uint8_t[16]: UTF-8 encoded, zero terminated string\n\n| 42-45\n| Time since last seen by gateway\n| uint32_t\n\n| 46-49\n| Joining?\n| uint32_t\n\n|===\n\n\n=== PACKET_LIST_ZONES\n\nReturns a list of all configured zones.\n\n.Request data\n|===\n| Byte(s) | Description | Data type\n\n| -\n| No additional information to send\n| -\n\n|===\n\n.Response data\n|===\n| Byte(s) | Description | Data type\n\n| 9-10\n| Number of zones\n| uint16_t\n\n| ...18 bytes each zone\n| Zone information\n| See following table\n\n|===\n\n.Zone information\n|===\n| Byte(s) | Description | Data type\n\n| 0-1\n| Zone id\n| uint16_t\n\n| 2-17\n| Zone name\n| uint8_t[16]: UTF-8 encoded, zero terminated string\n\n|===\n\nAssigned devices need to be discovered using \u003c\u003cPACKET_GET_ZONE_INFO\u003e\u003e after the zone id has been seen with this packet.\n\n=== PACKET_LIST_SCENES ===\n\nReturns a list of defined scenes.\n\n.Request data\n|===\n| Byte(s) | Description | Data type\n\n| -\n| No additional information to send\n| -\n\n|===\n\n.Response data\n|===\n| Byte(s) | Description | Data type\n\n| 0-1\n| Number of Scenes\n| uint16_t\n\n| ...20 bytes each scene\n| Scene information\n| See following table\n\n|===\n\n.Scene information\n|===\n| Byte(s) | Description | Data type\n\n| 0\n| Scene id\n| uint8_t\n\n| 1\n| Unknown, seems to always be 0x64 (@-sign)\n| uint8_t\n\n| 2-17\n| Scene name\n| uint8_t[16]: UTF-8 encoded, zero terminated string\n\n| 18-19\n| Unknown\n| uint16_t\n\n| 20\n| Next Scene id (chaining scenes?)\n| uint8_t\n\n|===\n\n=== PACKET_GET_ZONE_INFO\n\nReturns information about the requested zone, including assigned devices.\n\n.Request data\n|===\n| Byte(s) | Description | Data type\n\n| -\n| No additional information to send\n| -\n\n|===\n\n.Response data\n|===\n| Byte(s) | Description | Data type\n\n| 9-10\n| Zone id\n| uint32_t\n\n| 11-27\n| Zone name\n| uint8_t[16]: UTF-8 encoded, zero terminated string\n\n| 28\n| Number of assigned devices\n| uint8_t\n\n| ...8 bytes each device\n| Device addresses\n| See \u003c\u003cDevice address\u003e\u003e\n\n|===\n\n=== PACKET_SET_LUMINANCE\n\nSets the luminance value of the addressed device or zone.\n\n.Request data\n|===\n| Byte(s) | Description | Data type\n\n| 16\n| Luminance value\n| uint8_t\n\n| 17-18\n| Transition time in millis\n| uint16_t\n\n|===\n\n.Response data\n|===\n| Byte(s) | Description | Data type\n\n| 9-10\n| Device or zone id\n| uint16_t\n\n| 11-18\n| Device or zone address\n| uint64_t: See \u003c\u003cDevice and Zone Addressing\u003e\u003e\n\n|===\n\n=== PACKET_SET_SWITCH\n\nSets the power switch state of the addressed device or zone.\n\n.Request data\n|===\n| Byte(s) | Description | Data type\n\n| 16\n| Power switch state\n| uint8_t: bool\n\n|===\n\n.Response data\n|===\n| Byte(s) | Description | Data type\n\n| 9-10\n| WRONG:Device or zone id??? Number of devices changed?\n| uint16_t\n\n| 11-18\n| Device or zone address\n| uint64_t: See \u003c\u003cDevice and Zone Addressing\u003e\u003e\n\n|===\n\n=== PACKET_SET_TEMPERATURE\n\nSets the white light temperature of the addressed device or zone between 2,000 and 6,500 Kelvin.\n\n.Request data\n|===\n| Byte(s) | Description | Data type\n\n| 16\n| White light temperature\n| uint16_t: _2,000_ \u003e= x \u003c= _6,500_\n\n| 17-18\n| Transition time in millis\n| uint16_t\n\n|===\n\n.Response data\n|===\n| Byte(s) | Description | Data type\n\n| 9-10\n| Device or zone id\n| uint16_t\n\n| 11-18\n| Device or zone address\n| uint64_t: See \u003c\u003cDevice and Zone Addressing\u003e\u003e\n\n|===\n\n=== PACKET_SET_COLOR\n\nSets the RGB color value of the addressed device or zone.\n\n.Request data\n|===\n| Byte(s) | Description | Data type\n\n| 16\n| Red value\n| uint8_t\n\n| 17\n| Green value\n| uint8_t\n\n| 18\n| Blue value\n| uint8_t\n\n| 19\n| Alpha value\n| uint8_t: always _0xFF_?\n\n| 20-21\n| Transition time in millis\n| uint16_t\n\n|===\n\n.Response data\n|===\n| Byte(s) | Description | Data type\n\n| 9-10\n| Device or zone id\n| uint16_t\n\n| 11-18\n| Device or zone address\n| uint64_t: See \u003c\u003cDevice and Zone Addressing\u003e\u003e\n\n|===\n\n=== PACKET_ACTIVATE_SCENE\n\nActivates a predefined scene on the addressed device or zone.\n\n.Request data\n|===\n| Byte(s) | Description | Data type\n\n| 16\n| Scene id\n| uint8_t: 0x00 to 0x0F for the different predefined scenes\n\n|===\n\n.Response data\n|===\n| Byte(s) | Description | Data type\n\n| 9-10\n| Device or zone id\n| uint16_t\n\n| 11-18\n| Device or zone address\n| uint64_t: See \u003c\u003cDevice and Zone Addressing\u003e\u003e\n\n|===\n\n=== PACKET_GET_DEVICE_INFO\n\nReturns information about the requested device.\n\n.Request data\n|===\n| Byte(s) | Description | Possible values\n\n| -\n| No additional information to send\n| -\n\n|===\n\n.Response data\n|===\n| Byte(s) | Description | Data type\n\n\n| 9-10\n| Device id?\n| uint16_t\n\n| 11-18\n| Device address\n| uint64_t: See \u003c\u003cDevice address\u003e\u003e\n\n| 19\n| Reachable\n| uint8_t: _0x00_ online, _0xFF_ offline\n\n| 20\n| Unknown\n| uint8_t: ???\n\n| 21\n| Power switch status\n| uint8_t: bool\n\n| 22\n| Luminance value / Battery value (Motion Detector)\n| uint8_t\n\n| 23-24\n| Temparature value (in Kelvin)\n| uint16_t: _2,000_ \u003e= x \u003c= _6,500_\n\n| 25\n| Red value / Enabled value (Motion Detector)\n| uint8_t\n\n| 26\n| Green value / Triggered value (Motion Detector)\n| uint8_t\n\n| 27\n| Blue value\n| uint8_t\n\n| 28\n| Alpha value\n| uint8_t: always _0xFF_?\n\n| 29-31\n| Unknown\n| uint8_t[3]: ???\n\n|===\n\nIf the response packet's byte at index _19_ is _0xFF_ (the device is offline / non-reachable) the packet is only those 20 bytes, otherwise the full packet comes back.\n\n\n=== PACKET_GET_WIFI_CONFIGURATION\n\nRetrieves or configures the wifi configuration.\n\n.Request data\n|===\n| Byte(s) | Description | Data type\n\n| 16\n| Subcommand\n| uint8_t: enum { +\n_0x00_: Get wifi configuration +\n_0x01_: Set wifi configuration +\n_0x03_: Scan wifi configuration +\n}\n\n|===\n\n.Response data\n|===\n| Byte(s) | Description | Data type\n\n| 9\n| Number of profiles\n| uint8_t\n\n| ...97 bytes each profile\n| Profile information\n| See following table\n\n|===\n\n.Profile information\n|===\n| Byte(s) | Description | Data type\n\n| 0-31\n| Profile Name\n| uint8_t[32]: UTF-8 encoded, zero terminated string\n\n| 32-64\n| SSID\n| uint8_t[33]: UTF-8 encoded, zero terminated string\n\n| 65-70\n| BSSID\n| uint8_t[6]: UTF-8 encoded, zero terminated string\n\n| 71-74\n| Channel\n| uint32_t\n\n| 75-76\n| Unknown\n| uint16_t: ???\n\n| 77-80\n| IP Address\n| uint64_t: 4 bytes of IP address\n\n| 81-84\n| Gateway\n| uint64_t: 4 bytes of IP address\n\n| 85-88\n| Netmask\n| uint64_t: 4 bytes of IP address\n\n| 89-92\n| DNS #1\n| uint64_t: 4 bytes of IP address\n\n| 93-96\n| DNS #2\n| uint64_t: 4 bytes of IP address\n\n|===\n\n=== PACKET_GET_GATEWAY_FIRMWARE_VERSION\n\nRetrieves the current firmware version of the gateway.\n\n.Request data\n|===\n| Byte(s) | Description | Data type\n\n| -\n| No additional information to send\n| -\n\n|===\n\n.Response data\n|===\n| Byte(s) | Description | Data type\n\n| 9-12\n| Firmware version\n| uint8_t[4]: Translation into firmware version string -\u003e +\n{%02d, uint8_t[0]}+{%02d, uint8_t[1]}+{%02d, uint8_t[2]}+{%02d, uint8_t[3]}\n\n|===\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoctarius%2Flightify-binary-protocol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoctarius%2Flightify-binary-protocol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoctarius%2Flightify-binary-protocol/lists"}