events
Api reference content
put/api/events/{eventId}
Updates an existing event.
Parameters
| Parameter | Place | Required | Description |
|---|---|---|---|
| eventId | path | required |
Request body
| Content type | Schema |
|---|---|
| application/json | {
"name": "string",
"file_id": "string",
"source_type": "emitter | file | none",
"trigger": {
"mac": "string",
"sensor": "integer",
"type": "level | pulse_audio | pulse_time",
"duration": "double"
},
"action": [
{
"mac": "string",
"audio": "boolean",
"relays": "[double]"
}
],
"special_volume": "double"
} |
Sensors IO
In the case of the Aip-IO, the sensors range from 0 to 15, following the next relationship:
| Physical sensor | Api number |
|---|---|
| 0/0 | 0 |
| 0/1 | 1 |
| 0/2 | 2 |
| 0/3 | 3 |
| 1/0 | 4 |
| 1/1 | 5 |
| 1/2 | 6 |
| 1/3 | 7 |
| 2/0 | 8 |
| 2/1 | 9 |
| 2/2 | 10 |
| 2/3 | 11 |
| 3/0 | 12 |
| 3/1 | 13 |
| 3/2 | 14 |
| 3/3 | 15 |
Responses
| Status | Description |
|---|---|
| 204 | |
| 400 | application/json {
"errors": "[string]"
} |
| 404 |