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 |
|
Control characteristic |
|
Commands
Value |
Command |
|---|---|
|
Set or get bulb color |
|
Set or get bulb brightness |
|
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 |
|
Red |
|
Green |
|
Blue |
|
The implementation prepares these payloads in avea.compute_brightness() and avea.compute_color().