forked from OpenWonderLabs/homebridge-switchbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.schema.json
1348 lines (1347 loc) · 69.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": "SwitchBot",
"pluginType": "platform",
"singular": true,
"customUi": true,
"headerDisplay": "<p align='center'><img width='100px' src='https://user-images.githubusercontent.com/9875439/102681754-ac2eb800-4189-11eb-8e17-7c47c804484b.png'></p>\n\nThe **SwitchBot** plugin allows you to control SwitchBot Devices. \n\nTo get started link your SwitchBot account.\n\n1. Download SwitchBot App on App Store or Google Play Store.\n\n2. Register a SwitchBot account and log in into your account.\n\n3. Generate an Open Token within the App.\n\n4. Input your `Open Token` into the paramter below.",
"footerDisplay": "Please raise any issues on our [project page](https://github.com/OpenWonderLabs/homebridge-switchbot/issues).\n\nIf you would like to have other SwitchBot Devices added to this plugin fill out [Feature Request Form](https://github.com/OpenWonderLabs/homebridge-switchbot/issues/new?assignees=&labels=&template=feature_request.md).\n\n[SwitchBot Website](https://www.switch-bot.com)",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name",
"default": "SwitchBot"
},
"credentials": {
"type": "object",
"properties": {
"token": {
"title": "Token",
"type": "string",
"x-schema-form": {
"type": "password"
}
},
"secret": {
"title": "Secret",
"type": "string",
"x-schema-form": {
"type": "password"
}
},
"notice": {
"title": "Notice",
"type": "string",
"default": "Keep your Token & Secret a secret!"
}
},
"required": ["token", "secret", "notice"]
},
"options": {
"type": "object",
"properties": {
"devices": {
"type": "array",
"items": {
"title": "Devices",
"type": "object",
"properties": {
"deviceId": {
"title": "Device ID",
"type": "string",
"placeholder": "81F3UT59513F"
},
"configDeviceName": {
"title": "Device Name",
"type": "string",
"placeholder": "SwitchBot",
"condition": {
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId);"
}
},
"hide_device": {
"title": "Hide Device",
"type": "boolean",
"description": "If true, device will be removed or hidden from HomeKit.",
"condition": {
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId);"
}
},
"configDeviceType": {
"title": "Device Type",
"type": "string",
"oneOf": [
{
"title": "Bot",
"enum": ["Bot"]
},
{
"title": "Curtain",
"enum": ["Curtain"]
},
{
"title": "Blind Tilt",
"enum": ["Blind Tilt"]
},
{
"title": "Plug",
"enum": ["Plug"]
},
{
"title": "Meter",
"enum": ["Meter"]
},
{
"title": "Motion Sensor",
"enum": ["Motion Sensor"]
},
{
"title": "Hub 2",
"enum": ["Hub 2"]
},
{
"title": "Contact Sensor",
"enum": ["Contact Sensor"]
},
{
"title": "Color Bulb",
"enum": ["Color Bulb"]
},
{
"title": "Ceiling Light",
"enum": ["Ceiling Light"]
},
{
"title": "Ceiling Light Pro",
"enum": ["Ceiling Light Pro"]
},
{
"title": "Humidifier",
"enum": ["Humidifier"]
},
{
"title": "Smart Fan",
"enum": ["Smart Fan"]
},
{
"title": "Smart Lock",
"enum": ["Smart Lock"]
},
{
"title": "Strip Light",
"enum": ["Strip Light"]
},
{
"title": "Meter Plus (US)",
"enum": ["MeterPlus"]
},
{
"title": "Meter Plus (JP)",
"enum": ["Meter Plus (JP)"]
},
{
"title": "Indoor/Outdoor Sensor",
"enum": ["WoIOSensor"]
},
{
"title": "Plug Mini (US)",
"enum": ["Plug Mini (US)"]
},
{
"title": "Plug Mini (JP)",
"enum": ["Plug Mini (JP)"]
},
{
"title": "Robot Vacuum Cleaner S1",
"enum": ["Robot Vacuum Cleaner S1"]
},
{
"title": "Robot Vacuum Cleaner S1 Plus",
"enum": ["Robot Vacuum Cleaner S1 Plus"]
}
],
"condition": {
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device);"
}
},
"connectionType": {
"title": "Connection Type",
"type": "string",
"oneOf": [
{
"title": "BLE/OpenAPI",
"enum": ["BLE/OpenAPI"]
},
{
"title": "OpenAPI",
"enum": ["OpenAPI"]
},
{
"title": "BLE",
"enum": ["BLE"]
},
{
"title": "Disable",
"enum": ["Disabled"]
}
],
"description": "Bluetooth (BLE) API is only available for the following Device Types: Humidifier, Meter, MeterPlus, Curtain, Bot, Motion Sensor, Contact Sensor, Plug Mini (US), Plug Mini (JP), & Color Bulb",
"condition": {
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType !== 'Hub 2');"
}
},
"customBLEaddress": {
"title": "Custom BLE Address",
"type": "string",
"placeholder": "81F3UT59513F",
"condition": {
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].connectionType === 'BLE' || model.options.devices[arrayIndices].connectionType === 'BLE/OpenAPI'));"
}
},
"scanDuration": {
"title": "Scan Duration (Default is 1 Second) for BLE",
"type": "number",
"placeholder": 1,
"condition": {
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].connectionType === 'BLE' || model.options.devices[arrayIndices].connectionType === 'BLE/OpenAPI'));"
}
},
"hidHub": {
"type": "object",
"properties": {
"hide_temperature": {
"title": "Hide Hub 2's Temperature Sensor",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].configDeviceType === 'Hub 2') && model.options.devices[arrayIndices].deviceId);"
}
},
"hide_humidity": {
"title": "Hide Hub 2's Humidity Sensor",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].configDeviceType === 'Hub 2') && model.options.devices[arrayIndices].deviceId);"
}
}
}
},
"bot": {
"type": "object",
"properties": {
"mode": {
"title": "Mode",
"type": "string",
"oneOf": [
{
"title": "Press",
"enum": ["press"]
},
{
"title": "Switch",
"enum": ["switch"]
},
{
"title": "Multi-Press",
"enum": ["multipress"]
}
],
"description": "Press Mode presses one time per 'On' state in the Home App/API. Switch Mode allows you to set how many presses occur when the device is set to 'On'. Multi-Press allows you to queue up multiple button presses. It creates a queue by counting each time the device is set to 'On'. It is most useful for scripting with cURL requests or other API calls. Multi-Press only works when using OpenAPI.",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Bot' && model.options.devices[arrayIndices].deviceId);"
}
},
"deviceType": {
"title": "What Type of Device do you want to display in the Home App?",
"type": "string",
"oneOf": [
{
"title": "Outlet",
"enum": ["outlet"]
},
{
"title": "Garage Door",
"enum": ["garagedoor"]
},
{
"title": "Door",
"enum": ["door"]
},
{
"title": "Lock",
"enum": ["lock"]
},
{
"title": "Faucet",
"enum": ["faucet"]
},
{
"title": "Fan",
"enum": ["fan"]
},
{
"title": "Window",
"enum": ["window"]
},
{
"title": "Window Covering",
"enum": ["windowcovering"]
},
{
"title": "Stateful Programmable Switch (Only Works in 3rd Party Home Apps)",
"enum": ["stateful"]
},
{
"title": "Switch",
"enum": ["switch"]
}
],
"placeholder": "outlet",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Bot' && model.options.devices[arrayIndices].deviceId && model.options.devices[arrayIndices].bot && model.options.devices[arrayIndices].bot.mode);"
}
},
"allowPush": {
"title": "Allow Changes to Be Pushed",
"description": "If set to true, this will allow commands to be sent even if device state is already in state that is being pushed.",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Bot' && model.options.devices[arrayIndices].deviceId && model.options.devices[arrayIndices].bot && model.options.devices[arrayIndices].bot.mode);"
}
},
"doublePress": {
"title": "How many presses do you want to simulate?",
"type": "number",
"placeholder": "2",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Bot' && model.options.devices[arrayIndices].deviceId && model.options.devices[arrayIndices].bot && model.options.devices[arrayIndices].bot.mode);"
}
},
"pushRatePress": {
"title": "Double Press Push Rate",
"type": "number",
"placeholder": "15",
"description": "Indicates the number of seconds between pushes for double presses to SwitchBot API",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Bot' && model.options.devices[arrayIndices].deviceId && model.options.devices[arrayIndices].bot && model.options.devices[arrayIndices].bot.mode && model.options.devices[arrayIndices].bot.doublePress > 1);"
}
}
}
},
"meter": {
"type": "object",
"properties": {
"hide_temperature": {
"title": "Hide Meter's Temperature Sensor",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].configDeviceType === 'Meter' || model.options.devices[arrayIndices].configDeviceType === 'MeterPlus' || model.options.devices[arrayIndices].configDeviceType === 'Meter Plus (JP)' || model.options.devices[arrayIndices].configDeviceType === 'WoIOSensor') && model.options.devices[arrayIndices].deviceId);"
}
},
"hide_humidity": {
"title": "Hide Meter's Humidity Sensor",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].configDeviceType === 'Meter' || model.options.devices[arrayIndices].configDeviceType === 'MeterPlus' || model.options.devices[arrayIndices].configDeviceType === 'Meter Plus (JP)' || model.options.devices[arrayIndices].configDeviceType === 'WoIOSensor') && model.options.devices[arrayIndices].deviceId);"
}
}
}
},
"humidifier": {
"type": "object",
"properties": {
"hide_temperature": {
"title": "Hide Humidifier's Temperature Sensor",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Humidifier' && model.options.devices[arrayIndices].deviceId);"
}
},
"set_minStep": {
"title": "Set Min Step",
"type": "number",
"placeholder": "1",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Humidifier' && model.options.devices[arrayIndices].deviceId);"
}
}
}
},
"curtain": {
"type": "object",
"properties": {
"set_minStep": {
"title": "Set Minimum Step",
"type": "number",
"placeholder": "1",
"description": "Sets the minimum steps that curtain allows. So if set to 20, it would allow you to set the curtain state to 0, 20, 40, 60, 80, and 100",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
}
},
"set_min": {
"title": "Set Minimum Open State",
"type": "number",
"placeholder": "0",
"description": "Sets the minimum percentage before needed to set Curtain to Open",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
}
},
"set_max": {
"title": "Set Maximum Close State",
"type": "number",
"placeholder": "100",
"description": "Sets the maximum percentage before needing to set Curtain to Closed",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
}
},
"updateRate": {
"title": "Curtain Update Rate",
"type": "number",
"minimum": 1,
"placeholder": 5,
"description": "Indicates the number of seconds before refreshing Curtain status while updating slide progress.",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
}
},
"disable_group": {
"title": "Disable Grouping",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
}
},
"setOpenMode": {
"title": "Curtain's Opening Mode",
"type": "string",
"oneOf": [
{
"title": "Performance Mode",
"enum": ["0"]
},
{
"title": "Silent Mode",
"enum": ["1"]
}
],
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
}
},
"setCloseMode": {
"title": "Curtain's Closing Mode",
"type": "string",
"oneOf": [
{
"title": "Performance Mode",
"enum": ["0"]
},
{
"title": "Silent Mode",
"enum": ["1"]
}
],
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
}
},
"hide_lightsensor": {
"title": "Hide Light Sensor",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId);"
}
},
"set_minlux": {
"title": "Set Min Lux",
"type": "number",
"placeholder": "1",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].curtain.hide_lightsensor);"
}
},
"set_maxlux": {
"title": "Set Max Lux",
"type": "number",
"placeholder": "6001",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Curtain' && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].curtain.hide_lightsensor);"
}
}
}
},
"blindTilt": {
"type": "object",
"properties": {
"mode": {
"title": "Mapping Mode",
"type": "string",
"oneOf": [
{
"title": "Middle to Up",
"enum": ["only_up"]
},
{
"title": "Middle to Down",
"enum": ["only_down"]
},
{
"title": "Down-to-Up",
"enum": ["down_and_up"]
},
{
"title": "Up-to-Down",
"enum": ["up_and_down"]
},
{
"title": "Tilt Direction",
"enum": ["use_tilt_for_direction"]
}
],
"description": "Defines how the Home app sliders control the blind tilt.",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Blind Tilt' && model.options.devices[arrayIndices].deviceId);"
}
},
"set_minStep": {
"title": "Set Minimum Step",
"type": "number",
"placeholder": "1",
"description": "Sets the minimum steps that blind tilt allows. So if set to 20, it would allow you to set the blind tilt state to 0, 20, 40, 60, 80, and 100",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Blind Tilt' && model.options.devices[arrayIndices].deviceId);"
}
},
"set_min": {
"title": "Set Minimum Open State",
"type": "number",
"placeholder": "0",
"description": "Sets the minimum percentage before needed to set Blind Tilt to Open",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Blind Tilt' && model.options.devices[arrayIndices].deviceId);"
}
},
"set_max": {
"title": "Set Maximum Close State",
"type": "number",
"placeholder": "100",
"description": "Sets the maximum percentage before needing to set Blind Tilt to Closed",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Blind Tilt' && model.options.devices[arrayIndices].deviceId);"
}
},
"hide_lightsensor": {
"title": "Hide Light Sensor",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Blind Tilt' && model.options.devices[arrayIndices].deviceId);"
}
},
"updateRate": {
"title": "Blind Tilt Update Rate",
"type": "number",
"minimum": 1,
"placeholder": 5,
"description": "Indicates the number of seconds before refreshing Blind Tilt status while updating slide progress.",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Blind Tilt' && model.options.devices[arrayIndices].deviceId);"
}
}
}
},
"contact": {
"type": "object",
"properties": {
"hide_lightsensor": {
"title": "Hide Contact Sensor's Light Sensor",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Contact Sensor' && model.options.devices[arrayIndices].deviceId);"
}
},
"set_minlux": {
"title": "Set Min Lux",
"type": "number",
"placeholder": "1",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Contact Sensor' && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].contact.hide_lightsensor);"
}
},
"set_maxlux": {
"title": "Set Max Lux",
"type": "number",
"placeholder": "6001",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Contact Sensor' && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].contact.hide_lightsensor);"
}
},
"hide_motionsensor": {
"title": "Hide Contact Sensor's Motion Sensor",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Contact Sensor' && model.options.devices[arrayIndices].deviceId);"
}
}
}
},
"motion": {
"type": "object",
"properties": {
"hide_lightsensor": {
"title": "Hide Motion Sensor's Light Sensor",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Motion Sensor' && model.options.devices[arrayIndices].deviceId);"
}
},
"set_minlux": {
"title": "Set Min Lux",
"type": "number",
"placeholder": "1",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Motion Sensor' && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].motion.hide_lightsensor);"
}
},
"set_maxlux": {
"title": "Set Max Lux",
"type": "number",
"placeholder": "6001",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Motion Sensor' && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].motion.hide_lightsensor);"
}
}
}
},
"colorbulb": {
"type": "object",
"properties": {
"set_minStep": {
"title": "Set Min Step",
"type": "number",
"placeholder": "1",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Color Bulb' && model.options.devices[arrayIndices].deviceId);"
}
},
"adaptiveLightingShift": {
"title": "Adaptive Lighting Shift",
"type": "number",
"placeholder": "-1",
"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.",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Color Bulb' && model.options.devices[arrayIndices].deviceId);"
}
}
}
},
"striplight": {
"type": "object",
"properties": {
"set_minStep": {
"title": "Set Min Step",
"type": "number",
"placeholder": "1",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Strip Light' && model.options.devices[arrayIndices].deviceId);"
}
},
"adaptiveLightingShift": {
"title": "Adaptive Lighting Shift",
"type": "number",
"placeholder": "-1",
"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.",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Strip Light' && model.options.devices[arrayIndices].deviceId);"
}
}
}
},
"lock": {
"type": "object",
"properties": {
"hide_contactsensor": {
"title": "Hide Lock's Contact Sensor",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType === 'Smart Lock' && model.options.devices[arrayIndices].deviceId);"
}
}
}
},
"disableCaching": {
"title": "Disable Caching",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceId && model.options.devices[arrayIndices].configDeviceType === 'Curtain');"
}
},
"maxRetry": {
"title": "Max Retries for BLE",
"type": "number",
"placeholder": "5",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceId && (model.options.devices[arrayIndices].connectionType === 'BLE' || model.options.devices[arrayIndices].connectionType === 'BLE/OpenAPI') && (model.options.devices[arrayIndices].configDeviceType === 'Bot' || model.options.devices[arrayIndices].configDeviceType === 'Robot Vacuum Cleaner S1' || model.options.devices[arrayIndices].configDeviceType === 'Robot Vacuum Cleaner S1 Plus' || model.options.devices[arrayIndices].configDeviceType === 'Strip Light' || model.options.devices[arrayIndices].configDeviceType === 'Plug' || model.options.devices[arrayIndices].configDeviceType === 'Plug Mini (JP)' || model.options.devices[arrayIndices].configDeviceType === 'Plug Mini (US)' || model.options.devices[arrayIndices].configDeviceType === 'Curtain' || model.options.devices[arrayIndices].configDeviceType === 'Color Bulb' || model.options.devices[arrayIndices].configDeviceType === 'Ceiling Light' || model.options.devices[arrayIndices].configDeviceType === 'Ceiling Light Pro' || model.options.devices[arrayIndices].configDeviceType === 'Motion Sensor'));"
}
},
"mqttURL": {
"title": "MQTT URL",
"type": "string",
"placeholder": "192.168.7.1",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceId && (model.options.devices[arrayIndices].configDeviceType === 'Curtain' || model.options.devices[arrayIndices].configDeviceType === 'Meter' || model.options.devices[arrayIndices].configDeviceType === 'MeterPlus' || model.options.devices[arrayIndices].configDeviceType === 'Meter Plus (JP)'));"
}
},
"mqttOptions": {
"title": "MQTT Options",
"type": "string",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceId && model.options.devices[arrayIndices].mqttURL && (model.options.devices[arrayIndices].configDeviceType === 'Curtain' || model.options.devices[arrayIndices].configDeviceType === 'Meter' || model.options.devices[arrayIndices].configDeviceType === 'MeterPlus' || model.options.devices[arrayIndices].configDeviceType === 'Meter Plus (JP)'));"
}
},
"mqttPubOptions": {
"title": "MQTT Pub Options",
"type": "string",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceId && model.options.devices[arrayIndices].mqttURL && (model.options.devices[arrayIndices].configDeviceType === 'Curtain' || model.options.devices[arrayIndices].configDeviceType === 'Meter' || model.options.devices[arrayIndices].configDeviceType === 'MeterPlus' || model.options.devices[arrayIndices].configDeviceType === 'Meter Plus (JP)'));"
}
},
"history": {
"title": "EVE History",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceId && (model.options.devices[arrayIndices].configDeviceType === 'Curtain' || model.options.devices[arrayIndices].configDeviceType === 'Meter' || model.options.devices[arrayIndices].configDeviceType === 'MeterPlus' || model.options.devices[arrayIndices].configDeviceType === 'Meter Plus (JP)'));"
}
},
"firmware": {
"title": "Firmware Override",
"type": "string",
"placeholder": "1.2.8",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceId);"
}
},
"refreshRate": {
"title": "Device Refresh Rate",
"type": "number",
"placeholder": 360,
"description": "Indicates the number of seconds between polls of SwitchBot API.",
"condition": {
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType);"
}
},
"offline": {
"title": "Offline as Off",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device);"
}
},
"external": {
"title": "External Accessory",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType);"
}
},
"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.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType);"
}
}
},
"required": ["deviceId", "configDeviceType", "configDeviceName", "connectionType", "logging"]
},
"uniqueItems": true
},
"irdevices": {
"type": "array",
"items": {
"title": "IR Devices",
"type": "object",
"properties": {
"deviceId": {
"title": "Device ID",
"type": "string",
"placeholder": "81F3UT59513F"
},
"configDeviceName": {
"title": "Device Name",
"type": "string",
"placeholder": "SwitchBot",
"condition": {
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId);"
}
},
"hide_device": {
"title": "Hide Device",
"type": "boolean",
"description": "If true, device will be removed or hidden from HomeKit.",
"condition": {
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId);"
}
},
"configRemoteType": {
"title": "Remote Type",
"type": "string",
"oneOf": [
{
"title": "Air Conditioner (IR)",
"enum": ["Air Conditioner"]
},
{
"title": "DIY Air Conditioner (IR)",
"enum": ["DIY Air Conditioner"]
},
{
"title": "TV (IR)",
"enum": ["TV"]
},
{
"title": "DIY TV (IR)",
"enum": ["DIY TV"]
},
{
"title": "Light (IR)",
"enum": ["Light"]
},
{
"title": "DIY Light (IR)",
"enum": ["DIY Light"]
},
{
"title": "IPTV (IR)",
"enum": ["IPTV"]
},
{
"title": "DIY IPTV (IR)",
"enum": ["DIY IPTV"]
},
{
"title": "Set Top Box (IR)",
"enum": ["Set Top Box"]
},
{
"title": "DIY Set Top Box (IR)",
"enum": ["DIY Set Top Box"]
},
{
"title": "DVD (IR)",
"enum": ["DVD"]
},
{
"title": "DIY DVD (IR)",
"enum": ["DIY DVD"]
},
{
"title": "Fan (IR)",
"enum": ["Fan"]
},
{
"title": "DIY Fan (IR)",
"enum": ["DIY Fan"]
},
{
"title": "Projector (IR)",
"enum": ["Projector"]
},
{
"title": "DIY Projector (IR)",
"enum": ["DIY Projector"]
},
{
"title": "Camera (IR)",
"enum": ["Camera"]
},
{
"title": "DIY Camera (IR)",
"enum": ["DIY Camera"]
},
{
"title": "Air Purifier (IR)",
"enum": ["Air Purifier"]
},
{
"title": "DIY Air Purifier (IR)",
"enum": ["DIY Air Purifier"]
},
{
"title": "Speaker (IR)",
"enum": ["Speaker"]
},
{
"title": "DIY Speaker (IR)",
"enum": ["DIY Speaker"]
},
{
"title": "Water Heater (IR)",
"enum": ["Water Heater"]
},
{
"title": "DIY Water Heater (IR)",
"enum": ["DIY Water Heater"]
},
{
"title": "Vacuum Cleaner (IR)",
"enum": ["Vacuum Cleaner"]
},
{
"title": "DIY Vacuum Cleaner (IR)",
"enum": ["DIY Vacuum Cleaner"]
},
{
"title": "Others (IR)",
"enum": ["Others"]
}
],
"condition": {
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId && !model.options.irdevices[arrayIndices].hide_device);"
}
},
"connectionType": {
"title": "Connection Type",
"type": "string",
"oneOf": [
{
"title": "OpenAPI",
"enum": ["OpenAPI"]
},
{
"title": "Disable",
"enum": ["Disabled"]
}
],
"description": "Enables OpenAPI, if disabled will leave device in HomeKit and commands will not be sent to OpenAPI.",
"condition": {
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId && !model.options.irdevices[arrayIndices].hide_device && model.options.irdevices[arrayIndices].configRemoteType);"
}
},
"customize": {
"title": "Custom IR Commands",
"type": "boolean",
"description": "Enables Custom IR Commands",
"condition": {
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId && !model.options.irdevices[arrayIndices].hide_device && model.options.irdevices[arrayIndices].configRemoteType);"
}
},
"customOn": {
"title": "Custom <em class='primary-text'> On </em> Command",
"type": "string",
"placeholder": "On",
"condition": {
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId && !model.options.irdevices[arrayIndices].hide_device && model.options.irdevices[arrayIndices].configRemoteType && model.options.irdevices[arrayIndices].customize);"
}
},
"customOff": {
"title": "Custom <em class='primary-text'> Off </em> Command",
"type": "string",
"placeholder": "Off",
"condition": {
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId && !model.options.irdevices[arrayIndices].hide_device && model.options.irdevices[arrayIndices].configRemoteType && model.options.irdevices[arrayIndices].customize);"
}
},
"disablePushOn": {
"title": "Disable Sending <em class='primary-text'> On </em> Command",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId && !model.options.irdevices[arrayIndices].hide_device && model.options.irdevices[arrayIndices].configRemoteType);"
}
},
"disablePushOff": {
"title": "Disable Sending <em class='primary-text'> Off </em> Command",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId && !model.options.irdevices[arrayIndices].hide_device && model.options.irdevices[arrayIndices].configRemoteType);"
}
},
"disablePushDetail": {
"title": "Disable Sending <em class='primary-text'> Detail </em> Command(s)",
"description": "Details would be like tempearture for Air Conditioners.",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId && !model.options.irdevices[arrayIndices].hide_device && model.options.irdevices[arrayIndices].configRemoteType);"
}
},
"irair": {
"type": "object",
"properties": {
"hide_automode": {
"title": "Hide Auto Mode on IR Air Conditioners",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.irdevices && !model.options.irdevices[arrayIndices].hide_device && (model.options.irdevices[arrayIndices].configRemoteType === 'Air Conditioner' || model.options.irdevices[arrayIndices].configRemoteType === 'DIY Air Conditioner') && model.options.irdevices[arrayIndices].deviceId);"
}
},
"meterType": {