Mailing List Archive

Can't get external recorder (HauppaugeUSB/Colossus2) to start
TL;DR: I think “PID cache is empty” is the culprit but I can't fix it.


I've been struggling to get a Hauppauge Colossus2 working with MythTV
to replace an older s-video card I've been using. I'm using Poet's
HauppaugeUSB interface.

I /thought/ I'd set it up OK, and the HauppaugeUSB command line works
a treat outside of MythTV. But it just fails immediately for all
recordings (nomatter the tuning delay) and even more oddly is doesn't
seem to even /try/ to run my channel change script.

I can see in the logs that it successfully runs the external command
at about the right time, and also interrogates it at start-up.


After some diving through the code and a bit of
not-terribly-successful gdb-ing, I *think* the most pertinent error is:

E DTVChan[11](/usr/local/bin/hauppauge2 --config
/etc/hauppauge2.conf): SetChannelByString(106): PID cache is empty
E TVRec[11]: Failed to set channel to 106. Reverting to kState_None


I did then notice a possibly important step I'd missed when setting up
the card-source link: “Fetch channels from listing source” (whatever
that does?. I'm using the source I previously set up for the STB I've
connected.

However, when I go back into setup and select that, despite it saying
it'll take some time, it doesn't take very long (only a few seconds
before I can back out and save), and actually I get no feedback of it
doing anything. And it still then gives the same error.

I do now think that this lack of a “PID cache” is the problem, but
I've no idea now how to get past this.

Can anyone give me any pointers? Has missing that step before using
it the first time cocked it up?


One possible consideration is that I fetch my listings manually
(Schedules Direct) and then run mythfilldatabase from an external cron
script, so Myth itself may not be able to run mythfilldatabase
appropriately - I see mythtvsetup is running:

/usr/bin/mythfilldatabase --only-update-channels --sourceid 2 --cardtype
EXTERNAL --verbose all --loglevel debug, timeout=0

Is that necessary to work? I'm reusing the source that is set up for
the older card, so it's populated with channels and listing.


CentOS 8, MythTV 31 (new card added with this version)

--
[phoenix@fnx ~]# rm -f .signature
[phoenix@fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[phoenix@fnx ~]# exit

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't get external recorder (HauppaugeUSB/Colossus2) to start [ In reply to ]
On Sat, Jun 13, 2020 at 11:01 AM Neil Bird <lists@fnxweb.com> wrote:

> TL;DR: I think “PID cache is empty” is the culprit but I can't fix it.
>
>
> I've been struggling to get a Hauppauge Colossus2 working with MythTV
> to replace an older s-video card I've been using. I'm using Poet's
> HauppaugeUSB interface.
>
> I /thought/ I'd set it up OK, and the HauppaugeUSB command line works
> a treat outside of MythTV. But it just fails immediately for all
> recordings (nomatter the tuning delay) and even more oddly is doesn't
> seem to even /try/ to run my channel change script.
>
> I can see in the logs that it successfully runs the external command
> at about the right time, and also interrogates it at start-up.
>

When you test your external channel changing script, make sure you do it as
the same user that runs mythbackend. i.e.:

> sudo -umythtv /usr/local/bin/my-channel-changer.py
>

Permissions are a common problem.
Also, make sure your channel change script returns a zero status, otherwise
mythtv will assume it failed.
If the channel change script fails then everything else will.

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`


> After some diving through the code and a bit of
> not-terribly-successful gdb-ing, I *think* the most pertinent error is:
>
> E DTVChan[11](/usr/local/bin/hauppauge2 --config
> /etc/hauppauge2.conf): SetChannelByString(106): PID cache is empty
> E TVRec[11]: Failed to set channel to 106. Reverting to kState_None
>
>
> I did then notice a possibly important step I'd missed when setting up
> the card-source link: “Fetch channels from listing source” (whatever
> that does?. I'm using the source I previously set up for the STB I've
> connected.
>
> However, when I go back into setup and select that, despite it saying
> it'll take some time, it doesn't take very long (only a few seconds
> before I can back out and save), and actually I get no feedback of it
> doing anything. And it still then gives the same error.
>

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.


> I do now think that this lack of a “PID cache” is the problem, but
> I've no idea now how to get past this.
>
> Can anyone give me any pointers? Has missing that step before using
> it the first time cocked it up?
>
>
> One possible consideration is that I fetch my listings manually
> (Schedules Direct) and then run mythfilldatabase from an external cron
> script, so Myth itself may not be able to run mythfilldatabase
> appropriately - I see mythtvsetup is running:
>
> /usr/bin/mythfilldatabase --only-update-channels --sourceid 2 --cardtype
> EXTERNAL --verbose all --loglevel debug, timeout=0
>
> Is that necessary to work? I'm reusing the source that is set up for
> the older card, so it's populated with channels and listing.
>

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.

John
Re: Can't get external recorder (HauppaugeUSB/Colossus2) to start [ In reply to ]
On 13/06/2020 21:30, John P Poet wrote:
> 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.

Thanks for the reply, John, much appreciated, as is your Hauppauge
wrapper!

The channel script is fine, it's an adaptation of the older one I was
using with an IguanaIR reader/blaster, but edited to run sky-remote-cli
to network-control my SkyQ box. I pretty much managed to prove it
wasn't even being run for some reason.


I can't explain it, but on a whim I created a brand new Source, and
populated it afresh, hands-off, with mythfilldatabase, then attached my
new card to that instead of the older source.

And that seems to have worked!


I guess there's something in that old source (that I've been dragging
around in my Myth config. since 2004!) that something just didn't like.
Pass; from what I know, it should have just worked by attaching it to
the new card. The old source was back from when lots of things had to
be manually curated, especially STB-related stuff, so I've been very
wary of fiddling with my old Sky [UK satellite STB] settings, and the
listings fetching is heavily controlled.

I've largely left the satellite side of things untouched since way
back then, I'm only having to change now since I moved house and had to
get a SkyQ box because of a fresh dish installation (vs. the very old
1st. gen pre-Sky+ digibox I've been using).


Nomatter, it looks like it's happy, and I'm running a flurry of test
recordings now, the two of which have happened so far seem happy. I can
wipe out the old card and source and related scripting in a few days
when it's bedded down.

With a big side benefit that since I can use the new source without
trying to be too careful any more, I think mythfilldatabase+SD will
correct the channel numbers when Sky feck around with them (instead of
me manually having to do it when I notice recordings aren't right).

I'm currently a very happy chappy.

Thanks again.

--
[phoenix@fnx ~]# rm -f .signature
[phoenix@fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[phoenix@fnx ~]# exit
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org