bt-sensors-plugin-sk 1.1.1 → 1.2.0-beta.0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BTSensor.js +304 -108
- package/Queue.js +48 -0
- package/README.md +36 -22
- package/classLoader.js +38 -0
- package/definitions.json +941 -0
- package/index.js +425 -375
- package/package.json +52 -6
- package/plugin_defaults.json +146 -0
- package/public/893.js +1 -1
- package/public/main.js +1 -100
- package/public/remoteEntry.js +1 -129
- package/sensor_classes/ATC.js +34 -22
- package/sensor_classes/Aranet/AranetSensor.js +4 -0
- package/sensor_classes/Aranet2.js +16 -15
- package/sensor_classes/Aranet4.js +23 -17
- package/sensor_classes/BlackListedDevice.js +4 -0
- package/sensor_classes/DEVELOPMENT.md +1 -6
- package/sensor_classes/GoveeH50xx.js +12 -12
- package/sensor_classes/GoveeH510x.js +7 -8
- package/sensor_classes/IBeacon.js +6 -10
- package/sensor_classes/Inkbird.js +8 -6
- package/sensor_classes/JBDBMS.js +33 -25
- package/sensor_classes/KilovaultHLXPlus.js +33 -16
- package/sensor_classes/LancolVoltageMeter.js +4 -3
- package/sensor_classes/MopekaTankSensor.js +31 -15
- package/sensor_classes/Renogy/RenogySensor.js +15 -6
- package/sensor_classes/RenogyBattery.js +15 -13
- package/sensor_classes/RenogyRoverClient.js +2 -3
- package/sensor_classes/RuuviTag.js +36 -27
- package/sensor_classes/ShellySBHT003C.js +19 -22
- package/sensor_classes/SwitchBotMeterPlus.js +10 -12
- package/sensor_classes/SwitchBotTH.js +13 -16
- package/sensor_classes/UNKNOWN.js +8 -4
- package/sensor_classes/UltrasonicWindMeter.js +13 -5
- package/sensor_classes/Victron/VictronSensor.js +6 -2
- package/sensor_classes/VictronACCharger.js +19 -8
- package/sensor_classes/VictronBatteryMonitor.js +49 -37
- package/sensor_classes/VictronDCDCConverter.js +14 -5
- package/sensor_classes/VictronDCEnergyMeter.js +27 -15
- package/sensor_classes/VictronGXDevice.js +2 -5
- package/sensor_classes/VictronInverter.js +19 -15
- package/sensor_classes/VictronInverterRS.js +19 -8
- package/sensor_classes/VictronLynxSmartBMS.js +15 -13
- package/sensor_classes/VictronOrionXS.js +16 -3
- package/sensor_classes/VictronSmartBatteryProtect.js +5 -6
- package/sensor_classes/VictronSmartLithium.js +18 -18
- package/sensor_classes/VictronSolarCharger.js +31 -18
- package/sensor_classes/VictronVEBus.js +2 -5
- package/sensor_classes/XiaomiMiBeacon.js +31 -21
- package/spec/electrical.json +688 -0
- package/spec/environment.json +401 -0
- package/spec/sensors.json +39 -0
- package/spec/tanks.json +115 -0
- package/src/components/PluginConfigurationPanel.js +393 -0
- package/src/index.js +0 -0
- package/webpack.config.js +71 -0
package/definitions.json
ADDED
|
@@ -0,0 +1,941 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
4
|
+
"id": "https://signalk.org/specification/1.5.1/schemas/definitions.json#",
|
|
5
|
+
"title": "definitions",
|
|
6
|
+
"description": "Reusable definitions of core object types",
|
|
7
|
+
"definitions": {
|
|
8
|
+
"timestamp": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "RFC 3339 (UTC only without local offset) string representing date and time.",
|
|
11
|
+
"units": "RFC 3339 (UTC)",
|
|
12
|
+
"example": "2014-04-10T08:33:53Z",
|
|
13
|
+
"format": "date-time",
|
|
14
|
+
"pattern" : ".*Z$"
|
|
15
|
+
},
|
|
16
|
+
"source": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"description": "Source of data in delta format, a record of where the data was received from. An object containing at least the properties defined in 'properties', but can contain anything beyond that.",
|
|
19
|
+
"required": [
|
|
20
|
+
"label"
|
|
21
|
+
],
|
|
22
|
+
"properties": {
|
|
23
|
+
"label": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "A label to identify the source bus, eg serial-COM1, eth-local,etc . Can be anything but should follow a predicatable format",
|
|
26
|
+
"example": "N2K-1"
|
|
27
|
+
},
|
|
28
|
+
"type": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "A human name to identify the type. NMEA0183, NMEA2000, signalk",
|
|
31
|
+
"default": "NMEA2000",
|
|
32
|
+
"example": "NMEA2000"
|
|
33
|
+
},
|
|
34
|
+
"src": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "NMEA2000 src value or any similar value for encapsulating the original source of the data",
|
|
37
|
+
"example": "36"
|
|
38
|
+
},
|
|
39
|
+
"canName": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "NMEA2000 can name of the source device",
|
|
42
|
+
"example": "13877444229283709432"
|
|
43
|
+
},
|
|
44
|
+
"pgn": {
|
|
45
|
+
"type": "number",
|
|
46
|
+
"description": "NMEA2000 pgn of the source message",
|
|
47
|
+
"example": "130312"
|
|
48
|
+
},
|
|
49
|
+
"instance": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "NMEA2000 instance value of the source message"
|
|
52
|
+
},
|
|
53
|
+
"sentence": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "Sentence type of the source NMEA0183 sentence, $GP[RMC],092750.000,A,5321.6802,N,00630.3372,W,0.02,31.66,280511,,,A*43",
|
|
56
|
+
"example": "RMC"
|
|
57
|
+
},
|
|
58
|
+
"talker": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "Talker id of the source NMEA0183 sentence, $[GP]RMC,092750.000,A,5321.6802,N,00630.3372,W,0.02,31.66,280511,,,A*43",
|
|
61
|
+
"example": "GP"
|
|
62
|
+
},
|
|
63
|
+
"aisType": {
|
|
64
|
+
"type": "number",
|
|
65
|
+
"multipleOf" : 1,
|
|
66
|
+
"minimum": 1,
|
|
67
|
+
"maximum": 27,
|
|
68
|
+
"description": "AIS Message Type",
|
|
69
|
+
"example":"15"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
"sourceRef": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"pattern": "^[A-Za-z0-9-_.]*$",
|
|
77
|
+
"description": "Reference to the source under /sources. A dot spearated path to the data. eg [type].[bus].[device]",
|
|
78
|
+
"example": "NMEA0183.COM1.GP"
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
"version": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"description": "Version of the Signal K schema/APIs used by the root object.",
|
|
84
|
+
"pattern": "^[0-9]{1,3}[.][0-9]{1,2}[.][0-9]{1,2}($|-[a-zA-Z0-9]+$)",
|
|
85
|
+
"example": "1.5.0"
|
|
86
|
+
},
|
|
87
|
+
"units": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"description": "Allowed units of physical quantities. Units should be (derived) SI units where possible.",
|
|
90
|
+
"properties": {
|
|
91
|
+
"s": {
|
|
92
|
+
"display": "s",
|
|
93
|
+
"quantity": "Time",
|
|
94
|
+
"quantityDisplay": "t",
|
|
95
|
+
"description": "Elapsed time (interval) in seconds"
|
|
96
|
+
},
|
|
97
|
+
"Hz": {
|
|
98
|
+
"display": "Hz",
|
|
99
|
+
"quantity": "Frequency",
|
|
100
|
+
"quantityDisplay": "f",
|
|
101
|
+
"description": "Frequency in Hertz"
|
|
102
|
+
},
|
|
103
|
+
"m3": {
|
|
104
|
+
"display": "m\u00b3",
|
|
105
|
+
"quantity": "Volume",
|
|
106
|
+
"quantityDisplay": "V",
|
|
107
|
+
"description": "Volume in cubic meters"
|
|
108
|
+
},
|
|
109
|
+
"m3/s": {
|
|
110
|
+
"display": "m\u00b3/s",
|
|
111
|
+
"quantity": "Flow",
|
|
112
|
+
"quantityDisplay": "Q",
|
|
113
|
+
"description": "Liquid or gas flow in cubic meters per second"
|
|
114
|
+
},
|
|
115
|
+
"kg/s": {
|
|
116
|
+
"display": "kg/s",
|
|
117
|
+
"quantity": "Mass flow rate",
|
|
118
|
+
"quantityDisplay": "\u1e41",
|
|
119
|
+
"description": "Liquid or gas flow in kilograms per second"
|
|
120
|
+
},
|
|
121
|
+
"kg/m3": {
|
|
122
|
+
"display": "kg/m\u00b3",
|
|
123
|
+
"quantity": "Density",
|
|
124
|
+
"quantityDisplay": "\u03c1",
|
|
125
|
+
"description": "Density in kg per cubic meter"
|
|
126
|
+
},
|
|
127
|
+
"deg": {
|
|
128
|
+
"display": "\u00b0",
|
|
129
|
+
"quantity": "Angle",
|
|
130
|
+
"quantityDisplay": "\u2220",
|
|
131
|
+
"description": "Latitude or longitude in decimal degrees"
|
|
132
|
+
},
|
|
133
|
+
"rad": {
|
|
134
|
+
"display": "\u33ad",
|
|
135
|
+
"quantity": "Angle",
|
|
136
|
+
"quantityDisplay": "\u2220",
|
|
137
|
+
"description": "Angular arc in radians"
|
|
138
|
+
},
|
|
139
|
+
"rad/s": {
|
|
140
|
+
"display": "\u33ad/s",
|
|
141
|
+
"quantity": "Rotation",
|
|
142
|
+
"quantityDisplay": "\u03c9",
|
|
143
|
+
"description": "Angular rate in radians per second"
|
|
144
|
+
},
|
|
145
|
+
"A": {
|
|
146
|
+
"display": "A",
|
|
147
|
+
"quantity": "Current",
|
|
148
|
+
"quantityDisplay": "I",
|
|
149
|
+
"description": "Electrical current in ampere"
|
|
150
|
+
},
|
|
151
|
+
"C": {
|
|
152
|
+
"display": "C",
|
|
153
|
+
"quantity": "Charge",
|
|
154
|
+
"quantityDisplay": "Q",
|
|
155
|
+
"description": "Electrical charge in Coulomb"
|
|
156
|
+
},
|
|
157
|
+
"V": {
|
|
158
|
+
"display": "V",
|
|
159
|
+
"quantity": "Voltage",
|
|
160
|
+
"quantityDisplay": "V",
|
|
161
|
+
"description": "Electrical potential in volt"
|
|
162
|
+
},
|
|
163
|
+
"W": {
|
|
164
|
+
"display": "W",
|
|
165
|
+
"quantity": "Power",
|
|
166
|
+
"quantityDisplay": "P",
|
|
167
|
+
"description": "Power in watt"
|
|
168
|
+
},
|
|
169
|
+
"Nm": {
|
|
170
|
+
"display": "Nm",
|
|
171
|
+
"quantity": "Torque",
|
|
172
|
+
"quantityDisplay": "\u03c4",
|
|
173
|
+
"description": "Torque in Newton meter"
|
|
174
|
+
},
|
|
175
|
+
"J": {
|
|
176
|
+
"display": "J",
|
|
177
|
+
"quantity": "Energy",
|
|
178
|
+
"quantityDisplay": "E",
|
|
179
|
+
"description": "Electrical energy in joule"
|
|
180
|
+
},
|
|
181
|
+
"ohm": {
|
|
182
|
+
"display": "\u2126",
|
|
183
|
+
"quantity": "Resistance",
|
|
184
|
+
"quantityDisplay": "R",
|
|
185
|
+
"description": "Electrical resistance in ohm"
|
|
186
|
+
},
|
|
187
|
+
"m": {
|
|
188
|
+
"display": "m",
|
|
189
|
+
"quantity": "Distance",
|
|
190
|
+
"quantityDisplay": "d",
|
|
191
|
+
"description": "Distance in meters"
|
|
192
|
+
},
|
|
193
|
+
"m/s": {
|
|
194
|
+
"display": "m/s",
|
|
195
|
+
"quantity": "Speed",
|
|
196
|
+
"quantityDisplay": "v",
|
|
197
|
+
"description": "Speed in meters per second"
|
|
198
|
+
},
|
|
199
|
+
"m2": {
|
|
200
|
+
"display": "\u33a1",
|
|
201
|
+
"quantity": "Area",
|
|
202
|
+
"quantityDisplay": "A",
|
|
203
|
+
"description": "(Surface) area in square meters"
|
|
204
|
+
},
|
|
205
|
+
"K": {
|
|
206
|
+
"display": "K",
|
|
207
|
+
"quantity": "Temperature",
|
|
208
|
+
"quantityDisplay": "T",
|
|
209
|
+
"description": "Temperature in kelvin"
|
|
210
|
+
},
|
|
211
|
+
"Pa": {
|
|
212
|
+
"display": "Pa",
|
|
213
|
+
"quantity": "Pressure",
|
|
214
|
+
"quantityDisplay": "P",
|
|
215
|
+
"description": "Pressure in pascal"
|
|
216
|
+
},
|
|
217
|
+
"kg": {
|
|
218
|
+
"display": "kg",
|
|
219
|
+
"quantity": "Mass",
|
|
220
|
+
"quantityDisplay": "m",
|
|
221
|
+
"description": "Mass in kilogram"
|
|
222
|
+
},
|
|
223
|
+
"ratio": {
|
|
224
|
+
"display": "",
|
|
225
|
+
"quantity": "Ratio",
|
|
226
|
+
"quantityDisplay": "\u03c6",
|
|
227
|
+
"description": "Relative value compared to reference or normal value. 0 = 0%, 1 = 100%, 1e-3 = 1 ppt"
|
|
228
|
+
},
|
|
229
|
+
"m/s2": {
|
|
230
|
+
"display": "m/s\u00b2",
|
|
231
|
+
"quantity": "Acceleration",
|
|
232
|
+
"quantityDisplay": "a",
|
|
233
|
+
"description": "Acceleration in meters per second squared"
|
|
234
|
+
},
|
|
235
|
+
"rad/s2": {
|
|
236
|
+
"display": "rad/s\u00b2",
|
|
237
|
+
"quantity": "Angular acceleration",
|
|
238
|
+
"quantityDisplay": "a",
|
|
239
|
+
"description": "Angular acceleration in radians per second squared"
|
|
240
|
+
},
|
|
241
|
+
"N": {
|
|
242
|
+
"display": "N",
|
|
243
|
+
"quantity": "Force",
|
|
244
|
+
"quantityDisplay": "F",
|
|
245
|
+
"description": "Force in newton"
|
|
246
|
+
},
|
|
247
|
+
"T": {
|
|
248
|
+
"display": "T",
|
|
249
|
+
"quantity": "Magnetic field",
|
|
250
|
+
"quantityDisplay": "B",
|
|
251
|
+
"description": "Magnetic field strength in tesla"
|
|
252
|
+
},
|
|
253
|
+
"Lux": {
|
|
254
|
+
"display": "lx",
|
|
255
|
+
"quantity": "Light Intensity",
|
|
256
|
+
"quantityDisplay": "Ev",
|
|
257
|
+
"description": "Light Intensity in lux"
|
|
258
|
+
},
|
|
259
|
+
"Pa/s": {
|
|
260
|
+
"display": "Pa/s",
|
|
261
|
+
"quantity": "Pressure rate",
|
|
262
|
+
"quantityDisplay": "R",
|
|
263
|
+
"description": "Pressure change rate in pascal per second"
|
|
264
|
+
},
|
|
265
|
+
"Pa.s": {
|
|
266
|
+
"display": "Pa s",
|
|
267
|
+
"quantity": "Viscosity",
|
|
268
|
+
"quantityDisplay": "\u03bc",
|
|
269
|
+
"description": "Viscosity in pascal seconds"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"mmsi": {
|
|
274
|
+
"type": "string",
|
|
275
|
+
"description": "Maritime Mobile Service Identity (MMSI). Has to be 9 digits. See http://en.wikipedia.org/wiki/Maritime_Mobile_Service_Identity for information.",
|
|
276
|
+
"pattern": "^[2-7][0-9]{8}$",
|
|
277
|
+
"example": "503123456"
|
|
278
|
+
},
|
|
279
|
+
"aircraftMmsi": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"description": "Maritime Mobile Service Identity (MMSI) for aircraft. Has to be 9 digits. See http://en.wikipedia.org/wiki/Maritime_Mobile_Service_Identity for information.",
|
|
282
|
+
"pattern": "^1[0-9]{8}$",
|
|
283
|
+
"example": "103123456"
|
|
284
|
+
},
|
|
285
|
+
"atonMmsi": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"description": "Maritime Mobile Service Identity (MMSI) for . Has to be 9 digits. See http://en.wikipedia.org/wiki/Maritime_Mobile_Service_Identity for information.",
|
|
288
|
+
"pattern": "^99[0-9]{7}$",
|
|
289
|
+
"example": "993123456"
|
|
290
|
+
},
|
|
291
|
+
"sarMmsi": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"description": "Maritime Mobile Service Identity (MMSI) for . Has to be 9 digits. See http://en.wikipedia.org/wiki/Maritime_Mobile_Service_Identity for information.",
|
|
294
|
+
"pattern": "^97[0-9]{7}$",
|
|
295
|
+
"example": "973123456"
|
|
296
|
+
},
|
|
297
|
+
"uuid": {
|
|
298
|
+
"type": "string",
|
|
299
|
+
"description": "A unique Signal K flavoured maritime resource identifier (MRN). A MRN is a form of URN, following a specific format: urn:mrn:<issueing authority>:<id type>:<id>. In case of a Signal K uuid, that looks like this: urn:mrn:signalk:uuid:<uuid>, where Signal K is the issuing authority and UUID (v4) the ID type.",
|
|
300
|
+
"pattern": "^urn:mrn:signalk:uuid:[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$",
|
|
301
|
+
"example": "urn:mrn:signalk:uuid:b7590868-1d62-47d9-989c-32321b349fb9"
|
|
302
|
+
},
|
|
303
|
+
"url": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"description": "A location of a resource, potentially relative. For hierarchical schemes (like http), applications must resolve relative URIs (e.g. './v1/api/'). Implementations should support the following schemes: http:, https:, mailto:, tel:, and ws:.",
|
|
306
|
+
"example": "http://localhost:8080/signalk/v1/api/vessels/self/environment"
|
|
307
|
+
},
|
|
308
|
+
|
|
309
|
+
"commonValueFields": {
|
|
310
|
+
"type": "object",
|
|
311
|
+
"required": ["timestamp", "$source"],
|
|
312
|
+
"properties": {
|
|
313
|
+
"timestamp": {
|
|
314
|
+
"$ref": "#/definitions/timestamp"
|
|
315
|
+
},
|
|
316
|
+
|
|
317
|
+
"$source": {
|
|
318
|
+
"$ref": "#/definitions/sourceRef"
|
|
319
|
+
},
|
|
320
|
+
|
|
321
|
+
"_attr": {
|
|
322
|
+
"$ref": "#/definitions/_attr"
|
|
323
|
+
},
|
|
324
|
+
|
|
325
|
+
"meta": {
|
|
326
|
+
"$ref": "#/definitions/meta"
|
|
327
|
+
},
|
|
328
|
+
"pgn": {
|
|
329
|
+
"type": "number"
|
|
330
|
+
},
|
|
331
|
+
"sentence": {
|
|
332
|
+
"type": "string"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
|
|
337
|
+
"numberValue": {
|
|
338
|
+
"type": "object",
|
|
339
|
+
"description": "Data should be of type number.",
|
|
340
|
+
"allOf": [{
|
|
341
|
+
"$ref": "#/definitions/commonValueFields"
|
|
342
|
+
}, {
|
|
343
|
+
"properties": {
|
|
344
|
+
"value": {
|
|
345
|
+
"type": "number"
|
|
346
|
+
},
|
|
347
|
+
"values": {
|
|
348
|
+
"type": "object",
|
|
349
|
+
"patternProperties": {
|
|
350
|
+
".*": {
|
|
351
|
+
"$ref": "#/definitions/valuesNumberValue"
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}]
|
|
357
|
+
},
|
|
358
|
+
|
|
359
|
+
"valuesNumberValue": {
|
|
360
|
+
"type": "object",
|
|
361
|
+
"properties": {
|
|
362
|
+
"value": {
|
|
363
|
+
"type": "number"
|
|
364
|
+
},
|
|
365
|
+
"timestamp": {
|
|
366
|
+
"$ref": "#/definitions/timestamp"
|
|
367
|
+
},
|
|
368
|
+
"pgn": {
|
|
369
|
+
"type": "number"
|
|
370
|
+
},
|
|
371
|
+
"sentence": {
|
|
372
|
+
"type": "string"
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
|
|
377
|
+
"stringValue": {
|
|
378
|
+
"type": "object",
|
|
379
|
+
"description": "Data should be of type number.",
|
|
380
|
+
"allOf": [{
|
|
381
|
+
"$ref": "#/definitions/commonValueFields"
|
|
382
|
+
}, {
|
|
383
|
+
"properties": {
|
|
384
|
+
"value": {
|
|
385
|
+
"type": "string"
|
|
386
|
+
},
|
|
387
|
+
"values": {
|
|
388
|
+
"type": "object",
|
|
389
|
+
"patternProperties": {
|
|
390
|
+
".*": {
|
|
391
|
+
"$ref": "#/definitions/valuesStringValue"
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}]
|
|
397
|
+
},
|
|
398
|
+
|
|
399
|
+
"valuesStringValue": {
|
|
400
|
+
"type": "object",
|
|
401
|
+
"properties": {
|
|
402
|
+
"value": {
|
|
403
|
+
"type": "string"
|
|
404
|
+
},
|
|
405
|
+
"timestamp": {
|
|
406
|
+
"$ref": "#/definitions/timestamp"
|
|
407
|
+
},
|
|
408
|
+
"pgn": {
|
|
409
|
+
"type": "number"
|
|
410
|
+
},
|
|
411
|
+
"sentence": {
|
|
412
|
+
"type": "string"
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
"datetimeValue": {
|
|
419
|
+
"type": "object",
|
|
420
|
+
"description": "Data should be of type number.",
|
|
421
|
+
"allOf": [{
|
|
422
|
+
"$ref": "#/definitions/commonValueFields"
|
|
423
|
+
}, {
|
|
424
|
+
"properties": {
|
|
425
|
+
"value": {
|
|
426
|
+
"type": "string",
|
|
427
|
+
"format": "date-time"
|
|
428
|
+
},
|
|
429
|
+
"values": {
|
|
430
|
+
"type": "object",
|
|
431
|
+
"patternProperties": {
|
|
432
|
+
".*": {
|
|
433
|
+
"$ref": "#/definitions/valuesDatetimeValue"
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}]
|
|
439
|
+
},
|
|
440
|
+
|
|
441
|
+
"valuesDatetimeValue": {
|
|
442
|
+
"type": "object",
|
|
443
|
+
"properties": {
|
|
444
|
+
"value": {
|
|
445
|
+
"type": "string",
|
|
446
|
+
"format": "date-time"
|
|
447
|
+
},
|
|
448
|
+
"timestamp": {
|
|
449
|
+
"$ref": "#/definitions/timestamp"
|
|
450
|
+
},
|
|
451
|
+
"pgn": {
|
|
452
|
+
"type": "number"
|
|
453
|
+
},
|
|
454
|
+
"sentence": {
|
|
455
|
+
"type": "string"
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
"nullValue": {
|
|
462
|
+
"type": "object",
|
|
463
|
+
"description": "Data should be of type NULL.",
|
|
464
|
+
"properties": {
|
|
465
|
+
"value": {
|
|
466
|
+
"type": "null"
|
|
467
|
+
},
|
|
468
|
+
|
|
469
|
+
"timestamp": {
|
|
470
|
+
"$ref": "#/definitions/timestamp"
|
|
471
|
+
},
|
|
472
|
+
|
|
473
|
+
"source": {
|
|
474
|
+
"$ref": "#/definitions/source"
|
|
475
|
+
},
|
|
476
|
+
|
|
477
|
+
"_attr": {
|
|
478
|
+
"$ref": "#/definitions/_attr"
|
|
479
|
+
},
|
|
480
|
+
|
|
481
|
+
"meta": {
|
|
482
|
+
"$ref": "#/definitions/meta"
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
|
|
487
|
+
"_attr": {
|
|
488
|
+
"type": "object",
|
|
489
|
+
"title": "_attr schema.",
|
|
490
|
+
"description": "Filesystem specific data, e.g. security, possibly more later.",
|
|
491
|
+
"properties": {
|
|
492
|
+
"_mode": {
|
|
493
|
+
"type": "integer",
|
|
494
|
+
"title": "_mode schema.",
|
|
495
|
+
"description": "Unix style permissions, often written in `owner:group:other` form, `-rw-r--r--`",
|
|
496
|
+
"default": 644
|
|
497
|
+
},
|
|
498
|
+
"_owner": {
|
|
499
|
+
"type": "string",
|
|
500
|
+
"title": "_owner schema.",
|
|
501
|
+
"description": "The owner of this resource.",
|
|
502
|
+
"default": "self"
|
|
503
|
+
},
|
|
504
|
+
"_group": {
|
|
505
|
+
"type": "string",
|
|
506
|
+
"title": "_group schema.",
|
|
507
|
+
"description": "The group owning this resource.",
|
|
508
|
+
"default": "self"
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
|
|
513
|
+
"alarmState": {
|
|
514
|
+
"type": "string",
|
|
515
|
+
"title": "alarmState",
|
|
516
|
+
"description": "The alarm state when the value is in this zone.",
|
|
517
|
+
"default": "normal",
|
|
518
|
+
"enum": [
|
|
519
|
+
"nominal",
|
|
520
|
+
"normal",
|
|
521
|
+
"alert",
|
|
522
|
+
"warn",
|
|
523
|
+
"alarm",
|
|
524
|
+
"emergency"
|
|
525
|
+
]
|
|
526
|
+
},
|
|
527
|
+
"alarmMethodEnum": {
|
|
528
|
+
"enum": [
|
|
529
|
+
"visual",
|
|
530
|
+
"sound"
|
|
531
|
+
]
|
|
532
|
+
},
|
|
533
|
+
|
|
534
|
+
"meta": {
|
|
535
|
+
"type": "object",
|
|
536
|
+
"title": "Meta schema.",
|
|
537
|
+
"description": "Provides meta data to enable alarm and display configuration.",
|
|
538
|
+
"required": ["description"],
|
|
539
|
+
"properties": {
|
|
540
|
+
"displayName": {
|
|
541
|
+
"type": "string",
|
|
542
|
+
"title": "DisplayName schema.",
|
|
543
|
+
"description": "A display name for this value. This is shown on the gauge and should not include units.",
|
|
544
|
+
"example": "Tachometer, Engine 1"
|
|
545
|
+
},
|
|
546
|
+
|
|
547
|
+
"longName": {
|
|
548
|
+
"type": "string",
|
|
549
|
+
"title": "LongName schema.",
|
|
550
|
+
"description": "A long name for this value.",
|
|
551
|
+
"example": "Tachometer, Engine 1"
|
|
552
|
+
},
|
|
553
|
+
|
|
554
|
+
"shortName": {
|
|
555
|
+
"type": "string",
|
|
556
|
+
"title": "ShortName schema.",
|
|
557
|
+
"description": "A short name for this value.",
|
|
558
|
+
"example": "Tacho 1"
|
|
559
|
+
},
|
|
560
|
+
|
|
561
|
+
"description": {
|
|
562
|
+
"type": "string",
|
|
563
|
+
"title": "Description schema.",
|
|
564
|
+
"description": "Description of the SK path.",
|
|
565
|
+
"example": "Engine revolutions (x60 for RPM)"
|
|
566
|
+
},
|
|
567
|
+
|
|
568
|
+
"enum": {
|
|
569
|
+
"type": "array",
|
|
570
|
+
"title": "Permissible values",
|
|
571
|
+
"description": "List of permissible values",
|
|
572
|
+
"example": ["stopped", "started", "unusable"]
|
|
573
|
+
},
|
|
574
|
+
|
|
575
|
+
"properties": {
|
|
576
|
+
"type": "object",
|
|
577
|
+
"title": "Properties for object valued properties",
|
|
578
|
+
"patternProperties": {
|
|
579
|
+
".*": {
|
|
580
|
+
"type": "object",
|
|
581
|
+
"properties": {
|
|
582
|
+
"type": {
|
|
583
|
+
"type": "string"
|
|
584
|
+
},
|
|
585
|
+
"title": {
|
|
586
|
+
"type": "string"
|
|
587
|
+
},
|
|
588
|
+
"description": {
|
|
589
|
+
"type": "string"
|
|
590
|
+
},
|
|
591
|
+
"units": {
|
|
592
|
+
"type": "string"
|
|
593
|
+
},
|
|
594
|
+
"example": {
|
|
595
|
+
"type": [
|
|
596
|
+
"string",
|
|
597
|
+
"number",
|
|
598
|
+
"boolean",
|
|
599
|
+
"object"
|
|
600
|
+
]
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
|
|
607
|
+
"gaugeType": {
|
|
608
|
+
"type": "string",
|
|
609
|
+
"title": "gaugeType schema.",
|
|
610
|
+
"description": "gaugeType is deprecated. The type of gauge necessary to display this value.",
|
|
611
|
+
"example": "sparkline"
|
|
612
|
+
},
|
|
613
|
+
|
|
614
|
+
"displayScale": {
|
|
615
|
+
"type": "object",
|
|
616
|
+
"title": "Scale to display.",
|
|
617
|
+
"description": "Gives details of the display scale against which the value should be displayed",
|
|
618
|
+
"properties": {
|
|
619
|
+
"lower": {
|
|
620
|
+
"type": "number",
|
|
621
|
+
"title": "Display lower limit.",
|
|
622
|
+
"description": "The suggested lower limit for the pointer (or equivalent) on the display",
|
|
623
|
+
"example": 0
|
|
624
|
+
},
|
|
625
|
+
"upper": {
|
|
626
|
+
"type": "number",
|
|
627
|
+
"title": "Display upper limit.",
|
|
628
|
+
"description": "The suggested upper limit for the pointer (or equivalent) on the display",
|
|
629
|
+
"example": 4000
|
|
630
|
+
},
|
|
631
|
+
"type": {
|
|
632
|
+
"type": "string",
|
|
633
|
+
"enum": [
|
|
634
|
+
"linear",
|
|
635
|
+
"logarithmic",
|
|
636
|
+
"squareroot",
|
|
637
|
+
"power"
|
|
638
|
+
],
|
|
639
|
+
"title": "Scale type used on the display.",
|
|
640
|
+
"description": "The suggested type of scale to use",
|
|
641
|
+
"example": "logarithmic"
|
|
642
|
+
},
|
|
643
|
+
"power": {
|
|
644
|
+
"type": "number",
|
|
645
|
+
"title": "Selected power for display scale",
|
|
646
|
+
"description": "The power to use when the displayScale/type is set to 'power'. Can be any numeric value except zero.",
|
|
647
|
+
"example": 2
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
"oneOf": [
|
|
651
|
+
{
|
|
652
|
+
"required": [
|
|
653
|
+
"lower",
|
|
654
|
+
"upper"
|
|
655
|
+
],
|
|
656
|
+
"properties": {
|
|
657
|
+
"lower": {},
|
|
658
|
+
"upper": {}
|
|
659
|
+
},
|
|
660
|
+
"additionalProperties": false
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"required": [
|
|
664
|
+
"lower",
|
|
665
|
+
"upper",
|
|
666
|
+
"type"
|
|
667
|
+
],
|
|
668
|
+
"properties": {
|
|
669
|
+
"lower": {},
|
|
670
|
+
"upper": {},
|
|
671
|
+
"type": {
|
|
672
|
+
"enum": [
|
|
673
|
+
"linear",
|
|
674
|
+
"squareroot",
|
|
675
|
+
"logarithmic"
|
|
676
|
+
]
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
"additionalProperties": false
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"required": [
|
|
683
|
+
"lower",
|
|
684
|
+
"upper",
|
|
685
|
+
"type",
|
|
686
|
+
"power"
|
|
687
|
+
],
|
|
688
|
+
"properties": {
|
|
689
|
+
"lower": {},
|
|
690
|
+
"upper": {},
|
|
691
|
+
"type": {
|
|
692
|
+
"enum": [
|
|
693
|
+
"power"
|
|
694
|
+
]
|
|
695
|
+
},
|
|
696
|
+
"power": {}
|
|
697
|
+
},
|
|
698
|
+
"additionalProperties": false
|
|
699
|
+
}
|
|
700
|
+
]
|
|
701
|
+
},
|
|
702
|
+
"units": {
|
|
703
|
+
"type": "string",
|
|
704
|
+
"title": "units schema.",
|
|
705
|
+
"description": "The (derived) SI unit of this value.",
|
|
706
|
+
"example": "m/s"
|
|
707
|
+
},
|
|
708
|
+
"timeout": {
|
|
709
|
+
"type": "number",
|
|
710
|
+
"title": "Timeout",
|
|
711
|
+
"description": "The timeout in (fractional) seconds after which this data is invalid.",
|
|
712
|
+
"example": 2
|
|
713
|
+
},
|
|
714
|
+
|
|
715
|
+
"alertMethod": {
|
|
716
|
+
"type": "array",
|
|
717
|
+
"title": "Alert Method",
|
|
718
|
+
"description": "The method to use to raise the alert. An alert is an event that should be known",
|
|
719
|
+
"default": ["visual"],
|
|
720
|
+
"items": {
|
|
721
|
+
"$ref": "#/definitions/alarmMethodEnum"
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
"warnMethod": {
|
|
725
|
+
"type": "array",
|
|
726
|
+
"title": "Warn Method",
|
|
727
|
+
"description": "The method to use to raise the warning. A warning is an unexpected event that may require attention",
|
|
728
|
+
"default": ["visual"],
|
|
729
|
+
"items": {
|
|
730
|
+
"$ref": "#/definitions/alarmMethodEnum"
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
|
|
734
|
+
"alarmMethod": {
|
|
735
|
+
"type": "array",
|
|
736
|
+
"title": "Alarm Method",
|
|
737
|
+
"description": "The method to use to raise the alarm. An alarm requires immediate attention, eg no oil pressure",
|
|
738
|
+
"default": ["visual", "sound"],
|
|
739
|
+
"items": {
|
|
740
|
+
"$ref": "#/definitions/alarmMethodEnum"
|
|
741
|
+
}
|
|
742
|
+
},
|
|
743
|
+
"emergencyMethod": {
|
|
744
|
+
"type": "array",
|
|
745
|
+
"title": "Emergency Method",
|
|
746
|
+
"description": "The method to use to raise an emergency. An emergency is an immediate danger to life or vessel",
|
|
747
|
+
"default": ["visual", "sound"],
|
|
748
|
+
"items": {
|
|
749
|
+
"$ref": "#/definitions/alarmMethodEnum"
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
|
|
753
|
+
"zones": {
|
|
754
|
+
"type": "array",
|
|
755
|
+
"title": "Zones schema.",
|
|
756
|
+
"description": "The zones defining the range of values for this signalk value.",
|
|
757
|
+
"items": {
|
|
758
|
+
"type": "object",
|
|
759
|
+
"title": "zone",
|
|
760
|
+
"description": "A zone used to define the display and alarm state when the value is in between bottom and top.",
|
|
761
|
+
"required": ["state"],
|
|
762
|
+
"properties": {
|
|
763
|
+
"lower": {
|
|
764
|
+
"id": "lower",
|
|
765
|
+
"type": "number",
|
|
766
|
+
"title": "Lower",
|
|
767
|
+
"description": "The lowest number in this zone",
|
|
768
|
+
"name": "lower",
|
|
769
|
+
"example": 3500
|
|
770
|
+
},
|
|
771
|
+
|
|
772
|
+
"upper": {
|
|
773
|
+
"id": "upper",
|
|
774
|
+
"type": "number",
|
|
775
|
+
"title": "Upper",
|
|
776
|
+
"description": "The highest value in this zone",
|
|
777
|
+
"name": "upper",
|
|
778
|
+
"example": 4000
|
|
779
|
+
},
|
|
780
|
+
|
|
781
|
+
"state": {
|
|
782
|
+
"$ref": "#/definitions/alarmState"
|
|
783
|
+
},
|
|
784
|
+
|
|
785
|
+
"message": {
|
|
786
|
+
"id": "message",
|
|
787
|
+
"type": "string",
|
|
788
|
+
"title": "message",
|
|
789
|
+
"description": "The message to display for the alarm.",
|
|
790
|
+
"default": "Warning"
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
"geohash": {
|
|
798
|
+
"type": "string",
|
|
799
|
+
"description": "A geohash (see http://geohash.org)",
|
|
800
|
+
"pattern": "^[0-9A-Za-z:]{1,}$",
|
|
801
|
+
"example": "eg rbe:TasmanBay"
|
|
802
|
+
},
|
|
803
|
+
"position": {
|
|
804
|
+
"type": "object",
|
|
805
|
+
"title": "position",
|
|
806
|
+
"description": "The position in 3 dimensions",
|
|
807
|
+
"allOf": [
|
|
808
|
+
{
|
|
809
|
+
"$ref": "#/definitions/commonValueFields"
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"properties": {
|
|
813
|
+
"value": {
|
|
814
|
+
"type": "object",
|
|
815
|
+
"required": [
|
|
816
|
+
"latitude",
|
|
817
|
+
"longitude"
|
|
818
|
+
],
|
|
819
|
+
"properties": {
|
|
820
|
+
"longitude": {
|
|
821
|
+
"type": "number",
|
|
822
|
+
"description": "Longitude",
|
|
823
|
+
"units": "deg",
|
|
824
|
+
"example": 4.98765245
|
|
825
|
+
},
|
|
826
|
+
"latitude": {
|
|
827
|
+
"type": "number",
|
|
828
|
+
"description": "Latitude",
|
|
829
|
+
"units": "deg",
|
|
830
|
+
"example": 52.0987654
|
|
831
|
+
},
|
|
832
|
+
"altitude": {
|
|
833
|
+
"type": "number",
|
|
834
|
+
"description": "Altitude",
|
|
835
|
+
"units": "m"
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
},
|
|
839
|
+
"values": {
|
|
840
|
+
"type": "object",
|
|
841
|
+
"patternProperties": {
|
|
842
|
+
".*": {
|
|
843
|
+
"type": "object",
|
|
844
|
+
"properties": {
|
|
845
|
+
"timestamp": {
|
|
846
|
+
"$ref": "#/definitions/timestamp"
|
|
847
|
+
},
|
|
848
|
+
"pgn": {
|
|
849
|
+
"type": "number"
|
|
850
|
+
},
|
|
851
|
+
"sentence": {
|
|
852
|
+
"type": "string"
|
|
853
|
+
},
|
|
854
|
+
"value": {
|
|
855
|
+
"type": "object",
|
|
856
|
+
"properties": {
|
|
857
|
+
"longitude": {
|
|
858
|
+
"type": "number",
|
|
859
|
+
"description": "Longitude",
|
|
860
|
+
"units": "deg",
|
|
861
|
+
"example": 4.98765245
|
|
862
|
+
},
|
|
863
|
+
"latitude": {
|
|
864
|
+
"type": "number",
|
|
865
|
+
"description": "Latitude",
|
|
866
|
+
"units": "deg",
|
|
867
|
+
"example": 52.0987654
|
|
868
|
+
},
|
|
869
|
+
"altitude": {
|
|
870
|
+
"type": "number",
|
|
871
|
+
"description": "Altitude",
|
|
872
|
+
"units": "m"
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
]
|
|
883
|
+
},
|
|
884
|
+
"waypoint": {
|
|
885
|
+
"type": "object",
|
|
886
|
+
"description": "A waypoint, an object with a signal k position object, and GeoJSON Feature object (see geojson.org, and https://github.com/fge/sample-json-schemas/tree/master/geojson)",
|
|
887
|
+
"properties": {
|
|
888
|
+
"position": {
|
|
889
|
+
"$ref": "#/definitions/position"
|
|
890
|
+
},
|
|
891
|
+
"feature": {
|
|
892
|
+
"title": "Feature",
|
|
893
|
+
"description": "A Geo JSON feature object",
|
|
894
|
+
"required": [
|
|
895
|
+
"geometry",
|
|
896
|
+
"properties"
|
|
897
|
+
],
|
|
898
|
+
"properties": {
|
|
899
|
+
"type": {
|
|
900
|
+
"enum": [
|
|
901
|
+
"Feature"
|
|
902
|
+
]
|
|
903
|
+
},
|
|
904
|
+
"geometry": {
|
|
905
|
+
"title": "Point",
|
|
906
|
+
"properties": {
|
|
907
|
+
"type": {
|
|
908
|
+
"enum": [
|
|
909
|
+
"Point"
|
|
910
|
+
]
|
|
911
|
+
},
|
|
912
|
+
"coordinates": {
|
|
913
|
+
"description": "A single position, in x,y order (Lon, Lat)",
|
|
914
|
+
"type": "array",
|
|
915
|
+
"minItems": 2,
|
|
916
|
+
"items": [{
|
|
917
|
+
"type": "number"
|
|
918
|
+
}, {
|
|
919
|
+
"type": "number"
|
|
920
|
+
}],
|
|
921
|
+
"additionalItems": false
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
"properties": {
|
|
926
|
+
"type": [
|
|
927
|
+
"object",
|
|
928
|
+
"null"
|
|
929
|
+
],
|
|
930
|
+
"description": "Additional data of any type",
|
|
931
|
+
"additionalProperties": true
|
|
932
|
+
},
|
|
933
|
+
"id": {
|
|
934
|
+
"FIXME": "may be there, type not known (string? number?)"
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
}
|