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.
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:
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 is
10.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".
!https://rpcameron.net/hdhr/select_network_type.png!
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.
https://rpcameron.net/hdhr/network_settings.png
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.