===========================
Xbox, Xbox One, Smartglass and Xbox Live are trademarks of Microsoft Corporation. The developers of this module are in no way endorsed by or affiliated with Microsoft Corporation, or any associated subsidiaries, logos or trademarks.
- Fulfill the requirements
- Install the adapter and control your Xbox One or Xbox One X
- If you want to power your Xbox on with this adapter, you have to configure the instant-on power modus on your Xbox.
Thanks to Team Open Xbox for developing and maintaining the xbox-rest-server and the related libraries. Without their effort, developing this package would not be possible.
You can install the adapter via Admin interface or on your terminal.
- Open your ioBroker web interface in a browser (eg: 192.168.30.70:8081)
- Click on Tab "Adapters"
- Type "Xbox" in the filter
- Click on the three points and then on the "+" symbol of the Xbox adapter
- Fill in the Live ID of your Xbox in the settings of the adapter instance. You can find the Live ID in the settings of your console: System > Console info > "Xbox Live device ID" or "Xbox network device ID" (depending on which Xbox model and firmware is used)
- Fill in the ip address of your Xbox.
- Save the settings and open the ioBroker log.
- To start the login procedure, open the Link from the log (Xbox login url available at: <link>) in a webbrowser. Then copy the API key, which can be found after
code=
in the url of the browser's address bar, into the "API Token" field of the adapter instance settings.
In this section you can find a description of every state of the adapter.
-
info.connection
Data type Permission boolean R Read-only boolean indicator. Is true if adapter is connected to Xbox.
-
info.activeTitleName
Data type Permission string R Contains the name of the active title (which is focused) as read-only string.
-
info.activeTitleId
Data type Permission string R Contains the id (converted to hex) of the active title (which is focused) as read-only string.
-
info.activeTitleImage
Data type Permission string R Contains the link to the active title (which is focused) cover image as a string.
-
info.activeTitleType
Data type Permission string R Contains the type of the active title (which is focused) as a read-only string, e.g. 'Game'.
-
info.gamertag
Data type Permission string R String which contains the gamertag of the currently authenticated user.
-
info.gamerscore
Data type Permission number R Number which contains the gamerscore of the currently authenticated user.
-
info.installedApplications
Data type Permission string R String which contains a comma-separated list of the currently installed applicaitons. DLCs are excluded.
-
info.authenticated
Data type Permission boolean R Boolean value which indicates if you are successfully authenticated on Xbox Live.
-
settings.power
Data type Permission boolean R/W Boolean-value to turn your Xbox on and off. State also indicates current power status of the Xbox.
-
settings.launchTitle/launchStoreTitle
Data type Permission string R/W A writable string, which allows the user to launch a specific title by its title id (converted to hexadecimal). To find out about the hex code of a desired title, you can use the info.currentTitles state. The command is acknowledged when it has arrived at the server, which does not mean, that the command has been executed.
Example:
setState('settings.launchTitle', '2340236c', false); // Launch Red Dead Redemption 2
With
launchStoreTitle
you can use real names. The adapter will search for the title in store and take the ID of the first result. -
settings.inputText
Data type Permission string R/W Writable string, which allows the user to fill text into an active text field, e.g. to send private messages. The command is acknowledged when it has arrived at the server, which does not mean, that the command has been executed.
Example:
setState('settings.inputText', 'H1 M8 h0w d0 u do?', false); // Send a super nerdy text to someone
-
settings.gameDvr
Data type Permission string W *Writable string which records the defined time of gameplay. The state is available when authenticate is turned on in the settings. You have to be logged in on your Xbox with the same account as you are authenticated with. A game needs to be in the foreground.
Example:
setState('settings.gameDvr', '-60,30', false); // record last 60 seconds until the next 30 seconds (total of 90 seconds)
-
gamepad.a
Emulates the A button of your gamepad.
-
gamepad.b
Emulates the B button of your gamepad.
-
gamepad.x
Emulates the X button of your gamepad.
-
gamepad.y
Emulates the Y button of your gamepad.
-
gamepad.clear
Emulates the Clear button of your Xbox.
-
gamepad.dPadDown
Emulates the DPad Down button of your Xbox.
-
gamepad.dPadUp
Emulates the DPad Up button of your Xbox.
-
gamepad.dPadRight
Emulates the DPad Right button of your Xbox.
-
gamepad.dPadLeft
Emulates the DPad Left button of your Xbox.
-
gamepad.enroll
Emulates the Enroll button of your Xbox.
-
gamepad.leftShoulder
Emulates the Left Shoulder button of your Xbox.
-
gamepad.rightShoulder
Emulates the Right Shoulder button of your Xbox.
-
gamepad.leftThumbstick
Emulates the Left Thumbstick button of your Xbox.
-
gamepad.rightThumbstick
Emulates the Right Thumbstick button of your Xbox.
-
gamepad.menu
Emulates the Menu button of your Xbox.
-
gamepad.nexus
Emulates the Nexus (Xbox) button of your Xbox.
-
gamepad.view
Emulates the View button of your Xbox.
-
media.seek
Data type Permission number R/W Jump to a specific position on media content. The state will be acknowledged when it has been arrived at the REST server, which not means, that it has been executed.
-
media.play
Play button for media content.
-
media.pause
Pause button for media content.
-
media.playPause
Combined Play and Pause button for media content.
-
media.back
Back button for media content.
-
media.channelDown
Channel Down button for media content.
-
media.channelUp
Channel Up button for media content.
-
media.fastForward
Fast Forward button for media content.
-
media.menu
Menu button for media content.
-
media.nextTrack
Next Track button for media content.
-
media.previousTrack
Previous Track button for media content.
-
media.record
Record button for media content.
-
media.rewind
Rewind button for media content.
-
media.stop
Stop button for media content.
-
media.view
View button for media content.
For every friend a channel will be created. Under this channel you will find several read-only states.
- (foxriver76) allow to send web API commands even if Xbox is locally not connected
- (foxriver76) we have ensured, that instance object is existing again
- (foxriver76) we have optimized error logging messages
- (foxriver76) updated dependencies
- (foxriver76) see previous beta versions
- (foxriver76) we now determine correct store locale for germany if system language is "de"
- (foxriver76) we fixed
activeTitleName
of applications which have no short title
- (foxriver76) removed unused messagebox
- (foxriver76) we have revived acknowledgment flag for power on state
- (foxriver76) we are now synchronizing friends
- (foxriver76) fixed
activeTitleImage
which is now the cover and always an url - (foxriver76) optimized
launchStoreTitle
by preventing API calls for DLCs - (foxriver76) added gamerscore as state (synched every 10 minutes)
- (foxriver76) added list of installed applications to a new state
- (foxriver76) we have optimized
launchStoreTitle
to check for installed apps first - (foxriver76) we have optimized error logging
- (foxriver76) added
launchStoreTitle
state to launch apps by their names
- (foxriver76) fixed missing state objects
- (foxriver76) complete TypeScript rewrite
- (foxriver76) removed Python dependencies by siwtching to Xbox API written in Node.js
- (foxriver76) fixed title launch (closes #39)
- (foxriver76) fixed Xbox Live Auth (closes #63)
- (foxriver76) fixed error with mising admin ui on new installations
- (foxriver76) fixed wrong default value of
media.seek
(closes #113)
- (foxriver76) we now set
unsafePerm
flag to ensure compatibility with future controller - (foxriver76) updated dependencies
- (foxriver76) do not log rest server logging on levels above debug, so it can be activated when needed
- (foxriver76) added
requests
package as pip dev - (foxriver76) added logging for rest server
- (foxriver76) fixed debug logging on discovery
- (foxriver76) removed logging of error on adapter stoppage due to rest server termination
- (foxriver76) removed warn logging for debugging
- (foxriver76) fixed currentTitles and activeTitle states
- (foxriver76) replaced deprecated requests module by axios
- (foxriver76) migrated to xbox-smartglass 1.3
- (foxriver76) removed Python3.6 support
- (foxriver76) event based rest server startage (faster and more robust)
- (foxriver76) GameDVR now supports custom time
- (foxriver76) dependency upgrade, fixes installation problems
- (foxriver76) minor optimization
- (foxriver76) fixed problem with auth-only states
- (foxriver76) compatibility with controller v3
- (foxriver76) try specific python versions first on install
- (foxriver76) bump dependency, because of auth bug in smartglass
- (foxriver76) fixes for compact mode compatibility
- (foxriver76) more translations added
- (foxriver76) minor optimizations
- (foxriver76) dependency upgrade (smartglass has been refactored)
- python 3.6 required!
- (foxriver76) let js-controller know which apt packages are required
- (foxriver76) we not try to install apt packages any longer if already installed
- (foxriver76) increased stopTimeout to successfully shut down adapter on windows based systems
- (foxriver76) now using setStateChanged instead of own implementation
- (foxriver76) fix gamertag not set if no state on the object exists yet
- (foxriver76) if still logged in dont log warning/set auth false anymore
- (foxriver76) on logout only set auth to false, but keep gamertag
- (foxriver76) minor optimizations
- (foxriver76) improve log message quality
- (foxriver76) more promisification
- (foxriver76) minor fix for compact mode
- (foxriver76) support of compact mode
- (foxriver76) fixes and optimizations
- (foxriver76) small fixes and optimizations
- (foxriver76) use adapter-core module
- (foxriver76) minor type fix
- (foxriver76) Seek converted to number, to jump to specific position
- (foxriver76) try reauthentication when auth gets lost
- (foxriver76) new state activeTitleType added
- (foxriver76) minor fixes
- (foxriver76) authentication for 2 factor auth added
- (foxriver76) minor fix when currentTitles empty, activeTitle states should be too
- (foxriver76) dont set info.connection on power off, because will be self detected and prevents reconnection on shutdown
- (foxriver76) minor fix on state name
- (foxriver76) Authentication for Xbox Live added
- (foxriver76) When logged in current titles contains the correct title full name
- (foxriver76) Added decryption and encryption
- (foxriver76) minor fixes
- (foxriver76) Added new states
- (foxriver76) rest-server will now be stopped on windows unload too
- (foxriver76) enhanced windows debug logging
- (foxriver76) fix rest-server start on win when nopy not in own node_modules folder
- (foxriver76) starting rest-server on windows fixed
- (foxriver76) stopping rest-server on windows fixed
- (foxriver76) set info.connection and settings.power to false on unload
- (foxriver76) not only rely on ping to check if xbox is on, use available too
- (foxriver76) minor fix
- (foxriver76) bump smartglass-rest requirement to 0.9.7
- (foxriver76) enables pwoer on for not multicastable consoles
- (foxriver76) only use discovery when Xbox disconnected and online
- (foxriver76) fix when currentTitles is empty
- (foxriver76) minor fixes
- (foxriver76) explicit require versions of python deps
- (foxriver76) fix for power on, when Xbox not in broadcast network
- (foxriver76) brought back live id to settings
- (foxriver76) input text state to enter text in an open text field
- (foxriver76) ability to find consoles which are not available via broadcast
- (foxriver76) info state for active titles & launch title state
- (foxriver76) minor fix
- (foxriver76) restart adapter on rest server error
- (foxriver76) log when losing connection without ping
- (foxriver76) when console unavailable, also do not connect
- (foxriver76) debug logging for unavailable console
- (foxriver76) only set power states on change
- (foxriver76) minor connection fix
- (foxriver76) when status is connecting, don't connect again
- (foxriver76) LiveID is not necessary anymore
- (foxriver76) If reconnect attempts fail often in a row, only log it once
- (foxriver76) removed unneeded objects from io-package and adjusted title
- (foxriver76) Stop making connect requests when already connected
- (foxriver76) more user friendly logging
- (foxriver76) more robustness in nopys path
- (foxriver76) using relative paths for starting server
- (foxriver76) adding commands for windows
- (foxriver76) enhanced installation manual
- (foxriver76) automatically install required Debian packages
- (foxriver76) updated Readme
- (foxriver76) make installation for Windows possible
- (foxriver76) improved logging
- (foxriver76) detect OS
- (foxriver76) fixed state handling
- (foxriver76) using ping to check consoles power status instead of connection
- (foxriver76) stop powering on if it is unsuccessful for 15 seconds
- (foxriver76) restarting adapter when REST snpm erver is down
- (foxriver76) fixed endpoints
- (foxriver76) automated installation of dependencies
- (foxriver76) readme updated
- (foxriver76) code optimized
- (foxriver76) initial release
The MIT License (MIT)
Copyright (c) 2018-2023 Moritz Heusinger moritz.heusinger@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.