[Solved] Configuring XMLTV Prior to V31 upgrade

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

User avatar
Steve Goodey
Moderator
Posts: 159
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Re: [Solved] Configuring XMLTV Prior to V31 upgrade

Post by Steve Goodey » Tue Feb 16, 2021 8:11 am

Mythtv -- still the best and easily the most annoying DVR solution in the world -- but think of how much you will learn!!
Amen to that. :lol:
Don't forget the Wiki.

red192
Newcomer
Posts: 13
Joined: Fri Nov 13, 2015 5:17 am
United States of America

Re: [Solved] Configuring XMLTV Prior to V31 upgrade

Post by red192 » Tue Feb 16, 2021 1:46 pm

Exiting with Status 0! (Which to humans means it 'effing worked. Here's a virtual Bud Light for you, Mr. Unix XMLTV Grabber Programmer guy.)

red192
Newcomer
Posts: 13
Joined: Fri Nov 13, 2015 5:17 am
United States of America

Re: [Solved] Configuring XMLTV Prior to V31 upgrade

Post by red192 » Mon Mar 01, 2021 3:39 am

Here are my final notes on this journey to make xmltv listings from Schedules Direct work for me.

I was using xubuntu 18.04.5 and MythTV Version : v30.0 from ppa.launchpad.net/mythbuntu/30/ubuntu bionic InRelease
HDHomeRun PRIME, Model: HDHR3-CC, Firmware: 20210210 and HDHomeRun CONNECT Model: HDHR4-2US Firmware: 20210210
The back end computer is an old Supermicro X8SIL with 32gb of ECC ram and a Xeon X3470.

First, I ran mythconverg_backup.pl to make a safe copy of my database. I learned how to do this here https://www.mythtv.org/wiki/Database_Backup_and_Restore.

Next, I built XMLTV from source as instructed by the wiki here
https://www.mythtv.org/wiki/XMLTV#Introduction

After installing xmltv using apt, I ran “sudo apt remove xmltv” — which left all the dependencies in place and enabled me to build and install xmltv from source — AND eliminated the chance of running the wrong version. May not be necessary but I had a devil of time getting mythtv to find the right grabbers.

Here’s what I ended up with:

Code: Select all

scott@mythtv:~$ tv_grab_zz_sdjson --version
XMLTV module version 1.0.0
This is tv_grab_zz_sdjson version 1.0.0
and

Code: Select all

scott@mythtv:~$ tv_find_grabbers
/usr/local/bin/tv_grab_zz_sdjson_sqlite|Multinational (Schedules Direct JSON web services with SQLite DB)
/usr/local/bin/tv_grab_na_dd|North America (Data Direct)
/usr/local/bin/tv_grab_zz_sdjson|Schedules Direct JSON API
/usr/local/bin/tv_grab_na_tvmedia|North America (XMLTVListings.com by TVMedia)
Most of my recordings have been handled by the HDHR3-CC, the cable card tuner that does not need to scan channels – so my plan was to try editing the video source linked to these tuners and changing to the xmltv grabber (tv_grab_zz_sdjson), then deleting the channels and see if they get added back by mythfilldatabase. I’m just going to leave the HDHR4-2US out of this initially.

I want to be able to run the mythtv-setup as my user Scott and also enable this freaky program to run what it must as user mythtv when it needs to.

So down the rabbit hole!

When using the mythtv-setup in ten-foot mode, I go to video sources -> comcast (what I called this before when using Schedules Direct Data Direct ) -> Listing Grabber -> and select Schedules Direct JSON API. Then right arrow to configure.

If you were running XMLTV installed from the 18.04 repo you might see this message:
Params::Validate::NO_VALIDATION" used only once: possible typo
No idea what it means or if it causes problems. I did not see again when I ran a more updated XMLTV I built from source.

The next fun thing, you will see a sentence that says:
If you are migrating from a different grabber selecting an alternate channel ID format can make
And it is cut off. Says “can make the migration easier.”

If you make it through this UI, typing variable answers in the box when needed, you are rewarded with the message:
*** Exited with Status 0 ***
Unix programmers probably know that this is good news. Google for it: The shell script ran successfully.

The configuration process should have created an .xmltv directory and a config file in your user’s .mythtv directory that matches the video source name you created in the GUI – in my case comcast.xmltv

So I edited the comcast.xmltv config file to change the location of tv_grab_zz_sdjson.cache

Now looks like this …
cache=/home/mythtv/.xmltv/tv_grab_zz_sdjson.cache
channel-id-format=default
previously-shown-format=date
username=xxxxxxx
password=xxxxxxx
mode=lineup
lineup=USA-MI21637-X
lineup!USA-OTA-48307
Then I copied tv_grab_zz_sdjson.cache and comcast.xmltv to my mythtv user directories and changed the ownership and permissions.

Code: Select all

sudo cp /home/scott/.xmltv/tv_grab_zz_sdjson.cache /home/mythtv/.xmltv/
sudo chown mythtv:mythtv /home/mythtv/.xmltv/tv_grab_zz_sdjson.cache
sudo chmod 777 /home/mythtv/.xmltv/tv_grab_zz_sdjson.cache
and

Code: Select all

sudo cp comcast.xmltv /home/mythtv/.mythtv/
sudo chown mythtv:mythtv /home/mythtv/.mythtv/comcast.xmltv
sudo chmod 644 /home/mythtv/.mythtv/comcast.xmltv
I really don’t know if I have the permissions set correctly but the thing works now. I also made sure the directories had relaxed permissions so either user, scott or mythtv could write to the .cache file – once again, the permissions are a mystery to me.

Many of the old timers will repeat that the backend setup must be run as the mythtv user – and I tried to do this but could not succeed that way. Later I was able to upgrade to v31 and build those Raspberry Pi 4 front ends – they work ok – little buggy but workable.

Editorial remarks of limited value:

I’m a typical joe user, and I like to think of my “mythtv master backend” as a “program” that I installed on one of my “computers.” I still don’t fully get the Linux looking glass world where you install “a program” to record tv shows and whoa — it requires a myriad of other odd bits of software to run and its own secret handshake user account to work, and yeah its new version is now useless without this third-party xmltv thing. I guess Schedules Direct data direct is only useful for a few users in the USA and needs to go. For people who know what they are doing, no big deal, simply compile the latest version of xmltv from source. And yeah, for the configuration process to work you need run the setup that ran fine before as your sudo user (scott) as the mythtv user this time — maybe mythtv does not need to concern itself with being easy to configure as long as it works for a few people in the know. I have a feeling a lot of people will just give up rather than do all this jazz. Thanks to everyone who helped me! Hope this thread gives so good clues to others who are having trouble.

Post Reply