klattimer / LGWebOSRemote

Command line webOS remote for LGTVs
MIT License
498 stars 97 forks source link

lgtv.py off #5

Closed benjwdev closed 6 years ago

benjwdev commented 7 years ago

(venv)Laptop:amazon-alexa-lg-tv-master User$ python lgtv.py off {"type": "response", "id": "0", "payload": {"returnValue": true}}

When running python lgtv.py off shortly after the TV turns on the command hangs at the statement above. It seems to be on the ws.connect() command.

This seems only seems to be an issue with the off command. When sending a 'notification', it hangs while the TV boots up, then delivers it successfully. However, if the 'off' is executed even 30 seconds after the TV has fully booted it hangs indefinitely.

klattimer commented 7 years ago

https://github.com/klattimer/LGWebOSRemote/blob/master/lgtv.py#L223

Does your line223 look the same as this? This might have been fixed already. Other than that, I'd say it's either an issue with your network or your computer. The send command method works the same in all scenarios the turn off only has the difference that it's calling that particular method. A recent pull might have fixed it, well, it was supposed to fix some issues which might be what you're experiencing but who knows :)

Turning a TV on over wifi has known issues, but that's because of wake on lan and wifi being dodgy.

klattimer commented 6 years ago

Closing this as I can't reproduce it.