Kodi Community Forum
Using Schedules Direct with TVH - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: PVR & Live TV Support (https://forum.kodi.tv/forumdisplay.php?fid=167)
+---- Forum: Tvheadend (https://forum.kodi.tv/forumdisplay.php?fid=168)
+---- Thread: Using Schedules Direct with TVH (/showthread.php?tid=307718)

Pages: 1 2


Using Schedules Direct with TVH - elsmandino - 2017-02-21

Can anyone provide a beginner's guide to using Schedules Direct with TVHeadend please?

I am very much a Linux novice and am finding some of the information out there a bit difficult to understand.


RE: Using Schedules Direct with TVH - rpcameron - 2017-02-21

You basically have to setup your Schedules Direct account from the command line before you can use it with Tvheadend. Once you can run your grabber from the command line as the user that Tvheadend runs as, then you can get it working with Tvheadend.

Get a current version of the XMLTV project's utilities so you will have the grabbers installed. The one you want is tv_grab_zz_sdjson. This is the grabber for Schedules Direct that uses their JSON API.

From the command line, switch to the user that Tvheadend runs as (in this example, it's 'hts' which is what it is on my machine). Then, run the grabber in its configure mode, which will set up your lineups and channels to grab information for.

Code:
$ su - hts
$ tv_grab_zz_sdjson --configure

Once your grabber is configured, then you can (re-)start Tvheadend, so that it will pick up the XMLTV grabber. In the Tvheadend WebUI go to "Configuration > Channel / EPG > EPG Grabber Modules". From the, select the one for "Internal: Schedules Direct JSON API", click "Enable", "Save" and then "Re-Run EPG Grabber Modules". After the grabber runs, you will find your guide channels on the "EPG Channels" tab, where you can map them to your Channels.


RE: Using Schedules Direct with TVH - elsmandino - 2017-02-21

Thank you so much for this - my lack of Linux knowledge is really holding me back at the moment.

I am currently using Openmediavault (which is based upon Debian, Jessie).

(2017-02-21, 16:52)rpcameron Wrote: Get a current version of the XMLTV project's utilities so you will have the grabbers installed. The one you want is tv_grab_zz_sdjson. This is the grabber for Schedules Direct that uses their JSON API.

Is this where I need to be looking? http://wiki.xmltv.org/index.php/XMLTVProjectDownload - i.e. will the following install it for me?

Code:
sudo apt-get install xmltv-util



RE: Using Schedules Direct with TVH - elsmandino - 2017-02-22

I installed this code:

Code:
sudo apt-get install xmltv-util

and a number of things installed.

I then typed:

Code:
su - hts
tv_grab_zz_sdjson --configure

But got this:

Code:
-su: tv_grab_zz_sdjson: command not found

Any idea what I did wrong?

I checked the internal grabber section and I now have lots of XMLTV files - however none relate to Schedules Direct.


RE: Using Schedules Direct with TVH - rpcameron - 2017-02-22

The previous version of the XMLTV utils introduced tv_grab_sd_json. The current version has improved their grabber and renamed it to tv_grab_zz_sdjson, however it is still available as tv_grab_sd_json. If you don't have those files, then your distro's xmltv-utils package is out of date.

Also, the `su - hts` command is to login as the hts user. On your system it may be a different user.


RE: Using Schedules Direct with TVH - elsmandino - 2017-02-22

Right - I think(?) I am understanding what is going on now.

By simply using this:

Code:
sudo apt-get install xmltv-util

I think that the version that has been installed is xmltv-util (0.5.63-2) - https://packages.debian.org/jessie/interpreters/xmltv-util.

The lists all the grabbers that were provided - https://packages.debian.org/jessie/all/xmltv-util/filelist

and there indeed seems to be nothing included for json.

1. Is there any way to double check what version of xml-util has been installed?
2. Is there any way I can install a more recent version?


RE: Using Schedules Direct with TVH - elsmandino - 2017-02-22

Bit of an update - it seems that the latest version of XMLTV (05.69) - which includes the json grabber that I need, is simply not available yet for my version of Debian.

The latest version for Jessie is indeed 0.5.63-2.

What are my options now?

Is it worth trying mc2xml instead?


RE: Using Schedules Direct with TVH - MikeB2013 - 2017-02-22

Build xmltv on your debian system.

I am assuming you are using sudo on your debian system, if not you will need to become root.
In a terminal:

sudo apt-get install libxml-treepp-perl

You need to download the file xmltv-0.5.69.tar.bz2 from https://sourceforge.net/projects/xmltv/
extract the contents using:

tar xvf xmltv-0.5.69.tar.bz2
cd xmltv-0.5.69/
perl Makefile.PL
make
make test
sudo make install

You can test it by doing
tv_grab_zz_sdjson --version

which should respond with
XMLTV module version 0.5.69
This is tv_grab_zz_sdjson version 1.1, 2017/01/24 00:41:08

The README file gives details of changes and how to build.

Mike


RE: Using Schedules Direct with TVH - elsmandino - 2017-02-23

That is quite brilliant - I have no idea what those instructions mean but it means that I now have the SDJson grabber on my system now - thank you!!

I did this to configure the channels that I want, as instructed above.

Code:
su- hts
tv_grab_zz_sdjson --configure

The final part of the jigsaw is now getting the new grabber to show up in TVH's internal grabber list.

I have reset the server a couple of times but to no avail - I was expecting it just to appear there.


RE: Using Schedules Direct with TVH - elsmandino - 2017-02-26

Yet more problems - I have spent so many hours on this that I am teetering on the edge of just giving up and going back to Windows.

I somehow managed to mess up my system and decided to reinstall everything from scratch:

1. Reinstalled OMV and updated everything.
2. Installed TVHeadend
3.
Code:
sudo apt-get install libxml-treepp-perl
4.
Code:
sudo apt-get install bzip2
5.
Code:
sudo wget https://sourceforge.net/projects/xmltv/files/xmltv/0.5.69/xmltv-0.5.69.tar.bz2
6.
Code:
tar xvf xmltv-0.5.69.tar.bz2
7.
Code:
cd xmltv-0.5.69/
8.
Code:
root@openmediavault:~/xmltv-0.5.69# perl Makefile.PL
Can't locate Term/ReadKey.pm in @INC (you may need to install the Term::ReadKey module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at lib/Ask/Term.pm line 9.
BEGIN failed--compilation aborted at lib/Ask/Term.pm line 9.
Compilation failed in require at Makefile.PL line 254.

What seems to be the problem, now?


RE: Using Schedules Direct with TVH - rpcameron - 2017-02-26

The problem is that you don't have the Term::ReadKey perl module installed. Did you check the README:
Code:
LWP 5.65
XML::Parser 2.34
XML::Twig 3.10
XML::Writer 0.4.6
Date::Manip 5.42a
Memoize (included with Perl 5.8 and later)
Storable (included with Perl 5.8 and later)
Those are the pre-reqs for the xmltv-utils listed in the README for all of the grabbers. Individual grabbers have addition module requirements that are listed later in the document. Term::ReadKey is a requirement for tv_grab_na_dd, which is the old Schedules Direct DataDirect API grabber. You should be using tv_grab_zz_sdjson, which is the new Schedules Direct JSON API grabber.


RE: Using Schedules Direct with TVH - elsmandino - 2017-02-26

Right - I see.

If I wipe and reinstall everything from scratch, what should I do next time?

Should I do steps 1-7 above but then install the modules at that point?

Something like this?

Code:
sudo apt-get install perl
Code:
cpan XML::Parser
Code:
cpan XML::Twig
Code:
cpan XML::Writer
Code:
cpan Date::Manip
Code:
cpan Memoize
Code:
cpan Storable

and then proceed to

Code:
perl Makefile.PL
make
make test
sudo make install

Thanks again for sticking with me on this - I am going to make this work if it kills me!!!


RE: Using Schedules Direct with TVH - vskatusa - 2017-03-23

If your use case is similar to mine see my post here


RE: Using Schedules Direct with TVH - elsmandino - 2017-03-27

Success!!!! I finally managed to get the tv_grab_zz_sdjson grabber working.

One more quick question, before I put this one to bed.

I finally got round to doing this:

[code}su- hts
tv_grab_zz_sdjson --configure[/code]

I only want about one third of the channels from the Freeview line up.

Am I correct in thinking that clicking y or n on every channel is the only way to specify only the channels you want or is there another, quicker way?

It did not take me all that long but I was just wondering what happens when a new channel appears and I need to add the EPG for it - will I have to go through the whole configuration process again?


RE: Using Schedules Direct with TVH - rpcameron - 2017-03-27

(2017-03-27, 14:23)elsmandino Wrote: Success!!!! I finally managed to get the tv_grab_zz_sdjson grabber working.

One more quick question, before I put this one to bed.

I finally got round to doing this:

[code}su- hts
tv_grab_zz_sdjson --configure[/code]

I only want about one third of the channels from the Freeview line up.

Am I correct in thinking that clicking y or n on every channel is the only way to specify only the channels you want or is there another, quicker way?

It did not take me all that long but I was just wondering what happens when a new channel appears and I need to add the EPG for it - will I have to go through the whole configuration process again?

If you know the 5 digit station ID, you can manually add it to your config[/code] file. Just add a line containing:
Code:
=12345
to your config file, where "12345" is the station ID. Similarly, if you want to remove a station ID from your config file, change the = to a ! before the station ID.