[Enigma2] How To Get Full EPG For IPTV Channels

H4MZ4

Member
This thread is pretty much a rewrite of an existing tutorial. However, that method is slightly outdated and may be a little confusing, so here I am giving the steps which I used personally so hopefully it will be easier to understand.

As the previous thread stated...

# I do not take responsibility for any lost data or damage to your system or device, This is done at your own risk! #


-----------------
Generic Notes
  • The previous guide only mentioned non-UK epg, but as said, this is outdated and there are new EPG services for UK
  • In the 2nd section, I'll cover how to setup a Cron Job to download the EPG automatically daily
  • In several steps, there are automatic scripts which have come from the original thread, so credit to tommycahir for those
  • You're going to need knowledge on using programs like PuTTY and FileZilla

You Will Need:

  • Engima2 Box, such as Zgemma, Vu+, etc
  • IPTV Subscription (I will be using a few FTA streams)
  • FTP client such as FileZilla (Download), or even the Windows Explorer itself
  • E-Channelizer (Download)
  • EPGImport plugin
  • SSH Client for using the quick automatic scripts for some of the steps (Download)

-----------------

1) Adding Your IPTV Channels To A Bouquet
  • If you haven't already, you will need to use E-Channelizer to import your IPTV channels into a new bouquet. This tutorial isn't covering how to do that, but Google can tell you.
  • Once you've got it ready, it should look something like this, I'm using a random IPTV playlist I found:
f42b003692797e67bce7aa8ea85b083f.png

2) Choosing EPG Data
  • As I said in the beginning, it's now possible to download a UK EPG in XML format, which therefore allows you to get the EPG working for IPTV channels
  • Head over to the XMLTV UK site, and pick one of the feeds. I will be using the 24 hour feed.
  • Download the one you are wanting and save the file to your desktop
  • Copy the link to somewhere like Notepad as you will need it later.
187b85331b9b243f6a7044807b0ad5ed.png

3) Updating Stream References
  • Now we are going to use the E-Channelizer again, so open it up, and "Read From STB" to get the latest channel lists and information from the box
  • Download this script here and place it on your desktop or somewhere similar
  • FTP into your box and place the script in /home/root
  • SSH into your box and enter "cd /home/root", and check the script is there by doing "ls", and you should see the script name show up
58a637d7d35f9d71d444328cc6c6a0df.png

  • Go into /etc/engima2 and check which bouquet is your IPTV one, in my example my bouquet is called "Premium IPTV", and you can see the file is called "userbouquet.premium_iptv.tv"
    d45e0a10ee94a9305e8acce0c3c925a1.png
  • Now go ahead and enter the command with your bouquet file name, mine would be "python streamrefupdate.py /etc/enigma2/userbouquet.premium_iptv.tv"
1afafeb71f0a75415935cb5454beadbb.png


  • Now go ahead into E-Channelizer again, and reconnect to the box in order to update the bouquets. Double click on 2 different channels and make sure the "Stream Reference" is different.
7c1299a501c839486f67993106cd7e22.png

930151da0689868429c5f2e2e1c15017.png

  • As you can see, the Sky News stream reference is different to the Channel 5 stream reference, therefore we know the script has worked properly

4) Creating custom.channels.xml
  • This is where the most effort is needed, and also where we use another script (Download)
  • First download the script and place it on your desktop
  • Now connect to the box via FTP and place the script again in /home/root
  • Connect via SSH and do "cd /home/root" and "ls" to verify that the script is there.
0ac53f08b272b30fafa592930b674890.png

  • As with the first script, you want to run it in SSH by adding your bouquet file at the end, as my bouquet file was "premium_iptv", my command will be "python channelscreator.py /etc/enigma2/userbouquet.premium_iptv.tv"
  • Now that's done, connect via FTP and head into /home/root and you will notice a new file called "custom.channels.xml", copy that over to your desktop
  • Notice inside the file, that for each line, it shows the stream reference for each channel with the name on the left hand side
8f55f3fd6fa8d4c56f68a906cb9a70d4.png


  • Back on step 1, you should've downloaded the EPG you wanted, in my case, the 24 hour one.
  • Open the custom.channels.xml file, and the epg you downloaded
8bd0175f7b2d57290ec9d3fa289e0551.png


  • My first IPTV channel is Sky Sports 1, so on the epg file, search for Sky Sports 1.
  • As you can see, the channel ID is shown, therefore copy that ID to the custom.channels.xml file under "placeholder"
17d6b8f36992152f00c1779d67f988db.png


  • Now do this for all of the channels in your IPTV sub, search for the channel in the epg file, and copy the channel id to the custom.channels.xml
  • This is how the custom.channels.xml file should end up like, but with all your IPTV channels with the correct channel id from the epg file.
01c3d2c26ea40617eab58356dca5ba80.png

5) Creating custom.sources.xml
  • Coming up to our last few steps now
  • Create yourself a new file and call it "custom.sources.xml" and make sure it ends with xml, and not txt!
  • Inside this file, add the following:
Code:
<source type="gen_xmltv" channels="/etc/epgimport/custom.channels.xml">
   <description>IPTV EPG Test</description>
   <url>http://www.xmltv.co.uk/feed/6550</url>
</source>

  • You should change the description to something you will remember
  • Also the URL should be the EPG link that you choose in Step 1, this example is the 24 hour one!
  • Make sure the line for "/custom.channels.xml" is typed exactly the same as the file you made
  • Once done, it should look something like the one below, and save.
99fbdc0a8d5b5817db2c72da9d257705.png

6) Transfering Files To Box
  • It'd be a good time to download the EPGImport plugin on your box, if you don't have it already... MENU>Plugins>*GREEN BUTTON*>Extensions>EPGImport
  • Now you want to get the 2 files ready to upload that we made, the "custom.sources.xml" and "custom.channels.xml"
  • Place these 2 files onto the box over FTP to /etc/epgimport so it should look as below
26f8f58fbd8d70fdee26d77bb743ee8c.png

7) Configuring EPGImport
  • First we will test that the EPG works, then we will set up the daily task.
  • Go ahead and open the EPGImport plugin
  • Now press Blue to get to the sources, you will see the description of what you placed in the custom.sources.xml
  • Press Ok to tick it, then green to save
  • Now let's manually import the EPG to test it initially works, so press yellow, and select yes
  • Once the import is complete, open your EPG and check the bouquet out, and as you can see, the EPG is working fully!
6bfc0cf903dc4288b6f859c987217ddf.png

(Notice on SSF1, there is a program called "Madani Muzakara", this is from a different channel and it's what happens when you have the same stream reference on more than 1 channel, the epg programs mess up in order for the channels you have set the same stream reference from. Therefore it's very important you make sure that each channel has it's own stream reference)

8) Configuring Auto Import Daily
Since I chose the 24 hour EPG, I want it to download daily at 5AM and automatically import, this is where EPGImport's useful features come in.

  • Open the EPGImport Plugin
  • Enable Automatic Import
  • Set a time for the import, make it after 3:30AM since that's when the EPG updates on the site, I set mine for 9AM for no reason at all :/
  • Press green to save
  • Done!
bc425fb5f33272f885edfd1640aa89bb.png
 
Great post, but i have a question, i posted this on the zgemma forum also, number 8 Auto Import of EPG i have also changed my settings to re-import every day at 04.00 but it seems to get stuck at 86 thousand events out of 192 thousand and then jus sits there saying trying to import but never manages to complete, the only way seems to turn the box off and do this manually...any ideas..??..

Many Thanks
Rich
 
Hi Guys, any ideas when i try to re-import either on timer or manually it now gets stuck at about 69 thousand events and wont move on further..???
 
My laptop is pretty much obsolete so won't be able to get the e-channelizer software! Didnt find any iOS version in the App Store.

Don't suppose the supplier can set it up his end and send over in script format?
 
anyone got a video for this as I'm struggling to comprehend this
never had to do this before and struggling following
 
My laptop is pretty much obsolete so won't be able to get the e-channelizer software! Didnt find any iOS version in the App Store.

Don't suppose the supplier can set it up his end and send over in script format?
The application isn't available for mobile.

In some cases the IPTV supplier provides EPG. Though I've never bought an IPTV sub so I don't know how they work with EPGs.
 
anyone got a video for this as I'm struggling to comprehend this
never had to do this before and struggling following

Doesn't seem to be many videos for actually downloading the EPG from an external source, many are just taking the EPG from Cable/Satellite, which you can do if you have one of them connected.

Feel free to PM if that would help.
 
Hi Guys, any ideas when i try to re-import either on timer or manually it now gets stuck at about 69 thousand events and wont move on further..???
Thousand events? Quite a lot there, I can't really say for sure, but it could be that there are too many events for it to handle, maybe try it with less channels in your custom channels to see if maybe you're trying too many.

Also you might have mis configured your custom.sources.xml channel ID?

Again, can't say for sure since I've never imported that many events. But those are possibilities
 
Heya mate,

Followed it exactly and it works a treat for UK although XMLTV are missing the Irish channels and some others. Is there any way to do multiple EPGs for IPTV e.g. Spain, Germany, USA etc.? I'd like to get guides for those I'd use regularly. Cheers.
 
Heya mate,

Followed it exactly and it works a treat for UK although XMLTV are missing the Irish channels and some others. Is there any way to do multiple EPGs for IPTV e.g. Spain, Germany, USA etc.? I'd like to get guides for those I'd use regularly. Cheers.
Nice to see it works...

If you find services that provide the EPG in XML format for those countries, for example USA (https://raw.githubusercontent.com/euyulio/epg/master/guide.xml), then you can certainly use that. Follow the guide exactly the same, but create a new sources and channel file with the new URL for EPG.

You could also custom name them to something like

UKEPG.sources.xml
UKEPG.channels.xml

USEPG.sources.xml
USEPG.channels.xml

so you'd have multiple EPGs to download daily, or however you set it.
 
Cheers mate. Will give that a go for some of the US channels.

I used E-Channelizer today on a number of them and works a treat. Very user-friendly and you can now drag the EPG from a Sky Feed onto an IPTV channel.

I send my existing bouquets over to E-Channelizer. I then sorted my IPTV bouquet and mixed them into my existing FTA channels and the remaining Sky channels e.g. BBC 1 HD on my Entertainment bouquet is a DVB-S service while is Sky Sports 1 HD is a stream. On the left hand side I open the services panel and on the right I have my bouquets. On services, find e.g. Sky Sports 1 HD, press Ctrl and drag the channel onto your IPTV Sky Sports 1 HD. This allocates it the EPG from the DVB-S service.

It's much quicker than the posted version but both achieve the same results. However, it will only allow you to do it to those bouquets your feeds can read so USA channels, 19.2 etc. can't be read.
 
Cheers mate. Will give that a go for some of the US channels.

I used E-Channelizer today on a number of them and works a treat. Very user-friendly and you can now drag the EPG from a Sky Feed onto an IPTV channel.

I send my existing bouquets over to E-Channelizer. I then sorted my IPTV bouquet and mixed them into my existing FTA channels and the remaining Sky channels e.g. BBC 1 HD on my Entertainment bouquet is a DVB-S service while is Sky Sports 1 HD is a stream. On the left hand side I open the services panel and on the right I have my bouquets. On services, find e.g. Sky Sports 1 HD, press Ctrl and drag the channel onto your IPTV Sky Sports 1 HD. This allocates it the EPG from the DVB-S service.

It's much quicker than the posted version but both achieve the same results. However, it will only allow you to do it to those bouquets your feeds can read so USA channels, 19.2 etc. can't be read.
Hi Conor
I m doing the same as you - so one question as you are on ahead of me - I have the original bouquet file and my sub IPTV file - running Zgemma H2S - however when adding the paid sub iptv stream into the mix - the stream wont show but EPG does - so i must have something wrong somewhere - could you offer some advice on the code -
SlY 1 as example
#DESCRIPTION 106 Sky1
#SERVICE 4097:0:1:30:0:0:0:0:0:0:
replacing with IPTV stream
#DESCRIPTION 106 SKY 1
( Then IPTV code )

Am i missing something?

Cheers

GJH
 
Cheers mate. Will give that a go for some of the US channels.

I used E-Channelizer today on a number of them and works a treat. Very user-friendly and you can now drag the EPG from a Sky Feed onto an IPTV channel.

I send my existing bouquets over to E-Channelizer. I then sorted my IPTV bouquet and mixed them into my existing FTA channels and the remaining Sky channels e.g. BBC 1 HD on my Entertainment bouquet is a DVB-S service while is Sky Sports 1 HD is a stream. On the left hand side I open the services panel and on the right I have my bouquets. On services, find e.g. Sky Sports 1 HD, press Ctrl and drag the channel onto your IPTV Sky Sports 1 HD. This allocates it the EPG from the DVB-S service.

It's much quicker than the posted version but both achieve the same results. However, it will only allow you to do it to those bouquets your feeds can read so USA channels, 19.2 etc. can't be read.
Hi Conor
I m doing the same as you - so one question as you are on ahead of me - I have the original bouquet file and my sub IPTV file - running Zgemma H2S - however when adding the paid sub iptv stream into the mix - the stream wont show but EPG does - so i must have something wrong somewhere - could you offer some advice on the code -
SlY 1 as example
#DESCRIPTION 106 Sky1
#SERVICE 4097:0:1:30:0:0:0:0:0:0:
replacing with IPTV stream
#DESCRIPTION 106 SKY 1
( Then IPTV code )

Am i missing something?

Cheers

GJH
 
This guide is great and works well. I seem to have lost my EPG however, is this because I have created new bouquets and moved channels around? I previously had them in 1 bouquet and it worked fine.
 
Back
Top