Event – DEVICE_DATA

This topic provides the example and description of the event "DEVICE_DATA".

Trigger condition

When a device reports data to Milesight Development Platform, the system will send the reported details to the webhook URI using a POST request with a JSON payload.

Example

{
    "eventID":"",    // The unique ID of this event.
    "eventCreatedTime":"",    // The time at which the event occurs.
    "eventVersion":"1.0",
    "eventType":"DEVICE_DATA"    // The event type.
    "data":{
        "deviceProfile":{    // Basic information of the device reporting data.
            "sn":"",
            "devEUI":"",
            "name":""
        },
        "type":"",   // Type of the reported data. 
        "tslID":"",    // The ID of the reported data in TSL mode.
        "payload"{}
    }
}
Reported data type
Type Description
PROPERTY Static or dynamic information of the device, which describes the device's status or information.

For example, the PIR status and collected data of a sensor.

EVENT Specific occurrences or events related to the device.

For example, a People Counting Sensor is set to report upon line-crossing, when the sensor detects a person crossing the line, it will report the related data to Milesight Development Platform.

SERVICE Service invocation of the device.

For example, reboot the device, and query the historical data of a device.

ONLINE The device's connectivity status changes to online.
OFFLINE The device's connectivity status changes to offline.