Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Not possible to add integration #263

Closed
Wiftavarf opened this issue Jun 21, 2022 · 18 comments
Closed

Not possible to add integration #263

Wiftavarf opened this issue Jun 21, 2022 · 18 comments

Comments

@Wiftavarf
Copy link

Setting API-key all 36-digit
Enter username and password.

Just gets an error stating to enter API-key, user name and password.
Just did that.

Integration won't add.

@Thomas55555
Copy link
Owner

Thomas55555 commented Jun 29, 2022

Can you please support with more information? There is an issue template you can fill out, with al the basic input.

@Wiftavarf
Copy link
Author

When I try to add integration ”Husqvarna Automover”.
I can select two ways to Log in.

Select option 1: Log in with Authorization Code
I get this error:
D1A577CD-73D6-4493-8125-0AA343E09EFB

Trying option 2: Log in with API-key I get this error:
D9BA739B-363B-43D1-A191-52C3DC4309B4

Integration not adding!
Can’t get past these errors.

All other steps are added and checked.

@Wiftavarf Wiftavarf closed this as not planned Won't fix, can't repro, duplicate, stale Jun 29, 2022
@Wiftavarf Wiftavarf reopened this Jun 29, 2022
@sarahmva
Copy link

sarahmva commented Jun 30, 2022

I am facing the same problem.
I have created the application, added the Authentication AP and the Automower Connect API, tested the app using the curl example.

I have also added the secret and the appkey to the config

if I try:
image

HA cannot validate the config: Error loading /config/configuration.yaml: Secret fc82[...]

When trying option 1 (without the "!secret"), I also get the redirect error. Does my instance need to have external access? My instance is not accessible from the internet.

When trying Option 2:
image

I enabled debug logging but there is very little information:
2022-06-30 12:17:00 DEBUG (MainThread) [aioautomower.rest] Resp.status get access token: 400
is all I could fin.

@Wiftavarf
Copy link
Author

I actually got this to work, by add via option 1.

What I did was when you return to HA wia return link, there is an error.

But by leaving that page open and retry, in an other window, the session was ”open” to complete the integration addon.

@sarahmva
Copy link

Ah, I think I know what is happening....

  1. It is important to enter https://my.home-assistant.io/redirect/oauth as redirect URL in the application on the Husqvarna website
  2. When configuring for the first time, the redirect URL is escaped, this seems to cause issues: https%3A%2F%2Fmy.home-assistant.io%2Fredirect%2Foauth. When opening via the button in teh config flow, the URL is not escaped and then it does work...

A little strange, I am glad it now worked. Thanks @Wiftavarf for the tip!

@hypyke

This comment was marked as resolved.

@xavierdemoor
Copy link

After trying several methods, I finally understand what @sarahmva said. I pressed the "Open" button instead of following the auto-opened window. BUT, now the integration just say "Error" and I can't finalize.

I tried to set myhomeassistant to local url and Nabu casa external url. Nothing works.

@trickiegt
Copy link

Got it working agian... If you get hung up because you put in invaild credentials... delete the file config.storage\application_credentials --- or edit the information inside of it

@BFipsen
Copy link

BFipsen commented Jul 13, 2022

I cant find config.storage\application_credentials, can anyone please help me how to find this?

@trickiegt
Copy link

trickiegt commented Jul 13, 2022

\config\.storage -- sorry it was missing a \ (apparently its automatically removed) --- however... depends on how you access your server, there's alot of methods... i used samba share addon and then connected via the IP address in a windows explorer window \\192.168.10.11\config\.storage

@BFipsen
Copy link

BFipsen commented Jul 13, 2022

thankyou, i forgot to show hidden files in windows.

I deleted the file and got the posibility to insert the credentials again, but i still get this: Invalid client: redirect_uri does not match client value

any idea why?

@trickiegt
Copy link

trickiegt commented Jul 13, 2022

I made the mistake of changing https://my.home-assistant.io/redirect/oauth to my personal instance... https://myhomeassist.duckdns.org/redirect/oauth -- if you did that, I would recommend changing it to what was intended -- https://my.home-assistant.io/redirect/oauth

As an extra step, you might want to goto https://my.home-assistant.io/ first and make sure it is pointing to your home assistant site

@Thomas55555 Thomas55555 pinned this issue Jul 13, 2022
@anatolyk82
Copy link

I have the same problem, got always Invalid client: redirect_uri does not match client value

@mulcmu
Copy link
Contributor

mulcmu commented Jul 13, 2022

I encountered that error when had an extra space at the end to the url. Extra space was selected during the cut and paste. Everything looked correct but that was enough to fail the authorization process.

@BFipsen
Copy link

BFipsen commented Jul 14, 2022

I can't se why, but as trickiegt says, try to set: https://my.home-assistant.io/redirect/oauth
It worked for me.

@anatolyk82
Copy link

anatolyk82 commented Jul 14, 2022

It's working now. I missed "My Home Assistant" integration actually. It would be great to mention it in the documentation here to avoid such misunderstandings in future. Thank you!

https://www.home-assistant.io/integrations/my/

@mulcmu
Copy link
Contributor

mulcmu commented Jul 14, 2022

PR #304 adds this:

The My Home Assistant redirect feature needs to be setup to redirect to your home assistant installation. See https://my.home-assistant.io/faq/ for additional information.

Preview here:
https://github.com/mulcmu/husqvarna_automower/tree/readme-overhaul

@notacoderjustauser
Copy link

\config\.storage -- sorry it was missing a \ (apparently its automatically removed) --- however... depends on how you access your server, there's alot of methods... i used samba share addon and then connected via the IP address in a windows explorer window \\192.168.10.11\config\.storage

Thsi was the solution for my issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants