[mythtvnz] MythTV 0.29 and HDHomeRun

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Nov 1 00:29:21 GMT 2017


On Wed, 1 Nov 2017 11:15:31 +1300, you wrote:

>Hi all, I have an issue with a brand new MythTV installation that i wonder
>if anybody has seen before.  I've been using MythTV for many years on an
>ancient AMD AthlonXP with MythBuntu 14.04 that is slowly dying, so thought
>I would splash out and update to a nice modern setup.
>
>So we have:
>  * new intel cpu, motherboard, ram
>  * Ubuntu 17.10
>  * MythTV 0.29
>  * HDHomeRun Connect (NZ / AU dual tuner version)
>
>Software cleanly installed.  Mythbackend setup seems to go well.  Added one
>capture cards (tuners 0 on the HDHomeRun).  Added video source, connected
>them up in the 'Input Connections', scanned for channels. All ok at this
>point, so i start up MythFrontend and view LiveTV.  It works first time
>(yay).
>
>Now the issue.  I stopped the frontend, went into the backend setup and
>added the second HDHomeRun tuner.  A quick reboot later for some updates,
>and now Live TV no longer works.  I get the following error in the backend
>log:
>
>Nov  1 07:40:03 mythbox mythbackend: mythbackend[1050]: I ProcessRequest
>mainserver.cpp:1738 (HandleAnnounce) MainServer: MainServer::ANN Playback
>Nov  1 07:40:03 mythbox mythbackend: mythbackend[1050]: I ProcessRequest
>mainserver.cpp:1743 (HandleAnnounce) MainServer: adding:
>mythbox(55755a9a0fc0) as a client (events: 0)
>Nov  1 07:40:03 mythbox mythbackend: mythbackend[1050]: I TVRecEvent
>tv_rec.cpp:1088 (HandleStateChange) TVRec[1]: Changing from None to
>WatchingLiveTV
>Nov  1 07:40:03 mythbox mythbackend: mythbackend[1050]: I TVRecEvent
>tv_rec.cpp:3704 (TuningFrequency) TVRec[1]: TuningFrequency
>Nov  1 07:40:03 mythbox mythbackend: mythbackend[1050]: E TVRecEvent
>dtvmultiplex.cpp:379 (ParseTuningParams) DTVMux: ParseTuningParams -- Unknown
>tuner type = 0xffffffff80000000
>Nov  1 07:40:03 mythbox mythbackend: mythbackend[1050]: E TVRecEvent
>recorders/dtvchannel.cpp:300 (SetChannelByString) DTVChan[1](12332F08-0):
>SetChannelByString(1): Failed to initialize multiplex options
>Nov  1 07:40:03 mythbox mythbackend: mythbackend[1050]: E TVRecEvent
>tv_rec.cpp:3782 (TuningFrequency) TVRec[1]: Failed to set channel to 1.
>Reverting to kState_None
>Nov  1 07:40:03 mythbox mythbackend: mythbackend[1050]: I TVRecEvent
>tv_rec.cpp:1088 (HandleStateChange) TVRec[1]: Changing from WatchingLiveTV
>to None
>Nov  1 07:40:03 mythbox mythbackend: mythbackend[1050]: I
>MythSocketThread(51) mainserver.cpp:7643 (connectionClosed) Playback
>sock(55755a9a0fc0) 'mythbox' disconnected
>
>
>ok - so I've now gone into the backend MANY times and fiddled with the
>capture settings.  Deleted and reinstalled the capture cards.  Delete and
>reinstalled the video source, inputs, and channels.  updated software,
>rebooted machine.  Nothing works.  I'm at a loss...   No matter what I do,
>the error is always the same - *Unknown tuner type = 0xffffffff80000000*.
>Database repair via MythWeb shows no issues.  Note that that I can
>successfully SCAN for channels - this always works fine.  It is just live
>TV.  I'm not trying to use multi-rec at the moment, so number of virtual
>tuners is set to '1'.
>
>
>I wondered if it was the HDHomeRun itself, so I tried adding the HDHomeRun
>to that ancient Athlon mythbox I mentioned above.  But it works just fine -
>no issues at all...  So its not the HDHomeRun.
>
>I'm wondering if there is a regression in MythTV 0.29 that prevents it from
>working with HDHomeRuns ?  Anyone seen something like this before?  Is
>anyone successfully using HDHomeRun with MythTV 0.29?
>
>Cheers
>Mark

If you shut down and restart mythbackend, does it work?

The reason I ask is that when you boot modern hardware with a systemd
operating system and ssd boot drive, mythbackend can be started before
the network is up.  With v29, that should not matter as it should wait
for the network automatically, but I have not tested that yet.  In
0.28 and before, it was a common problem.

Have you checked that scanning works on both tuners of the HDHomerun?
If you have set up Live TV the way the Wiki recommends, it will be set
to use the second tuner by preference, whereas recordings will use the
first tuner preferentially.

I have not actually used HDHomeruns myself, but I have helped someone
else to set up a system using one.  Have you set the tuning timeouts?
When I was helping to set up the HDHomeruns, we found that the default
timeouts were rather too short, and scanning was missing several muxes
from Waiatarua.  When we set the signal timeout to 10000 (10 seconds)
and the tuning timeout to 30000 (30 seconds), scanning worked
properly.  The long signal timeout allows the tuner to tune to the
correct frequency.  The long tuning timeout allows tuning of Three to
work - it seems badly set up and it takes ages longer to find all the
streams for the channel than for any other channel.

You might like to try turning on some more log output.  In the
/etc/mythtv directory, create a file named additional.args.  Make it
owner and user mythtv.  The systemd unit that starts mythbackend
(/lib/systemd/system/mythtv-backend.service) reads this file if it
exists and treats it contents as environment variables.  It then uses
a $ADDITIONAL_ARGS environment variable on its command line, so you
can set the value of that variable to add things to the mythbackend
command line.  This is what I have in mine:

root at mypvr:/etc/mythtv# cat additional.args
#ADDITIONAL_ARGS=-v all --loglevel debug
ADDITIONAL_ARGS=-v record,dvbcam

In your case, I would recommend using "-v record", although if that is
not sufficient, you could try the "-v all --loglevel debug" line I
have commented out as that gives just about all possible debug output.
It slows down mythbackend though, which can cause the timing of things
to change and that can cause timing dependent problems to go away.



More information about the mythtvnz mailing list