generated from homebridge/homebridge-plugin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.schema.json
524 lines (524 loc) · 21.8 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
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
{
"pluginAlias": "midea-platform",
"pluginType": "platform",
"customUi": true,
"headerDisplay": "This plugin is currently experimental and under development. Please report [bugs](https://github.com/kovapatrik/homebridge-midea-platform/issues)",
"footerDisplay": "For help please see the [homepage](https://github.com/kovapatrik/homebridge-midea-platform)",
"singular": true,
"schema": {
"type": "object",
"properties": {
"refreshInterval": {
"title": "Interval, in seconds, to query Midea devices for state",
"type": "number",
"minimum": 0,
"maximum": 86400,
"description": "Frequency that the plugin will query devices for their current state (temperature, humidity, etc.). Some Midea devices update the plugin automatically on any change, others require that the device is queried. The default is 30 seconds, the maximum is 86400 (24 hours). Setting value to 0 (zero) disables polling and updates will only be noted if devices sends it automatically."
},
"heartbeatInterval": {
"title": "Interval, in seconds, to send keep-alive message to Midea devices",
"type": "number",
"minimum": 10,
"maximum": 120,
"description": "Frequency that the plugin sends a message to Midea devices to keep the network socket open. The default and minimum is 10 seconds, you can increase this up to a maximum of 120 (2 minutes). If you see socket closed messages in the log reduce this value."
},
"verbose": {
"title": "Enable verbose logging",
"type": "boolean",
"description": "Enables additional debug logging that may help a developer identify problems when working on Midea device support. Homebridge must be running with debug enabled for any debug logging to be visible."
},
"logRecoverableErrors": {
"title": "Log recoverable errors",
"type": "boolean",
"description": "If you see frequent warning or error messages in the log that the plugin recovers from you can suppress these messages by disabling this setting."
},
"uiDebug": {
"title": "Enable debug for custom UI",
"type": "boolean",
"description": "Debug data for the custom UI device discovery process will be logged to the Homebridge log and Javascript console."
},
"devices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"title": "Device Type",
"type": "string",
"required": true,
"enum": [
"Air Conditioner",
"Dehumidifier",
"Electric Water Heater",
"Gas Water Heater",
"Fan"
],
"description": "Select the type of device you are adding."
},
"name": {
"title": "Device Name",
"description": "This replaces the name provided by the Midea device.",
"type": "string"
},
"id": {
"title": "Device Identifier",
"type": "number",
"required": true,
"description": "The ID of the device. This shouldn't be changed if it was added by discovery."
},
"advanced_options": {
"type": "object",
"title": "Advanced Settings",
"expandable": true,
"expanded": false,
"properties": {
"ip": {
"title": "IP Address",
"type": "string",
"required": false,
"description": "IP address of device on your local LAN. This is optional and shouldn't be changed if it was added by discovery."
},
"token": {
"title": "Device login token",
"type": "string",
"description": "Token of the device obtained from cloud. This shouldn't be changed if it was added by discovery."
},
"key": {
"title": "Device login key",
"type": "string",
"description": "Key of the device obtained from cloud. This shouldn't be changed if it was added by discovery."
},
"verbose": {
"title": "Enable verbose logging",
"type": "boolean",
"description": "Override global setting for this one device."
},
"logRecoverableErrors": {
"title": "Log recoverable errors",
"type": "boolean",
"description": "Override global setting for this one device."
}
}
},
"A1_options": {
"title": "Dehumidifier Options",
"type": "object",
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices].type === 'Dehumidifier';"
},
"properties": {
"temperatureSensor": {
"title": "Temperature Sensor",
"description": "Toggles if the temperature sensor is created with the accessory.",
"type": "boolean"
},
"fanAccessory": {
"title": "Fan Accessory",
"description": "Toggles if the fan accessory is created with the accessory.",
"type": "boolean"
},
"humiditySensor": {
"title": "Humidity Sensor",
"description": "Toggles if a seperated humidity sensor is created with the accessory. This sensor can be used for autmations as for some reason the internal humidity sensor is not usable for this.",
"type": "boolean"
},
"pumpSwitch": {
"title": "Pump Switch",
"description": "Toggles if the pump switch is created with the accessory.",
"type": "boolean"
},
"waterTankSensor": {
"title": "Water Tank Sensor",
"description": "Creates a water tank sensor accessory which can be used to trigger automations when the tank is full. The sensor will show as `Leak Sensor` or `Contact Sensor` depending on this setting.",
"type": "string",
"required": true,
"enum": [
"None",
"Leak Sensor",
"Contact Sensor"
]
},
"minHumidity": {
"title": "Minimum Relative Humidity",
"type": "number",
"minimum": 0,
"maximum": 100
},
"maxHumidity": {
"title": "Maximum Relative Humidity",
"type": "number",
"minimum": 0,
"maximum": 100
},
"humidityStep": {
"title": "Humidity Step",
"type": "number",
"required": true,
"enum": [
5,
10
]
}
}
},
"AC_options": {
"title": "Air Conditioner Options",
"type": "object",
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices].type === 'Air Conditioner';"
},
"properties": {
"swing": {
"type": "object",
"title": "Swing Options",
"properties": {
"mode": {
"title": "Swing Mode",
"description": "Set swing mode of the unit. If your unit does not support this feature then leave it on None.",
"type": "string",
"required": true,
"enum": [
"None",
"Vertical",
"Horizontal",
"Both"
]
},
"angleAccessory": {
"title": "Swing Angle Accessory",
"description": "Toggles if the swing angle accessory is created with the accessory. The accessory can be used to set the angle of the slat to a specified value. The `mode` property will be used to determine the direction of the slat. The main position bar will be used to set the angle of the direction which is selected in the `mode` property.",
"type": "boolean"
},
"angleMainControl": {
"title": "Swing Angle Main Control",
"description": "If `mode` property is Both and the swing angle accessory is enabled, this property will be used to determine which direction will be controlled by the main position bar of the accessory.",
"type": "string",
"required": true,
"enum": [
"Vertical",
"Horizontal"
]
}
}
},
"heatingCapable": {
"title": "Heating Capability",
"description": "Toggles if heating is enabled on the accessory. If your unit does not support heating then leave this off.",
"type": "boolean"
},
"outDoorTemp": {
"title": "Outdoor Temperature",
"description": "Toggles if the outdoor temperature is created with the accessory.",
"type": "boolean"
},
"audioFeedback": {
"title": "Audio Feedback",
"description": "Toggles if the unit beeps when a command is sent.",
"type": "boolean"
},
"screenOff": {
"title": "Diplay screen off by default",
"description": "Toggles if the screen is turned off by default when the unit is turned on.",
"type": "boolean"
},
"ecoSwitch": {
"title": "Eco Mode Switch",
"description": "Toggles if the ECO mode switch is created with the accessory.",
"type": "boolean"
},
"dryModeSwitch": {
"title": "Dry Mode Switch",
"description": "Toggles if the dry mode switch is created with the accessory.",
"type": "boolean"
},
"breezeAwaySwitch": {
"title": "Breeze Away Mode",
"description": "Toggles if the breeze away mode swtich is created with the accessory.",
"type": "boolean"
},
"displaySwitch": {
"type": "object",
"properties": {
"flag": {
"title": "Display Switch",
"description": "Toggles if a switch, which can turn the display on or off will be created or not.",
"type": "boolean"
},
"command": {
"title": "Display Switch Alternate Command",
"description": "Use this if the switch display command does not work. If it doesn't work either way then you unit does not support this feature.",
"type": "boolean"
}
}
},
"auxHeatingSwitches": {
"title": "Auxiliary Heating Switches",
"description": "Toggles if the aux and aux+heat switches are created with the accessory.",
"type": "boolean"
},
"minTemp": {
"title": "Minimum Temperature (°C)",
"type": "number"
},
"maxTemp": {
"title": "Maximum Temperature (°C)",
"type": "number"
},
"tempStep": {
"title": "Temperature Step (°C)",
"type": "number",
"required": true,
"enum": [
0.5,
1
]
},
"fahrenheit": {
"title": "Fahrenheit",
"description": "Toggles if the temperature on the unit is displayed in Fahrenheit or Celsius.",
"type": "boolean"
},
"fanOnlyModeSwitch": {
"title": "Fan Only Mode Switch",
"description": "Toggles if the fan only mode switch is created with the accessory.",
"type": "boolean"
},
"fanAccessory": {
"title": "Fan Accessory",
"description": "Toggles if the fan accessory is created with the accessory.",
"type": "boolean"
}
}
},
"E2_options": {
"title": "Electric Water Heater Options",
"type": "object",
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices].type === 'Electric Water Heater';"
},
"properties": {
"protocol": {
"title": "Protocol",
"description": "Selects the protocol type of the water heater. Default to 'auto' which will try to detect the protocol automatically. Try to set this to 'old' or 'new' if the plugin is unable to communicate with the water heater.",
"type": "string",
"required": true,
"enum": [
"auto",
"old",
"new"
]
},
"minTemp": {
"title": "Minimum Temperature (°C)",
"type": "number"
},
"maxTemp": {
"title": "Maximum Temperature (°C)",
"type": "number"
},
"tempStep": {
"title": "Temperature Step (°C)",
"type": "number",
"required": true,
"enum": [
0.5,
1
]
},
"variableHeatingSwitch": {
"title": "Variable Heating Switch",
"description": "Toggles if the variable heating switch is created with the accessory.",
"type": "boolean"
},
"wholeTankHeatingSwitch": {
"title": "Whole Tank Heating Switch",
"description": "Toggles if the whole tank heating switch is created with the accessory.",
"type": "boolean"
}
}
},
"E3_options": {
"title": "Gas Water Heater Options",
"type": "object",
"condition": {
"functionBody": "return model.devices && model.devices[arrayIndices].type === 'Gas Water Heater';"
},
"properties": {
"precisionHalves": {
"title": "Precision Halves",
"description": "Toggles if the temperature on the unit is displayed in half degrees.",
"type": "boolean"
},
"minTemp": {
"title": "Minimum Temperature (°C)",
"type": "number"
},
"maxTemp": {
"title": "Maximum Temperature (°C)",
"type": "number"
},
"tempStep": {
"title": "Temperature Step (°C)",
"type": "number",
"required": true,
"enum": [
0.5,
1
]
},
"burningStateSensor": {
"title": "Burning State Sensor",
"description": "Toggles if the burning state sensor is created with the accessory.",
"type": "boolean"
},
"protectionSensor": {
"title": "Protection Sensor",
"description": "Toggles if the protection sensor is created with the accessory.",
"type": "boolean"
},
"zeroColdWaterSwitch": {
"title": "Zero Cold Water Switch",
"description": "Toggles if the zero cold water switch is created with the accessory.",
"type": "boolean"
},
"zeroColdPulseSwitch": {
"title": "Zero Cold Pulse Switch",
"description": "Toggles if the zero cold pulse switch is created with the accessory.",
"type": "boolean"
},
"smartVolumeSwitch": {
"title": "Smart Volume Switch",
"description": "Toggles if the smart volume switch is created with the accessory.",
"type": "boolean"
}
}
}
}
}
}
}
},
"layout": [
{
"items": [
{
"ref": "optional",
"type": "fieldset",
"expandable": true,
"expanded": false,
"title": "Optional Settings",
"items": [
"refreshInterval",
"heartbeatInterval",
"verbose",
"logRecoverableErrors",
"uiDebug"
]
},
{
"key": "devices",
"type": "tabarray",
"title": "{{ value.name || 'new device' }}",
"items": [
"devices[].type",
"devices[].id",
"devices[].name",
{
"key": "devices[].advanced_options",
"title": "Advanced Settings",
"expandable": true,
"expanded": false,
"items": [
"devices[].advanced_options.ip",
"devices[].advanced_options.token",
"devices[].advanced_options.key",
"devices[].advanced_options.verbose",
"devices[].advanced_options.logRecoverableErrors"
]
},
{
"key": "devices[].A1_options",
"expandable": true,
"expanded": false,
"items": [
"devices[].A1_options.temperatureSensor",
"devices[].A1_options.fanAccessory",
"devices[].A1_options.humiditySensor",
"devices[].A1_options.pumpSwitch",
"devices[].A1_options.waterTankSensor",
"devices[].A1_options.minHumidity",
"devices[].A1_options.maxHumidity",
"devices[].A1_options.humidityStep"
]
},
{
"key": "devices[].AC_options",
"expandable": true,
"expanded": false,
"items": [
{
"key": "devices[].AC_options.swing",
"items": [
"devices[].AC_options.swing.mode",
"devices[].AC_options.swing.angleAccessory",
"devices[].AC_options.swing.angleMainControl"
]
},
"devices[].AC_options.heatingCapable",
"devices[].AC_options.outDoorTemp",
"devices[].AC_options.audioFeedback",
"devices[].AC_options.screenOff",
"devices[].AC_options.ecoSwitch",
"devices[].AC_options.breezeAwaySwitch",
"devices[].AC_options.dryModeSwitch",
"devices[].AC_options.auxHeatingSwitches",
{
"key": "devices[].AC_options.displaySwitch",
"items": [
"devices[].AC_options.displaySwitch.flag",
"devices[].AC_options.displaySwitch.command"
]
},
"devices[].AC_options.minTemp",
"devices[].AC_options.maxTemp",
"devices[].AC_options.tempStep",
"devices[].AC_options.fahrenheit",
"devices[].AC_options.fanOnlyModeSwitch",
"devices[].AC_options.fanAccessory"
]
},
{
"key": "devices[].E2_options",
"expandable": true,
"expanded": false,
"items": [
"devices[].E2_options.protocol",
"devices[].E2_options.variableHeatingSwitch",
"devices[].E2_options.wholeTankHeatingSwitch",
"devices[].E2_options.minTemp",
"devices[].E2_options.maxTemp",
"devices[].E2_options.tempStep"
]
},
{
"key": "devices[].E3_options",
"expandable": true,
"expanded": false,
"items": [
"devices[].E3_options.precisionHalves",
"devices[].E3_options.burningStateSensor",
"devices[].E3_options.protectionSensor",
"devices[].E3_options.zeroColdWaterSwitch",
"devices[].E3_options.zeroColdPulseSwitch",
"devices[].E3_options.smartVolumeSwitch",
"devices[].E3_options.minTemp",
"devices[].E3_options.maxTemp",
"devices[].E3_options.tempStep"
]
}
]
}
]
}
]
}