Recently we switched our MythTV system from using satellite to terrestrial reception using the HDHomeRun by SiliconDust. Unfortunately what had been a perfectly working EPG under satellite turned into a one day wonder under terrestrial – I could only see one days listing.
I should point out that we live in New Zealand and the problems may be influenced by the particular setup we have here. I am running MythTV 0.25, Fedora 16, Intel core i7 , 6GB RAM with an HDHomeRun.
I have tried to get EPG, Electronic Program Guide, working for a while without much success and gave up. Recently though I gave it another go with more sucess. Now it seems to be fine, albeit without the all the detail like categories and this is my story on what I did. It’s written in hindsight and so possible there are some mistakes.
Resources
MythTV NZ mailing list:
mythtvnz@lists.linuxnut.co.nz
Post to MythTV NZ mailing list by Paulgir
http://lists.ourshack.com/pipermail/mythtvnz/2012-January/012377.html
Hans from Nice Technology
http://nice.net.nz/
Background
Getting the EPG from New Zealand terrestrial in MythTV has been a problem for a while with various theories about why.
After trying for sometime to get the EPG from the DVB-T broadcast I reluctantly decided to get my listings from http://www.epg.org.nz/ – the pragmatic solution. At epg.org.nz they produce an xml file containing most of TV channels in NZ and their tv listings for the next 8 days. The MythTV grabber downloads the listings and inserts the listings into MythTV.
Steps
Having a combination of satellite and terrestrial receivers seems to cause problems it certainly did for me. My suggestion would be to stick to one or the other if possible. This post assumes you are only using terrestrial and in my case a HDHomeRun.
To make things simpler we will refer to the user that runs mythbackend as the “mythtv user”.
1. | Download a copy of ‘tv_grab_nz-py’ from http://nice.net.nz/tv_grab_nz-py/ | ||||||
2. |
Some people have reported problems with the script and in the process of trying to get it working for me, I took these suggestions and edited the script:
|
||||||
3. | The above changes aren’t a perfect solution but made it work for me. So there is a good chance you might be able to enhance it further.With many thanks to Hans from Nice Technology, my version of the script can be found here: tv_grab_nz-py_tp.zip (Obviously it will need to be unzipped) | ||||||
4. | You need to put this script somewhere in the PATH of the mythtv user. So just run “env” to find the path and copy this script to somewhere in the path and give it execute rights and full permissions to themythtv user. I have tested this point and it does appears that “mythtvtv-setup” searches the path of the mythtv user.Also the filename must start with “tv_grab_” you can have what you want after that.
Recently I have found that it worked for me to put it in the “HOME” folder for the user that runs mythbackend. In my case this was “/var/lib/mythtv” |
||||||
5. | Login to your MythTV backend server and login as the mythtv user. then start the “mythtv-setup”. | ||||||
6. | |||||||
7. | Then select or create your video source and edit it. | ||||||
8. | In the drop-down for “Listings grabber” you should select “New Zealand”: | ||||||
9. | Next you need to create a config file in the home directory of the mythtv user. This needs to have exactly the same name as the “Video source name” you choose. In our case our source above is “HDHomeRun” so our config file is:
~/.mythtv/HDHomeRun.xmltv I haven’t tested it but I suspect you need to get the capitalization correct too. There are a number of ways to do this.
I did mine by running the script as the mythtv user. I tend to suspect creating the config file by hand might actually be the easiest, but then you need to know how to construct it. The “*.xmltv” is a list of channels. To give you an idea this is part of the contents of my HDHomeRun.xmltv: channel=aljazeera.freeviewnz.tv channel=tv1.freeviewnz.tv channel=tv-rotorua.freeviewnz.tv channel=tv2.freeviewnz.tv channel=tv2-plus1.freeviewnz.tv channel=tv2-plus1.freeviewnz.tv channel=tv3.freeviewnz.tv channel=tv33.freeviewnz.tv channel=tv3-plus1.freeviewnz.tv channel=tv9.freeviewnz.tv channel=tv-central.freeviewnz.tv channel=tvnz7.freeviewnz.tv channel=tv1-plus1.freeviewnz.tv channel=tvsn-shopping-channel.freeviewnz.tv channel=u.freeviewnz.tv |
||||||
10. | Now you need to map the channels in the “tv_grab_nz_py” script with the channels that you receive from your terrestrial broadcast.
So from the backend setup select “Channel Editor”: |
||||||
11. | Once you are in the editor you should probably sort the list. Click on the “Sort Mode” input box and use the left and right arrows to select “Channel Number:: | ||||||
12. | Highlight the channel you wish to edit and push “Enter”:As an aside one thing that eluded me for ages was how to delete one channel – simply select it and press “D”. | ||||||
13. | Once you are in the “Channel Options | Common” screen look for the field “XMLTV ID” field. You need to edit this so it matches you “*.xmltv” file (in my case “HDHomeRun.xmltv”).So in the below example, I am editing the TV3 channel and in my “HDHomeRun.xmltv” file I have:
channel=tv3.freeviewnz.tv So you need to put in “tv3.freeviewnz.tv” as below: |
Troubleshooting
It’s really handy to run “mythfilldatabase” from a terminal and look at the output. For example if you see:
No channels are configured to use grabber.
Then this means you have probably not edited the channels, as per the last few steps above or you have made a mistake in this area. Possibly the *.xmltv file is incorrect in some way.
You may also see:
Unknown xmltv channel identifier: c4.freeviewnz.tv - Skipping channel.
Which indicates that while “c4.freeviewnz.tv” exists in your *.xmltv file it is not configured in any of the channels in the channel editor.