Device to Cloud Command Line Interface Client Domain Model

Overview


In this chapter you will learn about the client sided Device to Cloud (D2C) domain model and why it is introduced by the command line tool d2c.
has been implemented on the basis of Device Management Orchestrator (DMO) and its API. Out of this reason the model entities Device, Device Group and Application are composed by the oneM2M model as shown in the following diagram.

Device to Cloud oneM2M class model

As you can see the oneM2M model is not intuitive and simple. We think it should be simplified to make life easy when you have to deal with it on the command line in your daily work. Out of this reason d2c introduces a client sided domain model and a related sets of d2c sub commands by which the handling of Devices, Device Groups and Applications is much easier.
In the following the domain model of those three entities are described. To learn about the corresponding d2c commands please refer to

Device Domain Model


  • JSON Sample
  • Description
{
    "id": "67e67fefe9b543a53b197f74",
    "name": "358878080180968",
    "creationTime": "2025-03-28T10:54:39",
    "lastModificationTime": "2025-05-21T10:36:56",
    "iccid": "282828282828",
    "deviceType": "Demo",
    "deviceName": "",
    "location": "geo:-49.0,109.0",
    "label": "",
    "description": null,
    "firmwareVersion": "1.0.0",
    "softwareVersion": "1.0.2",
    "osVersion": "",
    "hardwareVersion": "1.0.1",
    "protocols": [
        "LWM2M"
    ],
    "manufacturer": "Leshan Demo Device",
    "model": "Model 500",
    "subModel": "",
    "country": "",
    "uplinkProperties": {
        "Address": "Landgrabenweg 149, 53227 Bonn"
    },
    "deviceProperties": {
        "decoding-selector": "IM Building"
    },
    "credentialsId": "358878080180968",
    "credentialsSecret": "***",
    "labels": {
        "profile": "SCS-LwM2M",
        "ICCID": "282828282828",
        "d2c": "1.0",
        "UplinkProperty_Address": "Landgrabenweg 149, 53227 Bonn"
    }
}
AttributeDescriptionType
idUnique id of the oneM2M node object which composes the device.string
creationTimeISO timestamp when the oneM2m node object has been created.ISO timestamp
lastModificationTimeISO timestamp when the oneM2m node object has been modified the last time.ISO timestamp
nameUniqueu name of the oneM2M node object. The name attribute is used as uniqueu serial number or IMEI of the device and is assinged during device creation.string
manufacturerManufacturer of the device. Can be defined only during device creation.string
modelModel of the device. Can be defined only during device creation.string
subModelSub model of the device. Can be defined only during device creation.string
firmwareVersionFirmware version of the device.string
softwareVersionSoftware version of the device.string
osVersionOperating system version of the device.string
hardwareVersionHardware version of the device.string
countryCountry code of the device.string
deviceTypeAn optional type descriptor for the device.string
deviceNameAn optional additional name for the device.string
descriptionAn optional additional description for the device.string
labelAn optional additional label for the device.string
protocolsList of protocols which are supported by the device.Array of strings
locationThe geo location of the device.geo location according to RFC 5870 https://en.wikipedia.org/wiki/Geo_URI_scheme
uplinkPropertiesKey/value pairs which are passed along with each uplink message to the subscribbing application.key/value pairs
devicePropertiesAddtional Key/value pairs of your joice.key/value pairs
iccidIn case the device uses cellular connectivity the ICCID of the SIM card string
credentialsIdId of device authentication token such as PSKstring
credentialsSecretSecret of device authentication token such as PSKstring
labelsInternal labels of the corresponding onem2m node object. Various elements such as device or uplink properties are stored in the internal labels. Never modify the labels directyl without a deep understanding of applcation.list of strings

Application Domain Model


  • JSON Sample
  • Description
{
    "id": "6835719d611aed7aa2d99f36",
    "name": "My-Message-Monitor",
    "description": "Prints messages to stdout",
    "type": "webHook",
    "creationTime": "2025-05-27T08:02:37",
    "lastModificationTime": "2025-05-27T08:02:38",
    "urls": [
        "https://api.scs.iot.telekom.com/message-monitor"
    ],
    "connectionProperties":{
        "Authorization": "cm9sYW5kLmJhbGRpbkB0ZWxla",
        "loglevel": "debug"
    },
    "labels": {
        "applicationType": "WebHook",
        "d2c": 1.0
    },    
}
AttributeDescriptionType
idUnique id of the corresponding oneM2M application entity.string
creationTimeISO timestamp when the oneM2m application entity has been created.ISO timestamp
lastModificationTimeISO timestamp when the oneM2m application entity has been modified the last time.ISO timestamp
nameUniqueu name of the correspondiing oneM2M application entity.string
descriptionDescription of the applicationstring
typeType of the application. Currently only webHook is supported.string
urlsList of URLs to which the uplink messages of the devices shall be forwarded to.List of URLs
connectionPropertiesAny number of key/value properties to configure the connection. In case of webHook this are the header fields.key/value pairs
labelsInternal labels of the corresponding onem2m application object. Never modify the labels directyl without a deep understanding of applcation.list of strings

Device Group Domain Model


  • JSON Sample
  • Description
{
    "id": "68357993e027596a4cbeb7d9",
    "name": "My-Message-Monitor Device Group",
    "description": "This is a description",
    "creationTime": "2025-05-27T08:36:35",
    "lastModificationTime": "2025-05-27T08:36:41",
    "devices": [
        "358878080180968", 
        "995532951141026"
    ],
    "devicesCount": 2,
    "applications": [
        "My-Message-Monitor"
    ],
    "applicationsCount": 1,
    "labels": {
        "d2c": "1.0",
    }
}
AttributeDescriptionType
idUnique id of the corresponding oneM2M object.string
creationTimeISO timestamp when the oneM2m object has been created.ISO timestamp
lastModificationTimeISO timestamp when the oneM2m object has been modified the last time.ISO timestamp
nameUniqueu name of the corresponding oneM2M object.string
descriptionDescription of the device groupstring
devicesList of device names which belong to the device group.List of string
devicesCountNumber of devices in the device group.integer
applicationsList of application names to which every uplink message of every device in the group shall be forwarded to. By having multiple applications in the group you can implement uplink message replication.List of string
applicationsCountNumber of applications in the device group.integer
labelsInternal labels of the corresponding onem2m device group object. Never modify the labels directyl without a deep understanding of applcation.list of strings