Project

General

Profile

Possible to disconnect from server on idle?

Added by Christian . over 5 years ago

Setup

  • A few Kodi clients run on Raspberry Pis. The clients are always on.
  • Tvheadend is running on a x86 server offering DVB-S. The server is shutdown when it's idle (e.g. no current subscriptions, no scheduled recordings in the next few minutes). I wrote an autosuspend script that checks Tvheadend's activity for this. As long as a connection on the control port (default: 9981) exists, the server is considered busy.

Problem

The Kodi HTSP plugin does not release the connection to the server, thus the server does never shutdown.

I found a workaround, though. I created two profiles in Kodi, one for TV with the HTSP (and WOL) plugin enabled, and a second one having the plugins disabled. When the user stops watching TV, (s)he switches to the non-tv profile. The HTSP plugin is disabled and the server shuts down properly.

What's wrong with the workaround?

  1. After logoff, when the profile selection screen is shown, the HTSP plugin is still running. The user has to switch to the non-tv profile to disable the plugin.
  2. I'd prefer an automatic disconnect, or a configuration option to disconnect from the server on idle (whatever 'idle' may mean).

Is anyone else suffering from this issue? Is there a better solution than my workaround?


Replies (1)

RE: Possible to disconnect from server on idle? - Added by Paul Hey over 5 years ago

I'm also experiencing this.

I think I'm right in saying that this only happens when connected via ethernet, as I don't recall the same thing happening over wifi, presumable because power saving disables wifi.

Would be great to find a solution.

    (1-1/1)