4 minutes
Tvheadend and Kodi
I recently installed a Hauppage TV tuner card and wanted to hook it up to my Kodi box. It took a long time of trial and error and I wanted to save the instructions for posterity so that others may get up and going sooner than I did.
Step 1 - Installing the card
The card I got was a Hauppage 1196 HVR-1265. I got the card because of its Linux support. It’s a decent card, but it does come in at a hefty $70 USD, so it’s not the best value.
To get Linux to see it, you’ll need to see this page on their website and install the PPA. Follow the instructions, install their custom kernel, and reboot.
After that, run sudo apt install kodi-pvr-hts
to install the TVHeadEnd plugin.
Step 2 - Install the software
There are two ways to install the TVHeadEnd software: snap and PPA. You may be able to use the snap version with the below instructions, but when I tested the snap version, I didn’t know what I know now and so I was unable to get it to work.
To install the snap version, run sudo snap install tvheadend
.
The website, is a tad outdated as it says that Artful, Zesty, Yakkety, and Xenial (none of these are currently supported anymore). However, I can confirm that there is support for Focal (20.04), as shown by the Launchpad website.
To install the PPA run sudo apt-add-repository ppa:mamarley/tvheadend-git
. On 20.04, the the repositories update for you. Then run sudo apt install tvheadend
.
The PPA version creates a user named hts
. Put the user in the videos
group and make it harder for any bad actors to log into that account by running sudo usermod hts -aG video -s /sbin/nologin
. Reboot for the changes to take effect.
Step 3 - Configuration
Now go to the IP Address of the Kodi box. This will be referred to as KODI-IP in this document, but you can find it by going to Kodi > Settings > System Information > Network
. Once you have the IP Address to your Kodi box, open a web browser and navigate to $KODI-IP:9981
. The 9981 is the webconsole port for the TVHeadEnd software.
Create a web admin user for administration. This can be any username and password that you want. I stuck with my desktop login information.
Set up a network by navigating to Configuration > DVB Inputs > TV Adapters
. Since my card is hooked up to a Digital Antenna for OTA Digital channels, so I only set up the with a ATSC-T adapter for the ATSC-T Network. The defaults should be fine, but you do have to select ATSC-T Networks
in the Networks drop-down.
After that, navigate to Configuration > DVB Inputs > Networks
and Add
a network. Feel free to add Pre-defined Muxes that are the closest to your geographical location.
Don’t worry if you don’t have a lot of channels in the Configuration > DVB Inputs > Services
tab, it takes a while for the software to scan through the channels. I started with 7 channels, but it jumped to 50 after I let it sit overnight. You can check the status of the scan in the Configuration > DVB Inputs > Muxes
tab. Look for the Scan results
column to see if it says OK or FAIL.
The final configuration in the web GUI is the user. Navigate to Configuration > Users > Passwords
and create a new user. This information is arbitrary, so hts
or kodi
for both username and password are fine.
Once the user is created, naviage to Configuration > Users > Access Entries
and create an entry with the same username you just created. IMPORTANT: You have to actually give the access you want to the user, you cannot just leave the entry blank. That said, if you did give this user a generic name and password, I would not give them Web interface or Admin rights.
With those to steps, go to Kodi and navigate to Settings > Add-Ons > PVR > TVHeadEnd > Configure
and enter the kodi
/hts
username and password from above.
Once the channels populate in Configuration > DVB Inputs > Services
, add or remove the channels you care about, then Click Map services > Map all Services
. These channels can now be found under Configuration > Channel/EPG > Channels
and can be edited to your liking.
This guide was complete as of 5/17/2021.