-
Notifications
You must be signed in to change notification settings - Fork 41
/
schema.json
86 lines (86 loc) · 3.4 KB
/
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
{
"title": "I2C Component Definition",
"description": "An I2C-based WipperSnapper component for use in Adafruit IO",
"type": "object",
"$defs": {
"subcomponent": {
"type": ["string", "object"],
"pattern": "^(unspecified|accelerometer|magnetic-field|orientation|gyroscope|light|pressure|proximity|gravity|acceleration|rotation|humidity|ambient-temp|object-temp|voltage|current|color|raw|pm10-std|pm25-std|pm100-std|pm10-env|pm25-env|pm100-env|co2|gas-resistance|altitude|lux|eco2|unitless-percent|ambient-temp-fahrenheit|object-temp-fahrenheit|voc-index|nox-index|tvoc)$",
"required": [ "displayName", "sensorType" ],
"additionalProperties": false,
"properties": {
"displayName": {
"description": "The human-friendly name of this sensor.",
"type": "string",
"minLength": 3,
"maxLength": 24
},
"type": {
"description": "A unique string used to look up this sensor's definition, and its parent component's definition.",
"type": "string",
"minLength": 3,
"maxLength": 24
},
"sensorType": {
"description": "One of the supported I2C sensor type strings (found in README).",
"type": "string",
"pattern": "^(unspecified|accelerometer|magnetic-field|orientation|gyroscope|light|pressure|proximity|gravity|acceleration|rotation|humidity|ambient-temp|object-temp|voltage|current|color|raw|pm10-std|pm25-std|pm100-std|pm10-env|pm25-env|pm100-env|co2|gas-resistance|altitude|lux|eco2|unitless-percent|ambient-temp-fahrenheit|object-temp-fahrenheit|voc-index|nox-index|tvoc)$"
},
"defaultPeriod": {
"description": "What period to the form should default to for this sensor.",
"type": "number",
"minimum": 30,
"maximum": 86400
}
}
}
},
"required": [ "displayName", "vendor", "i2cAddresses", "subcomponents" ],
"additionalProperties": false,
"properties": {
"displayName": {
"description": "The human-friendly name of this component.",
"type": "string",
"minLength": 3,
"maxLength": 24
},
"published": {
"description": "If true, this component is supported by the current firmware version and will be displayed to all users. If false, it is hidden behind a developer toggle so that contributors can still work on it against the production site.",
"type": "boolean"
},
"description": {
"description": "A brief description describing this component's capabilities.",
"type": "string",
"minLength": 3,
"maxLength": 255
},
"productURL": {
"description": "Link to this component's homepage.",
"type": "string",
"format": "uri"
},
"documentationURL": {
"description": "Link to this component's documentation.",
"type": "string",
"format": "uri"
},
"vendor": {
"description": "Name of the company that makes this component.",
"type": "string",
"minLength": 3,
"maxLength": 24
},
"i2cAddresses": {
"description": "List of I2C addresses (as hex string, like \"0x38\") this component can appear on.",
"type": "array",
"items": {
"type": "string"
}
},
"subcomponents": {
"description": "List of sensors on this I2C component.",
"type": "array",
"items": { "$ref": "#/$defs/subcomponent" }
}
}
}