Project

General

Profile

connecting kodi and tvheadend in opensuse

Added by Dave H over 6 years ago

I'm pretty new to the whole world of PVRs etc on linux, though familiar with linux itself. I run opensuse, currently leap 15.0.

I've installed tvheadend (4.2.6-lp150.1.1 from opensuse) and I got that running fairly quickly. I also installed kodi (17.6-lp150.3.6 from packman) and that runs and happily plays .ts files that I have recorded using tvheadend.

What I haven't managed to get working is the Kodi PVR link to tvheadend.

I installed kodi.binary-addons-pvr.hts (17.6-lp150.1.10 from packman) but if I go to the Kodi Add-ons menu it says I don't have any installed yet. If I then enter the add-on browser and got to My add-ons and then to PVR clients I can see Tvheadend HTSP Client. If I enter that I see a configuration screen. Along the bottom are six buttons:
Run (greyed out)
Configure
Update
Auto-update (with an icon of a switch turned off, I think)
Enable (with a tick icon)
Uninstall (greyed out)

If I go into configure I see a bunch of parameters that look sensible (although I only recognize a few of them) and if I then click OK I'm taken back to the previous screen.

The update button says no updates are available.
The enable button changes to Disable if I click on it. I'm not clear whether the button is telling me what I can do (i.e click on Enable to enable it) or is reporting the current status (i.e. click on Enable to disable it)? But whatever I do makes no difference to the greyness of the Run button.

I'm assuming that I need to make the run button light up and then press it, but I don't see how to do that. Nor do I know if my assumption is correct.

Help! Pretty please :)


Replies (8)

RE: connecting kodi and tvheadend in opensuse - Added by Robert Cameron over 6 years ago

PVR addons are a bit different in Kodi to other addons, especially on Linux.

I find the easiest way to get Kodi talking to my Tvheadend server is to first configure the addon. Do this by entering the addons screen, and opening the configure page for the Tvheadend client. Adjust your server IP address and user/password fields to match what you use to access Tvheadend from its webui. (Make sure that the Tvheadend user you are connecting as has the right streaming and dvr permissions, too.)

Next, save your settings, and from the Addon screen, select "Enable". Kodi ought to now start its PVR manager subsystem and connect to your Tvheadend server. Further configuration can be done from Kodi's settings under the "Live TV" section. Personally, I like to ensure that it is set to use the channel numbers from the backend, so Kodi does not mess up the channel organization I've done in Tvheadend.

RE: connecting kodi and tvheadend in opensuse - Added by Dave H over 6 years ago

Hello Robert and thanks.

I don't know how to describe my problem any better. I believe I did what you suggested, but Kodi doesn't respond.

In the tvheadend log, I can see lines like:

2018-07-28 14:40:50.868 htsp: Got connection from 127.0.0.1
2018-07-28 14:40:50.868 htsp: 127.0.0.1: Welcomed client software: Kodi Media Center (HTSPv25)
2018-07-28 14:40:50.885 htsp: 127.0.0.1 [ Kodi Media Center ]: Identified as user 'tvheadend'

but I don't see anything in Kodi. The Run button is greyed out as I say and Kodi says I have not installed any add-ons.

Does Kodi make a log somewhere? Is there anything else I can try to see what is happening and why it doesn't work?

RE: connecting kodi and tvheadend in opensuse - Added by Thomas Klein over 6 years ago

Hi Dave,
did you install the pvr addon from packman in the same way (i.e. using the same user, "sudo", ...) like you did for installing kodi? Just asking to rule out otherwise hard-to-solve problems.

A general note: The tvh-pvr addon in kodi runs automatically, thus no need to click "run", which explains why "run" is greyed-out.

The usual way of doing the whole shebang is:
1) Install the addon (from repository inside Kodi or, if unavailable there, via packman like you did)
2) configure the addon
3) enable addon (sometimes it is already enabled after install and just needs the "configure" step above)

Regarding configuration of the addon:
Initially, all that is needed here is to enter ip/name of the server and the username+password for authentication.
Leave all other defaults unchanged for the moment.

After that, nothing more to be done on the addon! Instead:
Switch back to your Kodi main menu, select "Live-TV" and all should be okay. If not, you should see a popup error message in the upper right corner stating what's not working.

Possible pitfall 1: Skin
In the interface settings there is an option to configure which menu items appear in the main menu. If "someone" told Kodi to hide Live-TV from the menu, that feature will not appear and thus cannot be used.

Possible pitfall 2: Authentication
To be on the safe side, when entering the user/password in the configuration screen of the addon, try (at least for debugging the issue) to use the TVHeadend admin credentials instead of any dedicated user that you might have created on purpose inside the TVH config.
(But still: Any issues with authentication or connection would result in an error message popping up...)

In any case, if the PVR addon is active and running, it should either
- show an error message, at the latest after the connection timeout has expired (after a couple of seconds), or:
- show a popup telling that EPG data is refreshed from backend (where "backend" means the TVH server), or:
- show the EPG or channel list when clicking "LiveTV" in the Kodi main menu

If nothing helps, I suggest you start from scratch on the Kodi part by removing Kodi and the addon, then reinstall Kodi and get back to me for a stepwise "guided" approach to installing and configuring the addon.

Hope this helps, KR, Thomas

RE: connecting kodi and tvheadend in opensuse - Added by Dave H over 6 years ago

Hi Thomas, thanks for your reply.

Possible pitfall 1: Skin

I haven't changed the skin; it's something called Estuary. There's no Live TV in the main menu and there's no setting to change that in the Interface setting that I can see. But ...

Possible pitfall 2: Authentication

This was the problem. Actually I solved it a few days ago but forgot to update this posting, but read on because I have a new problem...

The problem was that the tvheadend wizard created me a * user and an admin user, and put the admin user first. Once I discovered that the order mattered and changed it, everything worked. :) Things show up in the 'TV' main menu entry.

My new problem is that this was all just a stepping stone to getting Kodi working on my FireTV (2nd generation). And whilst the FireTV works and Kodi works on it and I can see recorded videos that I have NFS-exported to it, the Tvheadend addon doesn't run. It says something about HTSP not working.

So far I haven't got a clue how to diagnose this problem :(

RE: connecting kodi and tvheadend in opensuse - Added by Thomas Klein over 6 years ago

Hi Dave,
glad to hear the initial issue was sorted-out in the meanwhile.

And on a side-note, the wording "Live TV" used by me refers to "TV" - sorry, my fault. Depending on skin and UI language, it is sometimes difficult to find the right naming regarding the difference between
  • TV = watching-live-tv-via-a-pvr-addon
    versus
  • TV = media-library-containing-tv-series

Anyway, now when it comes to your latest issue, I will try to assist - but note that I don't have a FireTV at hand, so I can't tell for any possible limitations with TVH (and the addon) that might be specific to this device.
Nevertheless, if there is a tvheadend client addon in the repository of Kodi when run on FireTV (and I assume you installed that), it should work.

I assume that the "HTSP not working" error message is shown on your TV screen, from inside Kodi, right?
More specifically: That message is NOT contained in the TVHeadend server's log file, correct?

I suspect a glitch in the configuration of streaming profiles and user settings.
Possible causes are
  1. the user used by Kodi's addon doesn't have the required access rights to use the required streaming profile
  2. there is no "default" streaming profile defined in TVH server and the Kodi addon uses "the default profile" (specified 0,zero, as the profile name)
  3. the profile used by the addon (determined by user settings in TVH server) doesn't include HTSP
  4. one of the HTSP ports configured in the Kodi addon is wrong (or blocked by some firewall?)
  5. a mix of the above :)

As you can see, your mileage may vary when trying to fix the problem.
If the above doesn't ring a bell regarding config changes you made, you will need to dig into your config.

FWIW, here's a high-level summary of what your config should include regarding the HTSP issue:
  • On TVH server side, in the Users tab, highlight the line for the user that the Kodi addon uses, then click EDIT button above the table's header line. This should bring up the "Edit Access Entry" dialog window. Here, 2 entries are of interest for HTSP: Streaming should include "HTSP" and Streaming Profiles should include the name of a streaming profile that contains HTSP. When I say "include", it means that there may be additional values (separated by comma) than just "HTSP".
    To check the streaming profiles, click the Stream tab, then highlight the entry named "HTSP" and check that it is enabled
  • On Kodi Addon configuration side, the HTSP ports specified should match with the ports used by the TVH server (defaults are 9981 and 9982)
    Note that you cannot leave them blank. Also, the IP address/name cannot be left blank and should either be "127.0.0.1" or "localhost" if the TVH server is running on the same device as Kodi, or the name/IP of the machine where TVH is running.
If none of that helps, you're lost, need further info... please provide
  • screenshots of the first and second config page of the Kodi addon config
  • screenshots of the user config parameters inside TVH server
  • screenshots of the streaming profile parameters inside TVH server

Sounds like an awfully complex thing to do, but with great fleyxibility and feature set comes the need to care about all the nuts and bolts. ;)

Cheers, Thomas

RE: connecting kodi and tvheadend in opensuse - Added by Dave H over 6 years ago

I assume that the "HTSP not working" error message is shown on your TV screen, from inside Kodi, right?
More specifically: That message is NOT contained in the TVHeadend server's log file, correct?

Yes, that's right. I've made some more progress now, and it looks like the problem is at the server end.

I managed to install adb (on my server) and connect it to my FireTV and then used it to pull the kodi.log file to my server. It had a bunch of explicit messages saying the HTSP messages weren't getting through. So then I (rather late in the day) looked at the system journal on my server and discovered that the kernel is dropping all the incoming messages to port 9982.

That was rather unexpected, since AFAIK I didn't have a firewall. But apparently I do, left over from some previous version of the OS. Now I just need to work out how to get control of it, or get rid of it entirely.

So hopefully I'll solve my problem soon. I'll try to remember to update this thread when I do.

Meanwhile, thanks for all your help.

RE: connecting kodi and tvheadend in opensuse - Added by Dave H over 6 years ago

Solved. Hurrah! As simple as stopping the firewall and now Kodi on the FireTV behaves pretty much like the copy on my linux box.

RE: connecting kodi and tvheadend in opensuse - Added by Thomas Klein over 6 years ago

Glad you resolved it. Enjoy. ;)

    (1-8/8)