Profile Field Description
Device Capabilities
The devicetype-capability.json file records basic information about a device.
{ "devices": [ { "manufacturerId": "TestUtf8ManuId", "manufacturerName": "HZYB", "model": "NBIoTDevice", "protocolType": "CoAP", "deviceType": "WaterMeter", "omCapability":{ "upgradeCapability" : { "supportUpgrade":true, "upgradeProtocolType":"PCP" }, "fwUpgradeCapability" : { "supportUpgrade":true, "upgradeProtocolType":"LWM2M" }, "configCapability" : { "supportConfig":true, "configMethod":"file", "defaultConfigFile": { "waterMeterInfo" : { "waterMeterPirTime" : "300" } } } }, "serviceTypeCapabilities": [ { "serviceId": "WaterMeterBasic", "serviceType": "WaterMeterBasic", "option": "Mandatory" }, { "serviceId": "WaterMeterAlarm", "serviceType": "WaterMeterAlarm", "option": "Mandatory" }, { "serviceId": "Battery", "serviceType": "Battery", "option": "Optional" }, { "serviceId": "DeliverySchedule", "serviceType": "DeliverySchedule", "option": "Mandatory" }, { "serviceId": "Connectivity", "serviceType": "Connectivity", "option": "Mandatory" } ] } ] }
The fields are described as follows:
Field |
Sub-field |
Mandatory or Optional |
Description |
|
---|---|---|---|---|
devices |
Mandatory |
Contains complete capability information about a device. (The root node cannot be modified.) |
||
manufacturerId |
Mandatory |
Identifies the manufacturer of the device. |
||
manufacturerName |
Mandatory |
Specifies the manufacturer name of the device. (The value must be in English.) |
||
model |
Mandatory |
Specifies the device model. As a type of device may have multiple models, it is recommended that the value contain letters or digits to ensure scalability. |
||
protocolType |
Mandatory |
Specifies the protocol used by the device to connect to the IoT platform. For example, the value is CoAP for NB-IoT devices. |
||
deviceType |
Mandatory |
Specifies the device type. |
||
omCapability |
Optional |
Defines the software upgrade, firmware upgrade, and configuration update capabilities of the device. For details, see the description of the omCapability structure in the following. If software or firmware upgrades of the device are not involved, this field can be deleted. |
||
serviceTypeCapabilities |
Mandatory |
Describes service capabilities of the device. |
||
serviceId |
Mandatory |
Identifies a service. If a service type includes only one service, the value of serviceId is the same as that of serviceType. If the service type includes multiple services, the services are numbered correspondingly, such as Switch01, Switch02, and Switch03. |
||
serviceType |
Mandatory |
Specifies the service type. The value of this field must be the same as that of serviceType in the servicetype-capability.json file. |
||
option |
Mandatory |
Specifies the service type. The value can be Master, Mandatory, or Optional. This field is not a functional field but a descriptive one. |
Description of the omCapability structure
Field |
Sub-field |
Mandatory or Optional |
Description |
---|---|---|---|
upgradeCapability |
Optional |
Specifies software upgrade capabilities of a device. |
|
supportUpgrade |
Optional |
true: The device supports software upgrades. false: The device does not support software upgrades. |
|
upgradeProtocolType |
Optional |
Specifies the protocol type used by the device for upgrades. It is different from protocolType of the device. For example, the software upgrade protocol of CoAP devices is PCP. |
|
fwUpgradeCapability |
Optional |
Specifies firmware upgrade capabilities of the device. |
|
supportUpgrade |
Optional |
true: The device supports firmware upgrades. false: The device does not support firmware upgrades. |
|
upgradeProtocolType |
Optional |
Specifies the protocol type used by the device for upgrades. It is different from protocolType of the device. Currently, the IoT platform supports only firmware upgrade of LWM2M devices. |
|
configCapability |
Optional |
Specifies configuration update capabilities of the device. |
|
supportConfig |
Optional |
true: The device supports configuration updates. false: The device does not support configuration updates. |
|
configMethod |
Optional |
file: Configuration updates are delivered in the form of files. |
|
defaultConfigFile |
Optional |
Specifies the default device configuration information (in JSON format). The specific configuration information is defined by the manufacturers. The IoT platform only stores the information for delivery and does not parse the meaning of the configuration fields. |
Service Capabilities
The servicetype-capability.json file records service information about a device.
{ "services": [ { "serviceType": "WaterMeterBasic", "description": "WaterMeterBasic", "commands": [ { "commandName": "SET_PRESSURE_READ_PERIOD", "paras": [ { "paraName": "value", "dataType": "int", "required": true, "min": 1, "max": 24, "step": 1, "maxLength": 10, "unit": "hour", "enumList": null } ], "responses": [ { "responseName": "SET_PRESSURE_READ_PERIOD_RSP", "paras": [ { "paraName": "result", "dataType": "int", "required": true, "min": -1000000, "max": 1000000, "step": 1, "maxLength": 10, "unit": null, "enumList": null } ] } ] } ], "properties": [ { "propertyName": "registerFlow", "dataType": "int", "required": true, "min": 0, "max": 0, "step": 1, "maxLength": 0, "method": "R", "unit": null, "enumList": null }, { "propertyName": "currentReading", "dataType": "string", "required": false, "min": 0, "max": 0, "step": 1, "maxLength": 0, "method": "M", "unit": "L", "enumList": null }, { "propertyName": "timeOfReading", "dataType": "string", "required": false, "min": 0, "max": 0, "step": 1, "maxLength": 0, "method": "M", "unit": null, "enumList": null }, { "propertyName": "internalTemperature", "dataType": "int", "required": false, "min": 0, "max": 0, "step": 1, "maxLength": 0, "method": "M", "unit": "0.01°C", "enumList": null }, { "propertyName": "dailyFlow", "dataType": "int", "required": false, "min": 0, "max": 0, "step": 1, "maxLength": 0, "method": "M", "unit": "L", "enumList": null }, { "propertyName": "dailyReverseFlow", "dataType": "int", "required": false, "min": 0, "max": 0, "step": 1, "maxLength": 0, "method": "M", "unit": "L", "enumList": null }, { "propertyName": "peakFlowRate", "dataType": "int", "required": false, "min": 0, "max": 0, "step": 1, "maxLength": 0, "method": "M", "unit": "L/H", "enumList": null }, { "propertyName": "peakFlowRateTime", "dataType": "string", "required": false, "min": 0, "max": 0, "step": 1, "maxLength": 0, "method": "M", "unit": null, "enumList": null }, { "propertyName": "intervalFlow", "dataType": "array", "required": false, "min": 0, "max": 0, "step": 1, "maxLength": 0, "method": "M", "unit": "L", "enumList": null }, { "propertyName": "pressure", "dataType": "array", "required": false, "min": 0, "max": 0, "step": 1, "maxLength": 0, "method": "O", "unit": "kPa", "enumList": null }, { "propertyName": "temperature", "dataType": "array", "required": false, "min": 0, "max": 0, "step": 1, "maxLength": 0, "method": "M", "unit": "0.01°C", "enumList": null }, { "propertyName": "vibration", "dataType": "array", "required": false, "min": 0, "max": 0, "step": 1, "maxLength": 0, "method": "M", "unit": "0.01g", "enumList": null } ] } ] }
The fields are described as follows:
Field |
Sub-field |
Mandatory or Optional |
Description |
|||
---|---|---|---|---|---|---|
services |
Mandatory |
Contains complete information about a service. (The root node cannot be modified.) |
||||
serviceType |
Mandatory |
Specifies the service type. The value of this field must be the same as that of serviceType in the devicetype-capability.json file. |
||||
description |
Mandatory |
Provides description about the service. This field is not a functional field but a descriptive one. It can be set to null. |
||||
commands |
Mandatory |
Specifies a parameter that a device can run. If the service has no commands, set the value to null. |
||||
commandName |
Mandatory |
Specifies the name of a command. The command name and parameters together form a complete command. |
||||
paras |
Mandatory |
Specifies parameters contained in a command. |
||||
paraName |
Mandatory |
Specifies the name of a parameter in the command. |
||||
dataType |
Mandatory |
Specifies the data type of a command parameter. Value: string, int, string list, decimal, DateTime, or jsonObject Complex types of reported data are as follows:
|
||||
required |
Mandatory |
Specifies whether the command is mandatory. The value can be true or false. The default value is false (optional). This field is not a functional field but a descriptive one. |
||||
min |
Mandatory |
Specifies the minimum value. This parameter is valid only when dataType is set to int or decimal. |
||||
max |
Mandatory |
Specifies the maximum value. This parameter is valid only when dataType is set to int or decimal. |
||||
step |
Mandatory |
Specifies the step. This field is not used. Set it to 0. |
||||
maxLength |
Mandatory |
Specifies the character string length. This field is valid only when dataType is string, string list, or DateTime. |
||||
unit |
Mandatory |
Specifies the unit. The value is determined by the parameter, for example: Temperature unit: C or K Percentage unit: % Pressure unit: Pa or kPa |
||||
enumList |
Mandatory |
Specifies a list of enumerated values. For example, the status of a switch can be set as follows: "enumList": ["OPEN","CLOSE"] This field is not a functional field but a descriptive one. It is recommended that this field be defined accurately. |
||||
responses |
Mandatory |
Specifies responses to command execution. |
||||
responseName |
Mandatory |
You can add _RSP to the end of commandName in the command corresponding to responses. |
||||
paras |
Mandatory |
Specifies parameters contained in a response. |
||||
paraName |
Mandatory |
Specifies the name of a parameter in the command. |
||||
dataType |
Mandatory |
Specifies the data type. Value: string, int, string list, decimal, DateTime, or jsonObject Complex types of reported data are as follows:
|
||||
required |
Mandatory |
Specifies whether the command response is mandatory. The value can be true or false. The default value is false (optional). This field is not a functional field but a descriptive one. |
||||
min |
Mandatory |
Specifies the minimum value. This field is valid only when dataType is int or decimal. The value of a field of the int or decimal type must be greater than or equal to the value of min. |
||||
max |
Mandatory |
Specifies the maximum value. This field is valid only when dataType is int or decimal. The value of a field of the int or decimal type must be less than or equal to the value of max. |
||||
step |
Mandatory |
Specifies the step. This field is not used. Set it to 0. |
||||
maxLength |
Mandatory |
Specifies the character string length. This field is valid only when dataType is string, string list, or DateTime. |
||||
unit |
Mandatory |
Specifies the unit. The value is determined by the parameter, for example: Temperature unit: C or K Percentage unit: % Pressure unit: Pa or kPa |
||||
enumList |
Mandatory |
Specifies a list of enumerated values. For example, the status of a switch can be set as follows: "enumList": ["OPEN","CLOSE"] This field is not a functional field but a descriptive one. It is recommended that this field be defined accurately. |
||||
properties |
Mandatory |
Describes reported data. Each sub-node indicates an attribute. |
||||
propertyName |
Mandatory |
Specifies the attribute name. |
||||
dataType |
Mandatory |
Specifies the data type. Value: string, int, string list, decimal, DateTime, or jsonObject Complex types of reported data are as follows:
|
||||
required |
Mandatory |
Specifies whether an attribute is mandatory. The value can be true or false. The default value is false, which indicates that the attribute is optional. This field is not a functional field but a descriptive one. |
||||
min |
Mandatory |
Specifies the minimum value. This field is valid only when dataType is int or decimal. The value of a field of the int or decimal type must be greater than or equal to the value of min. |
||||
max |
Mandatory |
Specifies the maximum value. This field is valid only when dataType is int or decimal. The value of a field of the int or decimal type must be less than or equal to the value of max. |
||||
step |
Mandatory |
Specifies the step. This field is not used. Set it to 0. |
||||
method |
Mandatory |
Specifies the access mode.
Value: R, RW, RE, RWE, or null |
||||
unit |
Mandatory |
Specifies the unit. The value is determined by the parameter, for example: Temperature unit: C or K Percentage unit: % Pressure unit: Pa or kPa |
||||
maxLength |
Mandatory |
Specifies the character string length. This field is valid only when dataType is string, string list, or DateTime. |
||||
enumList |
Mandatory |
Specifies a list of enumerated values. For example, batteryStatus can be set as follows: "enumList" : [0, 1, 2, 3, 4, 5, 6] This field is not a functional field but a descriptive one. It is recommended that this field be defined accurately. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot