klattimer / LGWebOSRemote

Command line webOS remote for LGTVs
MIT License
523 stars 101 forks source link

lgtv scan not working #125

Closed cdam06 closed 11 months ago

cdam06 commented 1 year ago

Followed install instructions. This is what I am seeing when attempting the lgtv scan ssl command. Any help would be appreciated.

(lgtv) chandu@ChandusacStudio lgtv % lgtv scan ssl
Traceback (most recent call last):
  File "/Users/chandu/opt/lgtv/bin/lgtv", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/chandu/opt/lgtv/lib/python3.11/site-packages/LGTV/__init__.py", line 123, in main
    results = LGTVScan()
              ^^^^^^^^^^
  File "/Users/chandu/opt/lgtv/lib/python3.11/site-packages/LGTV/scan.py", line 25, in LGTVScan
    response, address = sock.recvfrom(512)
                        ^^^^^^^^^^^^^^^^^^
TimeoutError: timed out
klattimer commented 1 year ago

Erm, you may need higher privileges to run the recvfrom, either that or it received nothing back, it looks like it just got nothing back.

You need your TV on the same network.

cdam06 commented 1 year ago

Thank you for the response. The TV is on and connected to the same network.

NcLax5 commented 1 year ago

Hi just wanted to add I am also receiving a similar error code on my LG C3

aaronkjones commented 12 months ago

lgtv scan ssl is working fine on my LG C2

~/opt/lgtv$ lgtv scan
{"result": "ok", "count": 1, "list": [{"uuid": "bc67s921-s92s-920d-ab3b-s8dj2kd8sa0", "tv_name": "Bob", "address": "192.168.1.147"}]}
klattimer commented 11 months ago

I'll close this, as the latest code appears to have fixed the underlying issue.

smnrock commented 11 months ago

Same issue in LG C3 in MacOS 14.2.1