代码拉取完成,页面将自动刷新
name: "test-mqtt-profile"
manufacturer: "VMware huaqiaoz"
model: "MQTT-2"
labels:
- "test"
description: "Test device profile"
deviceResources:
-
name: collect
description: "collect data actively"
attributes:
{ name: "collect" }
properties:
value:
{ type: "Boolean", size: "1", readWrite: "RW", defaultValue: "false" }
units:
{ type: "String", readWrite: "RW", defaultValue: "OFF" }
-
name: randnum
description: "device random number"
attributes:
{ name: "randnum" }
properties:
value:
{ type: "Float", size: "4", readWrite: "R", defaultValue: "0.00", minimum: "100.00", maximum: "0.00" }
units:
{ type: "String", readWrite: "R", defaultValue: "" }
-
name: ping
description: "device awake"
attributes:
{ name: "ping" }
properties:
value:
{ type: "String", size: "0", readWrite: "R", defaultValue: "oops" }
units:
{ type: "String", readWrite: "R", defaultValue: "" }
-
name: message
description: "device notification message"
attributes:
{ name: "message" }
properties:
value:
{ type: "String", size: "0", readWrite: "W" ,scale: "", offset: "", base: "" }
units:
{ type: "String", readWrite: "R", defaultValue: "" }
resources:
-
name: testcollect
get:
- { index: "1", operation: "get", object: "collect", property: "value" }
set:
- { index: "1", operation: "set", object: "collect", parameter: "enableCollect", property: "value" }
-
name: testrandnum
get:
- { index: "1", operation: "get", object: "randnum", parameter: "randnum", property: "value" }
-
name: testping
get:
- { index: "1", operation: "get", object: "ping", parameter: "ping", property: "value" }
-
name: testmessage
get:
- { index: "1", operation: "get", object: "message", property: "value" }
set:
- { index: "1", operation: "set", object: "message", parameter: "message", property: "value" }
commands:
-
name: testcollect
get:
path: "/api/v1/device/{deviceId}/testcollect"
responses:
-
code: "200"
description: "get the collect status"
expectedValues: ["collect"]
-
code: "503"
description: "service unavailable"
expectedValues: []
put:
path: "/api/v1/device/{deviceId}/testcollect"
parameterNames: ["enableCollect"]
responses:
-
code: "204"
description: "set the message."
expectedValues: []
-
code: "503"
description: "service unavailable"
expectedValues: []
-
name: testrandnum
get:
path: "/api/v1/device/{deviceId}/testrandnum"
responses:
-
code: "200"
description: "get the random value"
expectedValues: ["randnum"]
-
code: "503"
description: "service unavailable"
expectedValues: []
-
name: testping
get:
path: "/api/v1/device/{deviceId}/testping"
responses:
-
code: "200"
description: "ping the device"
expectedValues: ["ping"]
-
code: "503"
description: "service unavailable"
expectedValues: []
-
name: testmessage
get:
path: "/api/v1/device/{deviceId}/testmessage"
responses:
-
code: "200"
description: "get the message"
expectedValues: ["message"]
-
code: "503"
description: "service unavailable"
expectedValues: []
put:
path: "/api/v1/device/{deviceId}/testmessage"
parameterNames: ["message"]
responses:
-
code: "204"
description: "set the message."
expectedValues: []
-
code: "503"
description: "service unavailable"
expectedValues: []
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。