homebridge-xbox-tv 2.13.25 → 2.13.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config.schema.json +64 -60
- package/package.json +1 -1
- package/src/xboxdevice.js +3 -3
package/config.schema.json
CHANGED
|
@@ -40,45 +40,45 @@
|
|
|
40
40
|
"type": "boolean",
|
|
41
41
|
"default": false,
|
|
42
42
|
"description": "This enable console control over Web Api.",
|
|
43
|
-
"required":
|
|
43
|
+
"required": true
|
|
44
44
|
},
|
|
45
45
|
"getInputsFromDevice": {
|
|
46
46
|
"title": "Load Inputs From Device",
|
|
47
47
|
"type": "boolean",
|
|
48
48
|
"default": false,
|
|
49
49
|
"description": "This function get all available inputs direct from device, manually configured inputs will be skipped.",
|
|
50
|
-
"required": false,
|
|
51
50
|
"condition": {
|
|
52
51
|
"functionBody": "return model.devices[arrayIndices].webApiControl === true;"
|
|
53
|
-
}
|
|
52
|
+
},
|
|
53
|
+
"required": true
|
|
54
54
|
},
|
|
55
55
|
"filterGames": {
|
|
56
56
|
"title": "Hide Games",
|
|
57
57
|
"type": "boolean",
|
|
58
58
|
"default": false,
|
|
59
59
|
"description": "If enabled, Games will not be displayed on the list of inputs.",
|
|
60
|
-
"required":
|
|
60
|
+
"required": true
|
|
61
61
|
},
|
|
62
62
|
"filterApps": {
|
|
63
63
|
"title": "Hide Apps",
|
|
64
64
|
"type": "boolean",
|
|
65
65
|
"default": false,
|
|
66
66
|
"description": "If enabled, Apps will not be displayed on the list of inputs.",
|
|
67
|
-
"required":
|
|
67
|
+
"required": true
|
|
68
68
|
},
|
|
69
69
|
"filterSystemApps": {
|
|
70
70
|
"title": "Hide System Apps",
|
|
71
71
|
"type": "boolean",
|
|
72
72
|
"default": false,
|
|
73
73
|
"description": "If enabled, System Apps (Accessory, TV, Network Troubleshooter, Xbox Guide) will not be displayed on the list of inputs.",
|
|
74
|
-
"required":
|
|
74
|
+
"required": true
|
|
75
75
|
},
|
|
76
76
|
"filterDlc": {
|
|
77
77
|
"title": "Hide DLC",
|
|
78
78
|
"type": "boolean",
|
|
79
79
|
"default": false,
|
|
80
80
|
"description": "If enabled, DLC will not be displayed on the list of inputs.",
|
|
81
|
-
"required":
|
|
81
|
+
"required": true
|
|
82
82
|
},
|
|
83
83
|
"inputsDisplayOrder": {
|
|
84
84
|
"title": "Inputs Display Order",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"type": "string",
|
|
133
133
|
"placeholder": "Input name",
|
|
134
134
|
"description": "Here set Your own name.",
|
|
135
|
-
"required":
|
|
135
|
+
"required": false
|
|
136
136
|
},
|
|
137
137
|
"titleId": {
|
|
138
138
|
"title": "Title Id",
|
|
@@ -146,17 +146,17 @@
|
|
|
146
146
|
"type": "string",
|
|
147
147
|
"placeholder": "Input reference",
|
|
148
148
|
"description": "Here set reference. If web api is enable all available in */var/lib/homebridge/xboxTv/inputs_xxxxxx* file.",
|
|
149
|
-
"required":
|
|
149
|
+
"required": false
|
|
150
150
|
},
|
|
151
151
|
"oneStoreProductId": {
|
|
152
152
|
"title": "Product Id",
|
|
153
153
|
"type": "string",
|
|
154
154
|
"placeholder": "oneStoreProductId",
|
|
155
155
|
"description": "Here set the *oneStoreProductId*. If web api enable, switch app/games will be possible, all available in */var/lib/homebridge/xboxTv/inputs_xxxxxx* file.",
|
|
156
|
-
"required": false,
|
|
157
156
|
"condition": {
|
|
158
157
|
"functionBody": "return model.devices[arrayIndices].webApiControl === true;"
|
|
159
|
-
}
|
|
158
|
+
},
|
|
159
|
+
"required": false
|
|
160
160
|
},
|
|
161
161
|
"contentType": {
|
|
162
162
|
"title": "Content Type",
|
|
@@ -188,10 +188,11 @@
|
|
|
188
188
|
]
|
|
189
189
|
}
|
|
190
190
|
],
|
|
191
|
-
"required":
|
|
191
|
+
"required": false
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
}
|
|
194
|
+
},
|
|
195
|
+
"required": false
|
|
195
196
|
},
|
|
196
197
|
"buttons": {
|
|
197
198
|
"type": "array",
|
|
@@ -404,17 +405,17 @@
|
|
|
404
405
|
}
|
|
405
406
|
],
|
|
406
407
|
"description": "Here select the command or mode of button.",
|
|
407
|
-
"required":
|
|
408
|
+
"required": false
|
|
408
409
|
},
|
|
409
410
|
"oneStoreProductId": {
|
|
410
411
|
"title": "Product Id",
|
|
411
412
|
"type": "string",
|
|
412
413
|
"placeholder": "oneStoreProductId",
|
|
413
414
|
"description": "Here set the *oneStoreProductId*. If web api enabled, switch app/games will be possible, all available in */var/lib/homebridge/xboxTv/inputs_xxxxxx* file.",
|
|
414
|
-
"required": true,
|
|
415
415
|
"condition": {
|
|
416
416
|
"functionBody": "return model.devices[arrayIndices].webApiControl === true;"
|
|
417
|
-
}
|
|
417
|
+
},
|
|
418
|
+
"required": false
|
|
418
419
|
},
|
|
419
420
|
"displayType": {
|
|
420
421
|
"title": "Display Type",
|
|
@@ -440,16 +441,17 @@
|
|
|
440
441
|
}
|
|
441
442
|
],
|
|
442
443
|
"description": "Here select display type in HomeKit app.",
|
|
443
|
-
"required":
|
|
444
|
+
"required": false
|
|
444
445
|
},
|
|
445
446
|
"namePrefix": {
|
|
446
447
|
"title": "Prefix",
|
|
447
448
|
"type": "boolean",
|
|
448
449
|
"description": "Here enable/disable the accessory name as a prefix for button name.",
|
|
449
|
-
"required":
|
|
450
|
+
"required": false
|
|
450
451
|
}
|
|
451
452
|
}
|
|
452
|
-
}
|
|
453
|
+
},
|
|
454
|
+
"required": false
|
|
453
455
|
},
|
|
454
456
|
"sensorPower": {
|
|
455
457
|
"title": "Power",
|
|
@@ -484,14 +486,14 @@
|
|
|
484
486
|
"type": "string",
|
|
485
487
|
"placeholder": "Name",
|
|
486
488
|
"description": "Here set Your own name.",
|
|
487
|
-
"required":
|
|
489
|
+
"required": false
|
|
488
490
|
},
|
|
489
491
|
"reference": {
|
|
490
492
|
"title": "Reference",
|
|
491
493
|
"type": "string",
|
|
492
494
|
"placeholder": "Input/App reference",
|
|
493
495
|
"description": "Here set the Input/App reference.",
|
|
494
|
-
"required":
|
|
496
|
+
"required": false
|
|
495
497
|
},
|
|
496
498
|
"displayType": {
|
|
497
499
|
"title": "Type",
|
|
@@ -523,76 +525,77 @@
|
|
|
523
525
|
}
|
|
524
526
|
],
|
|
525
527
|
"description": "Here select sensor type to be exposed in HomeKit app.",
|
|
526
|
-
"required":
|
|
528
|
+
"required": false
|
|
527
529
|
},
|
|
528
530
|
"namePrefix": {
|
|
529
531
|
"title": "Prefix",
|
|
530
532
|
"type": "boolean",
|
|
531
533
|
"description": "Here enable/disable the accessory name as a prefix for sensor name.",
|
|
532
|
-
"required":
|
|
534
|
+
"required": false
|
|
533
535
|
}
|
|
534
536
|
}
|
|
535
|
-
}
|
|
537
|
+
},
|
|
538
|
+
"required": false
|
|
536
539
|
},
|
|
537
540
|
"webApiPowerOnOff": {
|
|
538
541
|
"title": "Power Control",
|
|
539
542
|
"type": "boolean",
|
|
540
543
|
"default": false,
|
|
541
544
|
"description": "This enable power control over Web Api.",
|
|
542
|
-
"required": false,
|
|
543
545
|
"condition": {
|
|
544
546
|
"functionBody": "return model.devices[arrayIndices].webApiControl === true;"
|
|
545
|
-
}
|
|
547
|
+
},
|
|
548
|
+
"required": false
|
|
546
549
|
},
|
|
547
550
|
"webApiRcControl": {
|
|
548
551
|
"title": "Remote Control",
|
|
549
552
|
"type": "boolean",
|
|
550
553
|
"default": false,
|
|
551
554
|
"description": "This enable game pad control over Web Api.",
|
|
552
|
-
"required": false,
|
|
553
555
|
"condition": {
|
|
554
556
|
"functionBody": "return model.devices[arrayIndices].webApiControl === true;"
|
|
555
|
-
}
|
|
557
|
+
},
|
|
558
|
+
"required": false
|
|
556
559
|
},
|
|
557
560
|
"webApiVolumeControl": {
|
|
558
561
|
"title": "Volume Control",
|
|
559
562
|
"type": "boolean",
|
|
560
563
|
"default": false,
|
|
561
564
|
"description": "This enable volume/mute control over Web Api.",
|
|
562
|
-
"required": false,
|
|
563
565
|
"condition": {
|
|
564
566
|
"functionBody": "return model.devices[arrayIndices].webApiControl === true;"
|
|
565
|
-
}
|
|
567
|
+
},
|
|
568
|
+
"required": false
|
|
566
569
|
},
|
|
567
570
|
"webApiToken": {
|
|
568
571
|
"title": "Web Api Token",
|
|
569
572
|
"type": "string",
|
|
570
573
|
"placeholder": "Web Api Token",
|
|
571
574
|
"description": "Here put the reponse Token (value after ?code=) from the authorization URL.",
|
|
572
|
-
"required": true,
|
|
573
575
|
"condition": {
|
|
574
576
|
"functionBody": "return model.devices[arrayIndices].webApiControl === true;"
|
|
575
|
-
}
|
|
577
|
+
},
|
|
578
|
+
"required": false
|
|
576
579
|
},
|
|
577
580
|
"webApiClientId": {
|
|
578
581
|
"title": "Client Id",
|
|
579
582
|
"type": "string",
|
|
580
583
|
"placeholder": "a34ac209-edab-4b08-91e7-a4558d8da1bd",
|
|
581
584
|
"description": "Here set your own Client Id from Azure AD or leave empty if you do not have own account.",
|
|
582
|
-
"required": false,
|
|
583
585
|
"condition": {
|
|
584
586
|
"functionBody": "return model.devices[arrayIndices].webApiControl === true;"
|
|
585
|
-
}
|
|
587
|
+
},
|
|
588
|
+
"required": false
|
|
586
589
|
},
|
|
587
590
|
"webApiClientSecret": {
|
|
588
591
|
"title": "Client Secret",
|
|
589
592
|
"type": "string",
|
|
590
593
|
"placeholder": "Client Secret",
|
|
591
594
|
"description": "Here set your Client Secret from Azure AD or leave empty if you do not have own account.",
|
|
592
|
-
"required": false,
|
|
593
595
|
"condition": {
|
|
594
596
|
"functionBody": "return model.devices[arrayIndices].webApiControl === true;"
|
|
595
|
-
}
|
|
597
|
+
},
|
|
598
|
+
"required": false
|
|
596
599
|
},
|
|
597
600
|
"enableDebugMode": {
|
|
598
601
|
"title": "Debug",
|
|
@@ -618,6 +621,7 @@
|
|
|
618
621
|
"infoButtonCommand": {
|
|
619
622
|
"title": "Info Button",
|
|
620
623
|
"type": "string",
|
|
624
|
+
"default": "nexus",
|
|
621
625
|
"oneOf": [
|
|
622
626
|
{
|
|
623
627
|
"title": "Game Pad View",
|
|
@@ -698,116 +702,116 @@
|
|
|
698
702
|
"title": "Enable",
|
|
699
703
|
"type": "boolean",
|
|
700
704
|
"default": false,
|
|
701
|
-
"
|
|
702
|
-
"
|
|
705
|
+
"description": "This enable RESTful server.",
|
|
706
|
+
"required": false
|
|
703
707
|
},
|
|
704
708
|
"restFulDebug": {
|
|
705
709
|
"title": "Debug",
|
|
706
710
|
"type": "boolean",
|
|
707
711
|
"default": false,
|
|
708
|
-
"required": false,
|
|
709
712
|
"description": "This enable debug mode for RESTFul.",
|
|
710
713
|
"condition": {
|
|
711
714
|
"functionBody": "return model.devices[arrayIndices].enableRestFul === true;"
|
|
712
|
-
}
|
|
715
|
+
},
|
|
716
|
+
"required": false
|
|
713
717
|
},
|
|
714
718
|
"restFulPort": {
|
|
715
719
|
"title": "Port",
|
|
716
720
|
"type": "integer",
|
|
717
721
|
"placeholder": 3000,
|
|
718
|
-
"required": true,
|
|
719
722
|
"description": "Here set the listening Port for RESTful server.",
|
|
720
723
|
"condition": {
|
|
721
724
|
"functionBody": "return model.devices[arrayIndices].enableRestFul === true;"
|
|
722
|
-
}
|
|
725
|
+
},
|
|
726
|
+
"required": false
|
|
723
727
|
},
|
|
724
728
|
"enableMqtt": {
|
|
725
729
|
"title": "Enable",
|
|
726
730
|
"type": "boolean",
|
|
727
731
|
"default": false,
|
|
728
|
-
"
|
|
729
|
-
"
|
|
732
|
+
"description": "This enable MQTT client.",
|
|
733
|
+
"required": false
|
|
730
734
|
},
|
|
731
735
|
"mqttDebug": {
|
|
732
736
|
"title": "Debug",
|
|
733
737
|
"type": "boolean",
|
|
734
738
|
"default": false,
|
|
735
|
-
"required": false,
|
|
736
739
|
"description": "This enable debug mode for MQTT.",
|
|
737
740
|
"condition": {
|
|
738
741
|
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
|
|
739
|
-
}
|
|
742
|
+
},
|
|
743
|
+
"required": false
|
|
740
744
|
},
|
|
741
745
|
"mqttHost": {
|
|
742
746
|
"title": "IP/Hostname",
|
|
743
747
|
"type": "string",
|
|
744
748
|
"placeholder": "ip or hostname",
|
|
745
|
-
"required": true,
|
|
746
749
|
"format": "hostname",
|
|
747
750
|
"description": "Here set the IP/Hostname of MQTT Broker.",
|
|
748
751
|
"condition": {
|
|
749
752
|
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
|
|
750
|
-
}
|
|
753
|
+
},
|
|
754
|
+
"required": false
|
|
751
755
|
},
|
|
752
756
|
"mqttPort": {
|
|
753
757
|
"title": "Port",
|
|
754
758
|
"type": "integer",
|
|
755
759
|
"placeholder": 1883,
|
|
756
|
-
"required": true,
|
|
757
760
|
"description": "Here set the port of MQTT Broker.",
|
|
758
761
|
"condition": {
|
|
759
762
|
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
|
|
760
|
-
}
|
|
763
|
+
},
|
|
764
|
+
"required": false
|
|
761
765
|
},
|
|
762
766
|
"mqttPrefix": {
|
|
763
767
|
"title": "Prefix",
|
|
764
768
|
"type": "string",
|
|
765
769
|
"placeholder": "home/xbox",
|
|
766
|
-
"required": false,
|
|
767
770
|
"description": "Here set the prefix.",
|
|
768
771
|
"condition": {
|
|
769
772
|
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
|
|
770
|
-
}
|
|
773
|
+
},
|
|
774
|
+
"required": false
|
|
771
775
|
},
|
|
772
776
|
"mqttClientId": {
|
|
773
777
|
"title": "Client ID",
|
|
774
778
|
"type": "string",
|
|
775
779
|
"placeholder": "client id",
|
|
776
|
-
"required": false,
|
|
777
780
|
"description": "Here optional set the Client ID of MQTT Broker.",
|
|
778
781
|
"condition": {
|
|
779
782
|
"functionBody": "return model.devices[arrayIndices].enableMqtt === true"
|
|
780
|
-
}
|
|
783
|
+
},
|
|
784
|
+
"required": false
|
|
781
785
|
},
|
|
782
786
|
"mqttAuth": {
|
|
783
787
|
"title": "Authorization",
|
|
784
788
|
"type": "boolean",
|
|
785
789
|
"default": false,
|
|
786
|
-
"required": false,
|
|
787
790
|
"description": "This enable authorization for MQTT Broker.",
|
|
788
791
|
"condition": {
|
|
789
792
|
"functionBody": "return model.devices[arrayIndices].enableMqtt === true;"
|
|
790
|
-
}
|
|
793
|
+
},
|
|
794
|
+
"required": false
|
|
791
795
|
},
|
|
792
796
|
"mqttUser": {
|
|
793
797
|
"title": "User",
|
|
794
798
|
"type": "string",
|
|
795
799
|
"placeholder": "user",
|
|
796
|
-
"required": false,
|
|
797
800
|
"description": "Here set the user of MQTT Broker.",
|
|
798
801
|
"condition": {
|
|
799
802
|
"functionBody": "return model.devices[arrayIndices].enableMqtt === true && model.devices[arrayIndices].mqttAuth === true;"
|
|
800
|
-
}
|
|
803
|
+
},
|
|
804
|
+
"required": false
|
|
801
805
|
},
|
|
802
806
|
"mqttPasswd": {
|
|
803
807
|
"title": "Password",
|
|
804
808
|
"type": "string",
|
|
805
809
|
"placeholder": "password",
|
|
806
|
-
"required": false,
|
|
807
810
|
"description": "Here set the password of MQTT Broker.",
|
|
808
811
|
"condition": {
|
|
809
812
|
"functionBody": "return model.devices[arrayIndices].enableMqtt === true && model.devices[arrayIndices].mqttAuth === true;"
|
|
810
|
-
}
|
|
813
|
+
},
|
|
814
|
+
"required": false
|
|
811
815
|
}
|
|
812
816
|
}
|
|
813
817
|
}
|
package/package.json
CHANGED
package/src/xboxdevice.js
CHANGED
|
@@ -61,9 +61,9 @@ class XboxDevice extends EventEmitter {
|
|
|
61
61
|
const tempInputs = [...CONSTANTS.DefaultInputs, ...this.inputs];
|
|
62
62
|
const inputsArr = [];
|
|
63
63
|
for (const input of tempInputs) {
|
|
64
|
-
const inputName = input.name;
|
|
65
|
-
const inputReference = input.reference;
|
|
66
|
-
const duplicatedInput = inputsArr.some(input => input.reference === inputReference);
|
|
64
|
+
const inputName = input.name ?? false;
|
|
65
|
+
const inputReference = input.reference ?? false;
|
|
66
|
+
const duplicatedInput = inputsArr.some(input => input.reference === inputReference) ?? false;
|
|
67
67
|
const push = inputName && inputReference && !duplicatedInput ? inputsArr.push(input) : false;
|
|
68
68
|
}
|
|
69
69
|
this.inputs = inputsArr;
|