forked from we5/homebridge-philipsair-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.schema.json
203 lines (203 loc) · 6.66 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
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
{
"pluginAlias": "PhilipsAirPlatform",
"pluginType": "platform",
"singular": true,
"headerDisplay": "Homebridge Plugin for Philips Air Purifiers / Humidifiers.",
"footerDisplay": "For documentation please see [GitHub repository](https://github.com/SeydX/homebridge-philipsair-platform)",
"schema": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"default": "PhilipsAirPlatform",
"description": "Name for the log."
},
"debug": {
"title": "Debug Log",
"type": "boolean",
"description": "Enables additional output (debug) in the log."
},
"warn": {
"title": "Warn Log",
"type": "boolean",
"description": "Enables additional output (warn) in the log.",
"default": true
},
"error": {
"title": "Error Log",
"type": "boolean",
"description": "Enables additional output (error) in the log.",
"default": true
},
"extendedError": {
"title": "Extended Error Log",
"type": "boolean",
"description": "Enables additional output (detailed error) in the log.",
"default": true,
"condition": {
"functionBody": "try { return model.error } catch(e){ return false }"
}
},
"devices": {
"title": "Devices",
"type": "array",
"required": true,
"minLength": 1,
"items": {
"title": "Air Purifier",
"type": "object",
"properties": {
"active": {
"title": "Active",
"type": "boolean",
"description": "If enabled, the device will be exposed to HomeKit."
},
"name": {
"title": "Name",
"type": "string",
"required": true,
"description": "Set the device name for display in the Home app."
},
"manufacturer": {
"name": "Manufacturer",
"type": "string",
"placeholder": "Philips",
"default": "Philips",
"description": "Set the manufacturer name for display in the Home app."
},
"model": {
"name": "Model",
"type": "string",
"placeholder": "Air Purifier",
"default": "Air Purifier",
"description": "Set the model for display in the Home app."
},
"serialNumber": {
"name": "Serial Number",
"type": "string",
"placeholder": "000000",
"default": "000000",
"description": "Set the serial number for display in the Home app."
},
"host": {
"title": "Host Address",
"type": "string",
"required": true,
"format": "ipv4",
"placeholder": "10.0.1.16",
"description": "IP address of your device.",
"condition": {
"functionBody": "try { return model.devices[arrayIndices[0]].active } catch(e){ return false }"
}
},
"port": {
"title": "Port",
"type": "integer",
"placeholder": 5683,
"description": "Port of your device.",
"condition": {
"functionBody": "try { return model.devices[arrayIndices[0]].active } catch(e){ return false }"
}
},
"humidifier": {
"title": "Humidifier",
"type": "boolean",
"description": "Expose a separate humidifier accessory to HomeKit."
},
"light": {
"title": "Light",
"type": "boolean",
"description": "Expose device lights as lightbulbs to HomeKit."
},
"temperature": {
"title": "Temperature sensor",
"type": "boolean",
"description": "Expose device temperature as temperature sensor to HomeKit."
},
"humidity": {
"title": "Humidity sensor",
"type": "boolean",
"description": "Expose device humidity as humidity sensor to HomeKit."
},
"sleepSpeed": {
"title": "Sleep Speed",
"type": "boolean",
"description": "Does this device support 'sleep' speed?"
},
"allergicFunc": {
"title": "Allergic mode function",
"type": "boolean",
"description": "Does this device support 'allergic' function?"
}
}
}
}
}
},
"layout": [
"name",
{
"title": "Log",
"orderable": false,
"expandable": true,
"expanded": false,
"type": "section",
"items": ["debug", "warn", "error", "extendedError"]
},
{
"title": "Devices",
"expandable": true,
"expanded": true,
"orderable": false,
"type": "section",
"items": [
{
"key": "devices",
"type": "array",
"orderable": false,
"buttonText": "Add Device",
"items": [
"devices[].active",
"devices[].name",
"devices[].host",
"devices[].port",
{
"key": "devices[]",
"type": "section",
"title": "Branding",
"expandable": true,
"expanded": false,
"condition": {
"functionBody": "try { return model.devices[arrayIndices[0]].active } catch(e){ return false }"
},
"items": ["devices[].manufacturer", "devices[].model", "devices[].serialNumber"]
},
{
"key": "devices[]",
"type": "section",
"title": "Accessories",
"expandable": true,
"expanded": false,
"condition": {
"functionBody": "try { return model.devices[arrayIndices[0]].active } catch(e){ return false }"
},
"items": ["devices[].humidifier", "devices[].light", "devices[].temperature", "devices[].humidity"]
},
{
"key": "devices[]",
"type": "section",
"title": "Extras",
"expandable": true,
"expanded": false,
"condition": {
"functionBody": "try { return model.devices[arrayIndices[0]].active } catch(e){ return false }"
},
"items": ["devices[].sleepSpeed", "devices[].allergicFunc"]
}
]
}
]
}
]
}