Feature #2034
EPG update interval
0%
Description
Hi!
I try to adjust the EPG update interval to stop my Synology DS214 from waking up. For me, every 24 hours is enough. I read some code and found the file tvheadend/var/epggrab/otamux. There I can adjust the update interval for OTA grabbers, in my case mainly EIT. From time to time, the file seems to be rewritten, so my changes are gone again. Either way it would be better to be able to adjust the interval in the GUI.
Is there a way to do it already? Am I using the wrong config file?
Thanks in advance!
Files
History
Updated by srx srx over 10 years ago
I would like to see some changes in EPG as well.
I think epggrab should not run at all by itself. I think egpgrab should only run when you are tuned to channel and then extract EPG data from already opened stream (I think most STB do it just like that). It might need full mux reception, but it's not a problem, I already have it enabled.
It's not a problem with FTA channels but it is a problem with crypted channels and lot of available tuners if epggrab decides to run on all free tuners and spam smartcards with lot of requests. It makes watching Live TV very annoying when picture freezes often.
epggrab should not start decoding a crypted stream. It should only attach to already open streams.
For now I just switch off over-the-ait EPG and enable it only when I want EPG to be updated.
Another solution would be allowing epggrab to run only at given times. Let's say 02:00-03:00 every day or maybe just once a week.
Updated by Adam Sutton over 10 years ago
A couple of points:
1. It will depend very heavily on where you are and how your network is organised. In the UK, and many other territories, EPG data (beyond now/next) is not held on standard muxes (heck its not even held in EIT form), so just picking it up from what you tune to would never work. There must be an active scanning process.
2. If the epggrab is the only thing running, it will not be spamming anything with requests related to descrambling (except EMMs), since no subscriptions for channels will exist. I do see high'ish CPU load when EPG scanning on my system, but that's not too surprising the EPG is encoded and the decoding routines are very optimised. But since its a few 10's of seconds every hour and has zero impact on overall performance, its not an issue. It's more likely you're suffering from self-interference problems, at least if this is DVB-S.
That being said, I completely agree that a more flexible arrangement would be better and I look forward to someone adding it.
Adam
Updated by Torsten Casselt over 10 years ago
I'm glad to see some activity here, but would you mind answering my question?
Where can I set the time interval EPG is updating except for the otamux file I mentioned in the topic? There must be some hardcoded value (3600 seconds) because the otamux file is overwritten every day. I can for sure just de-/activate the EIT grabber for one or two hours every day but there must be a better solution because on generation of the otamux file there must be a source where it takes the value from.
Thanks again!
Updated by Adam Sutton over 10 years ago
You can't I added the hooks for configuration, however I never actually made it configurable and as such I believe the code currently just keeps updating itself with the built-in value. So I'm afraid, at the moment, there is no way to control it.
Adam
Updated by Torsten Casselt over 10 years ago
Okay, thanks for the definitive answer. Then I'll write a cronjob for de-/activating the EIT grabber. I hope modifying the config file is enough or do I need some kind of call to tvheadend?
Updated by Sam Stenvall over 10 years ago
Usually you'll have to call the API for any change to take effect. You can see what the web interface is doing (ie. what requests it sends) and use that to make a script which does the same thing.
Updated by Torsten Casselt over 10 years ago
Jalle Grönroos wrote:
Usually you'll have to call the API for any change to take effect. You can see what the web interface is doing (ie. what requests it sends) and use that to make a script which does the same thing.
Thanks! I did just that, copied the curl with firefox to de-/activate EIT. It works. But how do I know when it updates the EPG again? I tried activating EPG at 04:00 and deactivating at 05:00. It seems not sufficient. Are there fixed times when EPG updates? Or can I somehow force an update manually? I could add it to the script.
Almost there… ;-)
Updated by Robert Sneyer over 10 years ago
Dear Torsten,
could you please share your script for (dis-) abling the epg update?
I would like to let my synology nas go to standby, too.
Thanks,
Robert
Updated by Torsten Casselt about 10 years ago
- File disable_epg.sh disable_epg.sh added
- File enable_epg.sh enable_epg.sh added
I uploaded the scripts. Multiple people already asked for them, so there is a requirement for fixing this problem. You maybe need to slightly adjust them if your options vary. After "--data" there is the string with the options set. It rewrites them each time you execute the script, so note your settings and try the script. If the settings are okay after that, then you can use it without adjustment. If not you need to change the options.
It is still a problem though. The scripts disable and enable the EPG without problems and the synology goes to sleep for a long time. But the EPG is not updated between the disabling and the reenabling. I had not enough time for that problem in the last time so I left EPG enabled to even have EPG. It would be nice if a dev would answer my question though, when the EPG update happens. Then I could time the cronjob exactly to disable before the update and enable after that. I watched the transports and they get accessed randomly distributed during the day, each channel another time. I hope this is not the case because it is impossible then to update the EPG for synology users that want to let their NAS go to sleep.
At least it would be great if a dev could validate this so I could post a feature request for an EPG force update. Maybe it does exist already?
Updated by Jaroslav Kysela about 10 years ago
- Status changed from New to Fixed
In current master, you can specify OTA EPG activation times in the crontab syntax. Closing as fixed.
Updated by Torsten Casselt about 10 years ago
Jaroslav Kysela wrote:
In current master, you can specify OTA EPG activation times in the crontab syntax. Closing as fixed.
Wow, this is awesome! You worked a lot on the whole EPG situation in the last time I see. You fixed this already end of June. Thanks a lot!
I will request an update of the tvheadend package for the synology NAS and report back.
Updated by Torsten Casselt about 10 years ago
Jaroslav Kysela wrote:
In current master, you can specify OTA EPG activation times in the crontab syntax. Closing as fixed.
Wow, this is awesome! You worked a lot on the whole EPG situation in the last time I see. You fixed this already end of June. Thanks a lot!
Are there any plans when the next stable version will be released?
Updated by Rob vh about 10 years ago
- Default config (02:04 and 14:04 everyday)
4 2 * * *
4 14 * * *
but I see EPG scan all through the day.
You can also request a mux scan for a (or several) specific muxes in the DVB Inputs-Mux scheduler tab, which does work for me.