Skip to content

Commit

Permalink
bump 1.5.0
Browse files Browse the repository at this point in the history
## [1.5.0] - 2021-04-11
## Changes
- added control over Web Api
- code rebuild
  • Loading branch information
grzegorz914 committed Apr 11, 2021
1 parent 93fe8ed commit 061df19
Show file tree
Hide file tree
Showing 8 changed files with 1,730 additions and 333 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.5.0] - 2021-04-11
## Changes
- added control over Web Api
- code rebuild

## [1.4.0] - 2021-02-19
## Changes
- code rebuild, use Characteristic.onSet
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Grzegorz Kaczor
Copyright (c) 2021 Grzegorz Kaczor

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
45 changes: 42 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[![GitHub pull requests](https://img.shields.io/github/issues-pr/grzegorz914/homebridge-xbox-tv.svg)](https://github.com/grzegorz914/homebridge-xbox-tv/pulls)
[![GitHub issues](https://img.shields.io/github/issues/grzegorz914/homebridge-xbox-tv.svg)](https://github.com/grzegorz914/homebridge-xbox-tv/issues)

Homebridge plugin for Microsoft game consoles. Tested with Xbox One X and Xbox Series X.
Homebridge plugin for Microsoft game consoles. Tested with Xbox One X/S and Xbox Series X.

</span>

Expand Down Expand Up @@ -45,7 +45,7 @@ Homebridge plugin for Microsoft game consoles. Tested with Xbox One X and Xbox S
* Remote/media control is possible after you go to the RC app on iOS or iPadOS.
* Speaker control is possible after you go to RC app on iOS or iPadOS as a `Speaker Service`.
* Legacy volume and mute control is possible through extra `lightbulb` dimmer slider or using Siri `Volume Service`, not working with the current API.
* Applications and games can only be read from the device, switching apps or games does not work with the current API.
* Apps, inputs and games can be controled and switched if `xboxWebApiEnabled` and the console is authenticated. In other case the current apps, inputs, games can be displayed.
* Siri control.

<p align="left">
Expand All @@ -64,17 +64,28 @@ Homebridge plugin for Microsoft game consoles. Tested with Xbox One X and Xbox S
2. Console need to allow connect from any 3rd app. *Allow Connections from any device* should be enabled.
* Profile & system > Settings > Devices & connections > Remote features > Xbox app preferences.

## Configuration and enable web API control
1. After enable `xboxWebApiEnabled` option, restart the plugin and go to Homebridge console log.
2. Open the authentication URL and login to Your XboxLive account, next accept permision for this app.
3. After accept permiosion for this app copy the part after `?code=` from the response URL and paste it in to the `xboxWebApiToken` in plugin config, save and restart the plugin again, done.

Install and use [Homebridge Config UI X](https://github.com/oznu/homebridge-config-ui-x) plugin to configure this plugin (strongly recomended). The sample configuration can be edited and used manually as an alternative. See the `sample-config.json` file in this repository for an example or copy the example below into your config.json file, making the apporpriate changes before saving it. Be sure to always make a backup copy of your config.json file before making any changes to it.
| Key | Description |
| --- | --- |
| `xboxliveid` | on your console select Profile & system > Settings > System > Console info, listed as **Xbox Live device ID**. *You can only find the Xbox Live device ID in Settings on your console, this is different from your console serial number* |
| `clientID` | Optional free-form for future use |
| `clientSecret` | Optional free-form for future use |
| `xboxWebApiToken` | Required if `xboxWebApiEnabled` enabled.|
| `xboxWebApiEnabled` | Optional, if enabled the console can be controlled using Web Api |
| `refreshInterval` | Set the data refresh time in seconds, default is every 5 seconds |
| `volumeControl`| Select what a additional volume control mode You want to use (None, Slider, Fan) |
| `switchInfoMenu`| If `true` then the `I` button will toggle its behaviour in the Apple Remote in Control Center and `PowerModeSelection` in settings |
| `disableLogInfo`| If `true` then disable log info, all values and state will not be displayed in Homebridge log console |
| `inputs` | Configure apps/inputs which will be published to and appear in HomeKit app in the device tile as inputs list |
| `buttons` | same as inputs but appear in HomeKit.app as extra tile |
| `reference` | open log in homebridge, open app on console and look in the log |
| `reference` | Required to identify current running app, open homebridge console and look in the log or if web Api enabled then all available in `/var/lib/homebridge/xboxTv/installedApps` file. |
| `referenceId` | Optiona, required if U want to use web api and switch inputs/apps, all available data in `/var/lib/homebridge/xboxTv/installedApps` file. |
| `type` | Optional choice from available options |
| `manufacturer` | Optional free-form informational data that will be displayed in the Home.app if it is filled in |
| `modelName` | Optional free-form informational data that will be displayed in the Home.app if it is filled in |
| `serialNumber` | Optional free-form informational data that will be displayed in the Home.app if it is filled in |
Expand All @@ -92,130 +103,158 @@ Install and use [Homebridge Config UI X](https://github.com/oznu/homebridge-conf
"name": "Xbox One",
"host": "192.168.1.6",
"xboxliveid": "FD0000000000",
"xboxWebApiToken": "M.R5_BAU.be1c3729-8ae5-d62b-5abd-4323c9c96383",
"clientID": "",
"clientSecret": "",
"refreshInterval": 5,
"xboxWebApiEnabled": false,
"disableLogInfo": false,
"volumeControl": 0,
"switchInfoMenu": false,
"inputs": [
{
"name": "Dashboard",
"reference": "Xbox.Dashboard_8wekyb3d8bbwe!Xbox.Dashboard.Application",
"referenceId": "",
"type": "HOME_SCREEN"
},
{
"name": "Settings",
"reference": "Microsoft.Xbox.Settings_8wekyb3d8bbwe!Xbox.Settings.Application",
"referenceId": "",
"type": "OTHER"
},
{
"name": "Accessory",
"reference": "Microsoft.XboxDevices_8wekyb3d8bbwe!App",
"referenceId": "",
"type": "OTHER"
},
{
"name": "Spotify",
"reference": "SpotifyAB.SpotifyMusic-forXbox_zpdnekdrzrea0!App",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "YouTube",
"reference": "GoogleInc.YouTube_yfg5n0ztvskxp!App",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "Netflix",
"reference": "4DF9E0F8.Netflix_mcm4njqhnhss8!App",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "Telewizja",
"reference": "Microsoft.Xbox.LiveTV_8wekyb3d8bbwe!Microsoft.Xbox.LiveTV.Application",
"referenceId": "",
"type": "HDMI"
},
{
"name": "Sklep",
"reference": "Microsoft.WindowsStore_8wekyb3d8bbwe!App",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "Microsoft Edge",
"reference": "Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "Airserver",
"reference": "F3F176BD.53203526D8F6C_p8qzvses5c8me!AirServer",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "Gears of War 5",
"reference": "Microsoft.HalifaxBaseGame_8wekyb3d8bbwe!HalifaxGameShip",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "Fortnite",
"reference": "Fortnite_d5xxtpggmzx6p!AppFortnite",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "Minecraft",
"reference": "Microsoft.MinecraftUWPConsole_8wekyb3d8bbwe!App",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "Plex",
"reference": "CAF9E577.PlexforXbox_aam28m9va5cke!App",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "Bluray",
"reference": "Microsoft.BlurayPlayer_8wekyb3d8bbwe!Xbox.BlurayPlayer.Application",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "COD WII",
"reference": "shg2SubmissionENFR_ht1qfjb0gaftw!S2Boot",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "COD WZ",
"reference": "iw8Submission-EN-FR_ht1qfjb0gaftw!iw8",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "GTA V",
"reference": "GTA-V_vesz1v3mcwykm!GTAV",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "All4",
"reference": "CHANNELFOURTELEVISIONCOMP.All4_e1252dwpj85a4!vstest.executionengine.universal.App",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "Amazon Prime",
"reference": "AmazonVideo.AmazonVideoUK_pwbj9vvecjh7j!App",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "Disney",
"reference": "Disney.37853FC22B2CE_6rarf9sa4v8jt!App",
"referenceId": "",
"type": "APPLICATION"
},
{
"name": "BBC iPlayer",
"reference": "BBCMobileApps.BBCIPLAYER_wzgfedwv7gft2!App",
"referenceId": "",
"type": "APPLICATION"
}
],
"buttons": [
{
"name": "Disney",
"reference": "Disney.37853FC22B2CE_6rarf9sa4v8jt!App",
"referenceId": ""
},
{
"name": "BBC iPlayer",
"reference": "BBCMobileApps.BBCIPLAYER_wzgfedwv7gft2!App",
"referenceId": ""
},
],
"manufacturer": "Microsoft Corporation",
Expand Down
75 changes: 65 additions & 10 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"pluginAlias": "XboxTv",
"pluginType": "platform",
"singular": true,
"customUi": false,
"headerDisplay": "This plugin works with Xbox game consoles and are exposed to HomeKit as separate accessories and each needs to be manually paired.\n\n1. Open the Home <img src='https://user-images.githubusercontent.com/3979615/78010622-4ea1d380-738e-11ea-8a17-e6a465eeec35.png' height='16.42px'> app on your device.\n2. Tap the Home tab, then tap <img src='https://user-images.githubusercontent.com/3979615/78010869-9aed1380-738e-11ea-9644-9f46b3633026.png' height='16.42px'>.\n3. Tap *Add Accessory*, and select *I Don't Have a Code or Cannot Scan*.\n4. Enter the Homebridge PIN, this can be found under the QR code in Homebridge UI or your Homebridge logs, alternatively you can select *Use Camera* and scan the QR code again.",
"footerDisplay": "This plugin works with Xbox game console which is available [here](https://github.com/grzegorz914/homebridge-xbox-tv).",
"schema": {
Expand All @@ -26,11 +27,32 @@
"required": true,
"format": "hostname"
},
"clientID": {
"title": "Web Api ID",
"type": "string",
"placeholder": "5e5ead27-ed60-482d-b3fc-702b28a97404",
"description": "Optional free-form for future use.",
"required": false
},
"clientSecret": {
"title": "Web Api Secret",
"type": "string",
"placeholder": "Web Api Secret",
"description": "Optional free-form for future use.",
"required": false
},
"xboxliveid": {
"title": "Xbox Live ID",
"title": "Live ID",
"type": "string",
"default": "FD00000000000000",
"placeholder": "FD00000000000000",
"description": "Here put the Xbox Live ID",
"required": true
},
"xboxWebApiToken": {
"title": "Web Api Token",
"type": "string",
"placeholder": "",
"description": "Here put the reponse Token (value after ?code=) from the authentication URL.",
"required": true
},
"refreshInterval": {
Expand All @@ -48,6 +70,13 @@
"required": false,
"description": "This disable log info, all values and state will not be displayed in Homebridge log console."
},
"xboxWebApiEnabled": {
"title": "Enable Web Api",
"type": "boolean",
"default": false,
"required": false,
"description": "This enable possibility to control Xbox over Web Api."
},
"volumeControl": {
"title": "Volume control mode",
"type": "integer",
Expand Down Expand Up @@ -91,17 +120,23 @@
"type": "object",
"properties": {
"name": {
"title": "Input name",
"title": "Name",
"type": "string",
"description": "Here set Your own name.",
"required": true
},
"reference": {
"title": "Input reference",
"title": "Reference",
"type": "string",
"description": "Here set reference.",
"required": true
},
"referenceId": {
"title": "Reference ID",
"type": "string",
"description": "Here set reference ID if You use web api and want to switch apps",
"required": false
},
"type": {
"title": "Input type",
"type": "string",
Expand Down Expand Up @@ -174,7 +209,7 @@
]
}
],
"required": true
"required": false
}
}
}
Expand All @@ -197,14 +232,19 @@
"type": "string",
"description": "Here set the reference.",
"required": true
},
"referenceId": {
"title": "Reference ID",
"type": "string",
"description": "Here set reference ID if You use web api and want to switch apps.",
"required": false
}
}
}
},
"manufacturer": {
"name": "Manufacturer",
"type": "string",
"default": "Microsoft Corporation",
"placeholder": "Manufacturer",
"description": "Set the manufacturer name.",
"required": false
Expand Down Expand Up @@ -243,8 +283,7 @@
"items": [
"devices[].name",
"devices[].host",
"devices[].xboxliveid",
"devices[].volumeControl",
"devices[].xboxWebApiEnabled",
{
"key": "devices[]",
"type": "section",
Expand All @@ -260,6 +299,7 @@
"items": [
"devices[].inputs[].name",
"devices[].inputs[].reference",
"devices[].inputs[].referenceId",
"devices[].inputs[].type"
]
}
Expand All @@ -279,11 +319,25 @@
"buttonText": "Add button",
"items": [
"devices[].buttons[].name",
"devices[].buttons[].reference"
"devices[].buttons[].reference",
"devices[].buttons[].referenceId"
]
}
]
},
{
"key": "devices[]",
"type": "section",
"title": "Xbox Live and Web Api",
"expandable": true,
"expanded": false,
"items": [
"devices[].xboxliveid",
"devices[].clientID",
"devices[].clientSecret",
"devices[].xboxWebApiToken"
]
},
{
"key": "devices[]",
"type": "section",
Expand All @@ -292,8 +346,9 @@
"expanded": false,
"items": [
"devices[].disableLogInfo",
"devices[].switchInfoMenu",
"devices[].refreshInterval",
"devices[].switchInfoMenu"
"devices[].volumeControl"
]
},
{
Expand Down
Loading

0 comments on commit 061df19

Please sign in to comment.