ekutner / home-connect-hass

Alternative (and improved) Home Connect integration for Home Assistant
MIT License
639 stars 62 forks source link

After removing my credentials from the configuration.yaml and reinstalling I cant authorised anymore #341

Closed diedvdyk closed 9 months ago

diedvdyk commented 9 months ago

After removing my credentials from the configuration.yaml and reinstalling I cant authorised anymore

I get this

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

So I checked on the developer website of Home Connect and saw that my redirecting url was wrong and corrected it.

But now everytime I try to add the integration again I directly get the unauthorized_client message. I dont get the dialog , that I got the first time, to enter my credentials . I tried removing the integration, then restarting HA, the installing the integration again but the error stays and I dont get the dialog for my credentials.

In the url that is called

https://api.home-connect.com/security/oauth/authorize?response_type=code&client_id=&redirect_uri=https://my.home-assistant.io/redirect/oauth&state=&scope=IdentifyAppliance+Monitor+Control+Settings

there is redirect_uri=https://my.home-assistant.io/redirect/oauth

this isnt my HA uri and not the uri I authorised on the developer Home Connect website

idominiki commented 9 months ago

For me it helps to remove yaml config and restart HA

I only got internal server error while I want to configure the integration as mentioned in #340

diedvdyk commented 9 months ago

For me it helps to remove yaml config and restart HA

I only got internal server error while I want to configure the integration as mentioned in #340

I saw this and thought I had to re-auth again and decided to reinstall the integration. And now have this other error that I cant make disappear.

diedvdyk commented 9 months ago

But now everytime I try to add the integration again I directly get the unauthorized_client message. I dont get the dialog , that I got the first time, to enter my credentials . I tried removing the integration, then restarting HA, the installing the integration again but the error stays and I dont get the dialog for my credentials.

I managed to solve this. In the integration menu there is a "hamburger" choice for application credentials. There you can delete the account details for Home Connect ALT After deleting and readded the integration I get the credentials dialog again.

Unfortunately I still get the same "unauthorized_client" error.

diedvdyk commented 9 months ago

I have solved my problem. The redirect url has to be https://my.home-assistant.io/redirect/oauth in the api configuration of the developer Home Connect website. Then the authentication process works, but it's complex ... You have the login in at the Home Connect website first , then grant access, then https://my.home-assistant.io , type your real internal HA uri press save ....