Help with HDHomeRun Prime and Comcast
Added by Michael Wiz over 7 years ago
Hey all....
I'm currently running MythTV with a HDHR Prime box, cablecard, on Comcast, and getting my EPG from SchedulesDirect. I'd like to look into switching from myth to tvheadend, mostly because of the need of having a GUI with myth backend and having it a bit top-heavy. My frontend is Kodi...so it shouldn't make much of a difference.
I'm having complications in trying to set up tvheadend and actually how to do it. Does anybody have a good reference on HDHR Prime, Schedules Direct, and Comcast?
Thanks in advanced...
Replies (8)
RE: Help with HDHomeRun Prime and Comcast - Added by Robert Cameron over 7 years ago
There are MANY posts on the forum about using a Prime with TVH. Is there a particular step you are not understanding?
RE: Help with HDHomeRun Prime and Comcast - Added by luuthe . over 7 years ago
Hi Michael,
Using the HDHR Prime with a CableCard and TVH currently requires a different set of steps than non-CableCard HDHR tuners. The short of it is that you'll need to pass the HDHR's lineup to TVH via an Automatic IPTV Network.
The Automatic IPTV Network takes a list of streams in a .m3u file and populates the muxes and channels for each entry. A script such as this one: https://gist.github.com/JoshKastang/88d5081dfdbaaf04092c will help with that. Be sure to modify it to fit your environment.
Once you have the .m3u, create an Automatic IPTV Network. Configuration > DVB Inputs > Networks > Add : IPTV Automatic Network. If you don't see it listed then switch to a more recent build or the unstable branch. Otherwise, you can manually browse to your lineup:
http://<hd.hr.i.p>/lineup.htmland copy/paste the vchannel links into the regular IPTV Network.
Set "Maximum # of Input Streams" to 3
Set "URL" to file:///path/to/m3u.m3u
If everything goes well TVH should start scanning through your channels, and the Muxes and Services tabs should begin to fill up with information. Once the scan completes, confirm some channels (aka Services) are working by switching over to the Services tab and opening a couple Play links in a media player.
Click "Map Services", "Map all sevices". The Channels tab should now be populated.
For the EPG, goto Configuration > Channel/EPG > EPG Grabber Modules. I have only used the External XMLTV grabber. There's likely a way to use an internal grabber, so hopefully someone else can chime in.
The External XMLTV grabber will open up a unix named socket in your TVH directory ( epggrab/xmltv.sock ). Download your Schedules Direct data to a .xmltv file. I use mc2xml for this, but there are alternatives. Once downloaded, push it to xmltv.sock with socat, nc.openbsd, curl, or whatever else works for you:
cat xmltv.xml | socat - UNIX-CONNECT:/path/to/tvheadend/epggrab/xmltv.sock or cat xmltv.xml | nc.openbsd -U /path/to/tvheadend/epggrab/xmltv.sock -w 3 or curl -d @xmltv.xml -X POST -m 5 --unix-socket /path/to/tvheadend/epggrab/xmltv.sock http://google.com
When the data is in TVH, associate the EPG entries to their respective channels using either the Channels tab or the EPG Grabber Channels tab. This could happen automatically if the channel names from the HDHR match your EPG source. Once the channels and EPG sources are associated, push the EPG data to xmltv.sock once more, and the EPG data should be filled out. Future EPG updates can be run with a cron job.
RE: Help with HDHomeRun Prime and Comcast - Added by Michael Wiz over 7 years ago
Thanks for the responses. If this topic is brought up all the time, why not make a wiki page from it to help with those getting started?
The issue I'm having is the process of getting tvheadend working with schedulesdirect and importing the channel lineup. For me, I think this area is lacking on a clear process that is used and what it all means. Yes, I'm very new so maybe it makes sense to everybody else but me, but this is where I'm lost, and it seems like many users have unique ways of getting this to work.
I'll try the instructions above and a few other ones to see if I can't get this thing working.
Thanks!
RE: Help with HDHomeRun Prime and Comcast - Added by Robert Cameron over 7 years ago
I do not know where there is not a Wiki page yet for this topic. However, a search through the forums would have yielded several answers.
In general, what you are asking is a 2 step process. First, you need to make Tvheadend aware of how to tune the Prime. To make this easier, make sure you are using a recent/development build (4.1.x) of Tvheadend, as the Automatic IPTV Network type is not available and it is much easier to do this with that type of network.
A #EXTM3U B #EXTINF:-1 tvh-chnum="FIRST_TVHEADEND_CHANNEL_NUMBER",FIRST_TVHEADEND_CHANNEL_NAME C http://IP_ADDRESS_OF_PRIME:5004/auto/vFIRST_CABLE_CHANNEL_NUMBER B #EXTINF:-1 tvh-chnum="SECOND_TVHEADEND_CHANNEL_NUMBER",SECOND_TVHEADEND_CHANNEL_NAME C http://IP_ADDRESS_OF_PRIME:5004/auto/vSECOND_CABLE_CHANNEL_NUMBER
That's the general structure of the M3U playlist file. The line types (A, B and C) are there for reference. As you can see, line A is present only once as the first line of the file. Subsequent lines come in pairs of types B and C, where B describes the incoming stream/channel to Tvheadend, and C is that stream/channel itself. The portions of
FIRST_TVHEADEND_CHANNEL_NUMBER
, FIRST_TVHEADEND_CHANNEL_NAME
, IP_ADDRESS_OF_PRIME
and FIRST_CABLE_CHANNEL_NUMBER
are values that you supply. For example, here is the beginning one of my playlist files:#EXTM3U #EXTINF:-1 tvh-chnum="2",CBS http://10.0.21.5:5004/auto/v702 #EXTINF:-1 tvh-chnum="4",NBC http://10.0.21.5:5004/auto/v704 #EXTINF:-1 tvh-chnum="5",The CW http://10.0.21.5:5004/auto/v705 #EXTINF:-1 tvh-chnum="7",ABC http://10.0.21.5:5004/auto/v707 #EXTINF:-1 tvh-chnum="9",KCAL http://10.0.21.5:5004/auto/v709 #EXTINF:-1 tvh-chnum="11",FOX http://10.0.21.5:5004/auto/v711
As you can see from this example, I am telling Tvheadend about 6 channels:
- "CBS", which I want to be channel 2 in Tvheadend, but is channel 702 in my provider's lineup
- "NBC", which I want to be channel 4 in Tvheadend, but is channel 704 in my provider's lineup
- ...
Also in that example, you can see the IP address of the Prime I am using is10.0.21.5
: this is the IP address I have my router give to my Prime. The Prime does not support static IPs, therefore your only option for consistent IP addresses is to set up an IP reservation in your router's DHCP server.
After you've created your M3U playlist with all of the channels you want in Tvheadend, save it somewhere that the user that Tvheadend runs as is able to find.
Now, in Tvheadend, navigate to Configuration > DVB Inputs > Networks
, and click on the "Add" button. When you are presented with the Network Type dialog, select "IPTV Automatic Network".
Now, in order to create your Network, give it a name that with be displayed in the Tvheadend interface, make sure you set the "Maximum # input streams" to 3
, and set the "URL" to where Tvheadend can find the M3U playlist you just created. In the example below, note that there are 3 slashes after file:
because I am using an absolute path.
Once the network is created, Tvheadend will now create a Mux for each stream/channel in your playlist, and attempt to tune it to find Services. These services will be named with whatever you set as the channel name in the playlist. After Tvheadend finishes scanning all of the muxes, you can now map services onto Channels. Click over to the Services tap, click on Map, and select Map all services. This will create a Channel for each Service, named the same, and assigned the channel number you chose by setting the "tvh-chnum" attribute in the playlist.
RE: Help with HDHomeRun Prime and Comcast - Added by Robert Cameron over 7 years ago
Getting guide data into Tvheadend is a bit convoluted because for use with the Prime, there are no decent built-in options. Using Schedules Direct is the best source, and to get the data into Tvheadend itself it's best to the the tv_grab_zz_sdjson
grabber from the XMLTV project. Because of the many different prerequisites that different grabbers and modules have, it is probably easier to install the XMLTV tools from your distribution's repository.
Before using the grabber from within Tvheadend, you need to create a configuration file. The grabber will do this for you when you run tv_grab_zz_sdjson --configure --config-file /path/to/config/file
. Make sure that the location you are creating your config file in is accessible to both the user creating it, as well as the user that Tvheadend runs as. To be certain that both situations are met, it may be best to configure the grabber as that user.
The grabber will ask you for your Schedules Direct username, password, and then walk you through configuring the lineups and channels you wish to have the grabber download data for. Once you have the grabber configured, you need to restart Tvheadend. This will allow the system to rescan for grabbers, and find the tv_grab_zz_sdjson
script.
To configure Tvheadend to use the new grabber, go to the Configuration > Channel / EPG > EPG Grabber Modules
, and in the left-hand list, select the "Internal: XMLTV: Schedules Direct JSON API" grabber and mark it as "Enabled". Also, there is a field for "Extra arguments", in this field you should enter --config-file /path/to/config/file
, so the grabber knows where to find the configuration file you created in the previous step. After making your changes, click on "Save", and then "Re-run Internal EPG Grabbers" so Tvheadend will now get a list of the channels that you chose guide data for.
This will take some time initially. After Tvheadend completes this initial grab, you can switch over to the Configuration > Channel / EPG > Channels
tab, and from there associate each channel you created from the previous stage (the mapping of the Services onto Channels) to an "EPG Channel". After the channels have all been associated with the proper EPG channel, re-run the grabber manually once more to populate the guide.
(Sometimes Tvheadend needs to be restarted in order that the guide be properly populated, or the EPG channels properly created.)
RE: Help with HDHomeRun Prime and Comcast - Added by Reggie Burnett over 6 years ago
Robert Cameron wrote:
I do not know where there is not a Wiki page yet for this topic. However, a search through the forums would have yielded several answers.
First, you need to create a M3U playlist file that describes the channels you want to have available in Tvheadend. The general format of the file is:
In general, what you are asking is a 2 step process. First, you need to make Tvheadend aware of how to tune the Prime. To make this easier, make sure you are using a recent/development build (4.1.x) of Tvheadend, as the Automatic IPTV Network type is not available and it is much easier to do this with that type of network.
[...]
That's the general structure of the M3U playlist file. The line types (A, B and C) are there for reference. As you can see, line A is present only once as the first line of the file. Subsequent lines come in pairs of types B and C, where B describes the incoming stream/channel to Tvheadend, and C is that stream/channel itself. The portions ofFIRST_TVHEADEND_CHANNEL_NUMBER
,FIRST_TVHEADEND_CHANNEL_NAME
,IP_ADDRESS_OF_PRIME
andFIRST_CABLE_CHANNEL_NUMBER
are values that you supply. For example, here is the beginning one of my playlist files:
[...]
As you can see from this example, I am telling Tvheadend about 6 channels:
- "CBS", which I want to be channel 2 in Tvheadend, but is channel 702 in my provider's lineup
- "NBC", which I want to be channel 4 in Tvheadend, but is channel 704 in my provider's lineup
- ...
Also in that example, you can see the IP address of the Prime I am using is10.0.21.5
: this is the IP address I have my router give to my Prime. The Prime does not support static IPs, therefore your only option for consistent IP addresses is to set up an IP reservation in your router's DHCP server.After you've created your M3U playlist with all of the channels you want in Tvheadend, save it somewhere that the user that Tvheadend runs as is able to find.
Now, in Tvheadend, navigate to
Configuration > DVB Inputs > Networks
, and click on the "Add" button. When you are presented with the Network Type dialog, select "IPTV Automatic Network".Now, in order to create your Network, give it a name that with be displayed in the Tvheadend interface, make sure you set the "Maximum # input streams" to
3
, and set the "URL" to where Tvheadend can find the M3U playlist you just created. In the example below, note that there are 3 slashes afterfile:
because I am using an absolute path.Once the network is created, Tvheadend will now create a Mux for each stream/channel in your playlist, and attempt to tune it to find Services. These services will be named with whatever you set as the channel name in the playlist. After Tvheadend finishes scanning all of the muxes, you can now map services onto Channels. Click over to the Services tap, click on Map, and select Map all services. This will create a Channel for each Service, named the same, and assigned the channel number you chose by setting the "tvh-chnum" attribute in the playlist.
Robert
Are you using Comcast and are you using IPTV networks with your primes? I'm doing that (and have for some time) but now I'm seeing quite a few muxes actually not get turned into services and then not mapped to channels. And since we can't create services manually this leaves out channels. Are you seeing this? Btw, in the past I ticked the checkbox to accept zero value for TSID. Do you know what that means? Are you using that?
RE: Help with HDHomeRun Prime and Comcast - Added by Robert Cameron over 6 years ago
Reggie, perhaps if you emailed me directly we can solve your issues. Drop me a message to rob at rpcameron dot net.
RE: Help with HDHomeRun Prime and Comcast - Added by Reggie Burnett over 6 years ago
No matter what I try with 4.2.5 or 4.3 when I load my m3u files I get all the muxes but a handful of services are created with encypted set to false and those channels will not tune in Kodi. If it has the encrypted flag set to true then it will tune. but it's random. I can load the m3u and let it scan and 1405 (AMC) will have encrypted = false and will not scan. Drop the network, do it again and 1405 will be fine and a different one will be broken. It's acting like there are hiccups on parsing the stream from the http url and if it senses any hiccups then it fails.
Of course I have no idea why if encryption = false kodi can't tune it.