I found setting this up agonizing. Dozens of forum threads, lots of questions about this, a tiny crumb of a clue here and there, but no real answers! So after finally getting it working, I feel obliged to write down what I did so that those that are next looking for these answer might find this post. I would have posted this in the openelec forum, but the registration process there wouldn’t work for me. This forum doesn't use rich formatting, so it ended up looking a bit clunky. Oh well.
The best post was probably this one by M B in this forum: https://www.lonelycoder.com/redmine/boards/14/topics/3368
You will need a second computer for this. Let’s call the openelec machine computer 1. Unless stated otherwise, almost everything is done on the non-openelec machine (computer 2). Computers 1 and 2 should be on the same LAN.
My openelec machine (computer 1):
Asus m2npv-vm (a repurposed Captiveworks 3000HD)
openelec 1.95.5 running on a 4GB Kingston USB stick
tvheadend 0.90.0.5265.ga257d
HDhomerun connected to same router, ATSC antenna in Toronto Canada
My Computer 2:
Ubuntu 12.04
1. in XBMC (computer 1):
System > Settings > Addons > openelec mediacenter os addons > Program Addons > hdhomerun (if you don’t have a HDHomerun, just skip this step)
install if needed
consider a reboot if just installing this now
consider checking on HDhomerun status by running “HDHomerun Config GUI” on computer 2.
System > Settings > Addons > Get Addons > All Addons > Services > hts-tvheadend
install
then once installed configure
under XMLTV, change location to “/storage/xmltv.xml”
System > Settings > Addons > installed Addons > PVR clients > Tvheadend HTSP Client
install
then once installed configure
just make sure that the IP address is the same as the openelec machine (Settings > system info)
2. to enable SSH access on Computer 1:
on Computer 2, look for the networked SMB share on machine “openelec”
create a blank file called “ssh_enable” in folder “configfiles”
3. to access settings for tvheadend (computer 2):
in a browser:
http://<ip_address_of_computer_1>:9981
Configuration > TV Adapters > Select TV Adapter >
Choose the first one from the drop-down
if your drop-down is blank, you will need to follow a different guide first!
Click “Add DVB Network by location”
for me I chose “United States > ATSC-center-frequencies-8VSB”
on the right side it should find some muxes... wait until the “muxes awaiting initial scan” falls to 0
Now click “Map DVB services to channels”
after awhile, there should be a list of channels under the tab “Services”, with stuff filled in the “Service Name” column that must have come from the ATSC stream
the stuff under the “Channel Name” column is blank, but we’ll come back to that later
4. to get an XML file with EPG data in it, there are 2 ways that worked for me:
option 1, go to
http://mc2xml.hosterbox.net/
download the mc2xml file for your OS. Check out the examples down the page
for Windows, I says it brings up a GUI to ask your postal code
for Linux, from a terminal type “mc2xml -c ca -g X1X1X1” (I’m in Canada, use your own postal code)
this should create a file called xmltv.xml in the same folder that mc2xml was run on Computer 2
option 2, use “tv_grab_na_dd”, which requires a subscription to SchedulesDirect
on Ubuntu, for me this required installing “xmltv-util” from the software centre
from a terminal type “tv_grab_na_dd --configure”
you can enter your username and password for SchedulesDirect
you can choose the ATSC lineup from your SchedulesDirect account
now type “tv_grab_na_dd --out ~/xmltv.xml”
this will put a file xmltv.xml in your Home folder on Computer 2
neither method worked for me trying to run it from Computer 1
5. to get at the channels found in step
#3
to show up in XBMC, they need names in the “Channel Name” column in TVheadend. But the exact names are also important to populating the EPG data, so:
open up the xmltv.xml file in a text editor, and look at the labels for each display name. ie for me the first one is “12 CHEX”. I always used the first listed name for each channel.
look in tvheadend under the Services tab at the Service Names
So firstly there is no CHEX in tvheadend. For me the first one in BOTH xmltv.xml and tvheadend is “4-1 WIVBDT”, so in tvheadend for service named WIVB-HD double-click the cell under the Services column, and enter in “4-1 WIVBDT”. Don’t forget to “Save changes”
keep going until you have all the ones entered that you want. Some may not be tunable channels, and you may want to delete them later. Yes, all this is tedious.
6. to get EPG data to populate within tvheadend (and XBMC):
copy the xmltv.xml from Computer 2 to Computer 1 into the folder “/storage/” (or you can try somewhere else, it should match what was in Step
#1@, but this is what worked for me)
within tvheadend, go to “Configuration > XMLTV”
click “Save configuration”
this launches the script “tv_grab_file” which will now look for the xmltv.xml file that you put in /storage/, and if the Channel Names match the data, the EPG will be populated. Look at the log at bottom of screen, it should be a number more than 0 for entries into EPG
7. in XBMC (Computer 1):
LiveTV > TV channels
every channel you manually entered in Step @#5
should be listed there! Select one and if it's tunable you should be watching TV!
8. in TVheadend (computer 2):
Configuration > Digital Video Recorder
consider changing the location to record TV (since if you’re like me and running openelec off of a USB key, it won’t hold very much)
every hard drive that is mounted in XBMC should be listed on computer 1 in folder /media/
ie. “/media/500GB/TV/recordings”
choosing programs to record works from either XBMC or tvheadend
That’s it!
Happy TV watching!
III_D