Page 1 of 1

Channel not found in database

Posted: Mon Jun 11, 2018 9:19 pm
by dalewking
I was a long time Windows Media Center user and now that Micro$oft no longer supports it I am trying to convert to MythTV. I did a fresh install of Mythbuntu and am trying to get it working with a HD HomeRun dual tuner box but it doesn't want to tune telling me the channel is not found in the database. I have followed several of the setup guides (including the one on MythTV wiki) but no luck.

If I try to watch live TV I get the Please Wait flash that immediately dumps me back to the menu. Recording does not work either. Here are the type of messages I see in the backend log:

Jun 11 08:55:54 HTPC mythbackend: mythbackend[794]: I TVRecEvent tv_rec.cpp:1073 (HandleStateChange) TVRec[1]: Changing from None to WatchingLiveTV
Jun 11 08:55:54 HTPC mythbackend: mythbackend[794]: I TVRecEvent mythdbcon.cpp:422 (PurgeIdleConnections) New DB connection, total: 9
Jun 11 08:55:54 HTPC mythbackend: mythbackend[794]: E TVRecEvent channelutil.cpp:1889 (GetChannelData) GetChannelData() failed because it could not#012#011#011#011find channel number '13.1' in DB for source '2'.
Jun 11 08:55:54 HTPC mythbackend: mythbackend[794]: E TVRecEvent recorders/channelbase.cpp:179 (IsTunable) ChannelBase[1]: IsTunable(13.1) Failed to find channel in DB on input '1'
Jun 11 08:55:54 HTPC mythbackend: mythbackend[794]: E TVRecEvent channelutil.cpp:1889 (GetChannelData) GetChannelData() failed because it could not#012#011#011#011find channel number '13.1' in DB for source '2'.
Jun 11 08:55:54 HTPC mythbackend: mythbackend[794]: E TVRecEvent recorders/channelbase.cpp:179 (IsTunable) ChannelBase[1]: IsTunable(13.1) Failed to find channel in DB on input '1'
Jun 11 08:55:54 HTPC mythbackend: mythbackend[794]: E TVRecEvent recorders/channelbase.cpp:134 (Init) ChannelBase[1]: Setting start channel '13.1' failed, #012#011#011#011and we failed to find any suitible channels on any input.
Jun 11 08:55:54 HTPC mythbackend: mythbackend[794]: I TVRecEvent tv_rec.cpp:3563 (TuningCheckForHWChange) TVRec[1]: HW Tuner: 1->1
Jun 11 08:55:54 HTPC mythbackend: mythbackend[794]: I TVRecEvent tv_rec.cpp:3685 (TuningFrequency) TVRec[1]: TuningFrequency
Jun 11 08:55:54 HTPC mythbackend: mythbackend[794]: E TVRecEvent channelutil.cpp:1889 (GetChannelData) GetChannelData() failed because it could not#012#011#011#011find channel number '13.1' in DB for source '2'.
Jun 11 08:55:54 HTPC mythbackend: mythbackend[794]: E TVRecEvent recorders/dtvchannel.cpp:219 (SetChannelByString) DTVChan[1](10327083-0): SetChannelByString(13.1): Unable to find channel in database.
Jun 11 08:55:54 HTPC mythbackend: mythbackend[794]: E TVRecEvent tv_rec.cpp:3763 (TuningFrequency) TVRec[1]: Failed to set channel to 13.1. Reverting to kState_None
Jun 11 08:55:54 HTPC mythbackend: mythbackend[794]: I TVRecEvent tv_rec.cpp:1073 (HandleStateChange) TVRec[1]: Changing from WatchingLiveTV to None

13.1 is in my list of channels in the channel editor in the backend setup app. Not sure what to try next.

Re: Channel not found in database

Posted: Mon Jun 11, 2018 9:26 pm
by bill6502
I'd check to see if you really have two sources, e.g. one for Over-The-Air
and one for Cable. At least in this case, 13.1 is on source 2.

Re: Channel not found in database

Posted: Wed Jun 13, 2018 1:45 am
by dalewking
I went poking around in the database, and all the channels in the channel table have sourceid = 1 so there are no channels on source 2. But I am assuming that when it talks about source 2 that would be defined in the videosource table and that only has one source:

Code: Select all

mysql> select * from videosource;
+----------+---------+------------------+-----------+-----------+----------+-----------+--------+------------+------------+
| sourceid | name    | xmltvgrabber     | userid    | freqtable | lineupid | password  | useeit | configpath | dvb_nit_id |
+----------+---------+------------------+-----------+-----------+----------+-----------+--------+------------+------------+
|        1 | Antenna | schedulesdirect1 | ********* | us-bcast  | PC:46032 | ********* |      0 | NULL       |         -1 |
+----------+---------+------------------+-----------+-----------+----------+-----------+--------+------------+------------+
1 row in set (0.00 sec)

Re: Channel not found in database

Posted: Wed Jun 13, 2018 2:39 am
by bill6502
Right you are, about videosource. Here's the actual query (for v30-Pre) as I don't know
what version you're running. But it should be close.
https://code.mythtv.org/cgit/mythtv/tre ... .cpp#n1846
Line 1924 is the error message from above.

You'll see that only the channel and videosource tables are in play for the error
message. Although the sourceid is passed to ChannelUtil::GetChannelData. I
can't tell what is setting the sourceid now.

I'd stop the backend and then start it from the command line like this:

Code: Select all

sudo mythbackend --user mythtv --logpath /tmp --loglevel debug -v channel,record
Attach the full log found in /tmp if what's there doesn't help find the issue. You'll also
see that the log in /tmp has more information than the console.

Re: Channel not found in database

Posted: Wed Jun 13, 2018 4:39 am
by dalewking
After lots more attempts I somehow got it working and now can get live tv and record. On to the next hurdle of getting MCE remote and MCE keyboard working through my WinTv-HVR-2250 card.