[mythtv-users] today's mythtv update for v31 failed

Ted L ted1193-mythmlist at yahoo.com
Sat Feb 5 13:40:59 UTC 2022

>At present, I have the permissions on the /var/log/mythtv/hdhr_discovery.log set to 'mythtv', and only the >override.conf file causes the running of hdhomerun_check.py.
>So I'm hoping the permissions keep working as they do now.  If I get another ubuntu mythtv update and the >permissions change on all log files then I know where the problem is and I'll move the logging for >hdhomerun_check.py to /tmp or somewhere. Once this function is set up, it is going to work unless the HDHR >tuner is powered off or failing. That's the only time I'd every look at that log file.
>JIm A

The script shown below from Mythbuntu Control Panel (https://github.com/mythcp/mythbuntu-control-panel/blob/master/hdhomerun-discover.py) is what I use daily with no problem.  
#! /usr/bin/python3

import subprocess, datetime, time, sys, os

current_date_time = datetime.datetime.now()
log_msg = current_date_time.strftime("%Y-%m-%d %H:%M:%S") + " Attempting to discover HDHomeRun device\n"
found = False
for attempt in range(10):
    if subprocess.run(['hdhomerun_config', 'discover']).returncode == 0:
        current_date_time = datetime.datetime.now()
        log_msg = log_msg + current_date_time.strftime("%Y-%m-%d %H:%M:%S") + " HDHomeRun device successfully found"
        found = True
    if attempt == 9:
        log_msg = log_msg + " HDHomeRun device was not found after 10 attempts"

if os.path.exists('/tmp/hdhomerun-discover.out'):
    with open('/tmp/hdhomerun-discover.out', 'w') as txt_file:
    if not found:


More information about the mythtv-users mailing list