generated from homebridge/homebridge-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 11
/
config.schema.json
115 lines (115 loc) · 4.93 KB
/
config.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
{
"pluginAlias": "PurpleAirSensor",
"pluginType": "platform",
"singular": true,
"headerDisplay": "",
"schema": {
"type": "object",
"properties": {
"apiReadKey": {
"title": "PurpleAir API read key",
"type": "string",
"required": false,
"description": "Ńot needed when you want to access your private sensors over the local network. To obtain the API read key, reach out to contact@purpleair.com."
},
"sensors": {
"type": "array",
"items": {
"type": "object",
"title": "Sensor",
"properties": {
"name": {
"title": "Name",
"type": "string",
"required": true,
"description": "This name will be used as the accessory name in HomeKit.",
"placeholder": "PurpleAir Mt. Hamilton"
},
"useLocalNetwork": {
"title": "Use sensor directly on the local network.",
"type": "boolean",
"default": false,
"description": "If checked, you must provide the local IP address of the sensor. Otherwise, PurpleAir public API will be used for which you must provide the API read key."
},
"sensor": {
"title": "Sensor ID",
"type": "number",
"required": false,
"description": "Required. Find the sensor ID by going to <a href='https://www.purpleair.com/map'>PurpleAir's map</a> -> click on a sensor, and look at the URL. It's the number right after 'select='.",
"condition": {
"functionBody": "return model.sensors[arrayIndices].useLocalNetwork === false;"
}
},
"localIPAddress": {
"title": "Sensor IP/hostname",
"type": "string",
"required": false,
"description": "Local IP/hostname address of the sensor",
"placeholder": "192.168.x.x",
"format": "hostname",
"condition": {
"functionBody": "return model.sensors[arrayIndices].useLocalNetwork === true;"
}
},
"key": {
"title": "Key for private sensors",
"type": "string",
"required": false,
"description": "Only needed for private sensors. Check the sensor map's URL for the 'key=' string. If you don't have a key, you can leave this field empty and the plugin will try to access the sensor as public. Note: this is different from the API read key.",
"condition": {
"functionBody": "return model.sensors[arrayIndices].useLocalNetwork === false;"
}
},
"humidity": {
"title": "Report humidity",
"type": "boolean",
"default": true,
"description": "If checked, the plugin will report humidity as a separate sensor in HomeKit."
},
"temperature": {
"title": "Report temperature",
"type": "boolean",
"default": true,
"description": "If checked, the plugin will report temperature as a separate sensor in HomeKit."
}
}
}
},
"conversion" : {
"title": "Conversion",
"type": "string",
"require": false,
"default": "None",
"description": "Conversions help accomodate different types of pollution with different particle densities. Note: for EPA you need to enable fetching humidity.",
"oneOf": [
{ "title": "None", "enum": ["None"] },
{ "title": "EPA", "enum": ["EPA"] },
{ "title": "AQandU", "enum": ["AQandU"] },
{ "title": "LRAPA", "enum": ["LRAPA"] },
{ "title": "WOODSMOKE", "enum": ["WOODSMOKE"] },
{ "title": "ALT-CF3", "enum": ["ALT-CF3"] }
]
},
"averages": {
"title": "Reading Averages",
"type": "string",
"description": "Note that for sensors accessed via local network, this config is ignored and always uses 2m average.",
"default": "realtime",
"oneOf": [
{ "title": "Show Realtime", "enum": ["realtime"] },
{ "title": "10 Minute Average", "enum": ["10m"] },
{ "title": "30 Minute Average", "enum": ["30m"] },
{ "title": "One Hour Average", "enum": ["60m"] }
]
},
"aqiInsteadOfDensity": {
"title": "Report AQI number instead of density (ug/m^3). HomeKit only allows reporting PM2.5 density instead of AQI value, but some prefer to see AQI value instead. If checked, the plugin will use the density field to report the AQI value.",
"type": "boolean"
},
"verboseLogging": {
"title": "Verbose logging. If checked, log more information at info level, so you can see what's happening in homebridge log without running homebridge in debug mode.",
"type": "boolean"
}
}
}
}