Project

General

Profile

Synology xmltv module and zap2xml help

Added by Nick Craig almost 8 years ago

I have a synology nas with tvheadend from synocommunity setup and working with my hdhomerun tuner. I cannot wrap my head around how to setup the internal grabber (currently it says disabled) with zap2it epg data (I have username and account with them) . I have downloaded the tv_grab_file and the zap2xml file but really have no clue what to do with them. Where do I put them etc. I do have ssh setup. If someone would be kind enough to do some heavy typing to give me a step by step that would be awesome.


Replies (38)

RE: Synology xmltv module and zap2xml help - Added by log jam almost 7 years ago

There is another thread about the zap2it issues here:

https://tvheadend.org/boards/12/topics/25524?r=30615#message-30615

Not sure if this will work on a Synology however...

RE: Synology xmltv module and zap2xml help - Added by D R almost 7 years ago

Everyone is running ok?
I have the latest zap2xml.pl (2018-01-09) installed but I m getting an error when accessing zap2it. TVGUIDE generates fine thought.

 LWP will support https URLs if the LWP::Protocol::https moduleis installed

Any ideas?

RE: Synology xmltv module and zap2xml help - Added by log jam almost 7 years ago

I got epg working on my Syno using the info in the thread I previously linked.

I downloaded both the zap2epg.py and the settings.xml files, and put them in the same place I had the previous zap2xml.pl and zap2xml.sh files.

Read through the thread and make adjustments as necessary to the settings.xml file. Set your zip code, how many days of guide data you want, etc. I followed the instructions step by step and added every channel ID I wanted guide data for in the settings.xml file.

Once I prepared my settings file with the relevant data, I ssh'd into my Synology and ran the following command:
sudo python /volume1/path to/zap2epg.py
This will take a while the first time.

I hope this helps you. I FINALLY have a color epg in Kodi now!

Thank you edit4ever!

RE: Synology xmltv module and zap2xml help - Added by D R almost 7 years ago

log jam wrote:

I got epg working on my Syno using the info in the thread I previously linked.

I downloaded both the zap2epg.py and the settings.xml files, and put them in the same place I had the previous zap2xml.pl and zap2xml.sh files.

Read through the thread and make adjustments as necessary to the settings.xml file. Set your zip code, how many days of guide data you want, etc. I followed the instructions step by step and added every channel ID I wanted guide data for in the settings.xml file.

Once I prepared my settings file with the relevant data, I ssh'd into my Synology and ran the following command:
sudo python /volume1/path to/zap2epg.py
This will take a while the first time.

I hope this helps you. I FINALLY have a color epg in Kodi now!

Thank you edit4ever!

I will give it shot this weekend if time permits. For now I am using tvguide.

RE: Synology xmltv module and zap2xml help - Added by Kris Hammond almost 7 years ago

I just dealt with this issue over the weekend. As far as I can tell, Zap2it has changed their website to use https protocol, which meant a rewrite of the zap2it perl script. It also means the new script is using perl modules that the old one didn't need. Have you tried installing the LWP::Protocol::https Perl module? Let me know if you need help. A couple of things to check:
- Which Perl modules are currently installed
- Which version of Perl you're running
I had trouble installing LWP::Protocol::https because the IO::Socket::SSL prerequisite was failing on testing and wouldn't force install. I fixed it by installing a newer Perl distribution (since the packaged version with my Debian Jessie distro is old). Installing Perlbrew and CPANM make the whole process a lot easier.

RE: Synology xmltv module and zap2xml help - Added by D R almost 7 years ago

Kris Hammond wrote:

I just dealt with this issue over the weekend. As far as I can tell, Zap2it has changed their website to use https protocol, which meant a rewrite of the zap2it perl script. It also means the new script is using perl modules that the old one didn't need. Have you tried installing the LWP::Protocol::https Perl module? Let me know if you need help. A couple of things to check:
- Which Perl modules are currently installed
- Which version of Perl you're running
I had trouble installing LWP::Protocol::https because the IO::Socket::SSL prerequisite was failing on testing and wouldn't force install. I fixed it by installing a newer Perl distribution (since the packaged version with my Debian Jessie distro is old). Installing Perlbrew and CPANM make the whole process a lot easier.

Synology provides their own Perl package and I can't add any new modules.

RE: Synology xmltv module and zap2xml help - Added by K Shea almost 7 years ago

D R wrote:

Synology provides their own Perl package and I can't add any new modules.

I'll just throw this out there, you could run the newly released zap2xml script on any Linux or Windows computer on your local network, then move the created xml file to your Synology. If you can ssh into the Synology then you could perhsps use sshfs to move the file. On a Linux machine you'd do it something like this (after using zap2xml to get your listings):

/usr/bin/sshfs :/home/hts/.xmltv /mnt/xmltv
/bin/cp -f tv_grab_file.xmltv /mnt/xmltv
/bin/umount /mnt/xmltv

The three lines would first mount the /home/hts/.xmltv directory on the synology as /mnt/xmltv - for this to work the permissions on /home/hts/.xmltv would probably need to be world readable and writeable - then copy tv_grab_file.xmltv over, and then unmount the directory. You may need to adjust the paths to be correct for your system, and actually you would not even need the paths at the very beginning of the lines if you are running the commands manually, but you would need them if you put the commands in a shell script. This is just to give a general idea of how it could be done; you may need to read up on the use of sshfs, cp, and/or umount to get it all to work. Basically, I know that sshfs is the tool that will let you mount a remote filesystem as if it were local, assuming that you can ssh into the remote system and assuming you have permission to access the directory in question. This is probably old news to true Linux geeks, but it was news to me when I discovered it.

RE: Synology xmltv module and zap2xml help - Added by Jim Stolpman over 6 years ago

New to this forum. Using the zap2xml.pl and zap2xml.sh scripts with success on a Synology DS718+ but only using TVGuide. Are there any plans to update the Perl script to be able to use the zap2it site?

RE: Synology xmltv module and zap2xml help - Added by D R over 6 years ago

Jim Stolpman wrote:

New to this forum. Using the zap2xml.pl and zap2xml.sh scripts with success on a Synology DS718+ but only using TVGuide. Are there any plans to update the Perl script to be able to use the zap2it site?

I hope someone that has more knowledge can tackle the new Perl script.

the problem might be now Perl on our Synology as it does not have all the modules and also cant add any modules.

RE: Synology xmltv module and zap2xml help - Added by D R about 6 years ago

I ended up running zap2xml on PC at starup or shedule and created a task to move the file daily.

It works for now but it's not as nice as having it all on my Synology.

RE: Synology xmltv module and zap2xml help - Added by D R over 5 years ago

log jam wrote:

I got epg working on my Syno using the info in the thread I previously linked.

I downloaded both the zap2epg.py and the settings.xml files, and put them in the same place I had the previous zap2xml.pl and zap2xml.sh files.

Read through the thread and make adjustments as necessary to the settings.xml file. Set your zip code, how many days of guide data you want, etc. I followed the instructions step by step and added every channel ID I wanted guide data for in the settings.xml file.

Once I prepared my settings file with the relevant data, I ssh'd into my Synology and ran the following command:
sudo python /volume1/path to/zap2epg.py
This will take a while the first time.

I hope this helps you. I FINALLY have a color epg in Kodi now!

Thank you edit4ever!

hi, can you provide more info on how you got it working?
I got both files but it complaints when I run it.

2019/08/05 20:20:35 Kodi settings version is: 2
2019/08/05 20:20:35 Running zap2epg-0.6.3 for zipcode: 95747 and lineup: Local Over the Air Broadcast
2019/08/05 20:20:35 No channel list found - adding all stations!
2019/08/05 20:20:35 Exception: main
Traceback (most recent call last):
  File "/zap2epg.py", line 713, in mainRun
    tvhMatchGet()
  File "/zap2epg.py", line 111, in tvhMatchGet
    response = urllib2.urlopen(channels_url)
  File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 401: Unauthorized

RE: Synology xmltv module and zap2xml help - Added by nick raia about 4 years ago

I having trouble setting the correct permissions for tv_grab_file. I have setup TVH on a ubuntu system before. However, upon installing the package on a DS916+ running DSM 6.2.3-25426 there is no user Tvheadend or hts. Over ssh running:

awk -F':' '{ print $1}' /etc/passwd

There is a user sc-tvheadend. But setting the permissions still does not show the EPG Grabber Module.

Can anyone point me in the right direction?

RE: Synology xmltv module and zap2xml help - Added by D R about 4 years ago

I use WinSCP to make the changes and it works no problem.
I have "root" as Group and owner and 0777 for permission and works well for me.

(26-38/38)