<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 14, 2020 at 7:09 AM Klaas de Waal <<a href="mailto:klaas.de.waal@gmail.com">klaas.de.waal@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 14 May 2020 at 12:33, Daryl McDonald <<a href="mailto:darylangela@gmail.com" target="_blank">darylangela@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 13, 2020 at 10:50 PM Stephen Worthington <<a href="mailto:stephen_agent@jsw.gen.nz" target="_blank">stephen_agent@jsw.gen.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 13 May 2020 16:56:07 -0700, you wrote:<br>
<br>
>On Wed, May 13, 2020 at 4:37 PM DryHeat122 . <<a href="mailto:dryheat122@gmail.com" target="_blank">dryheat122@gmail.com</a>> wrote:<br>
><br>
>> On Wed, May 13, 2020 at 2:08 AM Stephen Worthington <<br>
>> <a href="mailto:stephen_agent@jsw.gen.nz" target="_blank">stephen_agent@jsw.gen.nz</a>> wrote:<br>
>><br>
>>> On Tue, 12 May 2020 20:22:59 -0700, you wrote:<br>
>>><br>
>>> >When it rains it pours I guess.  I was just posting about HDPVR problems<br>
>>> a<br>
>>> >few days ago.  Now Myth can't tune any channels on my HDHomerun Duo.<br>
>>> >Checked the troubleshooting section on the wiki, but it assumes the<br>
>>> problem<br>
>>> >is with the HDHR. I can tune channels just fine on a Windows machine on<br>
>>> the<br>
>>> >same network, so its not the HDHR.  Any advice on how to troubleshoot?<br>
>>><br>
>>> Does it work if you restart mythbackend?  Are there any error messages<br>
>>> in mythbackend.log?  You can get additional logging about the<br>
>>> recording process by adding -v record to the mythbackend command line:<br>
>>><br>
>>> root@mypvr:/etc/mythtv# cat additional.args<br>
>>> ADDITIONAL_ARGS=-v record<br>
>>><br>
>>> Then restart mythbackend.  Or from a command line, temporarily add the<br>
>>> extra "record" logging while mythbackend is running:<br>
>>><br>
>>> sudo mythbackend --setverbose record<br>
>>><br>
>>> and turn it off again with:<br>
>>><br>
>>> sudo mythbackend --setverbose norecord<br>
>>><br>
>>> I am not sure if sudo is required above - all the second copy of<br>
>>> mythbackend is doing is to open a connection to a port on the main<br>
>>> mythbackend and send it the serverbose command.  So it may not need<br>
>>> any extra privileges.<br>
>>><br>
>>> Thanks for the advice.  I checked the logs before doing anything, and<br>
>> found (machine ID stuff stripped out for readability):<br>
>><br>
>> May 13 15:39:21  I ProcessRequest mainserver.cpp:1698 (HandleAnnounce)<br>
>> MainServer: MainServer::ANN Playback<br>
>> May 13 15:39:21  I ProcessRequest mainserver.cpp:1703 (HandleAnnounce)<br>
>> MainServer: adding: steve-EP45-UD3P(1f26320) as a client (events: 0)<br>
>> May 13 15:39:21  I TVRecEvent tv_rec.cpp:1073 (HandleStateChange)<br>
>> TVRec[2]: Changing from None to WatchingLiveTV<br>
>> May 13 15:39:21  I TVRecEvent mythdbcon.cpp:422 (PurgeIdleConnections) New<br>
>> DB connection, total: 13<br>
>> May 13 15:39:21  I TVRecEvent tv_rec.cpp:3685 (TuningFrequency) TVRec[2]:<br>
>> TuningFrequency<br>
>> May 13 15:39:21  N CoreContext autoexpire.cpp:264 (CalcParams) AutoExpire:<br>
>> CalcParams(): Max required Free Space: 3.0 GB w/freq: 14 min<br>
>> May 13 15:39:21  N TVRecEvent recordinginfo.cpp:687<br>
>> (ApplyRecordRecGroupChange) ApplyRecordRecGroupChange: LiveTV to LiveTV (2)<br>
>> May 13 15:39:25  W TVRecEvent tv_rec.cpp:4004 (TuningSignalCheck)<br>
>> TVRec[2]: TuningSignalCheck: taking more than 3000 ms to get a lock.<br>
>> marking this recording as 'Failing'.<br>
>> May 13 15:39:25  W TVRecEvent tv_rec.cpp:4006 (TuningSignalCheck)<br>
>> TVRec[2]: See 'Tuning timeout' in mythtv-setup for this input<br>
>> May 13 15:39:36  I TVRecEvent tv_rec.cpp:1073 (HandleStateChange)<br>
>> TVRec[2]: Changing from WatchingLiveTV to None<br>
>> May 13 15:39:36  I MythSocketThread(74) mainserver.cpp:7629<br>
>> (connectionClosed) Playback sock(1f26320) 'steve-EP45-UD3P' disconnected<br>
>><br>
>> I then rebooted and tried to tune one of the HDHR channels (3_1) from the<br>
>> program guide.  Now it doesn't even try to tune and I get:<br>
>><br>
>> May 13 15:55:33  I ProcessRequest mainserver.cpp:1698 (HandleAnnounce)<br>
>> MainServer: MainServer::ANN Playback<br>
>> May 13 15:55:33  I ProcessRequest mainserver.cpp:1703 (HandleAnnounce)<br>
>> MainServer: adding: steve-EP45-UD3P(13e54b0) as a client (events: 0)<br>
>> May 13 15:55:33  I TVRecEvent tv_rec.cpp:1073 (HandleStateChange)<br>
>> TVRec[2]: Changing from None to WatchingLiveTV<br>
>> May 13 15:55:33  I TVRecEvent tv_rec.cpp:3685 (TuningFrequency) TVRec[2]:<br>
>> TuningFrequency<br>
>> May 13 15:55:33  E TVRecEvent dtvmultiplex.cpp:379 (ParseTuningParams)<br>
>> DTVMux: ParseTuningParams -- Unknown tuner type = 0xffffffff80000000<br>
>> May 13 15:55:33  E TVRecEvent recorders/dtvchannel.cpp:299<br>
>> (SetChannelByString) DTVChan[2](10668BF0-0): SetChannelByString(3_1):<br>
>> Failed to initialize multiplex options<br>
>> May 13 15:55:33  E TVRecEvent tv_rec.cpp:3763 (TuningFrequency) TVRec[2]:<br>
>> Failed to set channel to 3_1. Reverting to kState_None<br>
>> May 13 15:55:33  I TVRecEvent tv_rec.cpp:1073 (HandleStateChange)<br>
>> TVRec[2]: Changing from WatchingLiveTV to None<br>
>> May 13 15:55:33  I MythSocketThread(67) mainserver.cpp:7629<br>
>> (connectionClosed) Playback sock(13e54b0) 'steve-EP45-UD3P' disconnected<br>
>><br>
>> Hmm.  That doesn't look good.  I checked backend setup for tuners and<br>
>> nothing seems to be amiss.<br>
>><br>
>> I also tried to follow your instructions for configuring verbose logging<br>
>> but it didn't work:<br>
>><br>
>> steve@steve-EP45-UD3P:~$ cd /etc/mythtv<br>
>> steve@steve-EP45-UD3P:/etc/mythtv$ ls<br>
>> config.xml  config.xml.orig  session-settings<br>
>> steve@steve-EP45-UD3P:/etc/mythtv$ cat additional.args<br>
>> cat: additional.args: No such file or directory<br>
>> steve@steve-EP45-UD3P:/etc/mythtv$ ADDITIONAL_ARGS=-v record<br>
>> The program 'record' is currently not installed. You can install it by<br>
>> typing:<br>
>> sudo apt install xawtv-tools<br>
>> steve@steve-EP45-UD3P:/etc/mythtv$ cat additional.args<br>
>> cat: additional.args: No such file or directory<br>
>><br>
>> Did you mean cat "ADDITIONAL_ARGS=-v record" > additional.args?<br>
>><br>
>><br>
>I just started mythbackend with the -v record option and got:<br>
><br>
>2020-05-13 16:48:14.026697 I  MainServer: MainServer::ANN Playback<br>
>2020-05-13 16:48:14.026707 I  MainServer: adding: steve-EP45-UD3P(223c4b0)<br>
>as a client (events: 0)<br>
>2020-05-13 16:48:14.033902 I  TVRec[2]: Found channel (3_1) on current<br>
>input(2).<br>
>2020-05-13 16:48:14.044957 I  TVRec[2]: Changing from None to WatchingLiveTV<br>
>2020-05-13 16:48:14.044977 I  TVRec[2]:<br>
>ClearFlags(FrontendReady,CancelNextRecording,) -> RunMainLoop, @<br>
>tv_rec.cpp:1301<br>
>2020-05-13 16:48:14.044991 I  TVRec[2]: HandleTuning Request: Program(NULL)<br>
>channel() input() flags(LiveTV,)<br>
>2020-05-13 16:48:14.047755 I  TVRec[2]: TuningShutdowns(Program(NULL)<br>
>channel(3_1) input() flags(LiveTV,))<br>
>2020-05-13 16:48:14.048112 I  TVRec[2]: ClearFlags(PENDINGACTIONS,) -><br>
>RunMainLoop, @ tv_rec.cpp:3663<br>
>2020-05-13 16:48:14.048122 I  TVRec[2]: No recorder yet, calling<br>
>TuningFrequency<br>
>2020-05-13 16:48:14.048129 I  TVRec[2]: TuningFrequency<br>
>2020-05-13 16:48:14.050975 E  DTVMux: ParseTuningParams -- Unknown tuner<br>
>type = 0xffffffff80000000<br>
>2020-05-13 16:48:14.051000 E  DTVChan[2](10668BF0-0):<br>
>SetChannelByString(3_1): Failed to initialize multiplex options<br>
>2020-05-13 16:48:14.051010 E  TVRec[2]: Failed to set channel to 3_1.<br>
>Reverting to kState_None<br>
>2020-05-13 16:48:14.051028 I  TVRec[2]: Changing from WatchingLiveTV to None<br>
>2020-05-13 16:48:14.051209 I  TVRec[2]:<br>
>ClearFlags(FrontendReady,CancelNextRecording,) -> RunMainLoop, @<br>
>tv_rec.cpp:1301<br>
>2020-05-13 16:48:14.051224 I  TVRec[2]: HandleTuning Request: Program(NULL)<br>
>channel() input() flags(KillRec,KillRingBuffer,)<br>
>2020-05-13 16:48:14.051236 I  TVRec[2]: TuningShutdowns(Program(NULL)<br>
>channel() input() flags(KillRec,KillRingBuffer,))<br>
>2020-05-13 16:48:14.051258 I  TVRec[2]: ClearFlags(PENDINGACTIONS,) -><br>
>RunMainLoop, @ tv_rec.cpp:3663<br>
>2020-05-13 16:48:14.051291 I  TVRec[2]: SetFlags(CancelNextRecording,) -><br>
>RunMainLoop,CancelNextRecording, @ tv_rec.cpp:2667<br>
>2020-05-13 16:48:14.051989 I  Playback sock(223c4b0) 'steve-EP45-UD3P'<br>
>disconnected<br>
>2020-05-13 16:48:32.395051 I  BackendContext: Frontend 'steve-EP45-UD3P'<br>
>disconnected.<br>
>2020-05-13 16:48:32.395070 I  Playback sock(224ec00) 'steve-EP45-UD3P'<br>
>disconnected<br>
>2020-05-13 16:48:32.395299 I  Monitor sock(1fdca30) 'steve-EP45-UD3P'<br>
>disconnected<br>
<br>
Two things:<br>
<br>
1) In the prior log, I noticed that the tuning timeout was 3000 ms.<br>
That is too short these days.  It was the default value a long time<br>
ago, and anyone who has upgraded MythTV over the years will still have<br>
that, but the default these days I think is 10000 ms.  I know I had to<br>
change my settings to 10000 several versions of MythTV ago, as we have<br>
one DVB-T channel here in New Zealand ("Three") that normally takes<br>
over 7 seconds to tune.<br>
<br>
2) I do not have any HDHRs, so I do not know exactly what messages<br>
should be seen when tuning one, but looking at the above log, I can<br>
not see anything that says mythbackend was actually ever receiving a<br>
reply from the HDHR.  So if it was my system, I would now be running<br>
Wireshark using a capture filter setting of "host <ip address of<br>
HDHR>" and seeing what the traffic was.  Was mythbackend sending<br>
messages to the right IP address?  Was the HDHR replying?  And also<br>
see what happens when VLC talks to the HDHR.<br></blockquote></div></div></blockquote><div> </div><div>I suggest to start with mythtv-setup and check if the HDHomeRun is recognized and configured correct. For inspiration see</div><div><a href="https://www.mythtv.org/wiki/Channel_Scanning#Scanning_with_HDHomeRun_tuners" target="_blank">https://www.mythtv.org/wiki/Channel_Scanning#Scanning_with_HDHomeRun_tuners</a>.</div><div>When the HDHomeRun is recognized it appears in the "Card Type" page with the device ID and the IP address. If that is OK then try a channel scan. If this does not work you can try increasing the timeouts as described in <a href="https://www.mythtv.org/wiki/Channel_Scanning#Signal_timeout_.28ms.29" target="_blank">https://www.mythtv.org/wiki/Channel_Scanning#Signal_timeout_.28ms.29</a> although the defaults are correct for my HDHomeRun tuner collection.</div><div>If the card is configured OK you should be able to do a channel scan and find all channels.</div><div>When mythtv-setup can tune and scan then the settings are also correct for mythbackend.</div><div><br></div><div>Klaas.</div><div><br></div></div></div></blockquote><div>OK I officially feel stupid.  Here's the process by which I discovered my stupidity in case it will help anyone else.   Searching around on the error message "DTVMux: ParseTuningParams -- Unknown tuner type = 0xffffffff80000000" led me to a page that looks useful for others having HDHR problems (<a href="http://gedakc.users.sourceforge.net/display-doc.php?name=pvr-hdhomerun-not-recording">http://gedakc.users.sourceforge.net/display-doc.php?name=pvr-hdhomerun-not-recording</a>) which suggested running <span style="color:rgb(0,0,0);white-space:pre-wrap">hdhomerun_config discover.  That said no devices found; however I could ping the IP address of the HDHR.  Thinking about what could explain a working ping but a blocked connection, I remembered that r</span>ight before these problems started happening, I had set up some firewall rules with UFW to allow me to SSH into the backend machine.  It should have occurred to me that this could hose the HDHR connection, but it did not.  </div><div><br></div><div>Entering sudo ufw allow from 192.168.1.100 set up the proper rule and now it works.  There is also some stuff out there about a problem where the backend starts before the network connections have stabilized.  This may explain the very first log errors I posted--i.e. where HDHR doesn't work after reboot, but does work after backend restart. We shall see if that remains a problem.</div><div><br></div><div>Thanks for all the advice/input, guys.</div><div><br></div></div></div>