hass-smartthinq
hass-smartthinq copied to clipboard
example.py
Hi have this error :
root@raspberrypi:/home/pi/wideq# python3 example.py -c FR -l fr-FR Log in here: https://fr.m.lgaccount.com/login/sign_in?country=FR&language=fr-FR&svcCode=SVC202&authSvr=oauth2&client_id=LGAO221A02&division=ha&grant_type=password Then paste the URL where the browser is redirected: https://fr.m.lgaccount.com/login/iabClose?access_token=80a369ab6caee45ee412a1c755725c4921a2d4bb20034000b0cae85fa2b12b885cec83d05e81103edcfef5497b504bfe&refresh_token=24a14f95f6162447f032661ef857e5b6dc742588e7ec467ccb502eff2ab1b834a1d6a66c5f16327bacb388e59f7cea15&oauth2_backend_url=https://gb.lgeapi.com/ Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 677, in urlopen chunked=chunked, File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 381, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 976, in validate_conn conn.connect() File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 370, in connect ssl_context=context, File "/usr/local/lib/python3.7/dist-packages/urllib3/util/ssl.py", line 377, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/lib/python3.7/ssl.py", line 412, in wrap_socket session=session File "/usr/lib/python3.7/ssl.py", line 853, in _create self.do_handshake() File "/usr/lib/python3.7/ssl.py", line 1117, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1056)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 449, in send timeout=timeout File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 765, in urlopen **response_kw File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 765, in urlopen **response_kw File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 765, in urlopen **response_kw [Previous line repeated 2 more times] File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 725, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/usr/local/lib/python3.7/dist-packages/urllib3/util/retry.py", line 439, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='eic.lgthinq.com', port=46030): Max retries exceeded with url: /api/member/login (Caused by SSLError(SSLError(1, '[SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1056)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "example.py", line 271, in
@armaesiea try this solution https://stackoverflow.com/a/61198852
change line in /etc/ssl/openssl.cnf
from
CipherString = DEFAULT@SECLEVEL=2
to
#CipherString = DEFAULT@SECLEVEL=2