In part 1 of this tutorial, we set up the Raspberry Pi and the TV HAT. The core Pi software and system should now be up to date and the TV Hat connected to an aerial. You should also ensure you have a valid TV Licence (if required) for your country.
Turn On, Tune In
With the hardware ready, it’s now time to begin the TV tuning software installation and setup. If you haven’t already reboot the Raspberry Pi and enter the Terminal for this next part.
Step 1 – To use the TV tuner, we need to install the TVheadend software. Open a Terminal session and enter the following:
sudo apt-get install tvheadend
Press Enter and ‘Y’ if necessary to confirm the installation.
Step 2 – As the installation continues, you will be presented with a configuration screen. Enter a username and password to enable access to the TVheadend server. Once entered, make a note of the web address access for the server. When accessing on the TV Pi, it’ll be http://localhost:9981/. If accessing from another computer on the network, use the Pi’s IP address. For example: http://192.168.1.223:9981/.
Step 3 – The remainder of the setup will now continue. It’ll take around three minutes to complete, depending on which model Raspberry Pi you’re using. When the setup has finished, you can exit the Terminal session.
Step 4 – You can now either open the web browser on the Pi, if you’re connected to the TV through the Pi, or, if you’re connecting remotely, open any web browser on your computer with the address from Step 2. If you don’t know the Pi’s IP address enter:
in the Terminal on the Pi. The inet entry is the Pi’s IP address. Here, the example is: 192.168.1.238.
Step 5 – For this example, we will assume you’re connecting remotely (from another computer on the home network). Enter the Pi’s IP address with the port 9981, e.g.: http://192.168.1.238:9981/. To start the Configuration Wizard: enter the username and password you set up from Step 2 and log in to the TVheadend Server, then set the Language and Language 1 options to your preference.
Step 6 – Click the Save & Next button to continue. You will need to enable network access to the server. Leave the Allowed Network field blank, but add an asterisk (*) in each of the other fields. Click Save & Next for the next step in the setup process.
Step 7 – For the Network Settings page, leave the first three fields blank, but use the pull-down menu to select DVB-T Network. The TVheadend server will already have pre-selected the Sony CXD2880 tuner (the TV HAT) from its available choices. Click the Save & Next button when ready.
Step 8 – For this next step you need to select the transmitter closest to your location. You can find the closest transmitter by entering your details at: http://www.digitaluk.co.uk/coveragechecker/. Simply choose the transmitter from the pull-down list. When ready, click on the Save & Next button. The TV HAT will now scan for all available TV signals from the chosen transmitter.
Step 9 – On the next screen, tick all three of the available boxes. Click the Save & Next box followed by the Finish button on the next screen; It’s recommended that you now reboot the Pi and when it’s fully rebooted, navigate back to the TVheadend server webpage.
Step 10 – The TVheadend server webpage will now display the list of available channels. After picking one, either click the title of the programme showing to expand the details, then click the Play Programme button to view its content, or click the small TV icon in the details column of the channel. You can now watch live TV across your home network.