Home Connect integration error

YES, this WORKED for me… Thx a lot…

In detail. Signup for developer account at https://developer.home-connect.com/, add Application (follow Home Connect - Home Assistant with Application ID: HomeAssistant, OAuth Flow: default, Redirect URL: https://<HOME_ASSISTANT_URL>/auth/external/callback), copy Home Connect user account, Client ID, Client Secret somewhere e.g. text document, LOGOUT!!!, then add integration in HA and add the details from the text document like email, client id, client secret… voilà

1 Like

Thanks for confirming @inv1sible
I have created Clarify home_connect prerequisites by mfalkvidd · Pull Request #25389 · home-assistant/home-assistant.io · GitHub to improve the documentation.

Hello together,
I try to get the integration running for some hours now. First I tried it the way the documentation says and I got the same error as everyone here. Then I had read this thread and tried everything:
Changed the Redirect URI to all the following things:
https://my.home-assistant.io/redirect/oauth
https://my.home-assistant.io/auth/external/callback
http://<INTERNAL IP:8123>/auth/external/callback

I even set up a new application in developer account for every Redirect URI to be sure. And yes I deleted the application credentials in HA and tried different browsers.

I tried the OAUTH2 Authorize Callback Feature which points to https://my.home-assistant.io/redirect/oauth/
And for sure I tried MikaelFs infos and logged out to my developer account. Nothing worked for me so far.
My Home Assistant is activated also, but Home Assistant is not reachable by an external URL over DynDNS or something like that.

So does anyone has any idea what to try next?

I tried everything and nothing worked until I turned off my pihole and adblockers

The redirect url it sends you to works, try calling the url on a different network if possible e.g mobile internet

Getting the same issues. Is there anyway to fix this or delete any reference of it?

Tryed for hours now without succes.
If I get the error I need to restore a full backup otherwise I cannot get rit of the error when I try to add home connect. (and I’m losing data collected in that time)>

I think it is the callback uri.

Please advise what to use :

I tryed :slight_smile:

https://192.168.178.15:8123/auth/external/callback

https://my.home-assistant.io/auth/external/callback

I used Edge to configure.

Please help.

I am pretty sure, a 192.168.x.x:8123 URL is NOT https… I used nginx manager and duckdns to get TLS connection. and then https://myexternalurl.duckdns.org/auth/external/callback worked for me… Hope that helps

Different browsers did not work, my mobile did not work.
Going to bed and trying again in the morning worked. Did not change anything and used the recommended settings and urls as described here Home Assistant

so only worked for me when i signed in the One Digital Identity for Many Brands - SingleKey ID
and copied the client id from the Account | Home Connect Developer Program and added it to the link that HA creates when i click open website, i donno if it was a mix of the cache info and/or the call back
but i didn’t need to logout of the developer account while i was signed in with signlekey-id.com, when i changed the link this time i was asked for my login email by home connect and after loging it showed up on HA

i think the important part is the singlekey-id.com login because it removes the cached login for the developer account


3 Likes

Posting as I got this working after hours of trying. The information in the documentation and this thread is correct, but I’d like to add some clarifying notes that worked for me.

If you’re not using Home Assistant cloud then you need to remove default_config: from configuration.yaml to disable the “My Home Assistant” integration. You need to do this in order for your internal/external URL settings under System > Network are used when HA constructs the callback URL for Home Connect. As per the documentation, make sure the callback url matches one or both of these. The base URL you are browing from when you set up the integration will be used to construct the callback URL, so make sure that matches one that you have configured in the Home Connect OAuth application.

I suspect the main problem with the auth flow that results in the request rejected by client authorization authority (developer portal) error is down to use of third party cookies, so you need to disable all adblocking (browser plugins, pihole, adguard etc) and you must use Google Chrome, preferrably in a fresh/private browsing session to ensure there is no cache/cookies from either singlekey-id or Home Connect developer portal. Chrome is the only browser that still doesn’t block third party cookies and the only browser that worked for me. I also tethered to my phone to ensure that pihole would definitely not block any requests.

So to summarise:

  • Follow the docs, the configuration guide is correct
  • Disable all ad/cookie blocking extensions or services you have. If you use pihole/adguard, tether to your phone
  • Use Google Chrome with a fresh/private session to set up the integration - this only works on Chrome

Hope this helps!

5 Likes

Thanks a lot! That was the only guide that worked.

SOLVED.

KEY POINT. After configuration some time is needed before you will connect successfully. It does make the whole process quite long and arduous when problem-solving (some might say with very little reward at the end for those of us like myself that I just adding a status for the dishwasher). :rofl:

***** original post

Could someone confirm that you need either a ‘home assistant cloud’ account or your instance to be accessible externally for this to work?.

I use a VPN to connect to my home assistant when I am away.

I have worked through this entire thread, trying every single option and it does not work for me.

1 Like

Hi. everything is done according to the instructions, after the transfer to the site Link to OAuth2 Authorize Callback – My Home Assistant / there is no confirmation only what is in the picture

please help. I have already tested all the options. I always get to this page above. whatever I do. can I throw screenshots of the settings here? maybe there’s a mistake somewhere? I don’t understand anymore. A bunch of integrations are configured. and it is with this that such problems arise.

there are obviously no parameters in my link, but this comes after specifying an email on the home connect website

I’ve tried everything listed here but no success. Anyone able to interpret this log ?
Logger: aiohttp.server
Source: helpers/config_entry_oauth2_flow.py:209
First occurred: April 29, 2023 at 11:58:46 AM (7 occurrences)
Last logged: 1:16:40 PM

Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py”, line 433, in _handle_request
resp = await request_handler(request)
File “/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py”, line 504, in _handle
resp = await handler(request)
File “/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py”, line 117, in impl
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/security_filter.py”, line 85, in security_filter_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/forwarded.py”, line 100, in forwarded_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/request_context.py”, line 28, in request_context_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/ban.py”, line 80, in ban_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/auth.py”, line 235, in auth_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/view.py”, line 146, in handle
result = await result
File “/usr/src/homeassistant/homeassistant/components/config/config_entries.py”, line 171, in get
return await super().get(request, flow_id)
File “/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py”, line 96, in get
result = await self._flow_mgr.async_configure(flow_id)
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 271, in async_configure
result = await self._async_handle_step(
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 367, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File “/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py”, line 315, in async_step_creation
token = await self.flow_impl.async_resolve_external_data(
File “/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py”, line 172, in async_resolve_external_data
return await self._token_request(
File “/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py”, line 209, in _token_request
resp.raise_for_status()
File “/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py”, line 1005, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message=‘Bad Request’, url=URL(‘https://api.home-connect.com/security/oauth/token’)

1 Like

Hi! I have a very special problem, getting the integration to work: I immediately get the “open website” dialogue and have no way of editing, what I have entered. Is there any way of getting rid of what I have previously entered and having a fresh go at it?
Thanks!

Is the Home Connect integration working for anyone at the moment? It’s broken both in Home Assistant and Alexa for me at the moment, which makes me think that they screwed something up on their end.

This should help: Application Credentials - Home Assistant

Same problem.
Home Assistant 2023.5.2
Supervisor 2023.04.1
Operating System 10.1