2019-01-02, 14:11
Increasing the connection timeout value in pvr.hts settings has no effect. No matter what value I set there, the "no connection" error message always pops up 2-3 seconds after Kodi has started.
I decided to delay the startup of Kodi now, until the server is available. This is not perfect, because that way the total startup takes longer than before (first wait until the server is up, than start Kodi and wait until Kodi is started), but it has the advantage that everything is up and running as soon as Kodi is started.
To do this, I use the following autostart.sh (LibreELEC) now:
The script only waits until a ping to the server is successful, and not until the services (tvheadend and emby) are running, because the time Kodi needs to start (after the script ended) is long enough for the services to start.
I decided to delay the startup of Kodi now, until the server is available. This is not perfect, because that way the total startup takes longer than before (first wait until the server is up, than start Kodi and wait until Kodi is started), but it has the advantage that everything is up and running as soon as Kodi is started.
To do this, I use the following autostart.sh (LibreELEC) now:
Quote: #!/bin/sh
# Check if server is running
ping -c1 -w1 servername >/dev/null 2>&1
# If not running...
if [ $? -ne 0 ]
then
# ...wake up server
ether-wake -b xx:xx:xx:xx:xx:xx >/dev/null 2>&1
# Wait 5 seconds
sleep 5
# Check and wait up to 20 seconds until server is running
ping -c1 -w20 servername >/dev/null 2>&1
fi
The script only waits until a ping to the server is successful, and not until the services (tvheadend and emby) are running, because the time Kodi needs to start (after the script ended) is long enough for the services to start.