Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probleme login with the integration #288

Open
Powdo opened this issue Feb 7, 2025 · 16 comments
Open

Probleme login with the integration #288

Powdo opened this issue Feb 7, 2025 · 16 comments
Assignees
Labels
bug Something isn't working

Comments

@Powdo
Copy link

Powdo commented Feb 7, 2025

After installing the integration and reboot my HA (full reboot) I can't connect with my credentials.

The problem sems to make by an SSL sertificat error :

Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1116, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs, sock=sock)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1149, in create_connection
transport, protocol = await self._create_connection_transport(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1182, in _create_connection_transport
await waiter
File "/usr/local/lib/python3.12/asyncio/sslproto.py", line 578, in _on_handshake_complete
raise handshake_exc
File "/usr/local/lib/python3.12/asyncio/sslproto.py", line 560, in _do_handshake
self._sslobj.do_handshake()
File "/usr/local/lib/python3.12/ssl.py", line 917, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

Image

I'm the only user aving this problem ? I haven't any proxy or network problème with SLL at all on my installation...

@Powdo Powdo added the bug Something isn't working label Feb 7, 2025
@driagi
Copy link

driagi commented Feb 7, 2025

Me too

2025-02-07 09:58:22.639 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry [email protected] for hon
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1122, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs, sock=sock)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1188, in create_connection
transport, protocol = await self._create_connection_transport(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
ssl_shutdown_timeout=ssl_shutdown_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1221, in _create_connection_transport
await waiter
File "/usr/local/lib/python3.13/asyncio/sslproto.py", line 581, in _on_handshake_complete
raise handshake_exc
File "/usr/local/lib/python3.13/asyncio/sslproto.py", line 563, in _do_handshake
self._sslobj.do_handshake()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/ssl.py", line 951, in do_handshake
self._sslobj.do_handshake()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1018)

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

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/hon/init.py", line 73, in async_setup_entry
await hon.async_authorize()
File "/config/custom_components/hon/hon.py", line 141, in async_authorize
if await self.async_get_frontdoor_url(0) == 1:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/hon/hon.py", line 107, in async_get_frontdoor_url
async with self._session.post(
~~~~~~~~~~~~~~~~~~^
f"{AUTH_API}/s/sfsites/aura?r=3&other.LightningLoginCustom.login=1",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
headers={"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"},
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
data=data,
^^^^^^^^^^
) as resp:
^
File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 1425, in aenter
self._resp: _RetType = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 703, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
req, traces=traces, timeout=real_timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 548, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1056, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1400, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1369, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<7 lines>...
)
^
File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1124, in _wrap_create_connection
raise ClientConnectorCertificateError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host account2.hon-smarthome.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1018)')]

@Zwerver91
Copy link

Zwerver91 commented Feb 7, 2025

Solution: #285 (comment)

@Powdo
Copy link
Author

Powdo commented Feb 7, 2025

Une piste les gars ...
Je n'arrive pas pour l'instant...

#285 (comment)

@Guidomo1954
Copy link

It hasn't been working for me since yesterday either. After installing home assistant core 2025.2.0, but even after restoring to a previous version the add-on does not work

@driagi
Copy link

driagi commented Feb 7, 2025

It hasn't been working for me since yesterday either. After installing home assistant core 2025.2.0, but even after restoring to a previous version the add-on does not work

I haven't updated and it doesn't work (2025.1.4)

@Powdo
Copy link
Author

Powdo commented Feb 7, 2025

Have you try to install certificate3 with hass-additional-ca ??

@driagi
Copy link

driagi commented Feb 7, 2025

Have you try to install certificate3 with hass-additional-ca ??

Yes. Now work.
I download the certificate with Chrome Browser directly in the crt extension.
Pay attention to the file name in the additional_ca folder and in configuration.yaml. They must obviously be the same.

@Guidomo1954
Copy link

My home assistant runs in "HAOS - Home Assistant Operating System", i installed hass-additional-ca but nothing changed

Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1122, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs, sock=sock)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1188, in create_connection
transport, protocol = await self._create_connection_transport(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
ssl_shutdown_timeout=ssl_shutdown_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1221, in _create_connection_transport
await waiter
File "/usr/local/lib/python3.13/asyncio/sslproto.py", line 581, in _on_handshake_complete
raise handshake_exc
File "/usr/local/lib/python3.13/asyncio/sslproto.py", line 563, in _do_handshake
self._sslobj.do_handshake()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/ssl.py", line 951, in do_handshake
self._sslobj.do_handshake()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1018)

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

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 637, in __async_setup_with_context

@Powdo
Copy link
Author

Powdo commented Feb 7, 2025

Have you try to install certificate3 with hass-additional-ca ??

Yes. Now work. I download the certificate with Chrome Browser directly in the crt extension. Pay attention to the file name in the additional_ca folder and in configuration.yaml. They must obviously be the same.

Can you help me, it didn't work for me !

Image

@Powdo
Copy link
Author

Powdo commented Feb 7, 2025

OK pour moi c'est celui-ci qui doit être téléchargé !!!
Merci a tous ! Et bon courage...

Image

@driagi
Copy link

driagi commented Feb 7, 2025

With Chrome Browser ( directly in crt extension)

Image

Image

Image

Image

Image

Image

@sortegal17
Copy link

sortegal17 commented Feb 7, 2025

With Chrome Browser ( directly in crt extension)

Image

Image

Image

Image

Image

Image

After doing this workaround, I had to log in to https://account2.hon-smarthome.com/ and change my password. It seemed to be expired

@kubasaw
Copy link

kubasaw commented Feb 9, 2025

I've fixed the issue with Haier's incorrect SSL certificate configuration in my fork: https://github.com/IoTLabs-pl/hOn. The solution is based on the approach used in hass-additional-ca.

If the RapidSSL certificates are missing, they are now automatically added and will be available for communication after an HA restart.

I’d really appreciate it if you could test it out, and even more if you have some time to help maintain and improve it! 🚀

@Powdo
Copy link
Author

Powdo commented Feb 9, 2025

Hello thx for the fork. I try but it doesn't work for me after i add the fork with new repo of HACS.

Image

Image

@MirkoHomeassistant
Copy link

Hello,
how to update the certificate running home assistant core? Seems Additional CA not run on it...

@framirezl
Copy link

Hello, how to update the certificate running home assistant core? Seems Additional CA not run on it...

Remember to set REQUESTS_CA_BUNDLE environment variable in your docker configuration:
https://github.com/Athozs/hass-additional-ca?tab=readme-ov-file#6-set-requests_ca_bundle-environment-variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants