-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.schema.json
358 lines (358 loc) · 13.2 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
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
{
"pluginAlias": "RainBird",
"pluginType": "platform",
"singular": true,
"customUi": true,
"customUiPath": "./dist/homebridge-ui",
"headerDisplay": "The Homebridge [RainBird](https://rainbird.com) plugin allows you to access your RainBird Controller from HomeKit with [Homebridge](https://homebridge.io).",
"footerDisplay": "Your RainBird account has been linked. Please raise any issues on our [project page](https://github.com/homebridge-plugins/homebridge-rainbird/issues).\n\nIf you would like to have other features added to this plugin fill out [Feature Request Form](https://github.com/homebridge-plugins/homebridge-rainbird/issues/new?assignees=&labels=&template=feature_request.md).",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name",
"default": "RainBird",
"required": true
},
"devices": {
"type": "array",
"items": {
"title": "Devices",
"type": "object",
"properties": {
"configDeviceName": {
"title": "Device Name",
"type": "string",
"pattern": "^[a-zA-Z0-9]+([a-zA-Z0-9 ]*[a-zA-Z0-9]+)?$",
"placeholder": "RainBird Controller"
},
"ipaddress": {
"title": "IP Address",
"description": "The device's Static IP address. Recommended to set this device's IP with a Static IP.",
"type": "string",
"format": "ipv4",
"pattern": "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$",
"placeholder": "192.168.1.1",
"required": true
},
"password": {
"title": "Password",
"type": "string",
"required": true,
"x-schema-form": {
"type": "password"
},
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"external": {
"title": "External Accessory",
"description": "This will make all device under this acessory be displayed as an external accesory and will not be added to cache or be added with child bridge of this plugin. Each device will have to be added seperately.",
"type": "boolean",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"showRainSensor": {
"title": "Show Rain Sensor (as Leak Sensor)",
"type": "boolean",
"required": false,
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"showValveSensor": {
"title": "Enable Valve Notifications (as Contact Sensors)",
"type": "boolean",
"required": false,
"description": "If enabled, whichever zone runs the contact sensors will go off as detected so you know that it is running.",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"showProgramASwitch": {
"title": "Show Program A Switch",
"type": "boolean",
"requried": false,
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"showProgramBSwitch": {
"title": "Show Program B Switch",
"type": "boolean",
"requried": false,
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"showProgramCSwitch": {
"title": "Show Program C Switch",
"type": "boolean",
"requried": false,
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"showProgramDSwitch": {
"title": "Show Program D Switch (not supported by all models)",
"type": "boolean",
"requried": false,
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"showStopIrrigationSwitch": {
"title": "Show Stop Irrigation Switch",
"type": "boolean",
"requried": false,
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"showZoneValve": {
"title": "Show Zones as Valve Accessories",
"type": "boolean",
"required": false,
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"includeZones": {
"title": "Zones to Include",
"type": "string",
"requried": false,
"description": "comma seperated list of zone numbers to create valve accessories for (leave blank for all)",
"pattern": "^[0-9]{1,3}(,[0-9]{1,3})*$",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"showDelayIrrigationSwitch": {
"title": "Show Delay Irrigation Switch",
"type": "boolean",
"required": false,
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"irrigationDelay": {
"title": "Irrigation Delay (days)",
"type": "number",
"minimum": 1,
"maximum": 14,
"placeholder": 1,
"required": false,
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"minValueRemainingDuration": {
"title": "Min Value for Ramaining Duration",
"type": "number",
"placeholder": 0,
"required": false,
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"maxValueRemainingDuration": {
"title": "Max Value for Ramaining Duration",
"type": "number",
"placeholder": 3600,
"required": false,
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"syncTime": {
"title": "Sync date and time of controller with host",
"type": "boolean",
"default": false,
"required": false,
"description": "Useful for automatically changing the controller's time when Daylight Savings starts/ends or fixing the time if the controller's internal clock runs fast or slow",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"showRequestResponse": {
"title": "Show RainBird requests and responses in the log",
"type": "boolean",
"requried": false,
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"firmware": {
"title": "Firmware Override",
"type": "string",
"placeholder": "1.2.8",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"refreshRate": {
"title": "Device Refresh Rate",
"type": "number",
"minimum": 120,
"placeholder": 900,
"description": "Indicates the number of seconds between refreshes of the Rainbird Client.",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"hide_device": {
"title": "Delete Device",
"type": "boolean",
"description": "DO NOT USE, UNLESS YOU WANT TO DELETE THIS DEVICE FROM CACHE.",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
},
"logging": {
"title": "Device Logging Override Setting",
"type": "string",
"required": true,
"default": "",
"oneOf": [
{
"title": "Default Logging",
"enum": [""]
},
{
"title": "Standard Logging",
"enum": ["standard"]
},
{
"title": "No Logging",
"enum": ["none"]
},
{
"title": "Debug Logging",
"enum": ["debug"]
}
],
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].ipaddress);"
}
}
}
}
},
"options": {
"type": "object",
"properties": {
"refreshRate": {
"title": "Refresh Rate",
"type": "number",
"minimum": 120,
"placeholder": 900,
"description": "Indicates the number of seconds between refreshes of the Rainbird Client."
},
"logging": {
"title": "Logging Setting",
"type": "string",
"required": true,
"default": "",
"oneOf": [
{
"title": "Default Logging",
"enum": [""]
},
{
"title": "Standard Logging",
"enum": ["standard"]
},
{
"title": "No Logging",
"enum": ["none"]
},
{
"title": "Debug Logging",
"enum": ["debug"]
}
]
},
"allowInvalidCharacters": {
"title": "Allow Invalid Characters",
"type": "boolean",
"description": "If true, invalid characters will be allowed in the device name."
}
}
}
}
},
"layout": [
{
"type": "fieldset",
"title": "Devices",
"expandable": true,
"expanded": true,
"items": [
{
"key": "devices",
"notitle": false,
"type": "tabarray",
"title": "{{ value.configDeviceName || value.ipaddress || 'New Device' }}",
"expandable": true,
"expanded": false,
"draggable": true,
"orderable": true,
"items": [
"devices[].configDeviceName",
"devices[].ipaddress",
"devices[].password",
"devices[].hide_device",
"devices[].external",
"devices[].showRainSensor",
"devices[].showValveSensor",
"devices[].showProgramASwitch",
"devices[].showProgramBSwitch",
"devices[].showProgramCSwitch",
"devices[].showProgramDSwitch",
"devices[].showStopIrrigationSwitch",
"devices[].showZoneValve",
"devices[].includeZones",
"devices[].showDelayIrrigationSwitch",
"devices[].irrigationDelay",
"devices[].minValueRemainingDuration",
"devices[].maxValueRemainingDuration",
"devices[].syncTime",
"devices[].showRequestResponse",
"devices[].firmware",
"devices[].refreshRate",
"devices[].logging"
]
}
]
},
{
"type": "fieldset",
"title": "Advanced Settings",
"expandable": true,
"expanded": false,
"items": [
{
"type": "help",
"helpvalue": "<h5>Refresh Rate</h5><em class='primary-text'>Refresh Rate indicates the number of seconds between refreshes of the RainbirdClient.</em>"
},
{
"key": "options.refreshRate",
"notitle": true
},
{
"type": "help",
"helpvalue": "<h5>Push Rate</h5><em class='primary-text'>Push Rate indicates the number of seconds between pushes to Rainbird Client.</em>"
},
{
"key": "options.pushRate",
"notitle": true
},
"options.logging",
"options.allowInvalidCharacters"
]
}
]
}