git-developer / autosuspend

AutoSuspend-Script for Tvheadend on Linux
GNU General Public License v3.0
7 stars 9 forks source link

EPG subscription prevents autosuspend #4

Closed malvinas2 closed 6 years ago

malvinas2 commented 6 years ago

Hello,

I don't know why, but the actualization of EPG over-the-air triggered by TVHeadend takes several hours here, which prevents autosuspend as there still is one subscription. Is it possible to add an option so that the autospend-script ignores / doesn't consider EPG subscription ?

https://i.imgur.com/KnpN0r1.png

git-developer commented 6 years ago

There's no option to address this issue in autosuspend. The cause is that a all subscriptions are considered equally important.

I had the same problem when I started, because EPG data has not been collected yet. But after a few days, EPG data was more or less complete, and the machine went to sleep as desired. So maybe the first option for you could be to simply wait a few days.

If this doesn't help, try to tweak the following options in Tvheadend's configuration:

Please share your experiences here.

malvinas2 commented 6 years ago

If I understand the setting correctly the 600 seconds refers to ONE mux, but my system found 112 muxes and approx. 60 channels. But I don't know which muxes are really in use. Does it help to switch off the cron-job for the OTA, whose default setting is 2:04 and 14:04 o'clock every day? At the weekend I will have a detailed look at the log of TvH, because I imagine that there is something wrong with it (btw I am using the Satip-Server Digibit R1 with the original firmware, not the one written by perex).

git-developer commented 6 years ago

Does it help to switch off the cron-job for the OTA, whose default setting is 2:04 and 14:04 o'clock every day?

I don't think so, probably the option Force initial EPG scan at startup triggers EPG grabbing.

The log should show how long EPG is grabbed for each mux. EPG may then be disabled per mux (Configuration / DVB Inputs / Muxes / Edit / EPG Scan) or even per service (Configuration / DVB Inputs / Services / Edit / Ignore EPG (EIT)).

git-developer commented 6 years ago

I still think that the preferred solution to the problem should be found within the EPG configuration. Nevertheless I added support to suspend if only an EPG grabber is running. To try it, update to commit 4ee6e80 or newer and add the following line to your autosuspend configuration (/etc/autosuspend):

TVHEADEND_CONSIDER_EPGGRABBING=no

I appreciate your feedback.

malvinas2 commented 6 years ago

Thank you for your support, I'll try the new version.

I logged TvH activities using the subsystems 'EPG', 'satip', 'epggrab' and 'mpegts', but as far as I am able to judge it, everything seems to be fine. Well, it just takes several hours to update all 60 channels ;-).

I deactivated the option 'Force initial EPG grab at start-up' which -I assume- starts the EPG grab every time the server has been started. Furthermore I changed the OTA-Cron to trigger the grabber just at 19:00 o'clock daily as this is our normal "television viewing time". (btw: I also installed and setup WebGrab+Plus and have got a subscription of epgdata.com, but obviously the aired information has got the most updated content)

malvinas2 commented 6 years ago

The past few days the 'No-EPG'-feature has worked as expected, at least 'syslog' tells me that the system got suspended during a run of EPG-subscription. Thank you very much!

One more question (I imagine it's just a small one, so I don't want to open another issue): The network is checked for open connections using SAMBANETWORK='192.168.1.' How do I have to modify the logit()-function, so that all found connections (=result of smbstatus) are written to the log-file? Sometimes it doesn't suspend because of open connections, but I don't know which one is still open ....

git-developer commented 6 years ago

Try branch feature/samba_logging where I extended IsBusy. If it doesn't work, please open a new issue.