home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.75k stars 30k forks source link

Not able to associate Freebox Pop (V8) with Home Assistant #44166

Closed jugla closed 3 years ago

jugla commented 3 years ago

Within Home Assistant 118.5 (running on raspberry pi4 in venv), I cannot associate my freebox pop with de Freebox integration (through the UI). When it is request to associate the freebox (with the button), the HA raise an error and ask to come later. No workaround ....

Where can I find some logs to help in the issue ?

Thanks in advance

frenck commented 3 years ago

Hi there,

Thanks for opening up an issue. When creating an issue, an issue template is presented. It looks like you've (partly) removed it. This causes your issue report to be incomplete.

Please edit your issue to have the full issue template back again and provide as much of the requested data as possible. Without it, we won't be able to help you.

Thanks already! 👍

jugla commented 3 years ago

The problem

Within Home Assistant 118.5 (running on raspberry pi4 in venv), I cannot associate my freebox pop with the Freebox integration (through the UI). When it is request to associate the freebox (with the button), the HA raise an error and ask to come later. No workaround ....

Environment

Here after the info given by the application:

Version 0.118.5
Installation Type Home Assistant Core
Development false
Supervisor false
Docker false
Virtual Environment true
Python Version 3.9.0
Operating System Family Linux
Operating System Version 5.4.79-v7l+
CPU Architecture armv7l
Timezone Europe/Paris

Problem-relevant configuration.yaml

Nothing as the problem comes from at the very starting point of UI

Traceback/Error logs

Tell me where I can find somethings

Additional information

jugla commented 3 years ago

I got the following error with my freebox on HTTP port ` 2020-12-15 21:38:37 ERROR (MainThread) [homeassistant.components.freebox.config_flow] Unknown error connecting with Freebox router at quark.fl abelline.space Traceback (most recent call last): File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/connector.py", line 975, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1081, in create_connection transport, protocol = await self._create_connection_transport( File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1111, in _create_connection_transport await waiter File "/usr/local/lib/python3.9/asyncio/sslproto.py", line 528, in data_received ssldata, appdata = self._sslpipe.feed_ssldata(data) File "/usr/local/lib/python3.9/asyncio/sslproto.py", line 188, in feed_ssldata self._sslobj.do_handshake() File "/usr/local/lib/python3.9/ssl.py", line 944, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1122)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/freebox/config_flow.py", line 74, in async_step_link await fbx.open(self._host, self._port) File "/srv/homeassistant/lib/python3.9/site-packages/aiofreepybox/aiofreepybox.py", line 66, in open self._access = await self._get_freebox_access(host, port, self.api_version, self.token_file, self.app_desc, self.timeout) File "/srv/homeassistant/lib/python3.9/site-packages/aiofreepybox/aiofreepybox.py", line 124, in _get_freebox_access app_token, track_id = await self._get_app_token(base_url, app_desc, timeout) File "/srv/homeassistant/lib/python3.9/site-packages/aiofreepybox/aiofreepybox.py", line 181, in _get_app_token r = await self._session.post(url, data=data, timeout=timeout) File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/client.py", line 527, in _request conn = await self._connector.connect( File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/connector.py", line 541, in connect proto = await self._create_connection(req, traces, timeout) File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/connector.py", line 898, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/connector.py", line 1057, in _create_direct_connection raise last_exc File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/connector.py", line 1026, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/connector.py", line 979, in _wrap_create_connection raise ClientConnectorSSLError(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorSSLError: Cannot connect to host XXXXX:PORT_HTTP ssl:default [[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1122)]

`

jugla commented 3 years ago

I got the following error with HTTPS port

` 2020-12-15 21:40:21 INFO (MainThread) [aiofreepybox.aiofreepybox] Read application authorization file 2020-12-15 21:40:21 INFO (MainThread) [aiofreepybox.aiofreepybox] No valid authorization file found 2020-12-15 21:40:21 ERROR (MainThread) [homeassistant.components.freebox.config_flow] Unknown error connecting with Freebox router at quark.flabelline.space Traceback (most recent call last): File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/connector.py", line 975, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1081, in create_connection transport, protocol = await self._create_connection_transport( File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1111, in _create_connection_transport await waiter File "/usr/local/lib/python3.9/asyncio/sslproto.py", line 528, in data_received ssldata, appdata = self._sslpipe.feed_ssldata(data) File "/usr/local/lib/python3.9/asyncio/sslproto.py", line 188, in feed_ssldata self._sslobj.do_handshake() File "/usr/local/lib/python3.9/ssl.py", line 944, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1122)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/freebox/config_flow.py", line 74, in async_step_link await fbx.open(self._host, self._port) File "/srv/homeassistant/lib/python3.9/site-packages/aiofreepybox/aiofreepybox.py", line 66, in open self._access = await self._get_freebox_access(host, port, self.api_version, self.token_file, self.app_desc, self.timeout) File "/srv/homeassistant/lib/python3.9/site-packages/aiofreepybox/aiofreepybox.py", line 124, in _get_freebox_access app_token, track_id = await self._get_app_token(base_url, app_desc, timeout) File "/srv/homeassistant/lib/python3.9/site-packages/aiofreepybox/aiofreepybox.py", line 181, in _get_app_token r = await self._session.post(url, data=data, timeout=timeout) File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/client.py", line 527, in _request conn = await self._connector.connect( File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/connector.py", line 541, in connect proto = await self._create_connection(req, traces, timeout) File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/connector.py", line 898, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/connector.py", line 1057, in _create_direct_connection raise last_exc File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/connector.py", line 1026, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/connector.py", line 977, in _wrap_create_connection raise ClientConnectorCertificateError(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host XXXXX:HTTPS_PORT ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1122)')]

`

jugla commented 3 years ago

Thanks to last error, I figure out that the certificate on freebox was perhaps old. I suppress and reinstall domain name on my freebox. It works !!!

Suggestion: write an error message on HA freebox integration

jugla commented 3 years ago

propose to close the issue