BKM for HDHR EIT EPG updates

For discussion of topics specific to MythTV on linux
Post Reply
User avatar
jfabernathy
Senior
Posts: 612
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

BKM for HDHR EIT EPG updates

Post by jfabernathy »

I'm not sure I used enough acronyms. Basically I'm look to see if anyone have the right config to get over the air program guide updates working on a mythtv system with HDHomerun tuners.

I've found that if I configure a system using HDHR tuners for OTA video source, it will sit there forever and not populate the program guide with shows.

However, if I use mythfrontend and just go to a channel and watch it the program guide will update plus all the sub-channels on that main transmission.

I know of a setting on the capture card for EIT. and there is a Video source setting for EIT.

Does anyone know the correct setting for EIT so that your can build a HDHR EIT only only system and have it update the guide?
User avatar
kmdewaal
Developer
Posts: 741
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: BKM for HDHR EIT EPG updates

Post by kmdewaal »

Jim, this is going to work!
Yes, there is a setting for the video source: "4. Videos sources / <the HDHR Video source> / Listings Grabber" and this one must be set to "Transmitted Guide Only (EIT)".
Then there is a setting for the capture card "2. Capture cards / <the HDHR Capture card>/ Recording Options / Use HDHomeRun for Active Scan" and this must be selected for the first capture card of your HDHomerun, as only the first one can be used for EIT.
See also the WIki, https://www.mythtv.org/wiki/Channel_Sca ... Run_tuners
User avatar
jfabernathy
Senior
Posts: 612
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: BKM for HDHR EIT EPG updates

Post by jfabernathy »

Okay, I'll try exactly that on a fresh backend only. However, the first problem I encountered was this:

I'm on Debian 12 so I built the packages per the wiki and got them installed. Prior to the package install I created my mythtv user and installed mariadb.

on a terminal ssh'ed into the new backend I started mythbackend and used a browser to to to 192.168.68.83:6544 and followed the screen to get the database setup, schema updated, etc.

Next I went through the setup and got it working. I wanted to get the mythtv-backend.service enabled and not use the term to run mythbackend. So I used the one included with the package and enabled it with an override to wait for the hdhomerun tuners to get ready. Below in the service. I cancel the mythbackend running from a terminal and enabled the mythtv-backend.service and now the backend can't connect to the database, so I'm confused.

Code: Select all

jim@nucboxg3:~$ sudo systemctl cat mythtv-backend
# /lib/systemd/system/mythtv-backend.service
[Unit]
Description=MythTV Backend
Documentation=https://www.mythtv.org/wiki/Mythbackend
After=mysql.service network.target
 
[Service]
User=mythtv
EnvironmentFile=-/etc/mythtv/additional.args
ExecStart=/usr/bin/mythbackend --quiet --syslog local7 $ADDITIONAL_ARGS
StartLimitBurst=10
StartLimitInterval=10m
Restart=on-failure
RestartSec=1
 
[Install]
WantedBy=multi-user.target

# /etc/systemd/system/mythtv-backend.service.d/override.conf
[Service]
ExecStartPre=/usr/local/bin/hdhomerun_check.py 192.168.68.93
User avatar
jfabernathy
Senior
Posts: 612
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: BKM for HDHR EIT EPG updates

Post by jfabernathy »

On a reboot the status of mythtv-backend shows this:

Code: Select all

● mythtv-backend.service - MythTV Backend
     Loaded: loaded (/lib/systemd/system/mythtv-backend.service; enabled; preset: enabled)
    Drop-In: /etc/systemd/system/mythtv-backend.service.d
             └─override.conf
     Active: active (running) since Tue 2024-12-10 06:24:39 EST; 11s ago
       Docs: https://www.mythtv.org/wiki/Mythbackend
    Process: 776 ExecStartPre=/usr/local/bin/hdhomerun_check.py 192.168.68.93 (code=exited, status=0/SUCCESS)
   Main PID: 969 (mythbackend)
      Tasks: 4 (limit: 18605)
     Memory: 182.2M
        CPU: 300ms
     CGroup: /system.slice/mythtv-backend.service
             └─969 /usr/bin/mythbackend --quiet --syslog local7

Dec 10 06:24:39 nucboxg3 mythbackend[969]: mythbackend[969]: I CoreContext mythcontext.cpp:652 (LoadDatabaseSettings) Using a profile name of: 'nucboxg3' (Usually the same as this host's name.)
Dec 10 06:24:39 nucboxg3 mythbackend[969]: mythbackend[969]: I CoreContext mythcontext.cpp:896 (TestDBconnection) Start up testing connections. DB localhost, BE , attempt 0, status dbAwake, Delay: 2000
Dec 10 06:24:40 nucboxg3 mythbackend[969]: mythbackend[969]: E CoreContext mythdbcon.cpp:247 (OpenDatabase) [DBManager0] Unable to connect to database!
Dec 10 06:24:40 nucboxg3 mythbackend[969]: mythbackend[969]: E CoreContext mythdbcon.cpp:248 (OpenDatabase) Driver error was [1/1045]:
                                           QMYSQL: Unable to connect
                                           Database error was:
                                           Access denied for user 'mythtv'@'localhost' (using password: YES)
Dec 10 06:24:41 nucboxg3 mythbackend[969]: mythbackend[969]: I CoreContext mythcontext.cpp:896 (TestDBconnection) Start up testing connections. DB localhost, BE , attempt 1, status dbStarted, Delay: 2000
Dec 10 06:24:41 nucboxg3 mythbackend[969]: mythbackend[969]: E CoreContext mythdbcon.cpp:247 (OpenDatabase) [DBManager1] Unable to connect to database!
Dec 10 06:24:41 nucboxg3 mythbackend[969]: mythbackend[969]: E CoreContext mythdbcon.cpp:248 (OpenDatabase) Driver error was [1/1045]:
                                           QMYSQL: Unable to connect
                                           Database error was:
                                           Access denied for user 'mythtv'@'localhost' (using password: YES)
Dec 10 06:24:46 nucboxg3 mythbackend[969]: mythbackend[969]: I CoreContext mythcontext.cpp:896 (TestDBconnection) Start up testing connections. DB localhost, BE , attempt 2, status dbStarted, Delay: 2000
Dec 10 06:24:46 nucboxg3 mythbackend[969]: mythbackend[969]: E CoreContext mythdbcon.cpp:247 (OpenDatabase) [DBManager2] Unable to connect to database!
Dec 10 06:24:46 nucboxg3 mythbackend[969]: mythbackend[969]: E CoreContext mythdbcon.cpp:248 (OpenDatabase) Driver error was [1/1045]:
                                           QMYSQL: Unable to connect
                                           Database error was:
                                           Access denied for user 'mythtv'@'localhost' (using password: YES)
User avatar
jfabernathy
Senior
Posts: 612
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: BKM for HDHR EIT EPG updates

Post by jfabernathy »

Okay, I found out what's going on, but not sure how to fix it.

If I disable mythtv-backend.service I can run the mythbackend command as user 'jim' and it works.

If I sudo su mythtv and run the mythbackend command I get the same issues as I see when enabling the mythtv-backend.service. Which runs as user 'mythtv'

Not sure how I got into this mess, but maybe I can continue testing the EIT EPG issue anyway.
User avatar
kmdewaal
Developer
Posts: 741
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: BKM for HDHR EIT EPG updates

Post by kmdewaal »

OK good that the EIT issue has ben solved.
What then remains as always, is getting access to the database as user mythtv.This is generaly beyond my understanding, but I usually just try a few variations of the mantra's described here: https://www.mythtv.org/wiki/Database_Se ... le_systems
User avatar
jfabernathy
Senior
Posts: 612
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: BKM for HDHR EIT EPG updates

Post by jfabernathy »

So I've solved the database connect problem. I pulled out the m.2 ssd stick and put in one that had just basic Debian 12 with KDE Plasma and restored to a timeshift snapshot that was nothing but the basic install.

Then I installed the v35 mythtv package I build locally on a server and it was properly setup so all I had to do was reboot and go to localhost:6544.

I added 2 HDHR tuners both from one HDHR Duo. The first tuner is the only one with the "Use HDHomeRun for Active Scan" checked.

On General, I normally uncheck the "Program Schedule Downloading Options" since I normally use Schedule Direct except for this test. But this time I left it checked which is the default.

On Video Sources I added the EIT only, "Transmitted Guide Only", but this time I checked the box, Perform EIT scan. Maybe this was the difference because I've started seeing EPG data populate.

EDIT: it's been about 1 hour and all 35 channels have guide data.
User avatar
epgtechtalk
Newcomer
Posts: 5
Joined: Tue Jun 03, 2025 2:19 pm
Location: Bascom Avenue Miami, FL
Philippines

Re: BKM for HDHR EIT EPG updates

Post by epgtechtalk »

To enable HDHomeRun (HDHR) EIT EPG updates with MythTV, a specific configuration sequence has proven effective. The process begins with a clean operating system installation.

First, install Debian 12 with KDE Plasma. Then, restore a Timeshift snapshot containing only the basic OS installation. Following this, install the v35 MythTV package, built locally on a server. This setup usually requires a reboot to access localhost:6544.

Next, add two HDHR tuners, both from a single HDHR Duo. Ensure that only the first tuner has "Use HDHomeRun for Active Scan" checked.

In the General settings, the "Program Schedule Downloading Options" should remain checked (this is the default setting). While some users typically uncheck this for Schedule Direct, keeping it enabled is key for this method.

Finally, when configuring Video Sources, add the EIT only source as "Transmitted Guide Only." Crucially, check the "Perform EIT scan" box. This step appears to be the most critical difference, as EPG data begins to populate after this selection. This Best Known Method (BKM) helps ensure reliable EPG data acquisition directly from HDHR tuners within a MythTV environment.
white_haired_uncle
Senior
Posts: 562
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: BKM for HDHR EIT EPG updates

Post by white_haired_uncle »

epgtechtalk wrote:
Fri Jul 25, 2025 5:07 am
To enable HDHomeRun (HDHR) EIT EPG updates with MythTV, a specific configuration sequence has proven effective. The process begins with a clean operating system installation.

First, install Debian 12 with KDE Plasma. Then, restore a Timeshift snapshot containing only the basic OS installation. Following this, install the v35 MythTV package, built locally on a server. This setup usually requires a reboot to access localhost:6544.

Next, add two HDHR tuners, both from a single HDHR Duo. Ensure that only the first tuner has "Use HDHomeRun for Active Scan" checked.
No, this answer is incorrect. As stated in an earlier post, you must be running as user 'jim' when you check "Use HDHomeRun for Active Scan". Failing to do so is known to cause your production database to be deleted even though a code freeze is active.
Post Reply