Hass.io Add-on: Xbox One

Ah that was easy for me, I run Home Assistant on a Ubuntu VM. So I have easy access to the files. But in the worst case you could just copy all the files from a text editor and create new ones for upload or just copy the entire file to another location (that is how I did it btw). The reason why I didn’t just copy my entire setup is because there is privacy sensitive data which I do not want uploaded to git (i.e. secrets file and some automations which involve locations etc). So basically my github file is an edited version of my HA setup. But most of it is there haha.

I will upload my TileBoard as well within the coming days.

Nice Thanks!

1 Like

Did you check if the xbox turns on via hass? Try it multiple times. For me it didnt work after the second time.

Btw you are Dutch right?

I did and that works fine. Even state check in card works fine.

Yes I am Dutch :wink:

I thought so :stuck_out_tongue:

1 Like

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.