هذه الصفحة غير متوفرة حاليًا بلغتك المحلية. نحن نعمل جاهدين على إضافة المزيد من اللغات. شاكرين تفهمك ودعمك المستمر لنا.

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
On this page

Development Guide

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

Overview

A product model (or profile file) describes the capabilities and features of a device. You can construct an abstract model of a device type by defining a profile file on the IoT platform, allowing it to understand the services, properties, and commands supported by the device.

  • Device Capability

    For a water meter, the device capabilities include the type, manufacturer, model, protocol, and services to be provided.

    For example, for a water meter, the manufacturer is HZYB, the manufacturer ID is TestUtf8ManuId, the model is NBIoTDevice, and the protocol is CoAP.

    The water meter provides the following services: WaterMeterBasic, WaterMeterAlarm, Battery, DeliverySchedule, and Connectivity. The Battery service is optional and the other services are mandatory.

  • Service

    Service defines service capabilities of a device. Each service contains properties, commands, and parameters.

    For example, the preceding five services of the water meter contain corresponding properties or commands.

Procedure

If you have used a default template when creating a project and product, the corresponding profile file template is selected automatically. You can directly use or modify the template. If a customized product is created, you must define your profile file.

  1. On the Product Development page, click a product to enter its development space.

  2. In the development space, click Profile Definition and click Add Service.

  3. In the Add Service area, define the service name, properties, and commands. A service can contain properties and/or commands. Configure the properties and commands based on your requirements.

    1. Enter Service Name using the camelcase naming method, such as waterMeter or battery.

    2. Click Add under Property List, set the parameters in the dialog box displayed, and click OK. For Name, the first letter of the first word must be lowercase, and the first letters of subsequent words must be capitalized, for example, batteryLevel or internalTemperature. For other parameters, set them based on your requirements.

      The rules for configuring Data Type are as follows:

      • int: Select this value if the reported data is an integer or Boolean values.
      • decimal: Select this value if the reported data is a decimal.
      • string: Select this value if the reported data is a string, enumerated values, or Boolean values. If enumerated or Boolean values are reported, use commas (,) to separate the values.
      • DateTime: Select this value if the reported data is a date.
      • jsonObject: Select this value if the reported data is in JSON structure.

    3. Click Add under Command List. In the dialog box displayed, set Command Name and click OK. It is recommended that the value of Command Name consist of only uppercase letters and underscores (_), for example, DISCOVERY or CHANGE_STATUS.

    4. Click Add under Command Fields. In the dialog box displayed, set the parameters and click OK. For Name of the command field, the first letter of the first word must be lowercase, and the first letters of the subsequent words must be capitalized, for example, statusValue. For other parameters, set them based on your requirements.

    5. Click Add under Command Response Fields. In the dialog box displayed, set the parameters and click OK. For Name of the command response field, the first letter of the first word must be lowercase, and the first letters of the subsequent words must be capitalized, for example, commandResult. For other parameters, set them based on your requirements.

      The command response field is optional. It must be defined only if the device is required to return a command execution result.

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