Have tried to add home-connect integration with Safari browser. Spent couple hours and tried several Redirect URIs.
After i found this thread - changed browser to Chrome and integration started to work fine. Only last step failed, but after i changed home-assistan.local:8123 to my url added successfully.
I think i found a solution and the root of the problem.
I think https://my.home-assistant.io/ makes a cookie on your local computer or something to make a redirect. Automatically it uses http:// for redirecting to homeassistant.local.
If you have set up duckdns in your instance, then reqular http will not work (you can probably make it to work, but if you have followed the tutorial, it will not work out of the box). All you need to do is, click my.home-assistant link, and when it says that you can create a new redirect path, replace http to https.
This is how i managed to make it work.
I got the same error message. When I switched to a a separate browser profile, it worked. This is what I think happens:
The OAuth dance must happen with your private Home Connect account. Not your Home Connect Developer account. But since you’ve just (if you followed the installation instructions) used your Developer account to create the app, the Developer account is what you are logged in with.
So if you log out of your Home Connect Developer account before performing the OAuth dance, it will probably work.
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à
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.
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)>
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
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