Kodi Community Forum

Full Version: TVServerXBMC keepalive request
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is mainly @margro as I've no idea how to implement this :-)

With the impending release of media portal 1.6 (and so probably a new tvserver plugin) is it possible to add a basic heartbeat / keepalive so that it can be aware when an xbmc client has crashed while watching live TV?
The current behaviour seems to be that it isn't aware the client has died so the tvserver carries on streaming (which basically holds a lock on the tuner).
Even when the client comes back online it doesn't seem to be able to regain ownership of the lock tuner.. The only way to free the device is restart the mepo tvservice or go into the tvserver configuration and use manual control.
Either way isn't really wife/kid friendly ;-)

If the tvserver could notice the client has disconnected and just stop the tuned channel (as long as no other clients are using it) then it would be a great addition.
The current behavior is that the TVServerXBMC plugin will stop the active timeshift when the client properly closes the connection.
A new connection from the same IP-address is still seen as a new user because you could watch two different channels (e.g. VLC and XBMC) on the same machine.

A crash somehow does not result in a proper connection shutdown in your case (it does here, just tried it), so the timeshift will continue. The only way to solve it is indeed with a heartbeat/keepalive.
I've done a few quick tests and I can probably fix this completely at the TVServerXBMC side alone by looking at the regular "GetSignalQuality" calls which can also be seen as heartbeart/keepalive calls.

I will add this to the list for the next TVServerXBMC plugin update.
Thanks so much for looking into this, will be a great addition to usability Smile
Brilliant!
Ok, I've just uploaded a 1.6.0 version of the TVServerXBMC plugin with the heartbeat addition.
It will only work with the following setting in XBMC enabled:
Settings\Live-TV\Playback\Show Signal quality.

This setting asks the backend for the signal quality and it will automatically be used as keepalive. Disabling this setting also disables the keepalive currently because I haven't updated the PVR addon itself yet...
Thanks so much.
I have installed the updated addon, will report back if the same behaviour is still seen with this enabled.
Yeah thanks indeed Smile

I've also installed and will see if it can reduce the dreaded "all cards busy" messages Smile
A quick update, all good so far Smile
Doh!

Been having samba problems again so keep having to reboot openelec boxes as they get stuck with the spinning icon when trying to start a live tv stream.

The manual control bit of the mp server shows both tuners of my tbs6280 in use - different xbmcpvrclient numbers..

mp server plugin version is 1.6.0125

What logs may help?