<div dir="ltr"><div dir="ltr">On Sat, Jun 13, 2020 at 11:01 AM Neil Bird <<a href="mailto:lists@fnxweb.com">lists@fnxweb.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">  TL;DR:  I think “PID cache is empty” is the culprit but I can't fix it.<br>
<br>
<br>
  I've been struggling to get a Hauppauge Colossus2 working with MythTV<br>
to replace an older s-video card I've been using.  I'm using Poet's<br>
HauppaugeUSB interface.<br>
<br>
  I /thought/ I'd set it up OK, and the HauppaugeUSB command line works<br>
a treat outside of MythTV.  But it just fails immediately for all<br>
recordings (nomatter the tuning delay) and even more oddly is doesn't<br>
seem to even /try/ to run my channel change script.<br>
<br>
  I can see in the logs that it successfully runs the external command<br>
at about the right time, and also interrogates it at start-up.<br></blockquote><div><br></div><div>When you test your external channel changing script, make sure you do it as the same user that runs mythbackend. i.e.:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><span style="font-family:monospace">sudo -umythtv /usr/local/bin/my-channel-changer.py</span></div></blockquote><div><br></div><div>Permissions are a common problem.</div><div>Also, make sure your channel change script returns a zero status, otherwise mythtv will assume it failed.</div><div>If the channel change script fails then everything else will.</div><div><br></div><div>If you just want to get past the channel change and see if it works, set your channel change script o just be `/bin/true`<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
After some diving through the code and a bit of<br>
not-terribly-successful gdb-ing, I *think* the most pertinent error is:<br>
<br>
 E  DTVChan[11](/usr/local/bin/hauppauge2 --config<br>
/etc/hauppauge2.conf): SetChannelByString(106): PID cache is empty<br>
 E  TVRec[11]: Failed to set channel to 106. Reverting to kState_None<br>
<br>
<br>
  I did then notice a possibly important step I'd missed when setting up<br>
the card-source link:  “Fetch channels from listing source” (whatever<br>
that does?.  I'm using the source I previously set up for the STB I've<br>
connected.<br>
<br>
  However, when I go back into setup and select that, despite it saying<br>
it'll take some time, it doesn't take very long (only a few seconds<br>
before I can back out and save), and actually I get no feedback of it<br>
doing anything.  And it still then gives the same error.<br></blockquote><div><br></div><div>I am guessing everything is actually fine with your guide information. The fact that it gives a valid channel number (106) is a good sign.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I do now think that this lack of a “PID cache” is the problem, but<br>
I've no idea now how to get past this.<br>
<br>
  Can anyone give me any pointers?  Has missing that step before using<br>
it the first time cocked it up?<br>
<br>
<br>
  One possible consideration is that I fetch my listings manually<br>
(Schedules Direct) and then run mythfilldatabase from an external cron<br>
script, so Myth itself may not be able to run mythfilldatabase<br>
appropriately - I see mythtvsetup is running:<br>
<br>
/usr/bin/mythfilldatabase --only-update-channels --sourceid 2 --cardtype<br>
EXTERNAL --verbose all --loglevel debug, timeout=0<br>
<br>
  Is that necessary to work?  I'm reusing the source that is set up for<br>
the older card, so it's populated with channels and listing.<br></blockquote><div><br></div><div>I am betting your whole problem is an issue with the channel change script. If you are sure it is working okay, then please post a complete log from mythbackend. Run mythbackend with "-v channel,record" to get good information. Also, the log from hauppauge2 could be useful as well.</div><div><br></div><div>John<br></div></div></div>