home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.54k stars 30.72k forks source link

Xbox Integration dosent find Any Xbox anymore #49370

Closed JuhaFIN1 closed 2 years ago

JuhaFIN1 commented 3 years ago

The problem

Had installed before, find my Series S and Series X in same nerwork. Was newer able to switch on / off. Deleted integration, rebooted and reinstalled: dosent find any xbox anymore. Even Alexa echo find and can on / off with voice.

What is version of Home Assistant Core has the issue?

Newest

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

XBOX

Link to integration documentation on our website

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.helpers.integration_platform
Source: components/xbox/media_source.py:48 
First occurred: 3:16:55 PM (1 occurrences) 
Last logged: 3:16:55 PM

Error processing platform xbox.media_source
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 41, in _process
    await process_platform(hass, component_name, platform)
  File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 56, in _process_media_source_platform
    hass.data[DOMAIN][domain] = await platform.async_get_media_source(hass)
  File "/usr/src/homeassistant/homeassistant/components/xbox/media_source.py", line 48, in async_get_media_source
    client = hass.data[DOMAIN][entry.entry_id]["client"]
KeyError: '1b0cf4eba063886289e764afc8d59b93'

Additional information

No response

probot-home-assistant[bot] commented 3 years ago

xbox documentation xbox source (message by IssueLinks)

probot-home-assistant[bot] commented 3 years ago

Hey there @hunterjm, mind taking a look at this issue as its been labeled with an integration (xbox) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

avd706 commented 3 years ago

uses Nabu Casa to authenticate, must have been on the free trail when I first set it up, now nothing works.

hunterjm commented 3 years ago

uses Nabu Casa to authenticate, must have been on the free trail when I first set it up, now nothing works.

The account linking service is free. No subscription needed.

hunterjm commented 3 years ago

@JuhaFIN1 - Can you verify that logging in via the same microsoft account in the Xbox mobile app results in consoles being found? The error message you posted is not related to that. It looks like your config entry was not setup properly. Try removing the integration and restarting Home Assistant. Then ensure that you are logged in to the correct microsoft account on Xbox.com that your xboxes are linked to. If you are logged in via your work email or something, the integration at times won't ask you to login, so if you aren't paying attention you are actually authenticating with the wrong account.

asucrews commented 3 years ago

Looks xbox live made some changes to the authencation method.

Logger: homeassistant.config_entries Source: components/xbox/api.py:31 First occurred: 2:18:04 PM (3 occurrences) Last logged: 2:27:48 PM

Error setting up entry Home Assistant Cloud for xbox Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 969, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1081, in create_connection transport, protocol = await self._create_connection_transport( File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1111, in _create_connection_transport await waiter ConnectionAbortedError: SSL handshake is taking longer than 60.0 seconds: aborting the connection

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/usr/src/homeassistant/homeassistant/components/xbox/init.py", line 88, in async_setup_entry consoles: SmartglassConsoleList = await client.smartglass.get_console_list() File "/usr/local/lib/python3.9/site-packages/xbox/webapi/api/provider/smartglass/init.py", line 54, in get_console_list resp = await self._fetch_list("devices", params, kwargs) File "/usr/local/lib/python3.9/site-packages/xbox/webapi/api/provider/smartglass/init.py", line 359, in _fetch_list resp = await self.client.session.get( File "/usr/local/lib/python3.9/site-packages/xbox/webapi/api/client.py", line 86, in get return await self.request(hdrs.METH_GET, url, kwargs) File "/usr/local/lib/python3.9/site-packages/xbox/webapi/api/client.py", line 60, in request await self._auth_mgr.refresh_tokens() File "/usr/src/homeassistant/homeassistant/components/xbox/api.py", line 31, in refresh_tokens await super().refresh_tokens() File "/usr/local/lib/python3.9/site-packages/xbox/webapi/authentication/manager.py", line 73, in refresh_tokens self.user_token = await self.request_user_token() File "/usr/local/lib/python3.9/site-packages/xbox/webapi/authentication/manager.py", line 138, in request_user_token resp = await self.session.post(url, json=data, headers=headers) File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request conn = await self._connector.connect( File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1051, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1020, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 975, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host user.auth.xboxlive.com:443 ssl:default [None]

1ntroduc3 commented 3 years ago

I have this issue also, the device is not showing up. only xbox live as "service" and some entities related to that. @hunterjm if I can look up some details for you that you need, please let me know. The current xbox integration is useless, for now.

hunterjm commented 3 years ago

I have this issue also, the device is not showing up. only xbox live as "service" and some entities related to that. @hunterjm if I can look up some details for you that you need, please let me know. The current xbox integration is useless, for now.

Things to check:

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.