Sync device events
Field paths are relative to one object in the message array. [] means an array item: for example, services[].rid is the rid of each service. Fields under value are shown as value.name, value.color_arr[].x, and so on.
Sync device updated
Topic
res/sync/update
Example message
json
[
{
"device_id": "BDF83E95-5B50-4711-B817-62B647665DB2",
"id": "2ACE7DAC-6DB8-4CF2-9FFD-246D0D45D73A",
"value": {
"on": 1
}
}
]Fields
| Field | Type | Description |
|---|---|---|
id | string | Sync device ID. |
device_id | string | Device ID. |
value | object | Fields changed by this event. |
Fields in value
| Field | Type | Description |
|---|---|---|
value.on | integer | On/off state: 1: on; 0: off. |
value.brightness | integer | Brightness. Range: 0-100. |
value.mode | integer | Mode: 0: video; 1: audio; 2: game. |
value.frequency | integer | Intensity: 0: low; 1: medium; 2: high; 3: maximum. |
value.source | integer | Input source: 0: HDMI1; 1: HDMI2. |
value.color_config | integer | Active color preset: 1 for preset 1, 2 for preset 2, and so on. |
value.color_config_1 | object[] | Color data for preset 1. |
value.color_config_2 | object[] | Color data for preset 2. |
value.color_config_3 | object[] | Color data for preset 3. |
value.color_config_4 | object[] | Color data for preset 4. |
value.stop_action | integer | What to do when synchronization stops: 0 keeps the current state; 2 turns the lights off. |
value.area_id | string | UUID of the associated synchronization area. |
value.area_name | string | Name of the associated synchronization area. |
Event details
- Sent when the sync device's properties change. The
valueobject contains only the changed fields. - Apply the fields in
valueto your local state. Fields absent from the message have not changed.