Home Connect integration - not working any more?

Hi all,

I’ve been using the Home Connect integration to monitor my Bosch washing machine for a year or so now and it’s never missed a beat, but a few weeks ago it died and my notifications stopped working. Since then, I’ve failed to get it going again.

I’ve followed the instructions in the documentation but to no avail. I’ve wiped my API integration on the dev portal and recreated it, but I’m still getting the following when trying to add the integration back into HA:

{
  "error": "unauthorized_client",
  "error_description": "request rejected by client authorization authority (developer portal)",
  "state": "xxx"
}

…which, a short time (5 mins) after creating the new application, changes to…

{
  "error": "unauthorized_client",
  "error_description": "client or redirection URI not authorized",
  "state": "xxx"
}

…presumably as the newly-created settings propagate on the HC dev portal.

As this integration looks to have moved the UI, I’ve removed all of the config from configuration.yaml, purged the local credentials and recreated using the UI. I’m using what I believe are the correct settings, including a redirect URI as follows:

https://external.hostname.com:8123/auth/external/callback

(tested and confirmed working outside of my network)

Any suggestions as to what to try now or is anyone else seeing similar issues?

Hi, see the integration instructions Home Connect - Home Assistant which uses a new updated callback url and 2022.6: Gaining new insights! - Home Assistant for context.

1 Like

Thanks! This was indeed it and switching the callback URL from my previous one to https://my.home-assistant.io/redirect/oauth resolved my issue.

Might be worth updating the 2022.6 changelog (specifically the HC breaking changes) to call out that the redirect URL in the Home Connect developer application configuration may need to be manually changed to avoid losing the integration.

All good now and thanks for the reply :+1:

I didn’t work on that part, but my impression is the big oauth section plus We have updated the documentation of all integrations using OAuth2 to reflect all these changes. was meant to cover this.

When in doubt, the integration instructions should always be current.

Damn, looks like I was too quick off the mark. The integration appears to be working, and the various sensors are reporting online but they are not updating as they should be. E.g.

image

Unlike before where the sensor was simply unavailable, now it’s just reporting no activity despite (with kids it goes without saying!) the washing machine being used many times over those 4 days.

The only two entries in the log for home connect are as follows:

Exception while reading event:
24 June 2022, 00:51:46 – (WARNING) /usr/local/lib/python3.9/site-packages/homeconnect/sseclient.py

Token expired.
23 June 2022, 22:01:58 – (WARNING) /usr/local/lib/python3.9/site-packages/homeconnect/api.py

It definitely was working when I originally fixed it last week (I used the door open/close as a convenient way to see that notifications were coming through to HA), but it does seem to have died since then. I could just delete and re-add the integration, but I thought I would hold out for now in case there is any other diagnostics that I can do to find out why this has happened.

(Note: prior to the recent auth change, this integration was, as far as I could tell, more or less 100% stable. I’m running HA Core 2022.6.7.)

Same thing saved me as well. I moved to my.home-assistant… in Home Connect !
Also i had to add line my: into /config/configuration.yaml because it returned 404 error if not, with these two corrections i got all my 6 Siemens appliances visible.
Bottom line: even when i put 192.168… address in redirect URI HA subbmited always my.home.assist…


and reply was not correctly handled on HA side - this was proved when i manually change request to 192.168… address. So , something should be fixed by HA team for OAuth request handling to Home connect.

I couldn’t get rid of the “client or redirection URI not authorized” error, so I decided to start over.

I removed the integration from Home Assistant, and then went to the Home Connect Developer site and deleted the current application for Home Assistant registered in there as well.

After adding a new application in Home Connect, closely following the instructions (new redirect url), I tried to add the Home Connect integration again, but it kept failing.

It took me a few minutes to realize I also needed to wipe the old Application Credentials for Home Connect in Home Assistant https://www.home-assistant.io/integrations/application_credentials.

After removing the old credentials, the integration was added smoothly.

So this is just a small hint to someone else ending up in the same situation :wink:

4 Likes

I am trying to get this integration working as well, but I’m still getting

  "error": "unauthorized_client",
  "error_description": "request rejected by client authorization authority (developer portal)"

despite numerous attempts and complete resets.

I have an app in developer.home-connect that has:

Application ID: HA
OAuth flow: Authorization Code Grant Flow
Redirect URI: Link to OAuth2 Authorize Callback – My Home Assistant (which I have set correctly, both using my external URL and using my internal URL)

Which gives me a client ID and client secret.

I then go to HA (where I have removed any old integration credentials) and add a New integration > Home Connect:

Name: HA
Client ID: the client ID
Oauth secret: the client secret

And again, I get the same error. Restarted HA several times in between resets, nothing helped.
Someone mentioned deleting something in the YML files but I can’t find anything related to home-connect in any of my YML files…

Also tried to “old” redirect URL that I found in another topic, despite the fact that the docs clearly state that tne new url (redirect/oauth) is the right one, but that also doesn’t work (yet this person says it does work with that “old” URL, posted 25 days ago).

Does anyone have a solution?

I think this is the solution for you. It was for my and I had a similar problem.

I had the same problem. What worked for me was to not try to add the integration automatically. As described before, I deleted the automatically created application credentials first. Then, I added the application credentials for Home Connect manually (in Home Assistant under Settings > Devices & Services; also see Application Credentials - Home Assistant). Then, I added the integration for Home Connect manually (via Settings > Add Integration). After filling in all the details on this Home Connect website, the integration in Home Assistant was successful!

Tried it the same way. Even created a new app and waited half an hour.
But still it uses the wrong redirect URI.

Hi, just dropped by to find a solution, as I was experiences exactly the same with wrong urls, trying to modifying them on the way back, both with/without https and external/oauth etc.

It turned out, I got it all fixed just by following the setup of the https://my.home-assistant.io/, where I typed in my local ip for HA. Then everthing just worked afterwards, straight out of ‘Add integration’ → Home Connect.

Hope it helps someone to save an hour or two :slight_smile:

After struggling to get Chrome 114 to work with the auth flow I gave up and used Safari (on iPad) instead. Boom - worked directly.

Guys, just use your iPhone like @msa said.
I struggled for hours with Chrome, then stumbled across this thread.

As multiple people said before, you shall not be logged in to the Home Connect dev account in the Browser wehere you try to setup the Oauth connection.
You can basically prepare everything on your PC, including adding the creds to HA (just add them with the error after clicking add and leave it, take your Iphone)

On Safari (Iphone IOS 16.6 tested), go to https://my.home-assistant.io and set the local IP of the Box, for example http:10.10.50.69:8123
Then Navigate to Home assistant (either through public Adress or Local, workes both)
Add HomeConnect

Page Loads, you authorize with the SingleIDKey and boom - Dishwasher added

2 Likes

I had tried everything but the tip with Safari (I used a Macbook) was the solution - works perfectly

hey guys,
worked for me as well, but that’s not the end of the journey, apparently. The dishwasher has been added correctly, creating a bunch of entities, but the device itself and all of the entities have been unavailable ever since (it used to work a year ago just fine).
I have the same with Google Home app where I can add the dishwasher directly and it shows the device is offline, while in the Home Connect app everything works great.

Anyone with similar expirience?

Ive removed the integration and added again and now it works