Using LWM2M

LWM2M device parameters view

LWM2MDeviceInfo.png

JSON object model :

{
  "page": 0,
  "size": 20,
  "totalCount": 2,
  "data": [
    {
      "ep": "urn:lo:nsid:lwm2m:device1:2caf4e244430430e",
      "securityMode": "PSK",
      "pubKeyOrIdentity": "a1ebc03a72cf0671",
      "device": "urn:lo:nsid:lwm2m:device1",
      "creationTs": 1544019251440,
      "updateTs": 1544019251440
    },
    {
      "ep": "urn:lo:nsid:lwm2m:device2",
      "securityMode": "PSK",
      "pubKeyOrIdentity": "32202c4215c03f76",
      "device": "urn:lo:nsid:lwm2m:device2",
      "creationTs": 1544020350136,
      "updateTs": 1544020350136
    }
  ]
}

LWM2M Notify messages are converted to Live Objects JSON data message. The screenshot below shows

a data message from an observe action on an LWM2M resource named "/3" (which is the standardised Device definition):

LWM2M data message model

LWM2MIm6.png

Or as text:

    {
        "metadata": {
        "source": "urn:lwm2m:device4",
        "connector": "coap",
        "network": {
        "lwm2m": {
        "ep": "urn:lwm2m:device4"
            }
        }
    },
    "streamId": "urn:lwm2m:device4!uplink",
    "created": "2017-08-24T13:29:54.087Z",
    "location": null,
    "model": "urn:oma:lwm2m:oma:3",
    "id": "599ed4d2a1a7e86004e2a4b8",
    "value": {
        "Device": {
        "0": {
        "17": "RGVtbw==",
        "18": "MS4wLjE=",
        "19": "MS4wLjI=",
        "20": "Ag==",
        "21": "AAHsAA==",
        "Battery Level": 50,
        "Timezone": "Europe/Paris",
        "Firmware Version": "1.0.0",
        "Memory Free": 93674,
        "Current Time": "2017-08-24T13:29:51.000+0000",
        "UTC Offset": "+02",
        "Model Number": "Model 500",
        "Serial Number": "LT-500-000-0001",
        "Error Code": {
            "0": 0
            },
            "Manufacturer": "Leshan Demo Device",
            "Supported Binding and Modes": "U"
            }
        }
    },
        "timestamp": "2017-08-24T13:29:53.766Z",
        "tags": []
    }

Where:

  • the streamId and the model are generated from the observed resource