lwm2m.device.create

The lwm2m.device.create command is used to create a LWM2M device. You must create a Thing and pass the thingId to create a LWM2M device. For more information on creating a Thing for LWM2M, see thing.create.

TR50 Request

{
  "1": {
    "command": "lwm2m.device.create",
    "params": {
      "endpoint": "lwm2m_client_001",
      "thingId": "5a62469e5758cd6b6eb7c03a",
      "connection": "server",
      "identity": "device_identity_001",
      "psk": "3B73DF398CCF940835CB0F6F0B0D32B3",
      "bsIdentity": "device_identity_001",
      "bsPsk": "3B73DF398CCF940835CB0F6F0B0D32B3",
      "profileId": "5a32fa31b5143809c8d938a1"
    }
  }
} 

Request Parameters

Name Type Required Description
endpoint String Yes The endpoint of the new device.
thingId ObjectId Yes The thingId of the new device.
connection String The connection of the new device.
identity String The identity of the new device.
psk String The pre-shared key of the new device.
bsIdentity String The bootstrap identity of the new device.
bsPsk String The bootstrap pre-shared key of the new device.
profileId ObjectId The profileId of the new device.


If the command is sent successfully a success message and the id of the new device is returned. Otherwise, an error and error message will be returned.

{
  "1": {
    "success": true,
    "params": {
      "id": "58acabdb5565be63148b4567"
    }
  }
}

Response Parameters

Name Type Description
id String The ID of the new device.