2019-04-12, 05:45
(cross-posted on Tvheadend board)
Setup
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?
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.
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?
- 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.
- I'd prefer an automatic disconnect, or a configuration option to disconnect from the server on idle (whatever 'idle' may mean).