|
10 | 10 | "CELL", |
11 | 11 | "CELL+WIFI", |
12 | 12 | "LORA", |
| 13 | + "SKYLO", |
13 | 14 | "WIFI" |
14 | 15 | ], |
15 | 16 | "properties": { |
| 17 | + "alert": { |
| 18 | + "description": "`true` if the Notecard is configured to add an entry to the `health.qo` Notefile on USB connect/disconnect (enabled by sending `card.voltage` with `\"usb\": true, \"alert\": true`).", |
| 19 | + "type": "boolean" |
| 20 | + }, |
| 21 | + "calibration": { |
| 22 | + "description": "If a user calibration value has been saved (via `\"set\": true`), this is that value; otherwise it is the hardware-supplied default.", |
| 23 | + "type": "number" |
| 24 | + }, |
16 | 25 | "daily": { |
17 | | - "description": "Change of moving average in the last 24 hours, if relevant to the time period analyzed.", |
| 26 | + "description": "Change in the 24-hour moving average over the analyzed window. Only present when historic voltage trend calculations have been enabled with `\"on\": true` and the analyzed window includes at least 24 hours of history.", |
18 | 27 | "type": "number" |
19 | 28 | }, |
20 | 29 | "hours": { |
21 | | - "description": "The number of hours used for trend analysis.", |
| 30 | + "description": "The number of hours of voltage history actually used in the analysis. Only present when historic voltage trend calculations have been enabled with `\"on\": true`.", |
22 | 31 | "type": "integer" |
23 | 32 | }, |
24 | 33 | "minutes": { |
25 | | - "description": "Represents the Notecard's uptime in minutes. This field is not present when the device is powered via USB.", |
| 34 | + "description": "The number of minutes since the Notecard was last on USB power. Not present when the Notecard is currently connected to USB power.", |
26 | 35 | "type": "integer" |
27 | 36 | }, |
28 | 37 | "mode": { |
29 | 38 | "description": "The current voltage-variable threshold value returned from Notecard.\n\nFor example, if the voltage threshold is `\"usb:4.6;normal:3.5;dead:0\"` and the power source returns a voltage of `3.9`, the mode value would be `\"normal\"`.", |
30 | 39 | "type": "string" |
31 | 40 | }, |
32 | 41 | "monthly": { |
33 | | - "description": "Change of moving average in the last 30 days, if relevant to the time period analyzed.", |
| 42 | + "description": "Change in the 30-day moving average over the analyzed window. Only present when historic voltage trend calculations have been enabled with `\"on\": true` and the analyzed window includes at least 30 days of history.", |
34 | 43 | "type": "number" |
35 | 44 | }, |
| 45 | + "on": { |
| 46 | + "description": "`true` if the request that produced this response set `\"on\": true`.", |
| 47 | + "type": "boolean" |
| 48 | + }, |
| 49 | + "sync": { |
| 50 | + "description": "`true` if the Notecard is configured to perform a sync on USB connect/disconnect (enabled by sending `card.voltage` with `\"usb\": true, \"sync\": true`).", |
| 51 | + "type": "boolean" |
| 52 | + }, |
36 | 53 | "usb": { |
37 | 54 | "description": "`true` if the Notecard is connected to USB power.", |
38 | 55 | "type": "boolean", |
|
43 | 60 | "type": "number" |
44 | 61 | }, |
45 | 62 | "vavg": { |
46 | | - "description": "The average voltage value during the measured period.", |
| 63 | + "description": "The average voltage during the analyzed window. Only present when historic voltage trend calculations have been enabled with `\"on\": true`.", |
47 | 64 | "type": "number" |
48 | 65 | }, |
49 | 66 | "vmax": { |
50 | | - "description": "The highest voltage value captured during the measurement period.", |
| 67 | + "description": "The highest voltage during the analyzed window. Only present when historic voltage trend calculations have been enabled with `\"on\": true`.", |
51 | 68 | "type": "number" |
52 | 69 | }, |
53 | 70 | "vmin": { |
54 | | - "description": "The lowest voltage value captured during the measurement period.", |
| 71 | + "description": "The lowest voltage during the analyzed window. Only present when historic voltage trend calculations have been enabled with `\"on\": true`.", |
55 | 72 | "type": "number" |
56 | 73 | }, |
57 | 74 | "weekly": { |
58 | | - "description": "Change of moving average in the last 7 days, if relevant to the time period analyzed.", |
| 75 | + "description": "Change in the 7-day moving average over the analyzed window. Only present when historic voltage trend calculations have been enabled with `\"on\": true` and the analyzed window includes at least 7 days of history.", |
59 | 76 | "type": "number" |
60 | 77 | } |
61 | 78 | }, |
62 | 79 | "additionalProperties": false, |
63 | 80 | "samples": [ |
64 | 81 | { |
65 | | - "title": "USB-Powered Voltage Response", |
66 | | - "description": "Example response when Notecard is powered via USB.", |
| 82 | + "title": "Bare Request (USB-Powered, History Disabled)", |
| 83 | + "description": "Minimal response from a bare `card.voltage` request on a USB-powered Notecard. No historical fields are present because trend analysis has not been enabled with `\"on\": true`.", |
| 84 | + "json": "{\"usb\": true, \"mode\": \"usb\", \"value\": 5.112190219747135}" |
| 85 | + }, |
| 86 | + { |
| 87 | + "title": "USB-Powered with Trends", |
| 88 | + "description": "Response when Notecard is powered via USB and historic voltage trend calculations have been enabled with `\"on\": true`.", |
67 | 89 | "json": "{\"usb\": true, \"hours\": 120, \"mode\": \"usb\", \"value\": 5.112190219747135, \"vmin\": 4, \"vmax\": 4, \"vavg\": 4}" |
68 | 90 | }, |
69 | 91 | { |
70 | 92 | "title": "Battery-Powered with Trends", |
71 | | - "description": "Example response showing battery voltage with trend analysis.", |
| 93 | + "description": "Response when Notecard is on battery and historic voltage trend calculations have been enabled with `\"on\": true`.", |
72 | 94 | "json": "{\"mode\": \"normal\", \"value\": 3.85, \"hours\": 720, \"vmin\": 3.2, \"vmax\": 4.1, \"vavg\": 3.75, \"daily\": -0.05, \"weekly\": -0.3, \"monthly\": -0.8, \"minutes\": 43200}" |
| 95 | + }, |
| 96 | + { |
| 97 | + "title": "Query Current Thresholds", |
| 98 | + "description": "Response to a `card.voltage` request that includes `\"mode\": \"?\"`. The `mode` field carries the configured threshold definition string, not a bucket label.", |
| 99 | + "json": "{\"usb\": true, \"mode\": \"usb:4.6;high:4.0;normal:3.5;low:3.2;dead:0\", \"value\": 5.112190219747135}" |
73 | 100 | } |
74 | 101 | ] |
75 | 102 | } |
0 commit comments