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:

Purpose

UUID

Avea service

f815e810-456c-6761-746f-4d756e696368

Control characteristic

f815e811-456c-6761-746f-4d756e696368

Commands

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:

Channel

Prefix

White

0x8000

Red

0x3000

Green

0x2000

Blue

0x1000

The implementation prepares these payloads in avea.compute_brightness() and avea.compute_color().