TVServerXBMC keepalive request

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Swifty Offline
Fan
Posts: 598
Joined: Nov 2008
Reputation: 5
Post: #1
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.
find quote
margro Offline
Fan
Posts: 648
Joined: Oct 2009
Reputation: 21
Location: The Netherlands
Post: #2
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.

Developer of the MediaPortal PVR addon and the Argus-TV PVR-addon. Unofficial XBMC Windows builds with PVR.
http://www.scintilla.utwente.nl/~marcelg/xbmc
find quote
Swifty Offline
Fan
Posts: 598
Joined: Nov 2008
Reputation: 5
Post: #3
Thanks so much for looking into this, will be a great addition to usability Smile
find quote
Thebluevoice Offline
Junior Member
Posts: 39
Joined: May 2012
Reputation: 0
Post: #4
Brilliant!
find quote
margro Offline
Fan
Posts: 648
Joined: Oct 2009
Reputation: 21
Location: The Netherlands
Post: #5
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...

Developer of the MediaPortal PVR addon and the Argus-TV PVR-addon. Unofficial XBMC Windows builds with PVR.
http://www.scintilla.utwente.nl/~marcelg/xbmc
find quote
Swifty Offline
Fan
Posts: 598
Joined: Nov 2008
Reputation: 5
Post: #6
Thanks so much.
I have installed the updated addon, will report back if the same behaviour is still seen with this enabled.
find quote
Thebluevoice Offline
Junior Member
Posts: 39
Joined: May 2012
Reputation: 0
Post: #7
Yeah thanks indeed Smile

I've also installed and will see if it can reduce the dreaded "all cards busy" messages Smile
find quote
Thebluevoice Offline
Junior Member
Posts: 39
Joined: May 2012
Reputation: 0
Post: #8
A quick update, all good so far Smile
find quote
Thebluevoice Offline
Junior Member
Posts: 39
Joined: May 2012
Reputation: 0
Post: #9
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?
find quote