hobbyquaker/lgtv2

Q: Delay between TV on and websocket ready for connect ?

aboulfad opened this issue · 1 comments

Hi, curious if anyone with an LG TV is observing very long delays (10-15s) before the LG TV websocket is available for connection after the TV is powered on? I have an 2017 OLED65E7 webos3.7

I have a written a very small bash script using netcat to detect when ws is ready for connection and will stop when netcat connects to LG ws. I've executed it many times, and my LG ws is only ready after 10-15sec.

wakeonlan [LG mac addr];./checkport.sh

checkport.sh

#!/bin/bash
time=0;
result=1;
while [ $result -ne 0 ]; do
nc -z -w1 [LG IP] 3000;

if [ $? -eq 0 ]; then
let result=0;
fi

echo Port: $? Time: $time;

sleep 1;
((time++));

done

Thanks for an insight/info !

Same here, with an old 2015 WebOS 2 TV. I guess what you see here is just the time WebOS needs to boot up. In this first 10-15seconds I'm also not able to use the Smart TV functionality, it tells me smth like "please wait until smart services started up" when I press the Home button on the TVs remote too early.