tvheadend, ATSC and epg...

  • if you run the zap2epg addon from a Kodi setup - you can configure your lineup and channels list which will create the settings.xml file - you can then run the program as a test from within the addon and generate the xmltv.xml file.

    With both of those in hand, you can determine if you want to take the script and configure it on your file server. :)

    Yesterday I tried on my Ubuntu-Mate system (17.10) after making small changes to the /etc/profile section of the tv_grab_zap2epg and it ran OK and created a good xmltv.xml file that could easily be copied to 3 LibreElec boxes. As I had installed the zap2epg addon on our Chromebox to get a settings file as you directed, I decided to let it remain there and now just have the tVheadend42 addon on two of the LibreElec boxes read the xmltv.xml file from Chromebox system which is a better solution as we use the Chromebox daily and the other 2 boxes less often. It is too early to know for sure but so far it looks like your addons are working OK, and a much better setup than using the original zap2xml pearl script on a file server.

    Thank you

  • PaJoe if you want for Ubuntu, you wouldn't need the tv_grab_zap2epg file. You can just run and it will generate the xmltv.xml file in the folder it is run from. You can setup a cron to just run that script whenever you want to update the guide info. Then just point your tvheadend system to the xmltv.xml file from within the tvh add settings and use their built in grabber.

    This actually works as a method for all systems, but I included the generic zap2epg grabber to make install simpler for some people. :)

  • OK - the fix is in. Here is the latest test release:

    Dropbox -

    It contains fixes for the location labels, JSON file errors and for handling a setup without a channels list.

    Please let me know how it goes for you. Thanks!

  • I've pushed a small update for the zap2epg addon - it includes the following:

    • adds generic timezone lineups (usefule for IPTV networks)
    • adds station/channel icons
    • removes old episode data from cache

    You can find the release here: Release zap2epg · edit4ever/script.module.zap2epg · GitHub

    After feedback on this version - I will likely post as a new addon release for wider testing and get ready to submit for the Kodi repo. Please let me know if you have issues with this.


  • Hi!

    I tried to install Zap2EPG 0.3.1 . I'm from Canada. And it doesn't seems to work.
    I've done a real quick screen capture to show you : 2017-11-12_0757

    Maybe it has something to do because my UI is in French ? I don't know.

  • You're not doing something wrong - they took the server down a couple of days ago and it stopped working. It looks like they brought it back online overnight, so I'll need to take a look at what they changed. As soon as I have an update, I'll post it here.


  • the zap2it tvlistings website is being rebuilt with a new system. They went public with it for 1 day two weeks ago, so I started building this new zap2epg addon to work with their new system. Then they pulled it down (not sure what they are working on - but it must not be ready for public release).

    So at some point, when switch to the new site - zap2xml will stop working. In the meantime, I'm getting zap2epg tested and ready. It works, but occasionally they may take the server offline or make a change that breaks it. I also think they have some work to do in changing what information is displayed, but we'll see if they take suggestions. :)

    For now, you can use zap2xml - but if you want to try zap2epg - here's an update that should work:

    Release zap2epg · edit4ever/script.module.zap2epg · GitHub


  • I tried zap2epg, the latest version. It works fine now.

    But there was a feature that I liked most on zap2xml, we could use username/password for our account on zap2it service. That was useful to me because I could add channels from different lineups to my favourites.

    Because from where I am, I catch Canadians and Americans channels.

    Not a very big deal for now I would say. But if you could bring back the option to use zap2it account favorites, that would be useful to me.

  • It looks like the new zap2it server is not setup to support multiple lineups - even with an account. However, they seem to include every possible OTA channel you can receive. For example, I live in downtown San Diego - but they still have all the Los Angeles OTA channels included in my OTA lineup. Likely due to the fact that if you mount a rooftop antenna, you can pick up the LA channels even though they are nearly 100 miles away.

    --- I just looked at your zipcode...looks like they don't bother to include the US channels from that far away...but you could cheat the system by using a Montreal zipcode like H2Z1R1 - that seems to bring up both countries stations.

    Let me know if that works as a solution for you. If not - it may be possible for me to build in a multiple zipcode/lineup option...but I may wait until they fully launch the system before I work on that.

    Thank again for testing!

  • I just installed zap2epg and configured it within Kodi and all I can say is "Wow!" I seem to be missing something though. I have reconfigured the EPG Grabber Module in Tvheadend to the internal XMLTV grab and rebooted. Nothing is showing up under the Electronic Program Guide tab. Is there something else I need to do? Thanks.

  • OK. I got to looking closer. Nothing is be written to my xmltv.xml file. Right now I am only trying to read 3 days of data and NO Extra Data. I have double checked my settings I feel I have everything correct.

  • Thanks for your reply edit4ever!

    For using a zipcode from Montreal, that's perfectly fine with me! I didn't try, believing it was all the same for all canadians zipcodes.

    Now, I have another problem. It's even bigger for me. Looks like I don't get ALL the programmes in my EPG. I did a small screenshot to show you : 2017-11-13_0825

    Can't be really sure about what's happening. Looked at the xmltv.xml file and saw some accentuated characters that looks scrambled in the missing programmes. You may have to encode them before writing them to the file. (in zap2xml Windows version I know there is a commandline "-e" or "-E" that you can use to do that)....

  • esenterre Thanks for pointing out that issue! Can you check to see if those programs appear in the tvheadend web interface epg? I think you are correct about the encoding issue - but I won't be able to check/test until I get back to my system tomorrow. I'll use the Montreal lineup so I can see the Canadian listings as a test.

    Since the new guide system was using json instead of web scraping, I thought all the charcters would be encoded properly and I wouldn't have to mess with that. Guess I'll need to check! :)

  • ekincaid I assume you are running the 0.3.2 release? In tvheadend - you are using the zap2peg grabber?

    As a test - you can run the zap2epg program from the kodi addon and have it download guide data. If it runs correctly, it will display a notification of number of channels and episodes downloaded.

    Let me know what happens when your run it from the addon. Also - it will produce a log file in the userdata/addon_data/script.module.zapepg folder that should point out where the problem is.

  • Okay. I got it running. Just a little misunderstanding on my part. You stated that you wanted to make this an easier process in an earlier conversation we had. I can say you are certainly accomplishing that. Nice job!