[mythtvnz] No EPG - need temp solution

Stephen Worthington stephen_agent at jsw.gen.nz
Tue Apr 19 03:32:30 BST 2022


On Tue, 19 Apr 2022 09:38:27 +1200, you wrote:

>It looks like it is not finding a "valid" config.xml
>
>When I ran locate -i config.xml I only found files created before I 
>started setting up your grabber:-
>
>root at FishMyth:/etc/mythtv# ls -la
>
>-rw-rw----   1 mythtv   mythtv   509 Apr 12 16:52 config.xml
>
>root at FishMyth:/home/robert/.mythtv# ls -la
>
>lrwxrwxrwx  1 robert sudo     22 Aug 26  2019 config.xml -> 
>/etc/mythtv/config.xml
>
>root at FishMyth:~/.mythtv# ls -la
>
>root at FishMyth:/usr/share/mythtv# ls -la
>
>-rw-r--r--   1 root root   514 Apr 12 12:32 config.xml
>
>Should I delete or rename the old files and run through your setup again?

It is possible that the format of your config.xml files is not quite
right - especially if they have been around for many versions of
MythTV and are still in the old format.  The format had a major change
many versions of MythTV ago, and while the old format is supposed to
still be accepted, I have had problems with that.

The correct modern format is in the example file:

/usr/share/mythtv/config.xml

As well as what is in there, there may also be a UPnP section which I
think gets added by mythfrontend if the UPnP options are enabled.
There are lots of bits of MythTV that will just create a new
config.xml file if they do not find one, and I think that includes the
Python bindings.  So they can get created when you do not expect it.

I would recommend renaming your /etc/mythtv/config.xml file (eg to
config.xml.old) and taking a copy of the /usr/share/mythtv/config.xml
file and editing it to put in your database password.  For config.xml
files on the backend machine, the Host field should be set to
"localhost" (I think 127.0.0.1 also works, but I am not sure about ::1
for IPv6).  When MythTV software sees localhost, it uses a Unix socket
connection instead of actually connecting via the TCP/IP stack to
localhost.  Using a socket is significantly faster.  On machines other
than the backend, the Host field needs to use an IP address or DNS
name of the backend machine.  Set the PingHost option to 0 when using
localhost.  For non-backend machines, it is probably best to have
PingHost set to 1.  The normal ownership of /etc/mythtv/config.xml is
"chown www-data:mythtv" and the permissions "chmod u=rw,g=rw".  The
reason for the "www-data" ownership is probably to allow PHP access
for running mythweb.  If there is a UPnP section, copy that to the new
config.xml.  But check that it follows the new format.  Here is an
example from one of my config.xml files:

<Configuration>
  <UPnP>
    <UDN>
 <MediaRenderer>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</MediaRenderer>
    </UDN>
  </UPnP>
  <Database>
    <UserName>mythtv</UserName>
    <PingHost>0</PingHost>
    <Host>localhost</Host>
    <DatabaseName>mythconverg</DatabaseName>
    <Password>xxxxxxxxxxxx</Password>
    <Port>3306</Port>
  </Database>
  <WakeOnLan>
    <Enabled>0</Enabled>
    <SQLReconnectWaitTime>0</SQLReconnectWaitTime>
    <SQLConnectRetry>5</SQLConnectRetry>
    <Command>echo 'WOLsqlServerCommand not set'</Command>
  </WakeOnLan>
</Configuration>

Once you have created the new config.xml, in /etc/mythtv, you can just
create links to it from anywhere else you need it.



More information about the mythtvnz mailing list