OpenELEC Forum
ATSC, Tvheadend and Zap2xml - Printable Version

+- OpenELEC Forum (https://forum.openelec.tv)
+-- Forum: Generic Forum (https://forum.openelec.tv/forumdisplay.php?fid=5)
+--- Forum: PVR + LIVE TV (https://forum.openelec.tv/forumdisplay.php?fid=38)
+--- Thread: ATSC, Tvheadend and Zap2xml (/showthread.php?tid=80857)

Pages: 1 2 3


ATSC, Tvheadend and Zap2xml - robca - 04-04-2016

I have OpenELEC running perfectly on my Asus ChromeBox, with TvHeadEnd happily displaying live TV using an HDHomeRun ATSC tuner (I live in the USA).

I'm now trying to configure the EPG using zap2xml. I know I could use xmltv and Schedules Direct, but I'd like to use zap2it if possible. Problem is: there's no zap2xml addon, and the zap2xml script is a perl script (and as far as I can tell, no perl in OpenELEC)

Is there a way to easily run zap2xml, or do I need to install perl first? And, if so, any pointer for a lightweight perl that runs well on OpenELEC

Needless to say, I'm still pretty lost when it comes to Linux setups...


ATSC, Tvheadend and Zap2xml - RoccoJones - 04-09-2016

I think you should take that as a 'no'. I'm just like you, except that I'm in Canada, which makes it worse. You might try following http://openelec.tv/forum/148-usage/80053-epg-for-tvheadend#161683 but it hasn't worked for me so far.


ATSC, Tvheadend and Zap2xml - robca - 04-11-2016

Thanks for the additional link, I'll look at the info there

I has been warned that getting EPG in USA or Canada would be a challenge, so I'm not entirely surprised.


ATSC, Tvheadend and Zap2xml - grillz - 04-14-2016

You could try using Activeperl. Ultraman talks about using it in this thread (for some other type of perl script): http://openelec.tv/forum/71-pvr-live-tv/40321-xmltv-adding-a-new-grabber?limitstart=0

Not sure it will work, I haven't given it a shot myself though I've been meaning to try.


ATSC, Tvheadend and Zap2xml - robca - 04-25-2016

grillz post=161974 Wrote:You could try using Activeperl. Ultraman talks about using it in this thread (for some other type of perl script): http://openelec.tv/forum/71-pvr-live-tv/40321-xmltv-adding-a-new-grabber?limitstart=0

Not sure it will work, I haven't given it a shot myself though I've been meaning to try.

Thanks for the pointer. After a bit of fiddling, I finally managed to make everything work, capturing the info here for anyone else who needs to do it.

You can download and install ActivePerl on OpenElec (once you know how, rather siple, actually), then add all the necessary Perl packages and finally downloading/running zap2xml

Code:
mkdir -p /storage/downloads/activeperl
cd /storage/downloads/activeperl

# if necessarym replace the download with the latest version
wget http://downloads.activestate.com/ActivePerl/releases/5.22.1.2201/ActivePerl-5.22.1.2201-x86_64-linux-glibc-2.15-299574.tar.gz

tar xzf ActivePerl-5.22.1.2201-x86_64-linux-glibc-2.15-299574.tar.gz

cd ActivePerl-5.22.1.2201-x86_64-linux-glibc-2.15-299574/

./install.sh --prefix /storage/ActivePerl --license-accepted --no-install-html

# done installing perl

#add ActivePerl to PATH
PATH=$PATH:/storage/ActivePerl/site/bin:/storage/ActivePerl/bin

# install some extra perl packages (not sure if all are actually needed, but this works... you can try to run the script and see what dependencies are missing)
/storage/ActivePerl/bin/ppm install TermReadKey
/storage/ActivePerl/bin/ppm install Date-Manip
/storage/ActivePerl/bin/ppm install XML-LibXML
/storage/ActivePerl/bin/ppm install XML-Writer
/storage/ActivePerl/bin/ppm install XML-Twig
/storage/ActivePerl/bin/ppm install File-Slurp
/storage/ActivePerl/bin/ppm install TimeDate
/storage/ActivePerl/bin/ppm install DateTime-Format-Strptime
/storage/ActivePerl/bin/ppm install XML-SAX
/storage/ActivePerl/bin/ppm install XML-NamespaceSupport
/storage/ActivePerl/bin/ppm install IO-stringy
/storage/ActivePerl/bin/ppm install HTTP-Cache-Transparent

/storage/ActivePerl/bin/ppm install JSON-XS

# I decided to store the resulting xmltv.xml file in /storage/xmltv directory, you can use anything else
mkdir -p /storage/xmltv
cd /storage/xmltv
# the current version of the download link for zap2xml for me was at http://zap2xml.hosterbox.net/?h=c61rsa you can find it here: http://zap2xml.awardspace.info/#dependencies)
wget http://zap2xml.hosterbox.net/?h=c61rsa -O zap2xml.pl

Assuming you have a zap2it account, after this, you would usually run a cron job to periodically refresh xlmtv.xml. Here's how you can test it works:


Code:
perl /storage/xmltv/zap2xml.pl -u username@email -p your_password -o /storage/xmltv/xmltv.xml

Since it was the first time I was setting an EPG in tvheadend, I first had to select the xmltv.xml file location in the tvheadend addon UI (from Kodi), then use the tvheadend Web UI to select the right xmltv.xml setting (Configuration, Channel/EPG, EPG grabber, select Internal grabber and there should be your file... it took me a couple of reboots for everything to work). Then Configuration, Channel/EPG, Channels, and one by one map the EPG grabber to the right channel (use Edit, if everything works, you should see a list of your channels in the EPG Source drop down)

Now I just need to make sure that my cron job runs when expected Smile


ATSC, Tvheadend and Zap2xml - skittzzo - 04-27-2016

Thank you so much!! So the install didn't work for me. Sad

When I ran the ./install/sh line, this is what i got:
perl/bin/perl: line 1:ELF: not found
perl/bin/perl: line 2: syntax error: unexpected "("


Has anyone had this problem?


ATSC, Tvheadend and Zap2xml - robca - 04-27-2016

skittzzo post=162607 Wrote:Thank you so much!! So the install didn't work for me. Sad

When I ran the ./install/sh line, this is what i got:
perl/bin/perl: line 1:ELF: not found
perl/bin/perl: line 2: syntax error: unexpected "("


Has anyone had this problem?

What machine and version of OpenElec are you using? I'm using a Chromebox and OpenElec 17 beta.

ELF errors usually suggest you are trying to run the wrong binary for your OS. As you can see from my posts, I'm using an x64 Intel system and I provided the download path for an x86/x64 binary


ATSC, Tvheadend and Zap2xml - skittzzo - 04-27-2016

You are so right...i'm new to all this, i'm sorry. I am running a Rasp Pi 2 with Openelec 7 beta. i just installed the image last night. I wanted to get my epg on auto update like i did on xbian, but it seems like this may be a futile effort.


ATSC, Tvheadend and Zap2xml - robca - 04-27-2016

skittzzo post=162617 Wrote:You are so right...i'm new to all this, i'm sorry. I am running a Rasp Pi 2 with Openelec 7 beta. i just installed the image last night. I wanted to get my epg on auto update like i did on xbian, but it seems like this may be a futile effort.
Well, as long as you download the right binary from the ActivePerl site, there's no reason why you can't use my previous post as the starting point. Once you have the right binary, the rest should be more or less the same. If you do, please post your findings

I plan to try the same on my RPi3 sooner or later (and once I do I'll update here), but not in the next few days


ATSC, Tvheadend and Zap2xml - skittzzo - 04-27-2016

That would be great, let me know what you find out!
I didn't see the binary for my system, but that doesn't mean that it's not there, maybe i'm just too ignorant to recognize it. Smile

As a solution i have Pi B model that I am no longer using. I loaded it with debian lite then set up zap2xml on it. I then created a script to run zap2xml to update the xmltv.xml file, then wrote another script to send that over ssh to my Pi 2. I set up a cron to perform both daily. So for now...it works. For how long is the question lol