Ape / samsungctl

Remote control Samsung televisions via a TCP/IP connection
MIT License
711 stars 191 forks source link

Delay when using command line #47

Open timdonovanuk opened 6 years ago

timdonovanuk commented 6 years ago

Hi - I've noticed using this via Home Assistant commands sent to the TV are almost instantaneous but using it from the command line there can be significant delays up to 5 seconds. Is there a difference in the versions bundled with HA vs running this via python3?

Thanks.

Ape commented 6 years ago

What TV model is this? Please try if you can reproduce the instantaneous behaviour with samsungctl library yourself.

One possible cause is that, with your TV model, it takes 5 seconds to establish the connection but after that it is fast. Using samsungctl as a library (probably what Home Assistant is doing) you can keep the connection alive. However, the samsungctl command cannot really reuse connections. If this is really the case you can make a better command line client that uses some kind of daemon to share connections.