This platform API allows the devices sending asynchronous events to notify extraordinary operational situations
The next figure shows the workflow of the events
As it is shown in the image:
-
It is used HTTP request/response mechanism with and embedded JSON file
-
Platform implements a HTTP web service publishing the next URIs
URI | Description |
---|---|
POST - /south/v80/devices/{device.id}/events/alarms |
For device alarm events |
Alarms Event
POST /south/v80/devices/{device.id}/events/alarms
JSON Object
Attribute | Description | ||||
---|---|---|---|---|---|
id |
Unique identifier (platform generated) for the event. This will contain an string in UUID format |
||||
timestamp |
|||||
deviceId(optional) |
Only used when device that generates the operation is different than the device used as a gateway or proxy. Example: Event from a Zigbee sensor behind a device proxy which is connected to the platform. If the field is not present the final device to execute the operation is that is indicated in the URI |
||||
path |
Array of device identifiers traversed to reach gateway
|
||||
name |
String with the name or identifier of the type of event.
|
||||
specific |
String with a device specific name for this type of event. |
||||
description |
String describing the alarm or reason of raising it |
||||
variables[] |
Array of variables associated to the operation request. See Parameter Object |
{ "event" : { "alarm" : { "id": "50dca9ab-f552-4805-9cff-019090d5b92b", "deviceId":"device_1", "severity": "CRITICAL", "priority" : "HIGH", "name": "Alarm_1", "specific" : "", "description": "alarm description", "timestamp" : 1432454275000, "variables": [ { "name" : "variable1", "value" : "value1" }, { "name" : "variable2", "value" : 10 }, { "name" : "variable3", "value" : { "variable3.1" : "value3.1", "variable3.2" : 20 } } ] } } }