Project

General

Profile

Tvheadend >4.0 with Kodi 17

Added by Sagar Kherdekar over 7 years ago

Hello

I want to use tvheadend 4.0 or 4.2 with Kodi 17.0 without tvheadend webui. Is it possible to add muxes/channels in tvheadend using either api or cli?

Please suggest...

Thanks in advance


Replies (40)

RE: Tvheadend >4.0 with Kodi 17 - Added by Mark Clarkstone over 7 years ago

Sagar Kherdekar wrote:

Hello

I want to use tvheadend 4.0 or 4.2 with Kodi 17.0 without tvheadend webui. Is it possible to add muxes/channels in tvheadend using either api or cli?

Please suggest...

Thanks in advance

You can access the same API as the webui through HTSP, but that's all I can tell you I'm afraid. If you don't want to use the webui itself you can still make the same API requests through the http server.

RE: Tvheadend >4.0 with Kodi 17 - Added by Sagar Kherdekar over 7 years ago

Yeah, when I searched for it, got http://IP:9981/api/service/list for services mapping and http://IP:9981/api/channels/list for channel keys and name. But, I want to automate process as I want to use it on 5 systems. So, when I'll update channels through any script, it should auto update the same.

Also, in version 4.0 there are open files for muxes and services but same is encrypted in version 4.2.

RE: Tvheadend >4.0 with Kodi 17 - Added by edit4ever ! over 7 years ago

Try this addon for Kodi - https://tvheadend.org/boards/14/topics/27100

It let's you configure tvh from within the Kodi interface.

RE: Tvheadend >4.0 with Kodi 17 - Added by Sagar Kherdekar over 7 years ago

Hi,

I'm getting some errors while using this addon. Can you help me out?

RE: Tvheadend >4.0 with Kodi 17 - Added by edit4ever ! over 7 years ago

Absolutely Sagar Kherdekar-

First I will need to know what Kodi installation you are using (LibreELEC, OSMC, Windows, Ubuntu, etc) and what version number.

I'll also need to know what version of Tvheadend you have installend.

And finally, if you know how to access the kodi.log - that would help - but if not, let me know and we'll go from there.

Thanks!

RE: Tvheadend >4.0 with Kodi 17 - Added by Sagar Kherdekar over 7 years ago

Yeah, surely.

kodi --version

"17.0 Git:20170210-nogitfound Media Center Kodi
Copyright (C) 2005-2013 Team Kodi - http://kodi.tv"

tvheadend: version 4.2.3-19~g490b6f2

PFA logs which I'm getting in ~/.kodi/temp/kodi.log while accessing "Muxes Configuration" part in Tvheadend setup for kodi section

RE: Tvheadend >4.0 with Kodi 17 - Added by edit4ever ! over 7 years ago

Thanks for the log - I'm guessing you use some IPTV networks? If so - that could be why muxes is failing - I haven't added support for IPTV yet and it looks like I have an error when pulling muxes without frequencies.

It should be fixable - but I'm also working to add IPTV support in the next day or two.

If you're not using IPTV - please let me know what types of networks you have setup so I can see what mux type is causing the issue.

Thanks!

RE: Tvheadend >4.0 with Kodi 17 - Added by edit4ever ! over 7 years ago

If you want - you can try a new test verion...

v1.8
- add support for IPTV Networks
v1.7
- add support for Tvh username-password
v1.6
- add backup and import of tvh userdata
- add channel icon reset option

You can download the latest test version here: [[https://forum.libreelec.tv/core/attachment/1744-script-module-tvh2kodi-1-8-test-zip/]]
Please let me know if you come across errors - otherwise I will update my github release. Thanks!

RE: Tvheadend >4.0 with Kodi 17 - Added by Sagar Kherdekar over 7 years ago

Thanks edit4ever ! for your help. You're right, I'm using IPTV network. Also, I'm getting error on link provided by you.
Can you please provide another link to download latest version 1.8 ?

RE: Tvheadend >4.0 with Kodi 17 - Added by edit4ever ! over 7 years ago

Sorry about that - link updated.

RE: Tvheadend >4.0 with Kodi 17 - Added by Sagar Kherdekar over 7 years ago

Thanks for latest version.

Now I am atleast able to use addon but still unable to use "Scan for New Channels" option.

PFA logs and screenshot. Also, when I'm going to add network after selecting "IPTV Network", it asks for Network URL while same is not asked in tvheadend UI.

Please can you provide simple document it will be much helpful.

Thanks.

RE: Tvheadend >4.0 with Kodi 17 - Added by edit4ever ! over 7 years ago

OK - thanks for the remibder on the adapters error - this was originally designed for usb tuners. I forgot to change that message for people only using IPTV netowrks. That should be an easy fix.

I'm fairly new to IPTV networks - I don't use them - so I'll need testers to help check for issues.

You are correct - it should not ask for url (that's for IPTV automatic networks) -- it's setting up the wrong type of network.

Try the attached file. (this will still have the adapter issue.)

RE: Tvheadend >4.0 with Kodi 17 - Added by edit4ever ! over 7 years ago

What network do you want to "scan for new channels" on?? An IPTV network? Is it setup as an IPTV Automatic network?

If you're just adding the IPTV muxes manually - vs setting up an IPTV automatic network that adds the muxes for you...the last step is to map the services to channels.

RE: Tvheadend >4.0 with Kodi 17 - Added by Sagar Kherdekar over 7 years ago

Thanks for the update. But, now I'm getting error in "Muxes configuration". I've attached logs for your reference.

Also, I'm using IPTV Network in Network Configuration. Can you please explain difference between "IPTV Network" and "IPTV Automatic Network"? If I've to use "IPTV Automatic Network" then which URL expected to be provided?

You're helping me alot with this addon but will it give me space to use this addon with any script as I want to automate things?

RE: Tvheadend >4.0 with Kodi 17 - Added by edit4ever ! over 7 years ago

It looks like after setting up the network, you were going to setup a mux (putting info in for your stream) but the muxes configuration failed to load. This is likely due to their not being any muxes...I'll have to check if that's true.

My addon just makes part of the tvheadend interface available in kodi so you don't have to use the web interface. All normal tvheadend setup information should be followed.

The easiest way to setup IPTV channels is to use the IPTV automatic network. For this, the list of your streams are put into an m3u file that tvh can read in and automatically setup the muxes and services.

You can see an example file here: http://siptv.eu/lists/example.m3u

Download that file if you want to look at how it is made - or to test it, enter that url into an IPTV Automatic Network and see how it works. :-)

Once services are setup - the final step is to just map the services to channels and then you're reday to watch!

RE: Tvheadend >4.0 with Kodi 17 - Added by Sagar Kherdekar over 7 years ago

ok. But I'm using urls like "udp://239.255.1.10:1234". So, my m3u is ready then where should I store it and where I've to configure its path in tvh2kodi addon or somewhere else ? I've currently added iptv.m3u as attached.

Then also I'm getting error which is also attached.

In what timezone are you available so that we can manage our timings. I usually work on IST timezone.

RE: Tvheadend >4.0 with Kodi 17 - Added by edit4ever ! over 7 years ago

I am in California (US) - PDT (7:27am)

That file can be stored anywhere on your device. Just know the path to the file.

Then setup an IPTV automatic network and for the url enter:

file:///PATH TO FILE/iptv.m3u

so let's say you put it in your home directory. Based on the log you sent - it seems you are logged in as guest. So that path would be:

file:///home/guest/iptv.m3u

That error is due to not having any muxes - I need to fix that code. If you do the above, it should create the muxes for you.

RE: Tvheadend >4.0 with Kodi 17 - Added by Sagar Kherdekar over 7 years ago

I've tried but same as per your instruction but still no success.

RE: Tvheadend >4.0 with Kodi 17 - Added by edit4ever ! over 7 years ago

can you just access the web interface to make sure you can setup the IPTV network?

Your path may be different depending on the OS you are using.

RE: Tvheadend >4.0 with Kodi 17 - Added by Sagar Kherdekar over 7 years ago

Yeah, I'm able to access through webui. Also, if I'm adding anything in addon or in webui and vice versa, I'm able to see reflection in both.

RE: Tvheadend >4.0 with Kodi 17 - Added by edit4ever ! over 7 years ago

Were you able to setup the IPTV automatic network through the web interface?

RE: Tvheadend >4.0 with Kodi 17 - Added by Sagar Kherdekar over 7 years ago

Yeah, I was able to setup IPTV automatic network through webui but in webui also I'm not able to scan muxes using IPTV automatic network.

RE: Tvheadend >4.0 with Kodi 17 - Added by edit4ever ! over 7 years ago

You shouldn't have to scan muxes - if you used IPTV automatic network - it should have already scanned those networks and setup any valid services.

I tried your file - it setup the muxes, but all those streams came up as fail. Are your sure that the addresses are correct?

You can monitor the tvheadend scan in the log window on the bottom of the web ui.

RE: Tvheadend >4.0 with Kodi 17 - Added by Sagar Kherdekar over 7 years ago

In bottom of the webui, I got following logs:

2017-07-27 00:00:58.320 iptv: unknown playlist format for network 'IPTV'

I've tested urls for IPTV channels, these are working fine in my local network.

RE: Tvheadend >4.0 with Kodi 17 - Added by edit4ever ! over 7 years ago

ok - so if you use the web interface...you should be able to see the muxes that were created by the iptv automatic network.

Then on the services tab - you should see services for any of the muxes it scanned.

If you have a list of services there - just click the map services button to map all services to channels.

(1-25/40)