Closed FerGitH closed 1 year ago
Hey there @davidmstraub, mind taking a look at this issue as it has been labeled with an integration (home_connect
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
home_connect documentation home_connect source (message by IssueLinks)
I'm also unable to authorize. For me I don't get an error log, but after being redirected to the home-connect login page it sends a failed response back to home assistant.
I also can't get this to work, have tried multiple configurations and redirect urls.
+1
I have the same issue
I also receive the error request rejected by client authorization authority (developer portal)"
As @AtomToast and @danielschmitz87 i receive all sort of errors from Home Connect API and finaly got this
Also in the callback url i see the parameter named error_description
with value Mandatory+parameter+missing+in+login+request
I have the same issue as described. It looked like a token expired at first, but after reinstalling the integration I couldn't get it back. Is this perhaps related to the new singlekey authentication for home connect? I set that up using the home connect app and when I now have to login after adding the integration in HA I do get a singlekey login screen in between, but it still results in an error.
I installed (Home Connect Alt)[https://github.com/ekutner/home-connect-hass] from HACS now and it just worked. I don't know if this official integration is abandoned or what, but I won't bother with it for now anyway!
I've been pulling my hair for the past few hours - good things I'm bold already π - trying to figure out why OAuth2 is failing. First, I had to find out you can only really use your public address while authenticating (like https://xxx.duckdns.org). After that I got stuck on the OAuth2 callback URL after accepting all @ home-connect with a 500 error:
500 Internal Server Error - Server got itself in trouble
( on http://xxx.duckdns.org/auth/external/callback?code=...&state=...&grant_type=authorization_code
)
Trace
2022-11-27 12:26:45.717 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 222, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 433, in get
await hass.config_entries.flow.async_configure(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 266, in async_configure
raise UnknownFlow
homeassistant.data_entry_flow.UnknownFlow
Thanks @jswetzen - I'll try that instead.
If anyone want to official integration work "properly" - you just need to add hidden input elements to login form:
<input type="hidden" name="response_type" value="code" />
<input type="hidden" name="scope" value="IdentifyAppliance" />
<input type="hidden" name="redirect_uri" value="YourURI" />
<input type="hidden" name="password" value="YourPassword" />
It seem`s to me that the login form is broken somehow With this weird solution i successfully make API works
With this weird solution i successfully make API works
I can confirm this works. In password I put my app's "secret" - not sure if it is actually used. I did it by editing html of add integration dialog in my home assistant, added https://my.home-assistant.io/redirect/oauth as redirect_uri and my app's secret as password, other 2 copied as they are.
I am trying what you guys suggested, changing the login form. It does seem to change something, I get a page with the old login of home connect. Unfortunately, as I have already enabled singlekey authentication, it redirects me to the singlekey login page as my original home connect login does not work anymore. Adding the suggested elements at the initial login form or at a later stage does not seem to have any effect. Are you not using singlekey yet or am I doing something wrong?
By my mind it work only you use old login form and you does not enabled singlekey authentication
By my mind it work only you use old login form and you does not enabled singlekey authentication
I have singlekey enabled, and I was redirected there, signed in and then sent back to app...
Have you signed into singlekey with same account that you used to register as developer? If not then you probably need to set the one you are signing in (on installation of integration) into Home Connect User Account for Testing of your app in developer portal.
I found the issue now and managed to get it working. My email address for singlekey started with a capital letter, I read somewhere else that that can cause issues. I changed it and after that everything worked like a charm. Thanks for the help!
If anyone want to official integration work "properly" - you just need to add hidden input elements to login form:
<input type="hidden" name="response_type" value="code" /> <input type="hidden" name="scope" value="IdentifyAppliance" /> <input type="hidden" name="redirect_uri" value="YourURI" /> <input type="hidden" name="password" value="YourPassword" />
It seem`s to me that the login form is broken somehow With this weird solution i successfully make API works
I can confirm this works.....though ended up going with Home Connect Alt from HACS. I didn't even attempt to modify the login form...just adjusted the URL on the tab that the integration opened as was able to get through the settings linking to my SingleKey-ID account. It did not actually complete when I went back to HA, but I'm assuming that's because I had tried multiple times before getting the URL right. Hope this helps someone!
Hi,
Another guy pulling his hair out. Register external URL http://
Would somebody be able to provide step by step guide how to get it fixed?
YES! finally got it working. No code/html modification were required, both home connect (alt) integrations work. Key is that the redirect url is specified as it appears the HC cloud service performs AUTHORISATION (check) on this URL if it is allowed and registered under the application you created. Here the solution:
1) at the screen with with "error": "unauthorized_client", examen the URL and look for the &redirect_url=
Hope this help others having problems with this.
If anyone want to official integration work "properly" - you just need to add hidden input elements to login form:
<input type="hidden" name="response_type" value="code" /> <input type="hidden" name="scope" value="IdentifyAppliance" /> <input type="hidden" name="redirect_uri" value="YourURI" /> <input type="hidden" name="password" value="YourPassword" />
It seem`s to me that the login form is broken somehow With this weird solution i successfully make API works
Where can I find the source code on Home assisted OS instance (original integration, not HACS)?
I am not up to date on recent changes to this integration, so I might not be able to help solve these issues, but I am puzzled by some of the posts here - @rmjjanssen1 isn't the procedure you described exactly what is documented here? Including the Redirect URI? So why would anyone need hidden inputs?
@FerGitH Solution that worked for as described in https://github.com/home-assistant/core/issues/86999
you have to make sure that u dont have any upper case Characters in your single-key e-mail adress. Go to: https://singlekey-id.com/de/home/ and edit your email there, but u have to change it to a second e-mail as you cant just use the same email in lower-case.
Hope this helps :)
If anyone want to official integration work "properly" - you just need to add hidden input elements to login form:
<input type="hidden" name="response_type" value="code" /> <input type="hidden" name="scope" value="IdentifyAppliance" /> <input type="hidden" name="redirect_uri" value="YourURI" /> <input type="hidden" name="password" value="YourPassword" />
It seem`s to me that the login form is broken somehow With this weird solution i successfully make API works
I can confirm! Successfully added my appliance through Home Connect Alt from HACS.
In the Home Connect login form, you need to open Chrome Dev Tools(F12 key). Find <body>
- Right Click - Edit as HTML. Find <input type="hidden"
and add code below. Click on anywere in Dev tools to close HTML edit form. After that, type your email in Login form.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment π This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
When I try to install Homeconnect I get an error message after inputting my credentials on the homeconnect site (https://api.home-connect.com/)
I have created a homeconnect account and added the client id and client secret in the configuration yalm
What version of Home Assistant Core has the issue?
2022.10.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Homeconnect
Link to integration documentation on our website
https://www.home-assistant.io/integrations/home_connect
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response