-
Notifications
You must be signed in to change notification settings - Fork 1
/
MQTTTestDeviceProfile.yml
107 lines (105 loc) · 2.95 KB
/
MQTTTestDeviceProfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Copyright 2017 Dell Inc. All rights reserved.
name: "Test.Device.MQTT.Profile"
manufacturer: "Dell"
model: "MQTT-2"
labels:
- "test"
description: "Test device profile"
deviceResources:
-
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" }
units:
{ type: "String", readWrite: "R", defaultValue: "" }
resources:
-
name: randnum
get:
- { index: "1", operation: "get", object: "randnum", property: "value", parameter: "randnum" }
-
name: ping
get:
- { index: "1", operation: "get", object: "ping", property: "value", parameter: "ping" }
-
name: query
get:
- { index: "1", operation: "get", resource: "randnum" }
commands:
-
name: testrandnum
get:
path: "/api/v1/device/{deviceId}/randnum"
responses:
-
code: "200"
description: ""
expectedValues: ["randnum"]
-
code: "503"
description: "service unavailable"
expectedValues: []
-
name: testping
get:
path: "/api/v1/device/{deviceId}/ping"
responses:
-
code: "200"
description: "ping the device"
expectedValues: ["ping"]
-
code: "503"
description: "service unavailable"
expectedValues: []
-
name: testmessage
put:
path: "/api/v1/device/{deviceId}/message"
parameterNames: ["message"]
responses:
-
code: "204"
description: "Set the message."
expectedValues: []
-
code: "503"
description: "service unavailable"
expectedValues: []
-
name: testquery
get:
path: "/api/v1/device/{deviceId}/query"
responses:
-
code: "200"
description: ""
expectedValues: ["randnum"]
-
code: "503"
description: "service unavailable"
expectedValues: []