Project

General

Profile

How to automatically deactivate tvheadend (tuner respectively) when not using Live TV

Added by Donnos Camilios about 12 years ago

Dear developers,

in general, as soon as I start XBMC my DVB-S Tuner (Sundtek SkyTV Ultimate) gets activated. However, I really need the tuner to be only activated when I enter the Live TV section of XBMX. When I leave Live TV again, I want the tuner automatically deactivated. Of course, this can be achieved by manually deactivating tvheadend server (under addons.../services). However, this is obviously not wife friendly and somehow complicated. Btw, I use XBMC on the recent Openelec Platform (Final Eden).

Just to explain the background, why this is important for me. My satellite system is connected to a priority-switch, where my zbox/openelec will have the higher priority. Thus, if xbmc runs (without using live TV) other DVB-S devices can not be used to watch TV. Any kind of help will be much appreciated. Thanks.


Replies (6)

RE: How to automatically deactivate tvheadend (tuner respectively) when not using Live TV - Added by Adam Sutton about 12 years ago

I don't fully understand the problem? Are you running XBMC+TVH on the same machine? The simple act of turning XBMC on (and thus connecting its client to the TVH server) will not cause TVH to start using a tuner.

However by default TVH always has the tuners active and in use (background scanning, EPG updates, etc..). If you don't want this then disable background scanning, you might also want to consider using an XMLTV EPG source instead of an OTA one (if you're not doing so already).

Adam

RE: How to automatically deactivate tvheadend (tuner respectively) when not using Live TV - Added by Donnos Camilios about 12 years ago

Hi Adam,

XBMC and TVHeadend both are running on the same htpc. TVHeadend had not to be installed seperately, was already available (under addons) in Openelec. Can't remember if there was an option named background scanning or similiar (do you mean autodetec muxes in WebGUI?). But will have a closer look when I am back at home. EPG is not important, i don't need it. Thank you Adam.

RE: How to automatically deactivate tvheadend (tuner respectively) when not using Live TV - Added by Adam Sutton about 12 years ago

In the TVH WebUI there is an option (enabled by default) to background scan when idle. If you need your tuners to be freed when you're not actively using them (i.e. to watch live tv) then you need to disable this option.

If you also want to reduce power when tuners are no in use the close FDs when idle option should ensure that tuners can properly enter low power states when not in use.

Adam

RE: How to automatically deactivate tvheadend (tuner respectively) when not using Live TV - Added by Donnos Camilios about 12 years ago

Hi Adam,

well, Idle scanning is not activated. I am actually not sure where to disable EPG completely. Is it enough to disable internal grabber? (I have also unchecked the 'Over-the-air' grabbers and external interfaces). However, the tuner remains active. The last point you were talking about ('...reduce power when tuners are no in use the close...'). What do you mean with that ? Thank you.

RE: How to automatically deactivate tvheadend (tuner respectively) when not using Live TV - Added by Donnos Camilios about 12 years ago

Hi Adam,

thank you for your support in irc. Finally i had success. With 'Skip initial scan' activated (don't know if this point is necessary) and 'close device handle when idle' activated it realy works. Thank you again.

RE: How to automatically deactivate tvheadend (tuner respectively) when not using Live TV - Added by b kuhls about 11 years ago

Hi,

sorry to hijack this thread, but my unsolved problem is similar to Donnos situation: "My satellite system is connected to a priority-switch, where my zbox/openelec will have the higher priority. Thus, if xbmc runs (without using live TV) other DVB-S devices can not be used to watch TV."

This means tvheadend must not activate the tuner without manually accessing it by xbmc. I am using self-compiled xbmc alpha 13 with tvheadend, based on latest git rev 2b64995434 and the corresponding pvr addon for xmbc.

Once per hour tvheadend activates itself without being called from xbmc to scan for epg data which blocks my TV. Here is the xbmc logline when the LiveTV mode of xbmc was closed by me:

Oct 03 21:31:51.846 [ INFO]:subscription: "127.0.0.1 [ XBMC Media Center ]" unsubscribing from "TELE 5"
Oct 03 21:32:05.017 [ DEBUG]:dvb: /dev/dvb/adapter0 stopping thread
Oct 03 21:32:05.017 [ DEBUG]:dvb: /dev/dvb/adapter0 stopped thread
Oct 03 21:32:05.123 [ DEBUG]:dvb: "/dev/dvb/adapter0" is off
Oct 03 21:32:05.123 [ DEBUG]:dvb: /dev/dvb/adapter0 closing frontend

Exactly an hour later this happens, no other loglines are present between these quotes:

Oct 03 22:32:05.000 [ DEBUG]:dvb: /dev/dvb/adapter0 opened frontend /dev/dvb/adapter0/frontend0
Oct 03 22:32:05.351 [ DEBUG]:dvb: "/dev/dvb/adapter0" tuning via s2api to "BetaDigital: 12,480,000 kHz Vertical (Default (Port 0, Universal LNB))" (1880000, 27500000 Baud, 3/4, SYS_DVBS, QPSK) for EPG scan
Oct 03 22:32:05.763 [ DEBUG]:dvb: /dev/dvb/adapter0 started dvr thread
Oct 03 22:32:05.763 [ DEBUG]:eit: install table handlers
Oct 03 22:32:05.777 [ DEBUG]:eit: begin processing
Oct 03 22:32:17.184 [ DEBUG]:eit: processing complete
Oct 03 22:32:37.017 [ DEBUG]:dvb: /dev/dvb/adapter0 stopping thread
Oct 03 22:32:37.017 [ DEBUG]:dvb: /dev/dvb/adapter0 stopped thread
Oct 03 22:32:37.130 [ DEBUG]:dvb: "/dev/dvb/adapter0" is off
Oct 03 22:32:37.130 [ DEBUG]:dvb: /dev/dvb/adapter0 closing frontend

Here is the xbmc log snippet for the time in question:

22:30:28 T:3040458416 DEBUG: SECTION:UnloadDelayed(DLL: special://xbmcbin/system/ImageLib-i486-linux.so)
22:30:28 T:3040458416 DEBUG: Unloading: ImageLib-i486-linux.so
22:32:36 T:2813934496 DEBUG: EPG - UpdateFromScraper - updating EPG for channel 'WDR HD' from client '1'
22:32:36 T:2813934496 DEBUG: EPG - UpdateFromScraper - updating EPG for channel 'RTL FS' from client '1'

This is the evidence that xbmc is not responsible for the activation of tvheadend.
I guess the epg service of tvheadend is responsible for this, tvheadend/epggrab/otamux looks like this:

{
"eit": [ {
"onid": 133,
"tsid": 33,
"period": 600,
"interval": 3600,
"networkname": "BetaDigital"
}
]
}

How can I prevent tvheadend from activating itself? I need the DVB EPG data, but it should only be collected when using the LiveTV addon of xbmc.

The following settings are present:

tvheadend/dvbadapters/* {
"enabled": 1,
"fe_path": "/dev/dvb/adapter0/frontend0",
"dmx_path": "/dev/dvb/adapter0/demux0",
"dvr_path": "/dev/dvb/adapter0/dvr0",
"type": "DVB-S",
"displayname": "Technisat SkyStar USB HD (DVB-S/S2)",
"autodiscovery": 0,
"idlescan": 0,
"idleclose": 1,
"skip_checksubscr": 0,
"sidtochan": 0,
"qmon": 0,
"poweroff": 1,
"nitoid": 0,
"diseqc_version": 0,
"diseqc_repeats": 0,
"extrapriority": 0,
"skip_initialscan": 1,
"disable_pmt_monitor": 0,
"full_mux_rx": 0,
"grace_period": 0
}

tvheadend/epggrab/config {
"channel_rename": 0,
"channel_renumber": 0,
"channel_reicon": 0,
"epgdb_periodicsave": 0,
"interval": 43200,
"mod_enabled": {
"eit": 1
}
}

Regards, bkuhls

    (1-6/6)