Lifecycle events Schema

AVRO schema for Lifecycle event

{
  "type" : "record",
  "name" : "LifeCycle",
  "fields" : [ {
    "name" : "groupName",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "deviceType",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "serialNumber",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "serverTime",
    "type" : [ "null", "long" ],
    "default" : null
  }, {
    "name" : "make",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "model",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "firmwareVersion",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "imsi",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "address",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "protocol",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "tags",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "subscriptionId",
    "type" : [ "null", "string" ],
    "default" : null
  }, {
    "name" : "deviceProps",
    "type" : [ "null", {
      "type" : "map",
      "values" : [ "null", "string" ]
    } ],
    "default" : null
  }, {
    "name" : "customAttributes",
    "type" : [ "null", {
      "type" : "map",
      "values" : [ "null", "string" ]
    } ],
    "default" : null
  }, {
    "name" : "eventType",
    "type" : "string"
  } ],
  "connect.version" : 1,
  "connect.name" : "LifeCycle"
}

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

Table 1. Lifecycle events schema descriptions
Field Name Description Field Type

Applicable Events

(Non Applicable Events has null value)

groupName Specifies the group to which the device pertains to. String All Lifecycle events
deviceType Specifies the type of device. String All Lifecycle events
serialNumber Specifies the unique endpoint ID of the device. String All Lifecycle events
serverTime Specifies the server processing time (number of milliseconds since 1970). Long All Lifecycle events
make Specifies the name of the device manufacturer. String Registration Event
model Specifies the device model. String Registration Event
firmwareVersion Specifies the current firmware version of the device. String Registration Event
imsi Specifies the IMSI of the device. String Registration Event
address Specifies the address of the device. String Registration Event
protocol Specifies the protocol used for the device. String Registration Event
tags Specifies the list of device tags. String Registration Event
subscriptionId Specifies the subscription correlator generated on acknowledgement of the subscription request. String All Lifecycle events
deviceProps Specifies properties of the device. MapEntry<String,String> Registration Event
customAttributes Specifies custom attributes from device. MapEntry<String,String> All Lifecycle events
eventType Specifies the lifecycle event type (REGISTRATION, DEREGISTRATION, UPDATE,EXPIRATION). String All Lifecycle events

Example of Lifecycle events showing MQTT

{"groupName": "docmqtt", "deviceType": "device", "serialNumber": "doc01", "serverTime": 1581060680521, "make": "Nokia", "model": "Sensor", "firmwareVersion": null, "imsi": "N/A", "address": null, "protocol": "MQTT", "tags": "N/A", "subscriptionId": "e2584325-0bcc-4591-a877-7b001ad5e135", "deviceProps": {"device/0/model": "Sensor", "device/0/manufacturer": "Nokia", "device/0/battery": "85.0"}, "customAttributes": {}, "eventType": "REGISTRATION"}

{"groupName": "mqtt", "deviceType": "device", "serialNumber": "device01", "serverTime": 1581061361708, "make": "Nokia", "model": "Sensor", "firmwareVersion": null, "imsi": "N/A", "address": null, "protocol": "MQTT", "tags": "N/A", "subscriptionId": "c17375e7-16e0-45cb-a89b-44a0c338d09a", "deviceProps": {"device/0/model": "Sensor", "device/0/manufacturer": "Nokia", "device/0/battery": "10.0"}, "customAttributes": {}, "eventType": "REGISTRATION"}

{"groupName": "mqtt", "deviceType": "device", "serialNumber": "device02", "serverTime": 1581061384482, "make": "Nokia", "model": "Sensor", "firmwareVersion": null, "imsi": "N/A", "address": null, "protocol": "MQTT", "tags": "N/A", "subscriptionId": "c17375e7-16e0-45cb-a89b-44a0c338d09a", "deviceProps": {"device/0/model": "Sensor", "device/0/manufacturer": "Nokia", "device/0/battery": "10.0"}, "customAttributes": {}, "eventType": "REGISTRATION"}





Example of Lifecycle events showing LWM2M

{"groupName": "newlwm2mt", "deviceType": "device", "serialNumber": "device17", "serverTime": 1581070188686, "make": "Nokia", "model": "Lightweight M2M Client", "firmwareVersion": "2.2", "imsi": "N/A", "address": "345000123", "protocol": "LWM2M", "tags": "N/A", "subscriptionId": "85d40756-b856-4352-b169-ba3f9e2799be", "deviceProps": {"device/0/firmwareVersion": "2.2", "device/0/timezone": "Europe/Berlin", "device/0/model": "Lightweight M2M Client", "device/0/batteryLevel": "100", "device/0/manufacturer": "Nokia", "device/0/deviceType": "LWM2M_PERFTEST_CLIENT", "device/0/hardwareVersion": "1.0", "device/0/softwareVersion": "0.1", "device/0/endPointClientName": "device17", "device/0/serialNumber": "345000123", "device/0/errorCode/0": "0", "device/0/currentBindingMode/0": "UQ", "device/0/currentBindingMode/1": "UQS", "device/0/currentTime": "1581070187000"}, "customAttributes": {}, "eventType": "REGISTRATION"}
{"groupName": "newlwm2mt", "deviceType": "device", "serialNumber": "device51", "serverTime": 1581070491388, "make": "Nokia", "model": "Lightweight M2M Client", "firmwareVersion": "2.2", "imsi": "N/A", "address": "345000123", "protocol": "LWM2M", "tags": "N/A", "subscriptionId": "dd0f39f4-a0c3-4c90-84c3-9609bc4b1d23", "deviceProps": {"device/0/firmwareVersion": "2.2", "device/0/timezone": "Europe/Berlin", "device/0/model": "Lightweight M2M Client", "device/0/batteryLevel": "100", "device/0/manufacturer": "Nokia", "device/0/deviceType": "LWM2M_PERFTEST_CLIENT", "device/0/hardwareVersion": "1.0", "device/0/softwareVersion": "0.1", "device/0/endPointClientName": "device51", "device/0/serialNumber": "345000123", "device/0/errorCode/0": "0", "device/0/currentBindingMode/0": "UQ", "device/0/currentBindingMode/1": "UQS", "device/0/currentTime": "1581070490000"}, "customAttributes": {}, "eventType": "REGISTRATION"}