Kodi Community Forum

Full Version: Baffled: beginner trying to get a R-Pi TV HAT to work with Kodi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all

I'm new here and absolutely all at sea with Linux so please be gentle with me and lead me by the hand (or even the nose) - I know I don't know the basics. 

I'm in the UK, using a Raspberry Pi 4 and a TV Hat. I am in a good signal area. I started with a clean install of whatever-it-is that the Raspberry Pi Foundation suggests I use as an OS. I've installed and got TVheadend to work and I can receive off-air digital TV using TVheadend and VLC. So I know the basic system is working. That has taken me about two weeks (I said I don't even know the basics and this stuff is hard).

I followed the instructions to install Kodi and it appears to have installed OK - I can certainly get it to run and give me what I think of as big-picture menus. Dark grey on the left, blue on the right, that sort of thing.

I have read through the PVR section on the Kodi Wiki. It seems to make some sort of sense: 1) install the tuner hardware (Pi TV Hat), 2) install the backend (TVheadend) and check it works - yes, OK so far. But that's where it all goes wrong: the instructions say that 3) I need to install a PVR add-on and that they're located in Settings > Add-ons > Install from repository > PVR clients

Trouble is, there ain't no PVR clients option. What I see there (Add-ons / Kodi Add-on repository) is

Context menus
Game add-ons
Information providers
Look and feel
Music add-ons
Picture add-ons
Program add-ons
Video add-ons
Web interface

But no PVR category (and I've been down all the rabbit-holes looking to see if it's hidden inside, say, Weather. It wasn't.)

Can anyone, very gently, give me some idea of what I may be doing wrong? I have tried searching the Forum but to no avail, not least because 'Pi' is too short to be acceptable as a search term, as is 'hat' or even 'R-Pi'. 

Ancient Kung Foole Proverb: Linux is like Klingon - but with all the soft fluffy bits taken out.
Yeah, the Linux variants don't ship with the PVR addons, you need to install them from a repository, in the same way that you installed Kodi.

So probably what you want to do (in a terminal) is sudo apt-get install kodi-pvr-hts which should install the tvheadend client.
As a simple alternative, install Libreelec on your Raspberry Pi 4 and everything you need is included.
Thank you both for responding.

I installed kodi-pvr-hts, with no errors, then rebooted.

In the Kodi main menu I select TV and get the message 'You did not set up a PVR yet [...]" followed by a button, Enter add-on browser, which I clicked.

This took me to

Add-ons / PVR clients

(which is an improvement from last time)  but the list is empty, save for two dots. Clicking on the two dots takes me to the same list I had before (though it calls itself Add-ons / All repositories), with no sign of an entry relating to PVR. Which is odd because I'd just come from there.

As to  why I am not using Libreelec, I did try that. I forget the details but I was unable to get Libreelec to talk to or recognise the TV HAT. But it was early in my two weeks of battering my head against this particular brick wall.

Any and all further suggestions will be most welcome.

Ancient Kung Foole Proverb: Linux is like Klingon - but with all the soft fluffy bits taken out.
@Ultrapurple No need to add a line & a text as a tagline in each of your posts. You can do that in your signature via your personal settings.
(2021-11-26, 11:35)Klojum Wrote: [ -> ]@Ultrapurple No need to add a line & a text as a tagline in each of your posts. You can do that in your signature via your personal settings.

Only once you have made ten posts - I checked  Cool

Post three and counting.

Just zis guy, you know?
Hmm... Perhaps they upped the anti-spam measures. Okay.

BTW, have you already visited the LibreELEC forum for your question? Not all LE devs are here on a daily basis.
@Klojum - no, I haven't gone to the Libreelec forum (yet), having at least temporarily abandoned that path. 

All of this started, by the way, with my modest collection of miniature TVs, all of which are analogue. A Raspberry Pi Zero and TV HAT is about the same size as two AA batteries and I figured it might be possible to use the battery compartment space (in most cases 4 x A) to house a Pi Zero, TV HAT, homebrew low power modulator and two small Li-ion cells to retain portability. I believe the analogue video output of the Pi can be set to NTSC, which would be ideal for my US sets. I live in a strong TV signal area so coupling the TV HAT aerial input to the set's own telescopic antenna would be all that's required. I don't want to break into the TVs to feed in baseband video and most of them don't have AV inputs. 

But it's all proving a good deal more difficult to get the TV HAT part running so I may well end up going back to my first thoughts, a couple of old set-top boxes feeding via HDMI > NTSC converters into commercial VHF modulators and a couple of milliwatts of amplification to give a service range of a few feet. I'm very much at home with the video and RF side of things.

What? No .SIG?
If TVHeadend is setup and channels scanned in then sounds like all you are missing is configuring the hts addon in Kodi.   Addons, My addons, PVR clients. Select TVHeadend HTS Client the bring up the context menu and information.  Make sure it is enabled then configure the IP to find the server and username password details.
For the Pi TV Hat to work with Kodi you need two things set-up.

1. PVR BackEnd/Server - something like TV Headend, VDR, MythTV etc.  Most of us in these parts use TV Headend.  This runs the code that will allow the TV Hat (which is DVB-T/T2 only) to tune and demodulate digital TV broadcasts, stream them to clients (*), record them etc.  It can run on the same machine as Kodi or it can run on a different machine on the same network.
2. PVR FrontEnd - which connects to the BackEnd/Server over the network (or locally if running on the same machine) and accesses the recordings or act as a client to the live streams ( * mentioned above)

You also need your OS on your PVR BackEnd/Server to have driver support for your tuner if it's a locally USB/PCI/PCI-E etc. connected device - and in some cases the correct firmware for the tuner to be downloaded too. 

LibreElec on a Pi will allow you to run the TV Headend backend (it's a 'Service' in the Add On list) and the TV Headend PVR front end (it's a 'PVR Client' or 'Frontend' in the Add On list I think). It includes the drivers for the TV Hat.

You might find the overhead of running both on a Zero or Zero W a bit much, but a Zero 2W should be fine!