Hass.io Add-on: Xbox One

I am using hassio and am using SSL/DuckDNS.

When I go to: http://hassio.local:5557/device

I get
{“devices”:{},“success”:true}

My xbox is powered on and connected to the network.

This component no longer works on the latest HA beta. It requires some older version of cryptography which gets updated in the upcoming HA update.

Required version: 2.3.1
Updated version: 2.5

Is it a python module or something included in the way HA communicates? If I have the package installed in a virtual environment, will it still work?

I too have it installed in a virtual environment (the same as my HA install) But I literally don’t have an idea if it will work if you would create a separate environment for this. At the moment I hesitate to update HA, because it will break so much at once that I do not feel comfortable to update right away (most lovelace cards have to be reworked in my case as css has changed, most custom components will stop working and the xbox component doesnt work at all).

This is actually the first update in the last 6 months that breaks so much at once :frowning: if I find the time I will try and fix all. If I find a solution to the xbox component I will definitely post it here.

Does anyone know how to fix this component to work with 0.88?? I’m not using Hass.io, so just a manual install is all I need.

I’ve moved the component in to the new components directory format /xboxone/media_player.py, but still not working.

I’ve always downgraded cryptography for updating the xboxone parts so that they work and validate, but then I upgrade it back to what’s need for HA. Never seem to have a problem.

Got it working finally. Fixed minor code revisions for home assistant 0.88 update and the new smartglass rest server. Made a pull request with hunter, but if you want to check it out now:

Thanks for the PR. I left a question, but I’ll try and get it updated sometime this week. The build takes forever for, so it might take awhile to get to the Hassio panel.

So to get this working again for me, I had to edit xboxone.py and edit lines 17 - 19.

It was

from homeassistant.components.media_player.const import (
    SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PREVIOUS_TRACK,
    SUPPORT_SELECT_SOURCE, SUPPORT_TURN_OFF, SUPPORT_TURN_ON,
    SUPPORT_VOLUME_STEP, SUPPORT_VOLUME_MUTE, SUPPORT_PLAY,
    MEDIA_TYPE_MUSIC, MEDIA_TYPE_VIDEO, MEDIA_TYPE_TVSHOW, MEDIA_TYPE_CHANNEL)

and I changed it to:

from homeassistant.components.media_player import (
    SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PREVIOUS_TRACK, PLATFORM_SCHEMA, SUPPORT_SELECT_SOURCE, SUPPORT_PLAY, MediaPlayerDevice)
from homeassistant.components.media_player.const import (
    SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_VOLUME_STEP, SUPPORT_VOLUME_MUTE, MEDIA_TYPE_MUSIC, MEDIA_TYPE_VIDEO, MEDIA_TYPE_TVSHOW, MEDIA_TYPE_CHANNEL)

Things are working again now.

I’m still running xbox-smartglass-rest 0.9.6. Does this fix to the new version mean I don’t need to do what I’ve done above?

The file above basically made those changes you indicated along with updating the smartglass server version.

If you want to keep the old version just leave the REQUIRED_SERVER_VERSION="0.9.6" in the xboxone.py file.

I think I remember having a problem with the previous version a while back but if it works for you this component will definitely work with it as long as the REQUIRED_SERVER_VERSION is set correctly.

It also fixes the status being correctly set in home assistant history, not a big deal, but bothered me for some reason.

I don’t mind having to update to 0.9.8. The main thing for me was to get it working again. I came back to post my fix and you had beaten me. Oh well. Your fix is probably better, mine is more of a band-aid.

I’ll have a look at it later. HA 0.88 has messed up a lot of custom components, so I’m slowly going around and updating/fixing them.

I have updated the addon to version 2.0 which will only work on Home Assistant 0.88+

Thanks for the fixes everybody.

1 Like

I have hassio 0.88.1 running now and Xbox One add-on 2.0.0. However I cannot start the add-on. If I hit the start button, nothing happens.

image

1 Like

Trying to get this addon to work as well. I’m on .88.1 and when I attempt to start the addon here’s what I get in the logs:

/run.sh: line 14: 12 Segmentation fault (core dumped) xbox-rest-server

Any ideas?

1 Like

I have got exactly the same message:

/run.sh: line 14: 12 Segmentation fault (core dumped) xbox-rest-server

2 Likes

So @WTFoX74 and I are the only ones with this problem? I’d love to try something to fix it but I have no idea what to try. Anyone have any advice? TIA.

I @krinehart, apparently we are the only which I cannot imagine. A fix would be very welcome :wink:

Works fine for me however since 0.88.1 it has problems reading the state. Even if the xbox is turned off it will show up as unknown whereas it always worked fine. Not a big deal, commands still work just the state is wrong.

Unfortunately I do not use Hassio so I can’t help you with that.

Edit: restarting the xbox rest server fixed the state issue for me.

I have the same issue!

I also have the same problem with the"backup to google drive" add on and it was suggested it might be a 64bit issue - see this thread Created new add-on to backup snapshots to Google Drive - #92 by samccauley

Interesting - I am running this on a 64bit Raspberry Pi.

Same here - I would imagine it is a common setup