Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Fields in the Profile Sample

Updated on 2022-02-24 GMT+08:00

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

Complete capability information about a device. (The root node cannot be modified.)

  

manufacturerId

  

Mandatory

Manufacturer ID of the device.

  

manufacturerName

  

Mandatory

Manufacturer name of the device. (The value must be in English.)

  

model

  

Mandatory

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

Protocol used by the device to connect to the IoT platform. For example, the value is CoAP for NB-IoT devices.

  

deviceType

  

Mandatory

Type of the device.

  

omCapability

  

Optional

Software upgrade, firmware upgrade, and configuration update capabilities of the device. For details, see the description of the omCapability structure below.

If software or firmware upgrade is not involved, this field can be deleted.

  

serviceTypeCapabilities

  

Mandatory

Service capabilities of the device.

     

serviceId

Mandatory

Service ID. 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

Type of the service. The value of this field must be the same as that of serviceType in the servicetype-capability.json file.

     

option

Mandatory

Type of the service field. 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

Software upgrade capabilities of the device.

  

supportUpgrade

Optional

true: The device supports software upgrades.

false: The device does not support software upgrades.

  

upgradeProtocolType

Optional

Protocol type used by the device for software upgrades. It is different from protocolType of the device. For example, the software upgrade protocol of CoAP devices is PCP.

fwUpgradeCapability

  

Optional

Firmware upgrade capabilities of the device.

  

supportUpgrade

Optional

true: The device supports firmware upgrades.

false: The device does not support firmware upgrades.

  

upgradeProtocolType

Optional

Protocol type used by the device for firmware upgrades. It is different from protocolType of the device. Currently, the IoT platform supports only firmware upgrades of LWM2M devices.

configCapability

  

Optional

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

Default device configuration information (in JSON format). The specific configuration information is defined by the manufacturer. The IoT platform stores the information for delivery but does not parse 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": "W",
                    "unit": "L",
                    "enumList": null
                },
                {
                    "propertyName": "timeOfReading",
                    "dataType": "string",
                    "required": false,
                    "min": 0,
                    "max": 0,
                    "step": 1,
                    "maxLength": 0,
                    "method": "W",
                    "unit": null,
                    "enumList": null
                },
                {
                    "propertyName": "internalTemperature",
                    "dataType": "int",
                    "required": false,
                    "min": 0,
                    "max": 0,
                    "step": 1,
                    "maxLength": 0,
                    "method": "W",
                    "unit": "0.01°C",
                    "enumList": null
                },
                {
                    "propertyName": "dailyFlow",
                    "dataType": "int",
                    "required": false,
                    "min": 0,
                    "max": 0,
                    "step": 1,
                    "maxLength": 0,
                    "method": "W",
                    "unit": "L",
                    "enumList": null
                },
                {
                    "propertyName": "dailyReverseFlow",
                    "dataType": "int",
                    "required": false,
                    "min": 0,
                    "max": 0,
                    "step": 1,
                    "maxLength": 0,
                    "method": "W",
                    "unit": "L",
                    "enumList": null
                },
                {
                    "propertyName": "peakFlowRate",
                    "dataType": "int",
                    "required": false,
                    "min": 0,
                    "max": 0,
                    "step": 1,
                    "maxLength": 0,
                    "method": "W",
                    "unit": "L/H",
                    "enumList": null
                },
                {
                    "propertyName": "peakFlowRateTime",
                    "dataType": "string",
                    "required": false,
                    "min": 0,
                    "max": 0,
                    "step": 1,
                    "maxLength": 0,
                    "method": "W",
                    "unit": null,
                    "enumList": null
                },
                {
                    "propertyName": "intervalFlow",
                    "dataType": "array",
                    "required": false,
                    "min": 0,
                    "max": 0,
                    "step": 1,
                    "maxLength": 0,
                    "method": "W",
                    "unit": "L",
                    "enumList": null
                },
                {
                    "propertyName": "pressure",
                    "dataType": "array",
                    "required": false,
                    "min": 0,
                    "max": 0,
                    "step": 1,
                    "maxLength": 0,
                    "method": "W",
                    "unit": "kPa",
                    "enumList": null
                },
                {
                    "propertyName": "temperature",
                    "dataType": "array",
                    "required": false,
                    "min": 0,
                    "max": 0,
                    "step": 1,
                    "maxLength": 0,
                    "method": "W",
                    "unit": "0.01°C",
                    "enumList": null
                },
                {
                    "propertyName": "vibration",
                    "dataType": "array",
                    "required": false,
                    "min": 0,
                    "max": 0,
                    "step": 1,
                    "maxLength": 0,
                    "method": "W",
                    "unit": "0.01g",
                    "enumList": null
                }
            ]
        }
    ]
}

The fields are described as follows:

Field

Sub-field

Mandatory or Optional

Description

services

           

Mandatory

Complete information about a service. (The root node cannot be modified.)

  

serviceType

        

Mandatory

Type of the service. The value of this field must be the same as that of serviceType in the devicetype-capability.json file.

  

description

        

Mandatory

Description of the service.

This field is not a functional field but a descriptive one. It can be set to null.

  

commands

        

Mandatory

Command supported by the device. If the service has no commands, set the value to null.

     

commandName

     

Mandatory

Name of the command. The command name and parameters together form a complete command.

     

paras

     

Mandatory

Parameters contained in the command.

        

paraName

  

Mandatory

Name of a parameter in the command.

        

dataType

  

Mandatory

Data type of the parameter in the command.

Value: string, int, string list, decimal, DateTime, or jsonObject

Complex types of reported data are as follows:

  • string list: ["str1","str2","str3"]
  • DateTime: The value is in the format of yyyyMMdd'T'HHmmss'Z', for example, 20151212T121212Z.
  • jsonObject: The value is in customized JSON format, which is not parsed by the IoT platform but is transparently transmitted only.
        

required

  

Mandatory

Whether the command is mandatory. The value can be true or false. The default value is false, indicating that the command is optional.

This field is not a functional field but a descriptive one.

        

min

  

Mandatory

Minimum value.

This field is valid only when dataType is set to int or decimal.

        

max

  

Mandatory

Maximum value.

This field is valid only when dataType is set to int or decimal.

        

step

  

Mandatory

Step.

This field is not used. Set it to 0.

        

maxLength

  

Mandatory

Character string length.

This field is valid only when dataType is set to string, string list, or DateTime.

        

unit

  

Mandatory

Unit.

The value is determined by the parameter, for example:

Temperature unit: C or K

Percentage unit: %

Pressure unit: Pa or kPa

        

enumList

  

Mandatory

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

Responses to command execution.

        

responseName

  

Mandatory

You can add _RSP to the end of commandName in the command corresponding to responses.

        

paras

  

Mandatory

Parameters contained in a response.

           

paraName

Mandatory

Name of a parameter in the command.

           

dataType

Mandatory

Data type.

Value: string, int, string list, decimal, DateTime, or jsonObject

Complex types of reported data are as follows:

  • string list: ["str1","str2","str3"]
  • DateTime: The value is in the format of yyyyMMdd'T'HHmmss'Z', for example, 20151212T121212Z.
  • jsonObject: The value is in customized JSON format, which is not parsed by the IoT platform but is transparently transmitted only.
           

required

Mandatory

Whether the command response is mandatory. The value can be true or false. The default value is false, indicating that the command response is optional.

This field is not a functional field but a descriptive one.

           

min

Mandatory

Minimum value.

This field is valid only when dataType is set to 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

Maximum value.

This field is valid only when dataType is set to 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

Step.

This field is not used. Set it to 0.

           

maxLength

Mandatory

Character string length.

This field is valid only when dataType is set to string, string list, or DateTime.

           

unit

Mandatory

Unit.

The value is determined by the parameter, for example:

Temperature unit: C or K

Percentage unit: %

Pressure unit: Pa or kPa

           

enumList

Mandatory

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

Reported data. Each sub-node indicates a property.

     

propertyName

     

Mandatory

Name of the property.

     

dataType

     

Mandatory

Data type.

Value: string, int, string list, decimal, DateTime, or jsonObject

Complex types of reported data are as follows:

  • string list: ["str1","str2","str3"]
  • DateTime: The value is in the format of yyyyMMdd'T'HHmmss'Z', for example, 20151212T121212Z.
  • jsonObject: The value is in customized JSON format, which is not parsed by the IoT platform but is transparently transmitted only.
     

required

     

Mandatory

Whether the property is mandatory. The value can be true or false. The default value is false, indicating that the property is optional.

This field is not a functional field but a descriptive one.

     

min

     

Mandatory

Minimum value.

This field is valid only when dataType is set to 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

Maximum value.

This field is valid only when dataType is set to 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

Step.

This field is not used. Set it to 0.

     

method

     

Mandatory

Access mode.

  • R: readable
  • W: writable
  • E: subscription

Value: R, RW, RE, RWE, or null

     

unit

     

Mandatory

Unit.

The value is determined by the parameter, for example:

Temperature unit: C or K

Percentage unit: %

Pressure unit: Pa or kPa

     

maxLength

     

Mandatory

Character string length.

This field is valid only when dataType is set to string, string list, or DateTime.

     

enumList

     

Mandatory

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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback