core: integration: home_connect adding home connect integration fail fail
The problem
on the last phase of adding home connect integration (after account linking) i got error message on the screen
from network capture: request: GET http://xxxxxxxxxxxxxxxxx:8123/api/config/config_entries/flow/0e41e558080b4b2e919a24e76adfbc33 HTTP/1.1 Host: xxxxxxxxxxxxxxxxx:8123 Connection: keep-alive HA-Frontend-Base: http://xxxxxxxxxxxxxxxxx:8123xxxxxxxxxxxxxxxxxXVCJ9.eyJpc3MiOiJlZDczMjFjNzg4YTE0MThmYmMxM2I2ODRiZWI0MmIzMiIsImlhdCI6MTY3NTE0NTc3MiwiZXhwIjoxxxxxxxxxxxxxxxxxxxxxxuIJ2H5nbiFI2lJu7vrNuQa4ufKjig User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Content-Type: application/json;charset=UTF-8 Accept: / Referer: http://xxxxxxxxxxxxxxxxx:8123/config/integrations Accept-Encoding: gzip, deflate Accept-Language: he-IL,he;q=0.9,en-US;q=0.8,en;q=0.7
response: HTTP/1.1 500 Internal Server Error Content-Type: text/plain; charset=utf-8 Content-Length: 55 Date: Tue, 31 Jan 2023 06:22:06 GMT Server: Python/3.10 aiohttp/3.8.1 Connection: close
500 Internal Server Error
Server got itself in trouble
from UI:
What version of Home Assistant Core has the issue?
core-2023.1.7
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
home_connect
Link to integration documentation on our website
No response
Diagnostics information
installation fail so no diagnostic data
Example YAML snippet
No yaml related
Anything in the logs that might be useful for us?
No response
Additional information
from HA logs: Logger: aiohttp.server Source: helpers/config_entry_oauth2_flow.py:209 First occurred: 7:18:48 AM (4 occurrences) Last logged: 8:32:48 AM
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 100, 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 81, 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/components/config/config_entries.py”, line 171, in get return await super().get(request, flow_id) File “/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py”, line 96, in get result = await self._flow_mgr.async_configure(flow_id) File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 286, in async_configure result = await self._async_handle_step( File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 374, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File “/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py”, line 315, in async_step_creation token = await self.flow_impl.async_resolve_external_data( File “/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py”, line 172, in async_resolve_external_data return await self._token_request( File “/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py”, line 209, in _token_request resp.raise_for_status() File “/usr/local/lib/python3.10/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’)
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17
The capital letter issue was also my issue.
FYI: The Home Connect app will show your email as all lower case. To see if yours has any capitalization, you have to click the “edit your single key” link in the Home Connect app. That will redirect you to a website that will show the email as you entered it.
Its a few screens deep so I think steps will be more helpful than a single screen shot.
I have tried 6 different options in there (combination of http and https and the local ip as well as my nabucasa address with or without the 8123 port at the end). Also tried enrolling it on a windows PC, iPad in browser as well as in the app and on an iPhone on the app. Also tried other addresses as the URI address in the home connect developer account but there only one options works and allows me even to login to the account (https://my.home-assistant.io/redirect/oauth)