klattimer / LGWebOSRemote

Command line webOS remote for LGTVs
MIT License
511 stars 99 forks source link

lgtv auth not working C2 or C3 #143

Closed Aurshur closed 9 months ago

Aurshur commented 9 months ago

I've hit a wall with the below issue, scan identifies both my C2 and C3 on the network, but if I try to authenticate either of them I get the following:

(lgtv-venv) ~ % lgtv auth 192.168.178.61 MyTV ssl lgtv auth (lgtv-venv) ~ % lgtv auth 192.168.178.61 MyTV 192.168.178.61 MyTV DEBUG:getmac:Initializing 'ip4' method cache (platform: 'darwin') DEBUG:getmac:Finished initializing 'ip4' method cache DEBUG:getmac:Raw MAC found: 1234 Traceback (most recent call last): File "/Users/1/lgtv-venv/bin/lgtv", line 8, in sys.exit(main()) ^^^^^^ File "/Users/1/lgtv-venv/lib/python3.12/site-packages/LGTV/init.py", line 160, in main ws.connect() File "/Users/1/lgtv-venv/lib/python3.12/site-packages/ws4py/client/init.py", line 224, in connect bytes = self.sock.recv(128) ^^^^^^^^^^^^^^^^^^^ ConnectionResetError: [Errno 54] Connection reset by peer

klattimer commented 9 months ago

I would suggest updating to the latest code, things have changed somewhat and you might need to address the command line that you're using as it has been updated.

Aurshur commented 9 months ago

Thanks!

I've gone ahead and updated but now and I'm now getting the same error as in this issue:

https://github.com/klattimer/LGWebOSRemote/issues/140#issuecomment-1848671895

[(lgtv-venv) 1@Mac-mini ~ % lgtv --ssl auth 192.168.178.61 C3 192.168.178.61 C3 DEBUG:getmac:Initializing 'ip4' method cache (platform: 'darwin') DEBUG:getmac:Finished initializing 'ip4' method cache DEBUG:getmac:Raw MAC found: 1234 Traceback (most recent call last): File "/Users/1/lgtv-venv/bin/lgtv", line 8, in sys.exit(main()) ^^^^^^ File "/Users/1/lgtv-venv/lib/python3.12/site-packages/LGTV/init.py", line 160, in main ws.connect() File "/Users/1/lgtv-venv/lib/python3.12/site-packages/ws4py/client/init.py", line 214, in connect self.sock = ssl.wrap_socket(self.sock, **self.ssl_options) ^^^^^^^^^^^^^^^ AttributeError: module 'ssl' has no attribute 'wrap_socket'

klattimer commented 9 months ago

OK lets close this and you should track that.