BLE protocol notes ================== The Avea bulb communicates over Bluetooth Low Energy (BLE). The library writes to the Avea control characteristic to set or request state such as color, brightness and name. UUIDs ----- The library uses the following Avea-specific UUIDs: .. list-table:: :header-rows: 1 * - Purpose - UUID * - Avea service - ``f815e810-456c-6761-746f-4d756e696368`` * - Control characteristic - ``f815e811-456c-6761-746f-4d756e696368`` Commands -------- .. list-table:: :header-rows: 1 * - Value - Command * - ``0x35`` - Set or get bulb color * - ``0x57`` - Set or get bulb brightness * - ``0x58`` - Set or get bulb name Brightness ---------- Brightness values are integers from ``0`` to ``4095``. The command payload starts with ``0x57`` followed by the brightness value encoded as little-endian bytes. Color ----- Color values are 12-bit integers from ``0`` to ``4095``. The color command starts with ``0x35`` and contains values for white, red, green and blue. The channel prefixes are: .. list-table:: :header-rows: 1 * - Channel - Prefix * - White - ``0x8000`` * - Red - ``0x3000`` * - Green - ``0x2000`` * - Blue - ``0x1000`` The implementation prepares these payloads in :func:`avea.compute_brightness` and :func:`avea.compute_color`.