Can't auth with TV
Closed this issue · 4 comments
DEBUG:getmac:Initializing 'ip4' method cache (platform: 'darwin')
DEBUG:getmac:Finished initializing 'ip4' method cache
DEBUG:getmac:Raw MAC found: b4:b2:91:c4:b3:4b
Traceback (most recent call last):
File "/opt/lgtv-venv/bin/lgtv", line 8, in
sys.exit(main())
^^^^^^
File "/opt/lgtv-venv/lib/python3.12/site-packages/LGTV/init.py", line 150, in main
ws.connect()
File "/opt/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'
Can someone help us with the same issue ?
❯lgtv auth 194.107.100.42 mytv ssl
DEBUG:getmac:Initializing 'ip4' method cache (platform: 'darwin')
DEBUG:getmac:Finished initializing 'ip4' method cache
DEBUG:getmac:Raw MAC found: 80:5b:65:a5:f8:4
DEBUG:getmac:Length of MAC 80:5b:65:a5:f8:4 is 16, padding single-character octets with zeros
Traceback (most recent call last):
File "/Users/asebert/.local/bin/lgtv", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/asebert/.local/pipx/venvs/lgtv/lib/python3.12/site-packages/LGTV/__init__.py", line 150, in main
ws.connect()
File "/Users/asebert/.local/pipx/venvs/lgtv/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'
Unfortunately this is due to a change in Python3 - it requires a code change. I'm not proficient in Python, but if anyone wants to have a gander, look at this post: eventlet/eventlet#795 (comment)
This isn't a problem with LGTV, it's a problem with ws4py.
Upstream issue appears to be tracked here: Lawouach/WebSocket-for-Python#262
Try:
lgtv --ssl auth 194.107.100.42 mytv
Work for me. Ubuntu Linux