Profile Service
The profile service allows you to send and receive MsgPack formatted profiles to control motion detection, lighting setup, and the device name.

Overview

The profile service lets you send and receive configuration for motion, lighting, and effects to and from the Amp. Currently, there are five commands that you can utilize:
Command
Description
get:config
Retrieves configuration as binary MsgPack
raw:<binary data>
Sends Amp profile as MsgPack (also the format that get:config returns config)
name:<name>
Sets the name of the Amp
effect:<action>,<region>,<effect>
Changes the effect for how a lighting region reacts to an action
saveEffect:<action>,<region>,<effect>
Saves the effect for how a lighting region reacts to an action
When sending / receiving data to the amp, you must take into account the MTU. The data will be received or needs to be sent in packets of MTU - 3 bytes.
In both directions, a flow control characteristic is sent with the size of the data in bytes so that both the Amp and the client knows how much data is being sent (i.e. how many notifications to look for before parsing the data)
Get a refresher on MTU considerations here​

Amp Receive (Client Transmit)

Transmits profile data to the amp as a series of notifications. Must be preceded by an Amp Flow Control message with value 1,<data size in bytes>

Amp Transmit (Client Receive)

Receives profile data from the amp as a series of notifications. Will be preceded by an Amp Flow Control with value 2,<data size in bytes>

Amp Flow Control

Dictates between the Amp and a Bluetooth LE client the direction of data being received and the amount of data being sent
Bytes 1-4 are a packed unsigned 32-bit integer that dictates the size of the data being sent
Byte
Operations
Description
0
R/W
FlowControl
1
R/W
Data size byte 1 (MSB)
2
R/W
Data size byte 2
3
R/W
Data size byte 3
4
R/W
Data size byte 4 (LSB)
​
​
Last modified 10mo ago