Closed javier6d2 closed 4 years ago
Hi,
I have the same issue :
root@raspberrypi:/home/pi/LGAC_SmartT# python3 example.py Log in here: https://fr.m.lgaccount.com/login/sign_in?country=FR&language=en-EN&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=8eaa260581d9c1eeeaeada298574de00efacd26b02d085a432cbc9c144a8a689f3dd61c82b8ccda8e01084458fc25dd5&refresh_token=154c747b6626d9906040bdeb7786bd0ef62112ff70365cbcfa72d4dc081da8ebe07b0bf153a060633fce2a816ae8ee5b&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 sslcontext=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 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 214, in
Solution:
sudo sed -i "s|TLSv1.2|TLSv1.0|g" /etc/ssl/openssl.cnf
Thank you Roman, with your advice I can now complete the plugin installation but I have an issue in Domoticz Log and the AC don´t start from Domoticz Devices:
2020-06-23 22:46:06.271 Status: Incoming connection from: 192.168.130.50 2020-06-23 22:46:13.458 (Ar Condicionado prueba) Pushing 'onHeartbeatCallback' on to queue 2020-06-23 22:46:13.470 (Ar Condicionado prueba) Processing 'onHeartbeatCallback' message 2020-06-23 22:46:13.470 (Ar Condicionado prueba) Calling message handler 'onHeartbeat'. 2020-06-23 22:46:13.473 (Ar Condicionado prueba) Pushing 'WriteDirective' on to queue 2020-06-23 22:46:13.473 (Ar Condicionado prueba) Processing 'WriteDirective' message 2020-06-23 22:46:13.473 (Ar Condicionado prueba) Sending 8 bytes of data 2020-06-23 22:46:13.473 (Ar Condicionado prueba) 91 a6 73 74 61 74 75 73 .. .. .. .. .. .. .. .. .. .. .. .. Ѧstatus 2020-06-23 22:46:13.915 (Ar Condicionado prueba) Pushing 'ReadEvent' on to queue 2020-06-23 22:46:13.925 (Ar Condicionado prueba) Processing 'ReadEvent' message 2020-06-23 22:46:13.925 (Ar Condicionado prueba) Received 65 bytes of data 2020-06-23 22:46:13.925 (Ar Condicionado prueba) 82 a9 65 78 63 65 70 74 69 6f 6e d9 29 70 79 74 68 6f 6e 2d ©exception٩python- 2020-06-23 22:46:13.925 (Ar Condicionado prueba) 4c 47 41 43 3a 20 5b 45 72 72 6e 6f 20 35 5d 20 49 6e 70 75 LGAC:.[Errno.5].Inpu 2020-06-23 22:46:13.925 (Ar Condicionado prueba) 74 2f 6f 75 74 70 75 74 20 65 72 72 6f 72 a3 63 6d 64 a6 73 t/output.errorãmdƳ 2020-06-23 22:46:13.925 (Ar Condicionado prueba) 74 61 74 75 73 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. tatus 2020-06-23 22:46:13.925 (Ar Condicionado prueba) Pushing 'onMessageCallback' on to queue 2020-06-23 22:46:13.925 (Ar Condicionado prueba) Processing 'onMessageCallback' message 2020-06-23 22:46:13.925 (Ar Condicionado prueba) Calling message handler 'onMessage'. 2020-06-23 22:46:13.925 (Ar Condicionado prueba) onMessage called 2020-06-23 22:46:13.925 (Ar Condicionado prueba) Got: {'exception': 'python-LGAC: [Errno 5] Input/output error', 'cmd': 'status'} 2020-06-23 22:46:16.793 (rflink) Temp + Humidity (Quarto dormir) 2020-06-23 22:46:19.486 (Ar Condicionado prueba) Pushing 'onCommandCallback' on to queue 2020-06-23 22:46:19.537 (Ar Condicionado prueba) Processing 'onCommandCallback' message 2020-06-23 22:46:19.537 (Ar Condicionado prueba) Calling message handler 'onCommand'. 2020-06-23 22:46:19.537 (Ar Condicionado prueba) onCommand called for Unit 6: Parameter 'Set Level', Level: 23.0 2020-06-23 22:46:19.537 Error: (Ar Condicionado prueba) 'onCommand' failed 'AttributeError':''BasePlugin' object has no attribute 'powerOn''. 2020-06-23 22:46:19.537 Error: (Ar Condicionado prueba) ----> Line 332 in '/home/pi/domoticz/plugins/LG-SThinq-AC/plugin.py', function onCommand 2020-06-23 22:46:19.537 Error: (Ar Condicionado prueba) ----> Line 266 in '/home/pi/domoticz/plugins/LG-SThinq-AC/plugin.py', function onCommand
It´s looks like I get connection with the server but I have a python exception.
I got the plugin working with Raspbian Buster, just use solution @RomanSladecek to install the plugin and don´t forget to run server automatically (my issue):
Make_ service file in systemd: sudo nano /lib/systemd/system/lgac_server.service. Paste this text with path modification:
[Unit] Description=LG AC Device Server After=multi-user.target
[Service] Type=simple ExecStart=/usr/bin/python3 /home/pi/LGAC_SmartT/LGACServerNew.py Restart=on-abort
[Install] WantedBy=multi-user.target
Press Ctrl+X, hit Y to save and enter.Then set privilidges: sudo chmod 644 /lib/systemd/system/lgac_server.service.
Kind regards
I had Raspbian Stretch with your plugin and everything works very well, now I have installed Buster to upgrade new Domoticz version and can´t run the plugin. I get problem with the handshake, but I can back to Stretch and works fine, may you upgrade?