[HOW TO] populate EPG data with zap2epg

This is an updated post for the previous topic. http://www.zap2it.com made changes that rendered the old HOW TO obsolete.

The instructions are much less cumbersome than the previous HOW TO guide.

  1. Install OSMC and TvHeadend. I am on the October 2018 update with TvHeadend version 4.2.6. I installed a fresh copy on a Raspberry Pi 3 B+.

  2. Download the zap2epg zip file from edit4ever’s page on GitHub.
    The current latest release is version 1.1. Goto Releases · edit4ever/script.module.zap2epg · GitHub and copy the zip file to the device or in a terminal window type:
    wget https://github.com/edit4ever/script.module.zap2epg/releases/download/v1.1.0/script.module.zap2epg-1.1.0.zip

  3. Install the addon. From the Kodi interface install the zip file by selecting addons --> Install from repository --> Install from zip file. Locate the zip file and install the addon.

  4. Copy the tv_grab_zap2xml file from the addon bin folder and place into the /usr/bin folder. The bin folder is located at /home/osmc/.kodi/addons/script.module.zap2epg/bin
    In a terminal window type
    sudo cp /home/osmc/.kodi/addons/script.module.zap2epg/bin/tv_grab_zap2epg /usr/bin

  5. Change permissions on the copied file by typing the following in the terminal:
    sudo chmod +x /usr/bin/tv_grab_zap2epg

  6. Restart the device or restart tvheadend by typing sudo service tvheadend restart

  7. In Kodi, open the addon and follow the prompts to setup the channels you want to capture the data for. Be sure to configure settings and input the IP address of your tvheadend server and its username and password. It’s a good idea to only select a single days worth of data to start so the process can finish sooner. Later, once it is working, you can increase the number of days, if you like.

  8. On the tvheadend website, make sure you are in expert view by selecting Configuration --> Users --> Access Entries and then edit your user. On the bottom of the popup window, change view level to expert. Find the expert settings and permanently change your user interface level to expert.

  9. On the tvheadend website, move to Configuration > Channel / EPG > EPG Grabber Modules and deselect ATSC and EIT grabbers. Enable the new Internal: XMLTV: tv_grab_zap2epg is a simple grabber for USA-Canada. When you click save, tvheadend will run the new EPG grabber.

  10. Open the log window by selecting the arrows in the bottom right of the screen. It should say xmltv: /usr/bin/tv_grab_zap2epg: grab /usr/bin/tv_grab_zap2epg When it has finished running, it will give a tally of how many channels, shows and episodes it picked up. It will probably take several minutes to pick up the data. I have 22 channels and I downloaded three days worth. It took over 12 minutes to run. Be patient.

  11. On the tvheadend website, move to Configuration > Channel / EPG > EPG Grabber Channels and ensure the addon linked the channels correctly. You can always change where each EPG data is linked to on that page.

  12. If everything is setup, you should have EPG data for your tvheaded device. You can always navigate to your tvheadend server to see the XMLTV data http://device:9981/xmltv

  13. There are many other options in the Kodi addon that you can use to customize how you want your EPG data to look.

You shouldn’t use sudo with wget (not necessary in this case and an additional risk)

You are missing the destination folder

Thanks. I am learning linux. I appreciate your guidance. Its fixed.