forked from ronnieroberts/homebridge-ewelink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.schema.json
1757 lines (1757 loc) · 77.4 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
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"pluginAlias": "eWeLink",
"pluginType": "platform",
"singular": true,
"customUi": true,
"customUiPath": "./lib/homebridge-ui",
"headerDisplay": "<p align=\"center\"><img width=\"60%\" src=\"https://user-images.githubusercontent.com/43026681/101325266-63126600-3863-11eb-9382-4a2924f0e540.png\"></p><p align=\"center\">For help and support please visit our <a href=\"https://github.com/bwp91/homebridge-ewelink/wiki\">GitHub Wiki</a>. We hope you find this plugin useful!</p>",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Plugin Name",
"default": "eWeLink"
},
"username": {
"type": "string",
"title": "Username",
"required": true,
"placeholder": "Email or full phone (e.g. +8613185260282)",
"description": "Your eWeLink username, please use your main eWeLink credentials (not a secondary/shared account)."
},
"password": {
"type": "string",
"title": "Password",
"required": true,
"description": "Your eWeLink password, can also be a base64 encoded version of your password."
},
"mode": {
"type": "string",
"title": "Connection Mode",
"description": "This setting defines how the plugin communicates with your devices. For further guidance, please refer to <a href=\"https://github.com/bwp91/homebridge-ewelink/wiki/Connection-Methods\" target=\"_blank\">this wiki article</a>.",
"default": "auto",
"oneOf": [
{
"title": "Hybrid (Recommended)",
"enum": ["auto"]
},
{
"title": "Cloud Only",
"enum": ["wan"]
},
{
"title": "LAN Only (will remove unsupported devices)",
"enum": ["lan"]
}
]
},
"language": {
"type": "string",
"title": "Logging Language",
"description": "Language to use for logging.",
"default": "en",
"oneOf": [
{
"title": "English",
"enum": ["en"]
},
{
"title": "French",
"enum": ["fr"]
},
{
"title": "Thai",
"enum": ["th"]
}
]
},
"disableDeviceLogging": {
"type": "boolean",
"title": "Disable Device Logging",
"description": "Global logging setting for accessory status changes. If true then accessory status changes will not be logged. This can also be set per accessory later in the config."
},
"disableNoResponse": {
"type": "boolean",
"title": "Disable 'No Response'",
"description": "If true, devices marked as cloud-offline will not be shown as 'No Response' in HomeKit.",
"condition": {
"functionBody": "return (model.mode !== 'lan');"
}
},
"ignoredHomes": {
"title": "Ignored Homes",
"type": "string",
"description": "A list of comma-separated eWeLink home ids to ignore.",
"placeholder": ""
},
"countryCode": {
"title": "Country Code",
"type": "string",
"description": "Override the default country code, may help with login issues for users in other regions.",
"placeholder": "+44"
},
"appId": {
"title": "App ID",
"type": "string",
"description": "Available if you want to override the eWeLink App ID."
},
"appSecret": {
"title": "App Secret",
"type": "string",
"description": "Available if you want to override the eWeLink App Secret."
},
"httpHost": {
"title": "HTTP Host",
"type": "string",
"description": "Available if you want to override the API host.",
"placeholder": "eu-apia.coolkit.cc",
"oneOf": [
{
"title": "Auto (Recommended)",
"enum": ["auto"]
},
{
"title": "eu-apia.coolkit.cc",
"enum": ["eu-apia.coolkit.cc"]
},
{
"title": "us-apia.coolkit.cc",
"enum": ["us-apia.coolkit.cc"]
},
{
"title": "as-apia.coolkit.cc",
"enum": ["as-apia.coolkit.cc"]
},
{
"title": "cn-apia.coolkit.cn",
"enum": ["cn-apia.coolkit.cn"]
}
]
},
"apiPort": {
"type": "integer",
"title": "Internal API Port",
"description": "Port to use for the internal HTTP API. Set to 0 to disable. Set to 1 to choose a randomly available port.",
"minimum": 0
},
"singleDevices": {
"title": "Single Channel Devices",
"description": "Optional settings for single-channel switch, outlet and light switch devices.",
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"title": "Label",
"type": "string",
"description": "This setting has no effect except to help identify this device."
},
"deviceId": {
"type": "string",
"title": "Device ID",
"description": "Enter the 10 digit eWeLink Device ID to begin.",
"minLength": 10,
"maxLength": 10
},
"ignoreDevice": {
"type": "boolean",
"title": "Hide From HomeKit",
"description": "If true, this accessory will be removed and ignored from HomeKit.",
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].deviceId && model.singleDevices[arrayIndices].deviceId.length === 10);"
}
},
"deviceModel": {
"type": "string",
"title": "Device Model",
"description": "This setting has no effect except showing the relevant options for this model below.",
"oneOf": [
{
"title": "Sonoff BASIC/MINI/RF/SV/RE5V1C",
"enum": ["single"]
},
{
"title": "Sonoff T1/T2/T3/TX-1C/M5-1-Gang",
"enum": ["t"]
},
{
"title": "Sonoff POW/R2",
"enum": ["pow"]
},
{
"title": "Sonoff IW100/IW101",
"enum": ["iw"]
},
{
"title": "Sonoff S20/S26/S31/S55",
"enum": ["s"]
},
{
"title": "Sonoff Micro",
"enum": ["micro"]
},
{
"title": "Sonoff SLAMPHER/R2",
"enum": ["slampher"]
},
{
"title": "Eachen GD-DC5",
"enum": ["gddc5"]
},
{
"title": "KingArt KING-Q1/Q4",
"enum": ["king"]
},
{
"title": "Zigbee Single Channel (BASICZBR3/ZBMINI/S31ZB)",
"enum": ["zb"]
}
],
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].deviceId && model.singleDevices[arrayIndices].deviceId.length === 10 && !model.singleDevices[arrayIndices].ignoreDevice);"
}
},
"showAs": {
"type": "string",
"title": "Show As (Simulation)",
"description": "Expose this device as a different HomeKit accessory type.",
"oneOf": [
{
"title": "1 Switch (Default)",
"enum": ["default"]
},
{
"title": "1 Outlet",
"enum": ["outlet"]
},
{
"title": "1 Air Purifier",
"enum": ["purifier"]
},
{
"title": "1 Heater",
"enum": ["heater"]
},
{
"title": "1 Cooler",
"enum": ["cooler"]
},
{
"title": "1 Doorbell",
"enum": ["doorbell"]
},
{
"title": "1 Garage Door",
"enum": ["garage"]
},
{
"title": "1 Gate (As Garage Door)",
"enum": ["gate"]
},
{
"title": "1 Irrigation Valve",
"enum": ["valve"]
},
{
"title": "1 Lock",
"enum": ["lock"]
},
{
"title": "1 Programmable Button",
"enum": ["p_button"]
},
{
"title": "1 Sensor",
"enum": ["sensor"]
},
{
"title": "1 Tap/Faucet",
"enum": ["tap"]
},
{
"title": "1 Audio Receiver (External Accessory)",
"enum": ["audio"]
},
{
"title": "1 Set Top Box (External Accessory)",
"enum": ["box"]
},
{
"title": "1 Streaming Stick (External Accessory)",
"enum": ["stick"]
}
],
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && ['single', 't', 'pow', 'iw', 's', 'micro', 'slampher', 'zb'].includes(model.singleDevices[arrayIndices].deviceModel) && !model.singleDevices[arrayIndices].ignoreDevice);"
}
},
"showAsMotor": {
"type": "string",
"title": "KingArt KING-Q1/Q4 Accessory Type",
"description": "Select the accessory type to show in HomeKit.",
"oneOf": [
{
"title": "Window Blind/Covering (Default)",
"enum": ["blind"]
},
{
"title": "Door",
"enum": ["door"]
},
{
"title": "Garage Door",
"enum": ["garage"]
},
{
"title": "Window",
"enum": ["window"]
}
],
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].deviceId && ['king'].includes(model.singleDevices[arrayIndices].deviceModel) && !model.singleDevices[arrayIndices].ignoreDevice);"
}
},
"showAsEachen": {
"type": "string",
"title": "Garage Device Accessory Type",
"description": "Select the accessory type to show in HomeKit.",
"oneOf": [
{
"title": "Garage Door (Default)",
"enum": ["garage"]
},
{
"title": "Lock",
"enum": ["lock"]
}
],
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].deviceId && ['gddc5'].includes(model.singleDevices[arrayIndices].deviceModel) && !model.singleDevices[arrayIndices].ignoreDevice);"
}
},
"inUsePowerThreshold": {
"type": "integer",
"title": "Outlet 'In Use' Threshold",
"description": "HomeKit will set the 'In Use' status of outlet devices to true when the wattage is above this number. Must be 0 or more.",
"placeholder": 0,
"minimum": 0,
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && ['pow', 'iw'].includes(model.singleDevices[arrayIndices].deviceModel) && [undefined, 'default', 'outlet'].includes(model.singleDevices[arrayIndices].showAs) && !model.singleDevices[arrayIndices].ignoreDevice);"
}
},
"disableTimer": {
"type": "boolean",
"title": "Disable Valve Timer",
"description": "If true, the timer for the valve will be removed.",
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && ['valve'].includes(model.singleDevices[arrayIndices].showAs) && !model.singleDevices[arrayIndices].ignoreDevice);"
}
},
"temperatureSource": {
"type": "string",
"title": "Temperature Sensor ID",
"description": "Enter a eWeLink, Govee or Meross device ID which provides a current temperature reading.",
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && ['heater', 'cooler'].includes(model.singleDevices[arrayIndices].showAs) && !model.singleDevices[arrayIndices].ignoreDevice);"
}
},
"isInched": {
"type": "boolean",
"title": "Status By Inching",
"description": "If true, the plugin will show the on/off status based on inching mode.",
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && [undefined, 'default', 'outlet'].includes(model.singleDevices[arrayIndices].showAs) && !['king', 'gddc5'].includes(model.singleDevices[arrayIndices].deviceModel) && !model.singleDevices[arrayIndices].ignoreDevice);"
}
},
"sensorType": {
"type": "string",
"title": "Sensor Type",
"description": "The type of sensor to use.",
"oneOf": [
{
"title": "Motion (Default)",
"enum": ["motion"]
},
{
"title": "Smoke/Fire",
"enum": ["smoke"]
},
{
"title": "Water/Leak",
"enum": ["water"]
},
{
"title": "Carbon Monoxide",
"enum": ["co"]
},
{
"title": "Carbon Dioxide",
"enum": ["co2"]
},
{
"title": "Occupancy",
"enum": ["occupancy"]
},
{
"title": "Contact",
"enum": ["contact"]
}
],
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && ['sensor'].includes(model.singleDevices[arrayIndices].showAs) && !model.singleDevices[arrayIndices].ignoreDevice);"
}
},
"operationTime": {
"type": "integer",
"title": "Operation Time (Deciseconds)",
"description": "Garage doors: the time to open/close the device. Locks: the time to show as unlocked. This setting is in deciseconds - count the time in seconds and multiply by 10, for example 75 for 7.5 seconds. Must be 20 or more.",
"placeholder": 100,
"minimum": 20,
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && ((model.singleDevices[arrayIndices].deviceModel === 'gddc5' && model.singleDevices[arrayIndices].showAsEachen !== 'lock') || ['garage', 'lock', 'gate'].includes(model.singleDevices[arrayIndices].showAs)) && !model.singleDevices[arrayIndices].ignoreDevice);"
}
},
"operationTimeDown": {
"type": "integer",
"title": "Operation Time Down (Deciseconds)",
"description": "If your garage door has a different operation time for up and down, use this setting to specify the operation time DOWN (in deciseconds) and the other setting to specify the operation time UP. Otherwise leave blank. Must be 20 or more.",
"placeholder": 100,
"minimum": 20,
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && ['garage'].includes(model.singleDevices[arrayIndices].showAs) && !model.singleDevices[arrayIndices].ignoreDevice);"
}
},
"sensorId": {
"type": "string",
"title": "Sensor",
"description": "A DW2 or Zigbee contact sensor can be used for a single garage door or lock to determine the current state. Enter the 10 digit eWeLink Device ID (normally in the format 1000ab23cd). Otherwise leave blank.",
"minLength": 10,
"maxLength": 10,
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && ['garage', 'lock'].includes(model.singleDevices[arrayIndices].showAs) && !model.singleDevices[arrayIndices].ignoreDevice);"
}
},
"hideSensor": {
"type": "boolean",
"title": "Hide Sensor",
"description": "Hide this contact sensor accessory from HomeKit.",
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].sensorId && model.singleDevices[arrayIndices].sensorId.length === 10 && !model.singleDevices[arrayIndices].ignoreDevice);"
}
},
"obstructId": {
"type": "string",
"title": "Obstruction Switch",
"description": "An optional switch that will trigger the Obstruction Detected feature depending on its value. Otherwise leave blank.",
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && ((model.singleDevices[arrayIndices].deviceModel === 'gddc5' && model.singleDevices[arrayIndices].showAsEachen !== 'lock') || ['garage'].includes(model.singleDevices[arrayIndices].showAs)) && !model.singleDevices[arrayIndices].ignoreDevice);"
}
},
"ipAddress": {
"type": "string",
"title": "IP Address",
"description": "You can manually set the IP address for this device if it cannot be discovered by the plugin.",
"condition": {
"functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && ['single', 't', 'pow', 'iw', 's', 'micro', 'slampher', 'gddc5'].includes(model.singleDevices[arrayIndices].deviceModel) && !model.singleDevices[arrayIndices].ignoreDevice);"
}
}
}
}
},
"multiDevices": {
"title": "Multi Channel Devices",
"description": "Optional settings for multi-channel switch, outlet and light switch devices.",
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"title": "Label",
"type": "string",
"description": "This setting has no effect except to help identify this device."
},
"deviceId": {
"type": "string",
"title": "Device ID",
"description": "Enter the 10 digit eWeLink Device ID to begin.",
"minLength": 10,
"maxLength": 10
},
"ignoreDevice": {
"type": "boolean",
"title": "Hide From HomeKit",
"description": "If true, this accessory will be removed and ignored from HomeKit.",
"condition": {
"functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].deviceId && model.multiDevices[arrayIndices].deviceId.length === 10);"
}
},
"deviceModel": {
"type": "string",
"title": "Device Model",
"description": "This setting has no effect except showing the relevant options for this model below.",
"oneOf": [
{
"title": "Sonoff DUAL/R2",
"enum": ["dual_dualr2"]
},
{
"title": "Sonoff DUALR3 (Switch Mode)",
"enum": ["dualr3_switch"]
},
{
"title": "Sonoff DUALR3 (Motor Mode)",
"enum": ["dualr3_motor"]
},
{
"title": "Sonoff 4CH/PRO/R2/R3",
"enum": ["4ch"]
},
{
"title": "Sonoff T1/T2/T3/TX-2C/3C/4C/M5-2/3-Gang",
"enum": ["t"]
},
{
"title": "Zigbee Multi Channel",
"enum": ["zb"]
}
],
"condition": {
"functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].deviceId && model.multiDevices[arrayIndices].deviceId.length === 10 && !model.multiDevices[arrayIndices].ignoreDevice);"
}
},
"showAs": {
"type": "string",
"title": "Show As (Simulation)",
"description": "Expose this device as a different HomeKit accessory type.",
"oneOf": [
{
"title": "Switches (Default)",
"enum": ["default"]
},
{
"title": "Outlets",
"enum": ["outlet"]
},
{
"title": "1 Air Purifier",
"enum": ["purifier"]
},
{
"title": "1 Door",
"enum": ["door"]
},
{
"title": "1 Doorbell",
"enum": ["doorbell"]
},
{
"title": "1 Garage Door",
"enum": ["garage"]
},
{
"title": "2 Garage Doors",
"enum": ["garage_two"]
},
{
"title": "4 Garage Doors",
"enum": ["garage_four"]
},
{
"title": "1 Gate (As Garage Door)",
"enum": ["gate"]
},
{
"title": "1 Irrigation Valve",
"enum": ["valve"]
},
{
"title": "2 Irrigation Valves",
"enum": ["valve_two"]
},
{
"title": "4 Irrigation Valves",
"enum": ["valve_four"]
},
{
"title": "1 Lock",
"enum": ["lock"]
},
{
"title": "1 Programmable Button",
"enum": ["p_button"]
},
{
"title": "1 Sensor",
"enum": ["sensor"]
},
{
"title": "1 Switch & 1 Valve",
"enum": ["switch_valve"]
},
{
"title": "1 Tap/Faucet",
"enum": ["tap"]
},
{
"title": "2 Taps/Faucets",
"enum": ["tap_two"]
},
{
"title": "1 Window",
"enum": ["window"]
},
{
"title": "1 Window Blind/Covering",
"enum": ["blind"]
},
{
"title": "1 Audio Receiver (External Accessory)",
"enum": ["audio"]
},
{
"title": "1 Set Top Box (External Accessory)",
"enum": ["box"]
},
{
"title": "1 Streaming Stick (External Accessory)",
"enum": ["stick"]
}
],
"condition": {
"functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].deviceId && ['dual_dualr2', 'dualr3_switch', '4ch', 't', 'zb'].includes(model.multiDevices[arrayIndices].deviceModel) && !model.multiDevices[arrayIndices].ignoreDevice);"
}
},
"showAsMotor": {
"type": "string",
"title": "DUALR3 Accessory Type",
"description": "Select the accessory type to show in HomeKit.",
"oneOf": [
{
"title": "Window Blind/Covering (Default)",
"enum": ["blind"]
},
{
"title": "Door",
"enum": ["door"]
},
{
"title": "Garage Door",
"enum": ["garage"]
},
{
"title": "Window",
"enum": ["window"]
}
],
"condition": {
"functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].deviceId && ['dualr3_motor'].includes(model.multiDevices[arrayIndices].deviceModel) && !model.multiDevices[arrayIndices].ignoreDevice);"
}
},
"hideChannels": {
"type": "string",
"title": "Hide Channels",
"description": "A comma separated list of channels to hide for this device. For example '0' or '0,1,2'.",
"condition": {
"functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].deviceId && ['dual_dualr2', 'dualr3_switch', '4ch', 't', 'zb'].includes(model.multiDevices[arrayIndices].deviceModel) && [undefined, 'default', 'outlet'].includes(model.multiDevices[arrayIndices].showAs) && !model.multiDevices[arrayIndices].ignoreDevice);"
}
},
"inUsePowerThreshold": {
"type": "integer",
"title": "Outlet 'In Use' Threshold",
"description": "HomeKit will set the 'In Use' status of outlet devices to true when the wattage is above this number. Must be 0 or more.",
"placeholder": 0,
"minimum": 0,
"condition": {
"functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].deviceId && [undefined, 'default', 'outlet'].includes(model.multiDevices[arrayIndices].showAs) && ['dualr3_switch'].includes(model.multiDevices[arrayIndices].deviceModel) && !model.multiDevices[arrayIndices].ignoreDevice);"
}
},
"disableTimer": {
"type": "boolean",
"title": "Disable Valve Timer",
"description": "If true, the timer for the valve will be removed.",
"condition": {
"functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && ['valve', 'valve_two', 'valve_four'].includes(model.multiDevices[arrayIndices].showAs) && !model.multiDevices[arrayIndices].ignoreDevice);"
}
},
"inchChannels": {
"type": "string",
"title": "Status By Inching",
"description": "A comma separated list of channels to show the on/off status based on inching mode. For example '1,2'.",
"condition": {
"functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && ['dual_dualr2', 'dualr3_switch', '4ch', 't', 'zb'].includes(model.multiDevices[arrayIndices].deviceModel) && [undefined, 'default', 'outlet'].includes(model.multiDevices[arrayIndices].showAs) && !model.multiDevices[arrayIndices].ignoreDevice);"
}
},
"sensorType": {
"type": "string",
"title": "Sensor Type",
"description": "The type of sensor to use.",
"oneOf": [
{
"title": "Motion (Default)",
"enum": ["motion"]
},
{
"title": "Smoke/Fire",
"enum": ["smoke"]
},
{
"title": "Water/Leak",
"enum": ["water"]
},
{
"title": "Carbon Monoxide",
"enum": ["co"]
},
{
"title": "Carbon Dioxide",
"enum": ["co2"]
},
{
"title": "Occupancy",
"enum": ["occupancy"]
},
{
"title": "Contact",
"enum": ["contact"]
}
],
"condition": {
"functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && ['sensor'].includes(model.multiDevices[arrayIndices].showAs) && !model.multiDevices[arrayIndices].ignoreDevice);"
}
},
"operationTime": {
"type": "integer",
"title": "Operation Time (Deciseconds)",
"description": "Blinds/garage doors: the time to open/close the device. Locks: the time to show as unlocked. This setting is in deciseconds - count the time in seconds and multiply by 10, for example 75 for 7.5 seconds. Must be 20 or more.",
"placeholder": 100,
"minimum": 20,
"condition": {
"functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && ['garage', 'garage_two', 'garage_four', 'blind', 'door', 'window', 'lock', 'gate'].includes(model.multiDevices[arrayIndices].showAs) && !model.multiDevices[arrayIndices].ignoreDevice);"
}
},
"operationTimeDown": {
"type": "integer",
"title": "Operation Time Down (Deciseconds)",
"description": "If your garage door or blind has a different operation time for up and down, use this setting to specify the operation time DOWN (in deciseconds) and the other setting to specify the operation time UP. Otherwise leave blank. Must be 20 or more.",
"placeholder": 100,
"minimum": 20,
"condition": {
"functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && ['garage', 'garage_two', 'garage_four', 'blind', 'door', 'window'].includes(model.multiDevices[arrayIndices].showAs) && !model.multiDevices[arrayIndices].ignoreDevice);"
}
},
"sensorId": {
"type": "string",
"title": "Sensor",
"description": "A DW2 or Zigbee contact sensor can be used for a single garage door or lock to determine the current state. Enter the 10 digit eWeLink Device ID (normally in the format 1000ab23cd). Otherwise leave blank.",
"minLength": 10,
"maxLength": 10,
"condition": {
"functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && ['garage', 'lock'].includes(model.multiDevices[arrayIndices].showAs) && !model.multiDevices[arrayIndices].ignoreDevice);"
}
},
"hideSensor": {
"type": "boolean",
"title": "Hide Sensor",
"description": "Hide this contact sensor accessory from HomeKit.",
"condition": {
"functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].sensorId && model.multiDevices[arrayIndices].sensorId.length === 10 && !model.multiDevices[arrayIndices].ignoreDevice);"
}
},
"obstructId": {
"type": "string",
"title": "Obstruction Switch",
"description": "An optional switch that will trigger the Obstruction Detected feature depending on its value. Otherwise leave blank.",
"condition": {
"functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && ['garage'].includes(model.multiDevices[arrayIndices].showAs) && !model.multiDevices[arrayIndices].ignoreDevice);"
}
},
"ipAddress": {
"type": "string",
"title": "IP Address",
"description": "You can manually set the IP address for this device if it cannot be discovered by the plugin.",
"condition": {
"functionBody": "return (model.mode !== 'wan' && model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].deviceId && ['dual_dualr2', 'dualr3_switch', 'dualr3_motor', '4ch', 't'].includes(model.multiDevices[arrayIndices].deviceModel) && !model.multiDevices[arrayIndices].ignoreDevice);"
}
}
}
}
},
"lightDevices": {
"title": "Light Devices",
"description": "Optional settings for dimmer, bulb and LED strip devices.",
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"title": "Label",
"type": "string",
"description": "This setting has no effect except to help identify this device."
},
"deviceId": {
"type": "string",
"title": "Device ID",
"description": "Enter the 10 digit eWeLink Device ID to begin.",
"minLength": 10,
"maxLength": 10
},
"ignoreDevice": {
"type": "boolean",
"title": "Hide From HomeKit",
"description": "If true, this accessory will be removed and ignored from HomeKit.",
"condition": {
"functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 10);"
}
},
"deviceModel": {
"type": "string",
"title": "Device Model",
"description": "This setting has no effect except showing the relevant options for this model below.",
"oneOf": [
{
"title": "Sonoff D1/R2",
"enum": ["d1"]
},
{
"title": "Sonoff B1/R2",
"enum": ["b1"]
},
{
"title": "Sonoff L1/L2/Lite",
"enum": ["l1"]
},
{
"title": "Sonoff B02-B-A60",
"enum": ["bulbB02BA60"]
},
{
"title": "Sonoff B02-F-A60",
"enum": ["bulbB02FA60"]
},
{
"title": "Sonoff B02-F-ST64",
"enum": ["bulbB02FST64"]
},
{
"title": "Sonoff B05-B-A60",
"enum": ["bulbB05BA60"]
},
{
"title": "Sonoff B05-BL-A19",
"enum": ["bulbB05BLA19"]
},
{
"title": "KingArt KING-M4",
"enum": ["king"]
},
{
"title": "Zigbee Light (Dimmer)",
"enum": ["zl_d"]
},
{
"title": "Zigbee Light (Dimmer + CCT)",
"enum": ["zl_dc"]
}
],
"condition": {
"functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 10 && !model.lightDevices[arrayIndices].ignoreDevice);"
}
},
"showAs": {
"type": "string",
"title": "Show As (Simulation)",
"description": "Expose this device as a different HomeKit accessory type.",
"oneOf": [
{
"title": "1 Light (Default)",
"enum": ["default"]
},
{
"title": "1 Fan",
"enum": ["fan"]
}
],
"condition": {
"functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && ['d1', 'king'].includes(model.lightDevices[arrayIndices].deviceModel) && !model.lightDevices[arrayIndices].ignoreDevice);"
}
},
"brightnessStep": {
"title": "Brightness Step",
"type": "integer",
"description": "A minimum step for the brightness slider in the Home app. Must be 1 or more.",
"placeholder": 1,
"minimum": 1,
"condition": {
"functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && ['d1', 'l1', 'bulbB02BA60', 'bulbB05BA60', 'bulbB02FA60', 'bulbB02FST64', 'bulbB05BLA19', 'king', 'zl_d', 'zl_dc'].includes(model.lightDevices[arrayIndices].deviceModel) && !model.lightDevices[arrayIndices].ignoreDevice);"
}
},
"adaptiveLightingShift": {
"title": "Adaptive Lighting Shift",
"type": "integer",
"description": "The mired for each Adaptive Lighting update will be increased by this value, making the light appear warmer. Set to -1 to remove Adaptive Lighting feature. Must be -1 or more.",
"placeholder": 0,
"minimum": -1,
"condition": {
"functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && ['l1', 'bulbB02BA60', 'bulbB05BA60', 'bulbB02FA60', 'bulbB02FST64', 'bulbB05BLA19', 'zl_dc'].includes(model.lightDevices[arrayIndices].deviceModel) && !model.lightDevices[arrayIndices].ignoreDevice);"
}
},
"offlineAsOff": {
"type": "boolean",
"title": "Offline As Off",
"description": "If true, this accessory will show as off if reported offline.",
"condition": {
"functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].deviceId && model.lightDevices[arrayIndices].deviceId.length === 10 && !model.lightDevices[arrayIndices].ignoreDevice);"
}
},
"ipAddress": {
"type": "string",
"title": "IP Address",
"description": "You can manually set the IP address for this device if it cannot be discovered by the plugin.",
"condition": {
"functionBody": "return (model.mode !== 'wan' && model.lightDevices && model.lightDevices[arrayIndices] && ['d1', 'bulbB05BLA19'].includes(model.lightDevices[arrayIndices].deviceModel) && !model.lightDevices[arrayIndices].ignoreDevice);"
}
}
}
}
},
"thDevices": {
"title": "Thermostat Devices",
"description": "Optional settings for thermostat devices, NSPanel, TH10/16 and THR316/320.",
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"title": "Label",
"type": "string",
"description": "This setting has no effect except to help identify this device."
},
"deviceId": {
"type": "string",
"title": "Device ID",
"description": "Enter the 10 digit eWeLink Device ID to begin.",
"minLength": 10,
"maxLength": 10
},
"ignoreDevice": {
"type": "boolean",
"title": "Hide From HomeKit",
"description": "If true, this accessory will be removed and ignored from HomeKit.",
"condition": {
"functionBody": "return (model.thDevices && model.thDevices[arrayIndices] && model.thDevices[arrayIndices].deviceId && model.thDevices[arrayIndices].deviceId.length === 10);"
}
},
"deviceModel": {
"type": "string",
"title": "Device Model",
"description": "This setting has no effect except showing the relevant options for this model below.",
"oneOf": [
{
"title": "Sonoff TH10/16 and THR316/320",
"enum": ["th"]
},
{
"title": "Sonoff NSPanel",
"enum": ["panel"]
},
{
"title": "Sonoff SC",
"enum": ["sc"]
},
{
"title": "KKMOON HC-T010-EWF",
"enum": ["hc"]
}
],
"condition": {
"functionBody": "return (model.thDevices && model.thDevices[arrayIndices] && model.thDevices[arrayIndices].deviceId && model.thDevices[arrayIndices].deviceId.length === 10 && !model.thDevices[arrayIndices].ignoreDevice);"
}
},
"showAs": {
"type": "string",
"title": "Show As (Simulation)",
"description": "Expose this device as a different HomeKit accessory type.",
"oneOf": [
{
"title": "1 Switch + Sensors (Default)",
"enum": ["default"]
},
{
"title": "1 Thermostat",
"enum": ["thermostat"]
},
{
"title": "1 Heater",
"enum": ["heater"]
},
{
"title": "1 Cooler",
"enum": ["cooler"]
},
{
"title": "1 Humidifier",
"enum": ["humidifier"]
},
{
"title": "1 Dehumidifier",
"enum": ["dehumidifier"]
}
],