homebridge-xbox-tv 3.4.3 → 3.5.0

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/CHANGELOG.md CHANGED
@@ -5,12 +5,22 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ### NOTE!!!
8
+ ### NOTE
9
9
 
10
10
  - After update to 2.x.x the plugin settings (xboxLiveId) need to be updated
11
11
  - After update to v3.0.0 RESTFull and MQTT config settings need to be updated
12
12
  - After update to v3.4.0 all buttons in config need to be updated
13
13
 
14
+ ## [3.5.0] - (13.03.2025)
15
+
16
+ ## Changes
17
+
18
+ - added possibility to disable indyvidual accessory
19
+ - bump dependencies
20
+ - config schema updated
21
+ - redme updated
22
+ - cleanup
23
+
14
24
  ## [3.4.0] - (05.03.2025)
15
25
 
16
26
  ## Changes
package/README.md CHANGED
@@ -74,6 +74,7 @@ Homebridge plugin for Microsoft game Consoles. Tested with Xbox One X/S and Xbox
74
74
  | `name` | Here set the accessory *Name* to be displayed in *Homebridge/HomeKit*. |
75
75
  | `host` | Here set the *Hsostname or Address IP* of Console.|
76
76
  | `xboxLiveId` | On your console select Profile > Settings > System > Console info, listed as **Xbox network device ID**. *You can only find the Xbox network device ID in Settings on your console, this is different from your console serial number*. |
77
+ | `disableAccessory` | If enabled, the accessory will be disabled. |
77
78
  | `getInputsFromDevice`| If enabled, apps will be loaded from device, only available if `webApiControl` enabled. |
78
79
  | `filterGames` | If enabled, Games will be hidden and not displayed in the inputs list, only available if `webApiControl` enabled. |
79
80
  | `filterApps` | If enabled, Apps will be hidden and not displayed in the inputs list, only available if `webApiControl` enabled. |
@@ -36,6 +36,13 @@
36
36
  "description": "Xbox Live ID",
37
37
  "required": true
38
38
  },
39
+ "disableAccessory": {
40
+ "title": "Disable Accessory",
41
+ "type": "boolean",
42
+ "default": false,
43
+ "description": "Here You can disable this accessory.",
44
+ "required": false
45
+ },
39
46
  "webApiControl": {
40
47
  "title": "Web Api",
41
48
  "type": "boolean",
@@ -932,6 +939,7 @@
932
939
  "devices[].name",
933
940
  "devices[].host",
934
941
  "devices[].xboxLiveId",
942
+ "devices[].disableAccessory",
935
943
  {
936
944
  "key": "devices[]",
937
945
  "type": "section",
@@ -959,7 +967,10 @@
959
967
  "functionBody": "return model.devices && model.devices[arrayIndices].getInputsFromDevice === false || model.devices[arrayIndices].webApiControl === false;"
960
968
  }
961
969
  }
962
- ]
970
+ ],
971
+ "condition": {
972
+ "functionBody": "return model.devices[arrayIndices].disableAccessory === false;"
973
+ }
963
974
  },
964
975
  {
965
976
  "key": "devices[]",
@@ -1043,7 +1054,10 @@
1043
1054
  "functionBody": "return model.devices[arrayIndices].buttons[arrayIndices].mode === 4;"
1044
1055
  }
1045
1056
  }
1046
- ]
1057
+ ],
1058
+ "condition": {
1059
+ "functionBody": "return model.devices[arrayIndices].disableAccessory === false;"
1060
+ }
1047
1061
  },
1048
1062
  {
1049
1063
  "key": "devices[]",
@@ -1173,7 +1187,10 @@
1173
1187
  }
1174
1188
  ]
1175
1189
  }
1176
- ]
1190
+ ],
1191
+ "condition": {
1192
+ "functionBody": "return model.devices[arrayIndices].disableAccessory === false;"
1193
+ }
1177
1194
  }
1178
1195
  ]
1179
1196
  }
package/index.js CHANGED
@@ -24,9 +24,16 @@ class XboxPlatform {
24
24
 
25
25
  api.on('didFinishLaunching', async () => {
26
26
  for (const device of config.devices) {
27
- const deviceName = device.name ?? false;
28
- const host = device.host ?? false;
29
- const xboxLiveId = device.xboxLiveId ?? false;
27
+
28
+ //check accessory is enabled
29
+ const disableAccessory = device.disableAccessory || false;
30
+ if (disableAccessory) {
31
+ continue;
32
+ }
33
+
34
+ const deviceName = device.name;
35
+ const host = device.host;
36
+ const xboxLiveId = device.xboxLiveId;
30
37
 
31
38
  if (!deviceName || !host || !xboxLiveId) {
32
39
  log.warn(`Name: ${deviceName ? 'OK' : deviceName}, Host: ${host ? 'OK' : host}, Xbox Live ID: ${xboxLiveId ? 'OK' : xboxLiveId}, wrong or missing.`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Xbox TV",
3
3
  "name": "homebridge-xbox-tv",
4
- "version": "3.4.3",
4
+ "version": "3.5.0",
5
5
  "description": "Homebridge plugin to control Xbox game consoles.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -43,7 +43,7 @@
43
43
  "uuid": "^11.1.0",
44
44
  "ping": "^0.4.4",
45
45
  "express": "^4.21.2",
46
- "axios": "^1.8.2"
46
+ "axios": "^1.8.3"
47
47
  },
48
48
  "keywords": [
49
49
  "homebridge",