Is there anyway to create a front end switch/script that will turn it on. I want to incorporate it into a room card rather than using the media player card.
tuxuser, sorry for the delayed reply, only just found time to have a look at this again.
Thank you so much, that worked!
With your message I’ve managed to work out how to automatically run other things like Forza too
Now just to suss how to create a switch in homeassistant that’ll turn on my xbox and then launch whatever app.
Installed this and it’s working great. Paired it with the mini-media-player for Lovelace and it’s working a treat.
The only issue I have is that I’ve turned off the console, but it’s still showing as on with a media title of Home. Would this be because I have my console set to instant on?
Is anyone else getting this error? Its happening constantly.
2018-10-24 21:05:55 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 246, in async_update_ha_state
supported_features = self.supported_features
File "/config/custom_components/media_player/xboxone.py", line 527, in supported_features
if not self._xboxone.volume_controls:
File "/config/custom_components/media_player/xboxone.py", line 119, in volume_controls
'mute': controls['buttons']['btn.vol_mute']['url'],
KeyError: 'btn.vol_mute'
Love this one , but homeassistant discovery find my xbox , so i’ve got 2 now , i try to see the difference , your got the source selection , Ha get the actual playing media and you only the source , can you implement the actual media (Title, artist etc …)
Look at the picture :
2018-10-27 10:07:15 ERROR (SyncWorker_14) [custom_components.media_player.xboxone] Failed to connect to console FD00EF1EA5F826C5: {‘message’: ‘Channel ID not found for ServiceChannel: ServiceChannel.SystemInputTVRemote’, ‘success’: False} 2018-10-27 10:07:15 ERROR (SyncWorker_14) [custom_components.media_player.xboxone] Failed to connect to FD00EF1EA5F826C5 2018-10-27 10:07:16 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for media_player.xbox_one_salon (<class ‘custom_components.media_player.xboxone.XboxOneDevice’>) took 0.775 seconds. Please report platform to the developers at https://goo.gl/Nvioub
Edit: Error solved after restart HA , just the little one regarding state took 0.7 second not a big problem
I don’t know how this happen , seems that is not the case today …
Edit: i think that this second xbox was here by another way , it was here caused i have it by the plex component , but actually i desinstall it to had only the xbox one from the addon , look at the plex component , when you start plex on the xbox you get a new xbox , but the xbox component doesn’t exist , i think HA can implement if it find it when you start plex …but it’s not the concern of this post…
With the regular xboxlive sensor, I always refresh when needed, but now this is loaded at every boot of HA, this seems to be undesired… how can we prevent that. If at all? If I click the oauth link nothing happens (not using windows but mac btw)
hi everyone nice addon but I´m having some difficulties don´t know if I missed something, here´s my logs:
[2018-12-09 14:46:47,146] WARNING in manager: Token Auth failed: No valid RefreshToken. Attempting auth via credentials
[2018-12-09 14:46:47,148] ERROR in app: {'success': False, 'message': 'AuthenticationManager was not able to authenticate with provided tokens or user credentials!'}
i’ve setup the add-on and it’s connected, i can turn on my xbox
but the entity shows that is off.
i also have a error in the logs
has somebody a solution? or even i overlooked something
2019-01-04 09:06:23 ERROR (MainThread) [homeassistant.core] Error doing job: Task
exception
was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 268, in
async_update_ha_state
supported_features = self.supported_features
File "/config/custom_components/media_player/xboxone.py", line 527, in supported_features
if not self._xboxone.volume_controls:
File "/config/custom_components/media_player/xboxone.py", line 119, in volume_controls
'mute': controls['buttons']['btn.vol_mute']['url'],
KeyError: 'btn.vol_mute'
I had this problem too, it would only work once and then I’d have to restart home assistant to make it work again.
In the log I found a version mismatch, as the xbox-rest-server is 0.9.8 and the custom_component is version 0.9.6 this lead to my xbox not responding to a second command after the first was given. I fixed it by changing the version number in the custom_component. Now it works flawlessly and I do not have any problems with it since I changed it. Works in automations etc. Only thing is, when the xbox is “ON” the sensor will give “Unknown” as its current state. But otherwise it works perfectly.
So edit the xboxone.py and change the version number (see screenshot) to 0.9.8
Thanks @jimz011 for the hint but it doesn’t work for me. Actually, I cannot even either get the state or start the xbox from HA. I’ll give it another try and report.
Stupid question maybe, but did you start the xbox-rest-server? As this needs to be running to be able to work at all. I have to mention that I use it in a virtual env with ubuntu and that I don’t use hass.io.