My solution to deal with the "no input detected" / "graceperiod expired" issue
#1
I just wanted to share with you how I made Tvheadend usable. The issue I was experiencing is that tvheadend would at random stop serving any streams and throw a "No input detected"-message. Restarting the tvheadend service was enough to fix this issue, but since the HTPC is used by my family there needed to be a hassle-free hands-off solution. Since the causes of these "graceperiod expired"-issues are widespread and probably driver related issues you shouldn't expect a official fix soon.

In my case tvheadend was running on a Ubuntu server, so this solution is based on this distro. The core of the solution is having Tvheadend log debug information to a file, and monitor this file for the "Graceperiod expired" message. If detected kick tvheadend in the nuts. It's not the best solution, but it works and it's pretty easy to set up!

1. Enable tvheadend debug logging. Edit /etc/default/tvheadend and add the -s switch to the arguments.
Code:
# TVH_ARGS
#   add any other arguments
TVH_ARGS="-s"

2. Save the following script somewhere. Mine was stored under /home/hts/monitor_tvheadend.sh
Code:
#!/bin/bash
tail -F /var/log/syslog | grep --line-buffered "Graceperiod expired" | while read line
do
  service tvheadend restart
done
Make it executable. Run:
Code:
chmod +x /home/hts/monitor_tvheadend.sh

3. Make the script run on boot. Add this line to /etc/rc.local at the bottom, but above "exit 0"
Code:
/home/hts/monitor_tvheadend.sh &
Mind the ampersand. It's there for a reason.

The best thing about this script is that it is based on "tail" instead of polling the file. This means it's resource efficient and responds immediately.
Reply


Messages In This Thread
My solution to deal with the "no input detected" / "graceperiod expired" issue - by jaapp - 2013-02-20, 12:36
Logout Mark Read Team Forum Stats Members Help
My solution to deal with the "no input detected" / "graceperiod expired" issue0