Xbox One support for Home Assistant
This add-on is a packaged version of a Home Assistant Xbox One custom component forked from hunterjm/hassio-addons. It allows you to easily setup and configure controlling your Xbox from Home Assistant.
This component replicates many of the features of the Xbox App. If it can't be done there, it can't be done here.
- Power On/Off
- Display name and image of current Game/App
- Requires auth with Xbox Live
- Media Controls: Play/Pause & Seek
- Supported apps only
- Volume Controls: Up/Down/Mute
- Requires
Device Control
to be cofigured inSettings
on the Xbox
- Requires
- Source Selection: Launch Pinned Apps from within Home Assistant
- Apps only, Games not supported
The installation of this add-on is pretty straightforward and not different in comparison to installing any other Hass.io add-on.
- Add our Hass.io add-ons repository to your Hass.io instance.
- Install the "Xbox One" add-on.
- Start the "Xbox One" add-on.
- Check the logs of the "Xbox One" add-on to see if everything went well.
- Surf to your Hass.io instance and use port
5557
(e.g.http://hassio.local:5557
). - Authenticate with Xbox Live by going to /auth/oauth and following the directions.
- Enter your home assistant python virtual-environment.
- Execute
pip install xbox-smartglass-rest
. - Create a service to autostart the server (e.g. for Systemd).
- Enable / start the service.
- Copy
xboxone.py
to<hass config path>/custom_components/media_player/xboxone.py
. - Proceed with Installation step 5.
File location: /etc/systemd/system/xbox-smartglass-rest@homeassistant.service
NOTE: This assumes running the service as user homeassistant
.
If you want to run the server with a different user, change
the filename to: xbox-smartglass-rest@<username>.service
!
Edit ExecStart
to your needs!
#
# Service file for systems with systemd to run Xbox One SmartGlass REST server.
#
[Unit]
Description=Xbox One SmartGlass REST for %i
After=network.target
[Service]
Type=simple
User=%i
ExecStart=/path/to/bin/inside/venv/xbox-rest-server
SendSIGKILL=no
[Install]
WantedBy=multi-user.target
This add-on creates a custom component in your hassio instance. This component needs to be configured in order to display your Xbox in Home Assistant. Follow the below steps to get started.
- Turn on all of the Xboxes you wish to be discovered.
- View the device list in this plugin: hassio.local:5557/device
- Create the
media_player
configuration using theliveid
as the value fordevice
. - Restart Home Assistant to pick up the config change.
Example configuration.yaml
:
media_player:
- platform: xboxone
device: FD009374623167E
name: Living Room Xbox One
Note: This is just an example, don't copy and paste it! Create your own!
Required: This must be set to xboxone
The LiveID of your Xbox One. It can be found in /device
endpoint. Once this addon is up and running click here.
The IP Address of your Xbox One. Useful if your xbox lives on a separate subnet.
The friendly name for this Xbox which will appear in Home Assistant.
Default: true
Set to false
if you have multiple consoles on your network and have issues with getting signed out. Future features may require an authenticated connection with the console.
Note: This refers to an authenticated connection with the console. You will still need to authenticate with Xbox Live to have the most useful features enabled (i.e. Friendly app names, images, and Source selection).
The original setup of this repository is by Jason Hunter.
Huge shoutout to Team OpenXbox for reverse engineering the SmartGlass protocol and providing the libraries and server used.
Special thanks to the contributions of tuxuser for answering late night questions and doing almost all of the heavy lifting on this.