-
Notifications
You must be signed in to change notification settings - Fork 23
/
device-schema.json
143 lines (143 loc) · 5.51 KB
/
device-schema.json
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://smart-data-models.github.io/dataModel.Device/device-schema.json",
"$schemaVersion": "0.0.7",
"title": " Smart data Models - Device Commons schema",
"description": "Common definitions to describe Device and Device Model schemas",
"definitions": {
"MacAddressType": {
"type": "string",
"pattern": "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$",
"description": "Property. Model:'https://schema.org/Text'. The MAC address of the device"
},
"CategoryType": {
"type": "array",
"description": "Property. Model:'https://schema.org/Text'. Sensor: A device that detects and responds to events or changes in the physical environment such as light, motion, or temperature changes. https://w3id.org/saref#Sensor. actuator : A device responsible for moving or controlling a mechanism or system. https://w3id.org/saref#Actuator. Meter : A device built to accurately detect and display a quantity in a form readable by a human being. Partially defined by SAREF. HVAC : Heating, Ventilation and Air Conditioning (HVAC) device that provides indoor environmental comfort. https://w3id.org/saref#HVAC. Network : A device used to connect other devices in a network, such as hub, switch or router in a LAN or Sensor network. (https://w3id.org/saref#Network. Multimedia : A device designed to display, store, record or play multimedia content such as audio, images, animation, video. Enum:'actuator, beacon, endgun, HVAC, implement, irrSection, irrSystem, meter, multimedia, network, sensor'. Raw category will be deprecated use deviceCategory instead to avoid conflict with other aqttributes named category",
"items": {
"type": "string",
"description": "Property. Every type of device that can be included in the array",
"enum": [
"actuator",
"beacon",
"endgun",
"HVAC",
"implement",
"irrSection",
"irrSystem",
"meter",
"multimedia",
"network",
"sensor"
]
}
},
"ControlledPropertyType": {
"type": "array",
"description": "Property. Model:'https://schema.org/Text'. Anything that can be sensed, measured or controlled by. Enum:'airPollution, atmosphericPressure, averageVelocity, batteryLife, batterySupply, cdom, conductance, conductivity, depth, eatingActivity, electricityConsumption, energy, fillingLevel, freeChlorine, gasConsumption, gateOpening, heading, humidity, light, location, milking, motion, movementActivity, noiseLevel, occupancy, orp, pH, power, precipitation, pressure, refractiveIndex, salinity, smoke, soilMoisture, solarRadiation, speed, tds, temperature, trafficFlow, tss, turbidity, waterConsumption, waterFlow, waterLevel, waterPollution, weatherConditions, weight, windDirection, windSpeed'",
"items": {
"type": "string",
"description": "Property. Every possible property controlled by the device",
"enum": [
"airPollution",
"atmosphericPressure",
"averageVelocity",
"batteryLife",
"batterySupply",
"cdom",
"conductance",
"conductivity",
"depth",
"eatingActivity",
"electricityConsumption",
"energy",
"fillingLevel",
"freeChlorine",
"gasConsumption",
"gateOpening",
"heading",
"humidity",
"light",
"location",
"milking",
"motion",
"movementActivity",
"noiseLevel",
"occupancy",
"orp",
"pH",
"power",
"precipitation",
"pressure",
"refractiveIndex",
"salinity",
"smoke",
"soilMoisture",
"solarRadiation",
"speed",
"tds",
"temperature",
"trafficFlow",
"tss",
"turbidity",
"uvLampIntensity",
"uvOrganicLoad",
"waterConsumption",
"waterFlow",
"waterLevel",
"waterPollution",
"weatherConditions",
"weight",
"windDirection",
"windSpeed"
]
}
},
"SupportedProtocolType": {
"type": "array",
"description": "Property. Model:'https://schema.org/Text'. Supported protocol(s) or networks. Model:'3g, bluetooth, bluetooth LE, cat-m, coap, ec-gsm-iot, gprs, http, lwm2m, lora, lte-m, mqtt, nb-iot, onem2m, sigfox, ul20, websocket'",
"items": {
"type": "string",
"description": "Property. Every type of protocols that can be used by the device",
"enum": [
"3g",
"bluetooth",
"bluetooth LE",
"cat-m",
"coap",
"ec-gsm-iot",
"gprs",
"http",
"lwm2m",
"lora",
"lte-m",
"mqtt",
"nb-iot",
"onem2m",
"sigfox",
"ul20",
"websocket"
]
}
},
"Device-Commons": {
"type": "object",
"properties": {
"category": {
"$ref": "#/definitions/CategoryType"
},
"deviceCategory": {
"$ref": "#/definitions/CategoryType"
},
"controlledProperty": {
"$ref": "#/definitions/ControlledPropertyType"
},
"supportedProtocol": {
"$ref": "#/definitions/SupportedProtocolType"
},
"macAddress": {
"$ref": "#/definitions/MacAddressType"
}
}
}
}
}