homebridge-xbox-tv 3.2.0-beta.0 → 3.2.0-beta.2

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.
Files changed (3) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
  3. package/src/constants.js +257 -255
package/index.js CHANGED
@@ -9,7 +9,7 @@ class XboxPlatform {
9
9
  constructor(log, config, api) {
10
10
  // only load if configured
11
11
  if (!config || !Array.isArray(config.devices)) {
12
- log.warn(`No configuration found for ${PLUGIN_NAME}`);
12
+ log.warn(`No configuration found for ${PluginName}`);
13
13
  return;
14
14
  }
15
15
  this.accessories = [];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Xbox TV",
3
3
  "name": "homebridge-xbox-tv",
4
- "version": "3.2.0-beta.0",
4
+ "version": "3.2.0-beta.2",
5
5
  "description": "Homebridge plugin to control Xbox game consoles.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/constants.js CHANGED
@@ -1,270 +1,272 @@
1
- const config = {
2
- PlatformName: "XboxTv",
3
- PluginName: "homebridge-xbox-tv",
4
- DefaultInputs: [
5
- {
6
- oneStoreProductId: "Screensaver",
7
- titleId: "851275400",
8
- reference: "Xbox.IdleScreen_8wekyb3d8bbwe!Xbox.IdleScreen.Application",
9
- isGame: false,
10
- name: "Screensaver",
11
- contentType: "Dashboard"
12
- },
13
- {
14
- oneStoreProductId: "Dashboard",
15
- titleId: "750323071",
16
- reference: "Xbox.Dashboard_8wekyb3d8bbwe!Xbox.Dashboard.Application",
17
- isGame: false,
18
- name: "Dashboard",
19
- contentType: "Dashboard"
20
- },
21
- {
22
- oneStoreProductId: "Settings",
23
- titleId: "1837352387",
24
- reference: "Microsoft.Xbox.Settings_8wekyb3d8bbwe!Xbox.Settings.Application",
25
- isGame: false,
26
- name: "Settings",
27
- contentType: "Dashboard"
28
- },
29
- {
30
- oneStoreProductId: "Television",
31
- titleId: "371594669",
32
- reference: "Microsoft.Xbox.LiveTV_8wekyb3d8bbwe!Microsoft.Xbox.LiveTV.Application",
33
- isGame: false,
34
- name: "Television",
35
- contentType: "systemApp"
36
- },
37
- {
38
- oneStoreProductId: "SettingsTv",
39
- titleId: "2019308066",
40
- reference: "Microsoft.Xbox.TvSettings_8wekyb3d8bbwe!Microsoft.Xbox.TvSettings.Application",
41
- isGame: false,
42
- name: "Settings TV",
43
- contentType: "Dashboard"
44
- },
45
- {
46
- oneStoreProductId: "Accessory",
47
- titleId: "758407307",
48
- reference: "Microsoft.XboxDevices_8wekyb3d8bbwe!App",
49
- isGame: false,
50
- name: "Accessory",
51
- contentType: "systemApp"
52
- },
53
- {
54
- oneStoreProductId: "NetworkTroubleshooter",
55
- titleId: "1614319806",
56
- reference: "Xbox.NetworkTroubleshooter_8wekyb3d8bbwe!Xbox.NetworkTroubleshooter.Application",
57
- isGame: false,
58
- name: "Network Troubleshooter",
59
- contentType: "systemApp"
1
+ export const PlatformName = "XboxTv";
2
+ export const PluginName = "homebridge-xbox-tv";
3
+
4
+ export const DefaultInputs = [
5
+ {
6
+ "oneStoreProductId": "Screensaver",
7
+ "titleId": "851275400",
8
+ "reference": "Xbox.IdleScreen_8wekyb3d8bbwe!Xbox.IdleScreen.Application",
9
+ "isGame": false,
10
+ "name": "Screensaver",
11
+ "contentType": "Dashboard"
12
+ },
13
+ {
14
+ "oneStoreProductId": "Dashboard",
15
+ "titleId": "750323071",
16
+ "reference": "Xbox.Dashboard_8wekyb3d8bbwe!Xbox.Dashboard.Application",
17
+ "isGame": false,
18
+ "name": "Dashboard",
19
+ "contentType": "Dashboard"
20
+ },
21
+ {
22
+ "oneStoreProductId": "Settings",
23
+ "titleId": "1837352387",
24
+ "reference": "Microsoft.Xbox.Settings_8wekyb3d8bbwe!Xbox.Settings.Application",
25
+ "isGame": false,
26
+ "name": "Settings",
27
+ "contentType": "Dashboard"
28
+ },
29
+ {
30
+ "oneStoreProductId": "Television",
31
+ "titleId": "371594669",
32
+ "reference": "Microsoft.Xbox.LiveTV_8wekyb3d8bbwe!Microsoft.Xbox.LiveTV.Application",
33
+ "isGame": false,
34
+ "name": "Television",
35
+ "contentType": "systemApp"
36
+ },
37
+ {
38
+ "oneStoreProductId": "SettingsTv",
39
+ "titleId": "2019308066",
40
+ "reference": "Microsoft.Xbox.TvSettings_8wekyb3d8bbwe!Microsoft.Xbox.TvSettings.Application",
41
+ "isGame": false,
42
+ "name": "Settings TV",
43
+ "contentType": "Dashboard"
44
+ },
45
+ {
46
+ "oneStoreProductId": "Accessory",
47
+ "titleId": "758407307",
48
+ "reference": "Microsoft.XboxDevices_8wekyb3d8bbwe!App",
49
+ "isGame": false,
50
+ "name": "Accessory",
51
+ "contentType": "systemApp"
52
+ },
53
+ {
54
+ "oneStoreProductId": "NetworkTroubleshooter",
55
+ "titleId": "1614319806",
56
+ "reference": "Xbox.NetworkTroubleshooter_8wekyb3d8bbwe!Xbox.NetworkTroubleshooter.Application",
57
+ "isGame": false,
58
+ "name": "Network Troubleshooter",
59
+ "contentType": "systemApp"
60
+ },
61
+ {
62
+ "oneStoreProductId": "MicrosoftStore",
63
+ "titleId": "1864271209",
64
+ "reference": "Microsoft.storify_8wekyb3d8bbwe!App",
65
+ "isGame": false,
66
+ "name": "Microsoft Store",
67
+ "contentType": "Dashboard"
68
+ },
69
+ {
70
+ "oneStoreProductId": "XboxGuide",
71
+ "titleId": "1052052983",
72
+ "reference": "Xbox.Guide_8wekyb3d8bbwe!Xbox.Guide.Application",
73
+ "isGame": false,
74
+ "name": "Xbox Guide",
75
+ "contentType": "systemApp"
76
+ }
77
+ ];
78
+
79
+ export const InputSourceTypes = [
80
+ "OTHER",
81
+ "HOME_SCREEN",
82
+ "TUNER",
83
+ "HDMI",
84
+ "COMPOSITE_VIDEO",
85
+ "S_VIDEO",
86
+ "COMPONENT_VIDEO",
87
+ "DVI",
88
+ "AIRPLAY",
89
+ "USB",
90
+ "APPLICATION"
91
+ ];
92
+
93
+ export const WebApi = {
94
+ "Url": {
95
+ "oauth2": "https://login.live.com/oauth20_authorize.srf",
96
+ "AccessToken": "https://login.live.com/oauth20_token.srf",
97
+ "RefreshToken": "https://login.live.com/oauth20_token.srf",
98
+ "UserToken": "https://user.auth.xboxlive.com/user/authenticate",
99
+ "XstsToken": "https://xsts.auth.xboxlive.com/xsts/authorize",
100
+ "Redirect": "http://localhost:8888/auth/callback",
101
+ "Xccs": "https://xccs.xboxlive.com"
102
+ },
103
+ "Scopes": "XboxLive.signin XboxLive.offline_access",
104
+ "ClientId": "a34ac209-edab-4b08-91e7-a4558d8da1bd",
105
+ "Console": {
106
+ "Name": {
107
+ "XboxSeriesX": "Xbox Series X",
108
+ "XboxSeriesS": "Xbox Series S",
109
+ "XboxOne": "Xbox One",
110
+ "XboxOneS": "Xbox One S",
111
+ "XboxOneX": "Xbox One X"
60
112
  },
61
- {
62
- oneStoreProductId: "MicrosoftStore",
63
- titleId: "1864271209",
64
- reference: "Microsoft.storify_8wekyb3d8bbwe!App",
65
- isGame: false,
66
- name: "Microsoft Store",
67
- contentType: "Dashboard"
113
+ "PowerState": {
114
+ "Off": 0,
115
+ "On": 1,
116
+ "ConnectedStandby": 2,
117
+ "SystemUpdate": 3,
118
+ "Unknown": 4
68
119
  },
69
- {
70
- oneStoreProductId: "XboxGuide",
71
- titleId: "1052052983",
72
- reference: "Xbox.Guide_8wekyb3d8bbwe!Xbox.Guide.Application",
73
- isGame: false,
74
- name: "Xbox Guide",
75
- contentType: "systemApp"
120
+ "PlaybackState": {
121
+ "Stopped": 0,
122
+ "Playing": 1,
123
+ "Paused": 2,
124
+ "Unknown": 3
76
125
  }
77
- ],
78
- InputSourceTypes: [
79
- "OTHER",
80
- "HOME_SCREEN",
81
- "TUNER",
82
- "HDMI",
83
- "COMPOSITE_VIDEO",
84
- "S_VIDEO",
85
- "COMPONENT_VIDEO",
86
- "DVI",
87
- "AIRPLAY",
88
- "USB",
89
- "APPLICATION"
90
- ],
91
- WebApi: {
92
- Url: {
93
- oauth2: "https://login.live.com/oauth20_authorize.srf",
94
- AccessToken: "https://login.live.com/oauth20_token.srf",
95
- RefreshToken: "https://login.live.com/oauth20_token.srf",
96
- UserToken: "https://user.auth.xboxlive.com/user/authenticate",
97
- XstsToken: "https://xsts.auth.xboxlive.com/xsts/authorize",
98
- Redirect: "http://localhost:8888/auth/callback",
99
- Xccs: "https://xccs.xboxlive.com"
126
+ }
127
+ };
128
+
129
+ export const LocalApi = {
130
+ "ParticipantId": {
131
+ "Target": 0
132
+ },
133
+ "Console": {
134
+ "Name": {
135
+ "1": "Xbox One",
136
+ "2": "Xbox 360",
137
+ "3": "Windows Desktop",
138
+ "4": "Windows Store",
139
+ "5": "Windows Phone",
140
+ "6": "iPhone",
141
+ "7": "iPad",
142
+ "8": "Android"
100
143
  },
101
- Scopes: "XboxLive.signin XboxLive.offline_access",
102
- ClientId: "a34ac209-edab-4b08-91e7-a4558d8da1bd",
103
- Console: {
104
- Name: {
105
- XboxSeriesX: "Xbox Series X",
106
- XboxSeriesS: "Xbox Series S",
107
- XboxOne: "Xbox One",
108
- XboxOneS: "Xbox One S",
109
- XboxOneX: "Xbox One X"
110
- },
111
- PowerState: {
112
- Off: 0,
113
- On: 1,
114
- ConnectedStandby: 2,
115
- SystemUpdate: 3,
116
- Unknown: 4
117
- },
118
- PlaybackState: {
119
- Stopped: 0,
120
- Playing: 1,
121
- Paused: 2,
122
- Unknown: 3
123
- }
144
+ "PairingState": {
145
+ "0": "Not Paired",
146
+ "1": "Paired"
124
147
  }
125
148
  },
126
- LocalApi: {
127
- ParticipantId: {
128
- Target: 0
129
- },
130
- Console: {
131
- Name: {
132
- 1: "Xbox One",
133
- 2: "Xbox 360",
134
- 3: "Windows Desktop",
135
- 4: "Windows Store",
136
- 5: "Windows Phone",
137
- 6: "iPhone",
138
- 7: "iPad",
139
- 8: "Android"
149
+ "Channels": {
150
+ "System": {
151
+ "Input": {
152
+ "Id": 0,
153
+ "Uuid": "fa20b8ca66fb46e0adb60b978a59d35f",
154
+ "Commands": {
155
+ "unpress": 0,
156
+ "enroll": 1,
157
+ "nexus": 2,
158
+ "view": 4,
159
+ "menu": 8,
160
+ "a": 16,
161
+ "b": 32,
162
+ "x": 64,
163
+ "y": 128,
164
+ "up": 256,
165
+ "down": 512,
166
+ "left": 1024,
167
+ "right": 2048,
168
+ "leftShoulder": 4096,
169
+ "rightShoulder": 8192,
170
+ "leftThumbstick": 16384,
171
+ "rightThumbstick": 32768
172
+ }
140
173
  },
141
- PairingState: {
142
- 0: "Not Paired",
143
- 1: "Paired"
144
- }
145
- },
146
- Channels: {
147
- System: {
148
- Input: {
149
- Id: 0,
150
- Uuid: "fa20b8ca66fb46e0adb60b978a59d35f",
151
- Commands: {
152
- unpress: 0,
153
- enroll: 1,
154
- nexus: 2,
155
- view: 4,
156
- menu: 8,
157
- a: 16,
158
- b: 32,
159
- x: 64,
160
- y: 128,
161
- up: 256,
162
- down: 512,
163
- left: 1024,
164
- right: 2048,
165
- leftShoulder: 4096,
166
- rightShoulder: 8192,
167
- leftThumbstick: 16384,
168
- rightThumbstick: 32768
169
- }
170
- },
171
- TvRemote: {
172
- Id: 1,
173
- Uuid: "d451e3b360bb4c71b3dbf994b1aca3a7",
174
- Commands: {
175
- volUp: "btn.vol_up",
176
- volDown: "btn.vol_down",
177
- volMute: "btn.vol_mute"
178
- },
179
- MessageType: {
180
- Error: "Error",
181
- GetConfiguration: "GetConfiguration",
182
- GetHeadendInfo: "GetHeadendInfo",
183
- GetLiveTVInfo: "GetLiveTVInfo",
184
- GetProgramInfo: "GetProgramInfo",
185
- GetRecentChannels: "GetRecentChannels",
186
- GetTunerLineups: "GetTunerLineups",
187
- GetAppChannelData: "GetAppChannelData",
188
- GetAppChannelLineups: "GetAppChannelLineups",
189
- GetAppChannelProgramData: "GetAppChannelProgramData",
190
- SendKey: "SendKey",
191
- SetChannel: "SetChannel"
192
- }
193
- },
194
- Media: {
195
- Id: 2,
196
- Uuid: "48a9ca24eb6d4e128c43d57469edd3cd",
197
- Commands: {
198
- play: 2,
199
- pause: 4,
200
- playPause: 8,
201
- stop: 16,
202
- record: 32,
203
- nextTrack: 64,
204
- previousTrack: 128,
205
- fastForward: 256,
206
- rewind: 512,
207
- channelUp: 1024,
208
- channelDown: 2048,
209
- back: 4096,
210
- view: 8192,
211
- menu: 16384,
212
- seek: 32786
213
- }
174
+ "TvRemote": {
175
+ "Id": 1,
176
+ "Uuid": "d451e3b360bb4c71b3dbf994b1aca3a7",
177
+ "Commands": {
178
+ "volUp": "btn.vol_up",
179
+ "volDown": "btn.vol_down",
180
+ "volMute": "btn.vol_mute"
214
181
  },
215
- Text: {
216
- Id: 3,
217
- Uuid: "7af3e6a2488b40cba93179c04b7da3a0"
218
- },
219
- Broadcast: {
220
- Id: 4,
221
- Uuid: "b6a117d8f5e245d7862e8fd8e3156476"
222
- },
223
- Title: {
224
- Id: 5,
225
- Uuid: "00000000000000000000000000000000"
182
+ "MessageType": {
183
+ "Error": "Error",
184
+ "GetConfiguration": "GetConfiguration",
185
+ "GetHeadendInfo": "GetHeadendInfo",
186
+ "GetLiveTVInfo": "GetLiveTVInfo",
187
+ "GetProgramInfo": "GetProgramInfo",
188
+ "GetRecentChannels": "GetRecentChannels",
189
+ "GetTunerLineups": "GetTunerLineups",
190
+ "GetAppChannelData": "GetAppChannelData",
191
+ "GetAppChannelLineups": "GetAppChannelLineups",
192
+ "GetAppChannelProgramData": "GetAppChannelProgramData",
193
+ "SendKey": "SendKey",
194
+ "SetChannel": "SetChannel"
195
+ }
196
+ },
197
+ "Media": {
198
+ "Id": 2,
199
+ "Uuid": "48a9ca24eb6d4e128c43d57469edd3cd",
200
+ "Commands": {
201
+ "play": 2,
202
+ "pause": 4,
203
+ "playPause": 8,
204
+ "stop": 16,
205
+ "record": 32,
206
+ "nextTrack": 64,
207
+ "previousTrack": 128,
208
+ "fastForward": 256,
209
+ "rewind": 512,
210
+ "channelUp": 1024,
211
+ "channelDown": 2048,
212
+ "back": 4096,
213
+ "view": 8192,
214
+ "menu": 16384,
215
+ "seek": 32786
226
216
  }
227
- }
228
- },
229
- Media: {
230
- Types: {
231
- 0: "No Media",
232
- 1: "Music",
233
- 2: "Video",
234
- 3: "Image",
235
- 4: "Conversation",
236
- 5: "Game"
237
217
  },
238
- PlaybackState: {
239
- 0: "Closed",
240
- 1: "Changing",
241
- 2: "Stopped",
242
- 3: "Playing",
243
- 4: "Paused"
218
+ "Text": {
219
+ "Id": 3,
220
+ "Uuid": "7af3e6a2488b40cba93179c04b7da3a0"
244
221
  },
245
- SoundLevel: {
246
- 0: "Muted",
247
- 1: "Low",
248
- 2: "Full"
249
- }
250
- },
251
- Messages: {
252
- Types: {
253
- d00d: "message",
254
- dd00: "simple",
255
- dd01: "simple",
256
- dd02: "simple",
257
- cc00: "simple",
258
- cc01: "simple"
222
+ "Broadcast": {
223
+ "Id": 4,
224
+ "Uuid": "b6a117d8f5e245d7862e8fd8e3156476"
259
225
  },
260
- Requests: {
261
- d00d: "message",
262
- dd00: "discoveryRequest",
263
- dd01: "discoveryResponse",
264
- dd02: "powerOn",
265
- cc00: "connectRequest",
266
- cc01: "connectResponse"
226
+ "Title": {
227
+ "Id": 5,
228
+ "Uuid": "00000000000000000000000000000000"
267
229
  }
268
230
  }
231
+ },
232
+ "Media": {
233
+ "Types": {
234
+ "0": "No Media",
235
+ "1": "Music",
236
+ "2": "Video",
237
+ "3": "Image",
238
+ "4": "Conversation",
239
+ "5": "Game"
240
+ },
241
+ "PlaybackState": {
242
+ "0": "Closed",
243
+ "1": "Changing",
244
+ "2": "Stopped",
245
+ "3": "Playing",
246
+ "4": "Paused"
247
+ },
248
+ "SoundLevel": {
249
+ "0": "Muted",
250
+ "1": "Low",
251
+ "2": "Full"
252
+ }
253
+ },
254
+ "Messages": {
255
+ "Types": {
256
+ "d00d": "message",
257
+ "dd00": "simple",
258
+ "dd01": "simple",
259
+ "dd02": "simple",
260
+ "cc00": "simple",
261
+ "cc01": "simple"
262
+ },
263
+ "Requests": {
264
+ "d00d": "message",
265
+ "dd00": "discoveryRequest",
266
+ "dd01": "discoveryResponse",
267
+ "dd02": "powerOn",
268
+ "cc00": "connectRequest",
269
+ "cc01": "connectResponse"
270
+ }
269
271
  }
270
- };
272
+ }