Stuck for days on Siemens Home Connect Integration - Help needed

I am stuck and unable to integrate Home Connect in Home Assistant.

What am I doing wrong based on the info below?

image

image

Redirect Ui: https://xxx.duckdns.org/auth/external/callback

home_connect:
  client_id: '23...98'
  client_secret: '30...EA'
  
homeassistant:
   external_url: 'https://xxx.duckdns.org/'
   internal_url: 'https://xxx.duckdns.org/'

Thanks in advance.

I remember it as being a pain.
The only thing I see I have different is this the local IP is my first redirect URI and my nabu casa as the secon.

In configuration.yaml, do you have " " in the client id, secret and external & internal url?

Do you need to ask a publication request?

Yes.

Don’t have that in my configuration. It’s probably configured in the configuration menu.

Can’t remember what that is or if I have done it.

Finally worked after adding the local URL and deleted the homeassistant section of configuration.yaml.

Thanks

I followed the documentation set the config.yaml correct added the local address and nabucasa address. But when adding the integration it keeps giving this error:
“error”: “unauthorized_client”,
“error_description”: “client or redirection URI not authorized”

I did recreate an App on the home connect portal and copy and pasted the Client and secret keys to config.yaml. Reloaded the config, rebooted the HA device.

Nothing seems to fix it what am i missing it should be straight forward but apparently not

1 Like

Try and create a new app in home connect.
It might need a fresh start.

Already done, it took a while to “sync” on the Home connect side of things (they do warn it can take some time). I now get the login screen on the Home connect page after trying to add the integration. After filling in the credentials i get a new error:

File “/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py”, line 1004, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message=‘Bad Request’, url=URL(‘https://api.home-connect.com/security/oauth/token’)

I have seen that error also.
I don’t remember what the issue is or how it was solved but you can read about the errors here:
Home Connect API Documentation (home-connect.com)

I know I also spent a lot of time to get the integration running. And I spent even more time trying to get another instance of the API running in HA or Node red.
And that message about token, I have seen it way to many times.

EDIT:
I just remembered something. The access token is saved in the hidden folder of Home Assistant and is used as bearer to access the API.
Most likely the error is because the auth process has not worked as it should.
So try and remove the integration from HA and restart HA, and try and add the integration again.

Not sure it will work but that perhaps clears all the old stuff and you can start fresh in HA.

Hellis81,

Thanks for your patience and support, the Integration doesn’t end up in the integrations dashboard since it can’t finalize the setup. Is there a way to manually remove the token? Or is Home Connect somehow (half) installed on HA and is there a way to remove that manually?

Remi

The file where it’s saved is: /config/.storage/core.config_entries
And the domain should be home_connect.
You can probably just do a CTRL+F and search for it.

Just look at the file, don’t edit it and don’t save it. Right now we just need to look if it’s there

home_connect isn’t there

I looked at the error page you refer to earlier but the text:
400 Bad Request Error occurred (e.g. validation error - value is out of range)

Didn’t really help much towards finding the why :grinning:

I know… The API documentation is not very good.

All I can say is that I had similar issues, and then it just worked.

did you open any ports on the router or anything else that might not be documented?

Yes I’m sure that was not needed

Deleted due to incorrect info posted.