can get channels & programs from command line, but not myth apps

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

Moderator: Forum Moderators

Post Reply
User avatar
dochawk
Junior
Posts: 24
Joined: Mon Jan 17, 2022 8:32 pm
United States of America

can get channels & programs from command line, but not myth apps

Post by dochawk »

I *must* be down to something simple here.

[edit: trimming much due to discoveries in followups, and subject changed]

I can play live channels, and have channel names, from the pi, albeit at something silly like four frames per second (there is a "no gpu" warning at some point) and without sound.

...

the whole of /etc/mythtv/config.xml, to which /home/mythtv/.mythtv/config.xml is a symlink, is (withthepassword redacted)

but this is also an automatically configured file.

Code: Select all

<Configuration>
  <Database>
    <PingHost>1</PingHost>
    <Host>localhost</Host>
    <UserName>mythtv</UserName>
    <Password>PASSWORD_REDACTED</Password>
    <DatabaseName>mythconverg</DatabaseName>
    <Port>3306</Port>
  </Database>
  <WakeOnLAN>
    <Enabled>0</Enabled>
    <SQLReconnectWaitTime>0</SQLReconnectWaitTime>
    <SQLConnectRetry>5</SQLConnectRetry>
    <Command>echo 'WOLsqlServerCommand not set'</Command>
  </WakeOnLAN>
</Configuration>
and FWIW, the OSX client finds it on a network (once told to look), but fails to access the database on the back end.

I *must* be so close, but . . .


[log replaced in favor of newer in followup]
Last edited by dochawk on Mon Feb 20, 2023 10:40 pm, edited 2 times in total.
yawlhoo
Senior
Posts: 120
Joined: Wed Apr 15, 2015 4:18 pm
United States of America

Re: channel names from schedule direct, and live tv, but no programming information

Post by yawlhoo »

My guess from being roughly where you are MANY times is that you have ownership problems with the files resulting from xmltv setup.

You can either examine each file and change ownerships, or start over with the config logged in as user mythtv.
User avatar
dochawk
Junior
Posts: 24
Joined: Mon Jan 17, 2022 8:32 pm
United States of America

Re: channel names from schedule direct, and live tv, but no programming information

Post by dochawk »

thanks.

I've done another install, and this time everything but apt-get was done after su to mythtv.

I noticed that the mythfilldatabase output includes

Code: Select all

2023-02-20 14:13:30.535511 I  XMLTV config file is: /home/mythtv/.mythtv/sch_dir.xmltv
but there is no such file.

Also that running the grabber from the command line spews a lot of data.

so I tried

Code: Select all

tv_grab_zz_sdjson > /home/mythtv/.mythtv/sch_dir.xmltv
which produced a 60 meg file, starting with

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE tv SYSTEM "xmltv.dtd">

<tv source-info-url="http://www.schedulesdirect.org" source-info-name="Schedules Direct" generator-info-name="tv_grab_zz_sdjson 1.1.1">
  <channel id="I101368.json.schedulesdirect.org">
    <display-name>KPVTLD (KPVT-LD)</display-name>
    <display-name>KPVTLD</display-name>
    <display-name>2_1</display-name>
  </channel>
  <channel id="I101369.json.schedulesdirect.org">
    <display-name>KPVTLD2 (KPVT-LD2)</display-name>
    <display-name>KPVTLD2</display-name>
    <display-name>2_2</display-name>
    <icon src="https://schedulesdirect-api20141201-logos.s3.dualstack.us-east-1.amazonaws.com/stationLogos/s66281_dark_360w_270h.png" width="360" height="270" />
  </channel>
 

which looks like a general description and channels, and then things like

Code: Select all

<programme start="20230221050000 +0000" stop="20230221060000 +0000" channel="I24021.json.schedulesdirect.org">
    <title>NCIS</title>
    <sub-title>The Good Fighter</sub-title>
    <desc>When an NCIS agent turns up dead and Kasie goes unaccounted for, the team must work quickly to find the killer.</desc>
    <credits>
      <director>Jose Clemente Hernandez</director>
      <actor role="NCIS Special Agent Timothy McGee">Sean Murray</actor>
      <actor role="NCIS Special Agent Nicholas &quot;Nick&quot; Torres">Wilmer Valderrama</actor>
      <actor role="Dr. Jimmy Palmer">Brian Dietzen</actor>

  
as programs.

So I seem to have both ends if I can tie them together: I can manually pull programming in a text terminal, and my tuners can be seen by the myth software.

But mythfilldatabase still comes up with

Code: Select all

2023-02-20 14:20:59.549380 I  Grabber prefers method: allatonce
2023-02-20 14:20:59.551154 I  XMLTV config file is: /home/mythtv/.mythtv/sch_dir.xmltv
2023-02-20 14:21:02.456588 E  XMLTV grabber returned error code 1
2023-02-20 14:21:03.206518 E  Malformed XML file, missing </tv> element, at line 1, Premature end of document.
(I have no reason to think the file should have gone there other than grasping at straws).


I think somehow there is confusion between what should go into ~/.mythtv, and what should go into ~/.xmlconfig


here are their listings:

Code: Select all

mythbackend:~> ls -al .mythtv/ .xmltv/
.mythtv/:
total 28
drwxr-xr-x  7 mythtv mythtv 4096 Feb 20 14:34 .
drwxr-x--- 10 mythtv mythtv 4096 Feb 20 14:34 ..
drwxrwxr-x  2 mythtv mythtv 4096 Feb 20 13:32 3rdParty
drwxrwxr-x  4 mythtv mythtv 4096 Feb 20 14:04 cache
drwxrwxr-x  2 mythtv mythtv 4096 Feb 20 13:32 channels
lrwxrwxrwx  1 root   root     22 Feb 20 13:25 config.xml -> /etc/mythtv/config.xml
drwxrwxr-x  2 mythtv mythtv 4096 Feb 20 13:32 themes
drwxrwxr-x  4 mythtv mythtv 4096 Feb 20 14:04 tmp

.xmltv/:
total 45984
drwxrwxr-x  2 mythtv mythtv     4096 Feb 20 13:23 .
drwxr-x--- 10 mythtv mythtv     4096 Feb 20 14:34 ..
-rw-rw-r--  1 mythtv mythtv 47068319 Feb 20 14:15 tv_grab_zz_sdjson.cache
-rw-rw-r--  1 mythtv mythtv      175 Feb 20 13:22 tv_grab_zz_sdjson.conf
(and the channels directory in .mythtv is empty)
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: can get channels & programs from command line, but not myth apps

Post by bill6502 »

Check out the ASCII art here: viewtopic.php?f=36&t=3480&start=15#p19508

There should be no entries in ~/.mythtv or ~/.xmltv for the grabber to work. It all lives under ~mythtv/...
and if you run mythfilldatabase from the command line, you do it as user mythtv.

I saw in your previous log there was an "sch dir.xmltv" file (space that's now an underscore). That file
name comes from the name of the source you picked. They must match.

In the earlier log, there was a 'No channels are configured to use grabber.' line. That means that for
the source being used, no channels had an XMLTVID in the mythconverg.channel database.
User avatar
dochawk
Junior
Posts: 24
Joined: Mon Jan 17, 2022 8:32 pm
United States of America

Re: can get channels & programs from command line, but not myth apps

Post by dochawk »

Am I possibly missing a step or package?

I'm using armbian, which seems pretty much inherit from ubuntu for these.

My sequences

1) create login user (hawk)
2) use that to update & upgrade with apt and apt-get
3) install tcsh (nearly 40 years of finger memory is hard to change!)
4) add user mythtv without a password, and add hawk to mythtv group

[at this point, I clone the sd so that I can get a head start]

5) apt-get install mythtv xmltv (by sudo while logged in as hawk)
6)

Code: Select all

sudo su mythtv
and run mythtv-setup as mythtv

what I'm getting, though, is

Code: Select all

mythbackend:~> ls -lrs  mythtv .mythtv .xmltv
ls: cannot access 'mythtv': No such file or directory
.xmltv:
total 0

.mythtv:
total 20
4 drwxrwxr-x 3 mythtv mythtv 4096 Feb 20 18:04 tmp
4 drwxrwxr-x 2 mythtv mythtv 4096 Feb 20 18:04 themes
0 lrwxrwxrwx 1 root   root     22 Feb 20 18:01 config.xml -> /etc/mythtv/config.xml
4 drwxrwxr-x 2 mythtv mythtv 4096 Feb 20 18:04 channels
4 drwxrwxr-x 6 mythtv mythtv 4096 Feb 20 18:15 cache
4 drwxrwxr-x 2 mythtv mythtv 4096 Feb 20 18:04 3rdParty
So it's myth-setup that is creating .mythtv and .xmltv

I created ~/mythtv, and moved .mythtv there, and might have got a little farther when running mythfilldatabase:

Code: Select all

...

2023-02-20 18:43:28.384794 I  Updating source #1 (sch_dir) with grabber tv_grab_zz_sdjson
2023-02-20 18:43:28.386554 I  No channels are configured to use grabber.
...
2023-02-20 18:43:30.691581 I  Grabber prefers method: allatonce
2023-02-20 18:43:30.695035 I  XMLTV config file is: /home/mythtv/.mythtv/sch_dir.xmltv
2023-02-20 18:43:32.008825 E  XMLTV grabber returned error code 1
2023-02-20 18:43:32.795554 E  Malformed XML file, missing </tv> element, at line 1, Premature end of document.
2023-02-20 18:43:32.798004 E  Failed to fetch some program info


so that wasn't the answer.

Am I missing something here?

also, after the move, if I restart mythtv-setup, it can't find the mythconverg database-- and

Code: Select all

find . | grep -i conver
run from ~ yields nothing.
yawlhoo
Senior
Posts: 120
Joined: Wed Apr 15, 2015 4:18 pm
United States of America

Re: can get channels & programs from command line, but not myth apps

Post by yawlhoo »

I don't see /home/mythtv/.mythtv/sch_dir.xmltv in your listing.
-----
On my own system the key configuration files are:

/home/mythtv/.mythtv
-rw-r--r-- 1 mythtv mythtv 142 Oct 15 13:36 Antenna.xmltv

and

/home/mythtv/.xmltv
-rw-r--r-- 1 mythtv mythtv 108249088 Feb 21 02:03 SchedulesDirect.DB

I don't know where the mythconverg physical file lives, I examine it via mysql

mysql -u mythtv -p mythconverg
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: can get channels & programs from command line, but not myth apps

Post by bill6502 »

Recheck the ASCII art link a few posts above. I'm not sure what the clone mentioned
earlier did, but the files are required.
Post Reply