ObserveNotify events Schema

AVRO schema for ObserveNotify event

{
  "type" : "record",
  "name" : "ObserveNotify",
  "fields" : [ {
    "name" : "groupName",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "serialNumber",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "serverTime",
    "type" : [ "null", "long" ],
    "default" : null
  }, {
    "name" : "resourcePath",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "value",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "customAttributes",
    "type" : [ "null", {
      "type" : "map",
      "values" : [ "null", "string" ]
    } ],
    "default" : null
  }, {
    "name" : "subscriptionId",
    "type" : [ "null", "string" ],
    "default" : null
  } ],
  "connect.version" : 1,
  "connect.name" : "ObserveNotify"
}

The following table provides the descriptions of the ObserveNotify events schema fields.

Table 1. ObserveNotify events schema descriptions
Field Name Description Field Type
groupName Specifies the group to which the device pertains to. String
serialNumber Specifies the unique endpoint ID of the device. String
serverTime Specifies the server processing time (number of milliseconds since 1970). Long
resourcePath Specifies the path of the resource observed within the scope of a subscription. This parameter is mandatory inside a resources element. The resourcePath is obtained in case of data policy notification. For example, Time resource has the value sent by the device which is appended with three zeroes. Example: resourcePath":"3/0/13",*"value":"1543422580000"" String
value Specifies the payload of the resource subject to observation (base64-encoded in case of binary content). String
customAttributes Specifies the custom attributes from device. MapEntry<String,String>
subscriptionId Specifies the subscription correlator generated on acknowledgement of the subscription request. String

Example of observeNotify events showing MQTT

{"groupName": "docmqtt", "serialNumber": "doc01", "serverTime": 1581060802397, "resourcePath": "device/0/battery", "value": "10.0", "customAttributes": {}, "subscriptionId": "1fbbd504-7f63-42fa-a935-2803e7d53f9c"}

{"groupName": "mqtt", "serialNumber": "device02", "serverTime": 1581061430579, "resourcePath": "device/0/battery", "value": "15.0", "customAttributes": {}, "subscriptionId": "daa987bd-186c-411b-8a0e-344ee00633c3"}

{"groupName": "mqtt", "serialNumber": "device01", "serverTime": 1581061444674, "resourcePath": "device/0/battery", "value": "100.0", "customAttributes": {}, "subscriptionId": "daa987bd-186c-411b-8a0e-344ee00633c3"}

Example of observeNotify events showing LMM2M


{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt", "serverTime": 1581058036948, "resourcePath": "3/0/9", "value": "30", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}
{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt", "serverTime": 1581058096902, "resourcePath": "3/0/9", "value": "40", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}
{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt", "serverTime": 1581058156980, "resourcePath": "3/0/9", "value": "50", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}
{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt", "serverTime": 1581058216981, "resourcePath": "3/0/9", "value": "60", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}
{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt", "serverTime": 1581058276913, "resourcePath": "3/0/9", "value": "70", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}
{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt", "serverTime": 1581058336919, "resourcePath": "3/0/9", "value": "80", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}
{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt", "serverTime": 1581058396968, "resourcePath": "3/0/9", "value": "90", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}
{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt", "serverTime": 1581058456939, "resourcePath": "3/0/9", "value": "100", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}
{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt", "serverTime": 1581058516936, "resourcePath": "3/0/9", "value": "0", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}
{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt02", "serverTime": 1581058644452, "resourcePath": "3/0/9", "value": "0", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}
{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt02", "serverTime": 1581058704464, "resourcePath": "3/0/9", "value": "10", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}
{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt02", "serverTime": 1581058764480, "resourcePath": "3/0/9", "value": "20", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}
{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt02", "serverTime": 1581058824449, "resourcePath": "3/0/9", "value": "30", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}

{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt01", "serverTime": 1581058863691, "resourcePath": "3/0/9", "value": "0", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}
{"groupName": "newlwm2mt", "serialNumber": "newlwm2mt01", "serverTime": 1581058863737, "resourcePath": "3/0/9", "value": "30", "customAttributes": {}, "subscriptionId": "ee5519e8-57e1-4d17-bc41-340de20d7e67"}