-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcard.aux.req.notecard.api.json
More file actions
556 lines (556 loc) · 22.2 KB
/
card.aux.req.notecard.api.json
File metadata and controls
556 lines (556 loc) · 22.2 KB
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/blues/notecard-schema/master/card.aux.req.notecard.api.json",
"title": "card.aux Request Application Programming Interface (API) Schema",
"description": "Configure various uses of the general-purpose I/O (GPIO) pins `AUX1`-`AUX4` on the Notecard edge connector for tracking applications and simple GPIO sensing and counting tasks.",
"type": "object",
"version": "1.1.2",
"apiVersion": "9.1.1",
"skus": [
"CELL",
"CELL+WIFI",
"LORA",
"SKYLO",
"WIFI"
],
"properties": {
"connected": {
"description": "If `true`, defers the sync of the state change Notefile to the next sync as configured by the `hub.set` request.",
"type": "boolean",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
],
"minApiVersion": "3.3.1"
},
"count": {
"description": "When used with `\"mode\":\"neo-monitor\"` or `\"mode\":\"track-neo-monitor\"`, this controls the number of NeoPixels to use in a strip. Possible values are `1`, `2`, or `5`.",
"type": "integer",
"enum": [
-1,
1,
2,
5
],
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
],
"minApiVersion": "3.5.1"
},
"file": {
"description": "The name of the Notefile used to report state changes when used in conjunction with `\"sync\": true`. Default Notefile name is `_button.qo`.",
"type": "string",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
],
"minApiVersion": "3.3.1"
},
"gps": {
"description": "If `true`, along with `\"mode\":\"track\"` the Notecard supports the use of an external GPS module. This argument is deprecated. Use the `card.aux.serial` request with a `mode` of `\"gps\"` instead.",
"type": "boolean",
"deprecated": true
},
"limit": {
"description": "If `true`, along with `\"mode\":\"track\"` and `gps:true` the Notecard will disable concurrent modem use during GPS tracking.",
"type": "boolean",
"minApiVersion": "3.4.1"
},
"max": {
"description": "When in `gpio` mode, if an `AUX` pin is configured as a `count` type, the maximum number of samples of duration `seconds`, after which all subsequent counts are added to the final sample. Passing `0` or omitting this value will provide a single incrementing count of rising edges on the pin.",
"type": "integer",
"minimum": -1
},
"mode": {
"description": "The AUX mode. Must be one of the following keywords. Some keywords are only supported on certain types of Notecards.",
"type": "string",
"enum": [
"dfu",
"gpio",
"led",
"monitor",
"motion",
"neo",
"neo-monitor",
"off",
"rgb",
"rgb-monitor",
"track",
"track-monitor",
"track-neo-monitor",
"track-rgb-monitor",
"-"
],
"sub-descriptions": [
{
"const": "dfu",
"description": "Enable the Notecard's `AUX1` pin for [Outboard Firmware Updates](/notehub/host-firmware-updates/notecard-outboard-firmware-update). When enabled, `AUX1` is active `LOW` when a DFU is in progress, and `HIGH` otherwise. See [Using DFU Mode](/notecard/notecard-walkthrough/working-with-the-notecard-aux-pins#using-dfu-mode) for more information.",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
],
"minApiVersion": "3.5.1"
},
{
"const": "gpio",
"description": "Configure the Notecard for GPIO mode with `AUX1` OFF, `AUX2` as an output `LOW`, `AUX3` as an output `HIGH`, and `AUX4` as an input.",
"skus": [
"CELL",
"CELL+WIFI",
"LORA",
"SKYLO",
"WIFI"
]
},
{
"const": "led",
"description": "When wiring LEDs to the Notecard's AUX pins (as is done when using monitor mode), use this mode along with the card.led API to manually enable/disable individual red, green, and/or yellow LEDs.",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
],
"minApiVersion": "3.5.1"
},
{
"const": "monitor",
"description": "If you plan to place your Notecard in an enclosure, monitor mode can be used to configure inputs and outputs typically placed on the faceplate of a device in order for a technician to test and monitor Notecard activity.",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
]
},
{
"const": "motion",
"description": "Supplement autonomous tracking with digital inputs and a status output.",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
]
},
{
"const": "neo",
"description": "When wiring a NeoPixel or NeoPixel strip to the Notecard's AUX2 pin (as is done when using neo-monitor mode), use this mode along with the card.led API to manually enable/disable a single NeoPixel.",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
],
"minApiVersion": "3.5.1"
},
{
"const": "neo-monitor",
"description": "Similar to monitor mode, neo-monitor mode supports NeoPixel LEDs that can be used to configure inputs and outputs typically placed on the faceplate of a device in order for a technician to test and monitor Notecard activity.",
"skus": [
"CELL",
"CELL+WIFI",
"LORA",
"SKYLO",
"WIFI"
]
},
{
"const": "off",
"description": "Disable AUX mode.",
"skus": [
"CELL",
"CELL+WIFI",
"LORA",
"SKYLO",
"WIFI"
]
},
{
"const": "rgb",
"description": "When wiring an RGB LED to the Notecard's AUX2-4 pins, you may use this mode along with the card.led API to manually enable/disable colors in a single RGB LED.",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
],
"minApiVersion": "9.3.1"
},
{
"const": "rgb-monitor",
"description": "Similar to monitor mode, `rgb-monitor` mode supports a single RGB LED that can be used to configure inputs and outputs typically placed on the faceplate of a device in order for a technician to test and monitor Notecard activity.",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
],
"minApiVersion": "9.3.1"
},
{
"const": "track",
"description": "Enhance Notes in the `_track.qo` Notefile with temperature, pressure, and humidity readings from a connected BME280 sensor.",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
]
},
{
"const": "track-monitor",
"description": "Combines the functionality of the `track` and `monitor` AUX modes.",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
],
"minApiVersion": "3.5.1"
},
{
"const": "track-neo-monitor",
"description": "Combines `track` and `monitor` modes while also supporting NeoPixel LEDs that allow for monitoring Notecard activity.",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
],
"minApiVersion": "3.5.1"
},
{
"const": "track-rgb-monitor",
"description": "Combines `track` and `monitor` modes while also supporting a single RGB LED that allows for monitoring Notecard activity.",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
],
"minApiVersion": "9.3.1"
},
{
"const": "-",
"description": "Resets the AUX mode to its default value (`off`).",
"skus": [
"CELL",
"CELL+WIFI",
"LORA",
"SKYLO",
"WIFI"
]
}
]
},
"ms": {
"description": "When in `gpio` mode, this argument configures a debouncing interval. With a debouncing interval in place, the Notecard excludes all transitions with a shorter duration than the provided debounce time, in milliseconds. This interval only applies to GPIOs configured with a `usage` of `count`, `count-pulldown`, or `count-pullup`.",
"type": "integer",
"minimum": -1,
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
],
"minApiVersion": "5.1.1"
},
"offset": {
"description": "When used with `\"mode\":\"neo-monitor\"` or `\"mode\":\"track-neo-monitor\"`, this is the 1-based index in a strip of NeoPixels that determines which single NeoPixel the host can command.",
"type": "integer",
"anyOf": [
{
"const": -1
},
{
"minimum": 1
}
],
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
]
},
"rate": {
"description": "The AUX UART baud rate for debug communication over the AUXRX and AUXTX pins.",
"enum": [
-1,
300,
600,
1200,
2400,
4800,
9600,
19200,
38400,
57600,
115200,
230400,
460800,
921600
],
"default": 115200,
"type": "integer",
"minApiVersion": "3.2.1"
},
"seconds": {
"description": "When in `gpio` mode, if an `AUX` pin is configured as a `count` type, the count of rising edges can be broken into samples of this duration. Passing `0` or omitting this field will total into a single sample.",
"type": "integer",
"minimum": -1
},
"sensitivity": {
"description": "When used with `\"mode\":\"neo-monitor\"` or `\"mode\":\"track-neo-monitor\"`, this controls the brightness of NeoPixel lights, where `100` is the maximum brightness and `1` is the minimum.",
"type": "integer",
"minimum": -1,
"maximum": 100,
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
],
"minApiVersion": "3.5.1"
},
"start": {
"description": "When in `gpio` mode, if an `AUX` pin is configured as a `count` type, set to `true` to reset counters and start incrementing.",
"type": "boolean"
},
"sync": {
"description": "If `true`, for pins set as `input` by `usage`, the Notecard will autonomously report any state changes as new notes in `file`. For pins used as `counter`, the Notecard will use an interrupt to count pulses and will report the total in a new note in `file` unless it has been noted in the previous second.",
"type": "boolean",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
],
"minApiVersion": "3.4.1"
},
"usage": {
"description": "An ordered list of pin modes for each AUX pin when in GPIO mode.",
"type": "array",
"items": {
"type": "string",
"enum": [
"",
"off",
"high",
"low",
"input",
"input-pulldown",
"input-pullup",
"count",
"count-pulldown",
"count-pullup"
]
},
"sub-descriptions": [
{
"const": "",
"description": "to leave the pin unchanged.",
"skus": [
"CELL",
"CELL+WIFI",
"LORA",
"SKYLO",
"WIFI"
]
},
{
"const": "off",
"description": "to disable the pin.",
"skus": [
"CELL",
"CELL+WIFI",
"LORA",
"SKYLO",
"WIFI"
]
},
{
"const": "high",
"description": "to set the pin as a `HIGH` output.",
"skus": [
"CELL",
"CELL+WIFI",
"LORA",
"SKYLO",
"WIFI"
]
},
{
"const": "low",
"description": "to set the pin as a `LOW` output.",
"skus": [
"CELL",
"CELL+WIFI",
"LORA",
"SKYLO",
"WIFI"
]
},
{
"const": "input",
"description": "to set the pin as an input.",
"skus": [
"CELL",
"CELL+WIFI",
"LORA",
"SKYLO",
"WIFI"
]
},
{
"const": "input-pulldown",
"description": "to set the pin as a pull-down input.",
"skus": [
"CELL",
"CELL+WIFI",
"LORA",
"SKYLO",
"WIFI"
],
"minApiVersion": "3.3.1"
},
{
"const": "input-pullup",
"description": "to set the pin as a pull-up input.",
"skus": [
"CELL",
"CELL+WIFI",
"LORA",
"SKYLO",
"WIFI"
],
"minApiVersion": "3.3.1"
},
{
"const": "count",
"description": "to set the pin as an input (interrupt) that increments a counter for each rising edge pulse on the pin. It is up to the device's designer to make sure that the signal is either HIGH or LOW at any time, and is never left floating.",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
]
},
{
"const": "count-pulldown",
"description": "Same as `count` usage, but a pull-down resistor internal to the Notecard will automatically keep the pin from floating.",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
]
},
{
"const": "count-pullup",
"description": "Same as `count` usage, but a pull-up resistor internal to the Notecard will automatically keep the pin from floating and falling edges of pulses are counted.",
"skus": [
"CELL",
"CELL+WIFI",
"SKYLO",
"WIFI"
]
}
]
},
"req": {
"description": "Request for the Notecard (expects response)",
"const": "card.aux"
},
"cmd": {
"description": "Command for the Notecard (no response)",
"const": "card.aux"
}
},
"oneOf": [
{
"required": [
"req"
],
"properties": {
"req": {
"const": "card.aux"
}
}
},
{
"required": [
"cmd"
],
"properties": {
"cmd": {
"const": "card.aux"
}
}
}
],
"additionalProperties": false,
"annotations": [
{
"title": "note",
"description": "Utilizing these pins requires a physical connection to each pin, separate from a connection to the Notecard's serial data interfaces."
}
],
"samples": [
{
"title": "DFU Mode",
"description": "Enable the Notecard's `AUX1` pin for [Outboard Firmware Updates](/notehub/host-firmware-updates/notecard-outboard-firmware-update). When enabled, `AUX1` is active `LOW` when a DFU is in progress, and `HIGH` otherwise.",
"json": "{\"req\": \"card.aux\", \"mode\": \"dfu\"}"
},
{
"title": "GPIO Mode",
"description": "Configure the Notecard for GPIO mode with `AUX1` OFF, `AUX2` as an output `LOW`, `AUX3` as an output `HIGH`, and `AUX4` as an input.",
"json": "{\"req\": \"card.aux\", \"mode\": \"gpio\", \"usage\": [\"off\", \"low\", \"high\", \"input\"]}"
},
{
"title": "GPIO Mode With Count",
"description": "Configure the Notecard for GPIO mode with `AUX1` OFF, `AUX2` as an output `LOW`, `AUX3` as an output `HIGH`, and `AUX4` as a count.",
"json": "{\"req\": \"card.aux\", \"mode\": \"gpio\", \"usage\": [\"off\", \"low\", \"high\", \"count\"], \"seconds\": 2, \"max\": 5, \"start\": true}"
},
{
"title": "GPIO Mode With Notefile",
"description": "Configure GPIO mode with automatic state change reporting to a Notefile.",
"json": "{\"req\": \"card.aux\", \"mode\": \"gpio\", \"usage\": [\"off\", \"low\", \"high\", \"input\"], \"sync\": true, \"file\": \"statechange.qo\"}"
},
{
"title": "Monitor Mode",
"description": "Configure inputs and outputs typically placed on the faceplate of a device for technicians to test and monitor Notecard activity.",
"json": "{\"req\": \"card.aux\", \"mode\": \"monitor\"}"
},
{
"title": "Neo-Monitor Mode",
"description": "Enable neo-monitor mode which supports NeoPixel LEDs for monitoring Notecard activity.",
"json": "{\"req\": \"card.aux\", \"mode\": \"neo-monitor\"}"
},
{
"title": "Motion Mode",
"description": "Supplement autonomous tracking with digital inputs and a status output.",
"json": "{\"req\": \"card.aux\", \"mode\": \"motion\"}"
},
{
"title": "Setting AUX UART Baud",
"description": "Configure the AUX UART baud rate for debug communication.",
"json": "{\"req\": \"card.aux\", \"rate\": 9600}"
},
{
"title": "Track Mode",
"description": "Enhance Notes with temperature, pressure, and humidity readings from a connected BME280 sensor.",
"json": "{\"req\": \"card.aux\", \"mode\": \"track\"}"
}
]
}