e2m3u2bouquet 0.7

v0.7

Updated release today of the script only. This update adds the following functionality to the script

  • Config file based settings
  • Support for multiple providers

If you are a plugin user on 0.6.3 with a single IPTV provider there is no need to upgrade to script version 0.7 (Plugin v0.7 is in the pipe line).

However as probably the largest out standing feature on our list I thought it worth releasing the script alone for those that don’t mind the commandline.

So script release is available here;

https://github.com/su1s/e2m3u2bouquet/releases/tag/v0.7.0

Install Guide

Download and extract the e2m3u2bouquet.py file.

FTP it to /etc/enigma2/e2m3u2bouquet on your enigma2 box.

SSH into your enigma box, then;

cd /etc/enigma2/e2m3u2bouquet
chmod 755 e2m3u2bouquet.py
./e2m3u2bouquet.py

The script on first run will create a config.xml in /etc/enigma2/e2m3u2bouquet and tell you to fill it in.

Edit the config.xml and populate provider details and settings for as many providers as your require, the XML is commented so should be pretty straight forward.

NB: You need to change the supplier name field for the script to know you have updated the file.

nano config.xml
or
vi config.xml

Or use FTP to transfer the file for editing and replace it.

Then run the script again.

./e2m3u2bouquet.py

This will create bouquets for all the providers specificed and enabled in the config file.

Automation

To automate this use cron.

crontab -e

enter

0 5 * * * /etc/enigma2/e2m3u2bouquet/e2m3u2bouquet.py >> /tmp/e2.log

and press ESC follwed by :wq to exit the cron editor and save the entry. This will update your bouquets at 5am daily.

Issues

Any issues / bugs or problems leave a coment.

FAB URL Changes

Fab Urls

Changes to the new Fab new urls were made by Doug last night (12/08/2017)

However due to changes in the way we handle providers in later versions of the script you need to be on version >= 0.6 of the script or plugin to receive these changes.

See here or here to download the latest version.

Also please note FAB continue to be blocked by the current court directives despite the change in URLs so do not expect service during EPL matches

If you’re looking to setup a VPN on your enigma2 box there’s a guide available on the PIA website here

Community Guides – E2m3u2bouquet

Community Guides

Noticed a couple of good community guides knocking about for the plugin which may well be useful to some.

Firstly Tommycahir who came up with the initial concepts for the script has done a very concise install guide for the plugin over on Enigma2 Community (registration required but worth it)

How to install IPTV and EPG with Suls E2m3u2bouquet IPK

Also Head Melted has done a nice video install guide on YouTube

Enigma2 IPTV Bouquets with EPG ipk install , Suls Script removal & ipk install. quick guide.

Dsayers Guide to installing and configuring the plugin over on Techkings

Suls e2m3u2bouquet 0.6 IPTV Bouquet MakerMaker plugin

 

E2m3u2bouquet Help Thread

Help Thread

Common problems and resolutions for E2m3u2bouquet.

“Permission denied” attempting to run the script

Ensure the script is executable, eg run (in the folder the script is in)

chmod 777 e2m3u2bouquet.py

then run the script as per instructions

or run the script via python

python e2m3u2bouquet.py -n PROVIDER -u USERNAME -p PASSWORD

EPG is not working

Ensure you have enabled the source in epg-importer and run a manual import.

If this still doesn’t work paste your epg url into firefox, this should return a bunch of XML data to the browser (nb: doesn’t work in chrome), if you don’t receive XML data back in the browser your epg url is wrong. Contact your provider to resolve this.

ImportError: No module named argparse

You need to install argparse on your box. Telnet/ssh to your box and run

opkg install python-argparse

No Module named imghdr

You need to install python-image (and likely python-imaging). Telnet/ssh to your box and run

opkg install python-image python-imaging

Bouquets disappear after box is rebooted

If you’ve already installed the providers iptv.sh script the changes it makes will need to be reverted otherwise the new bouquets will be deleted on restart

  • SSH to the box and remove /usr/bin/enigma2_pre_start.sh – this sets iptv.sh to run on restart which causes all bouquets to be deleted
    N.B. Your box may use enigma2_pre_start.sh for other services. Check that it only contains iptv.sh before removing
rm /usr/bin/enigma2_pre_start.sh
  • Use the box GUI to delete the bouquet that iptv.sh creates Open the bouquet list. With the ‘Example’ bouquet selected, press the menu button there should be an option to remove the entry
  • Remove iptv.sh
rm /etc/enigma2/iptv.sh

e2m3u2bouquet 0.4.2

V0.4.2

Quick post, purely a bug fix release,

  • Includes 0.4.1 fix invalid picon path hanging the script
  • includes 0.4.1 update service number to use numbers unlikely to be in use by existing sat services
  • includes 0.4.1 leave service number gaps between categories to reduce the effect of playlist additions cause the epg to get out of sync
  • Fixed error for ACE and FLAWLESS users where “:” in category put the box into an infinite loop

e2m3u2bouquet_v0.4.2

 

e2m3u2bouquet 0.4

V0.4

OK been a couple of weeks but we have been busy.

Latest version of the script is now available below or from the home page, goto the home page for install instructions etc.

The script has come on a bit and is starting to be a bit more mature, some 500 lines of code compared to the initial release at 100 lines.

We are also now a team of 2! so kudos to Doug Mackay for doing at least half the coding on this release, also to Jose Sanchez for supplying the code for the picon support.

So changes this time

  • m3u file parsing updated ..
  • create single channels and sources list for EPG-Importer. Only one source now needs to be enabled in the EPG-Importer plugin (much quicker)
  • Added Picon download option (thanks to Jose Sanchez for initial code and idea)
  • Added custom bouquet ordering
  • Better command line arguments setup and processing
  • Mutli VOD by default
  • Named provider support (currently FAB, ULTIMATESPORTS and EPIC)
  • Delimiter options for user defined parsing of the m3u file (this means other format m3u files can be used with the script)

This means the command line options have changed again, they will remain static now,

So for the lucky FAB, ULTIMATESPORTS or EPIC people you can now run the script as follows

./e2m3u2bouquet.py -n FAB -u username -p password 

./e2m3u2bouquet.py -n EPIC -u username -p password 

Others need to run in a similar fashion to before but with the following options

./e2m3u2bouquet.py -m "http://stream.fabiptv.com:25461/get.php?username=USERNAME&password=PASSWORD&type=m3u_plus&output=ts" -e "http://stream.fabiptv.com:25461/xmltv.php?username=USERNAME&password=PASSWORD"

If any other providers want to be added to provider support just get in touch, happy to add others.

For information on picon support / custom bouquet sorting or specifying delimiter options for parsing other m3u file formats etc see the e2m3u2bouquet home page but for reference the full list of options is as follows.

usage: e2m3u2bouquet.py [-h] [-m M3UURL] [-e EPGURL] [-d1 DELIMITER_CATEGORY]
[-d2 DELIMITER_TITLE] [-d3 DELIMITER_TVGID]
[-d4 DELIMITER_LOGOURL] [-n PROVIDERNAME]
[-u USERNAME] [-p PASSWORD] [-i] [-s] [-P]
[-q ICONPATH] [-U] [-V]

e2m3u2bouquet.e2m3u2bouquet -- Enigma2 IPTV m3u to bouquet parser

Copyright 2017. All rights reserved.
Created on 2017-06-04.
Licensed under GNU GENERAL PUBLIC LICENSE version 3
Distributed on an "AS IS" basis without warranties
or conditions of any kind, either express or implied.

USAGE

optional arguments:
-h, --help show this help message and exit
-i, --iptvtypes Treat all stream references as IPTV stream type.
(required for some enigma boxes)
-s, --singlevod Create single VOD bouquets rather multiple VOD
bouquets
-P, --picons Automatically download of Picons, this option will
slow the execution
-q ICONPATH, --iconpath ICONPATH
Option path to store picons, if not supplied defaults
to /usr/share/enigma2/picon/
-U, --uninstall Uninstall all changes made by this script
-V, --version show program's version number and exit

URL Based Setup:
-m M3UURL, --m3uurl M3UURL
URL to download m3u data from (required)
-e EPGURL, --epgurl EPGURL
URL source for XML TV epg data sources
-d1 DELIMITER_CATEGORY, --delimiter_category DELIMITER_CATEGORY
Delimiter (") count for category - default = 7
-d2 DELIMITER_TITLE, --delimiter_title DELIMITER_TITLE
Delimiter (") count for title - default = 8
-d3 DELIMITER_TVGID, --delimiter_tvgid DELIMITER_TVGID
Delimiter (") count for tvg_id - default = 1
-d4 DELIMITER_LOGOURL, --delimiter_logourl DELIMITER_LOGOURL
Delimiter (") count for logourl - default = 5

Provider Based Setup:
-n PROVIDERNAME, --providername PROVIDERNAME
Host IPTV provider name (FAB/EPIC) (required)
-u USERNAME, --username USERNAME
Your IPTV username (required)
-p PASSWORD, --password PASSWORD
Your IPTV password (required)

e2m3u2bouquet_v0.4

e2m3u2bouquet – Automation via cron job

Cron Automation

OK quick post for those who requested it.

ssh to your enigma2 box

install busybox-cron

opkg install busybox-cron

Now set up your job

crontab -e

Will open the cron text editor.
Next steps need to be followed exactly as vi isn’t the most user friendly text editor

Press insert to start inputting text

Input your schedule and the command to run eg:

0 6,18 * * * /etc/enigma2/e2m3u2bouquet/e2m3u2bouquet.py -n FAB -u USERNAME -p PASSWORD >> /tmp/e2.log

or

0 6,18 * * * /etc/enigma2/e2m3u2bouquet/e2m3u2bouquet.py -m "http://stream.fabiptv.com:25461/get.php?username=YOURUSERNAME&password=YOURPASSWORD&type=m3u_plus&output=ts" -e "http://stream.fabiptv.com:25461/xmltv.php?username=YOURUSERNAME&password=YOURPASSWORD"

press escape to exit text entering mode

input

:wq

to write and quit from the file, your crontab is saved.

In the above example we have scheduled the job to run at 6am and 6 pm every day (6,18)

An alternative to the above is to use

(crontab -l ; echo "0 6,18 * * * /etc/enigma2/e2m3u2bouquet/e2m3u2bouquet.py -n FAB -u USERNAME -p PASSWORD")| crontab -

This will append the job to the crontab. You’ll get a warning message if the current crontab is empty

 

See here for more information on cron scheduling

Enigma2 IPTV m3u to bouquet v0.3

V0.3

nb: e2m3u2bouquet homepage is here for full instructions.

OK quick post to put this out there,

Thanks to all who tested the initial version and for all the suggestions and feedback really useful.

New version is a complete rewrite of the code base that won’t interest anyone unless they have an interest in python….

Feature wise it does the following

  • tvg-id now included in the channels from the m3u file
  • better parsing of m3u data (credit: Doug MacKay)
  • downloads m3u file from url
  • sets custom source to providers xml tv feed (as per Dougs v0.2)
  • fixed IPTV streams not playing / having incorrect stream type (Now set as IPTV stream type)
  • option to make all streams IPTV type (required for some enigma boxes)
  • option to split VOD bouquets by initial category
  • all parameters arg based so in theory works for other providers without a need to change the code and can be set up as an automatic cron job
  • auto reloads bouquets (credit: Doug MacKay)
  • debug \ testrun modes

In english, the bugs are ironed out, and epg is now working for everything that it can. It is no longer a requirement to manually download the m3u file the script will pick this up itself.

This does however mean the script is run differently.

Download version 0.3 here e2m3u2bouquet_v0.3

New instructions

  1. download the above file
  2. unzip the e2m3u2bouquet.py file
  3. ftp the e2m3u2bouquet.py to your engima2 box (i would suggest to /home/root)
  4. ssh to your enigma2 box (using putty or something similar)
  5. cd to the correct directory if you are not already there cd /home/root
  6. make script executable chmod 777 e2m3u2bouquet.py
  7. run the script passing the url for your m3u file and the url for your providers XML TV data feed (for FAB the below works)
    note: you need to replace the username and password values X 2
    python e2m3u2bouquet.py "http://stream.fabiptv.com:25461/get.php?username=YOURUSERNAME&password=YOURPASSWORD&type=m3u_plus&output=ts" "http://stream.fabiptv.com:25461/xmltv.php?username=YOURUSERNAME&password=YOURPASSWORD"
  8. No need to reboot

Additionally If you want epg data

  1. open EPG-Importer plugin (download it if you haven’t already got it)
  2. select sources (Blue button on openvix)
  3. enable all the IPTV UK sources created by the script
  4. Kick off a manual EPG import

If you are with a different provider the script should work but you will obviously need the m3u url (1st parameter) and XML TV url (2nd parameter) for your own provider. Please note the m3u file needs to be the “extended” version if you have the option.

For all stream types to be set to IPTV add -i to the end (default is DVB stream types for live channels and IPTV for VOD)

python e2m3u2bouquet.py "http://stream.fabiptv.com:25461/get.php?username=YOURUSERNAME&password=YOURPASSWORD&type=m3u_plus&output=ts" "http://stream.fabiptv.com:25461/xmltv.php?username=YOURUSERNAME&password=YOURPASSWORD" -i

To split VOD channels via category add -m

python e2m3u2bouquet.py "http://stream.fabiptv.com:25461/get.php?username=YOURUSERNAME&password=YOURPASSWORD&type=m3u_plus&output=ts" "http://stream.fabiptv.com:25461/xmltv.php?username=YOURUSERNAME&password=YOURPASSWORD" -m

To uninstall, dummy the positional parameters and add -U (yukky I know, will resolve)

python e2m3u2bouquet.py a a -U

There’s still quite a bit of work to do with the script but I wanted to get some thing that had working epg and could be automated out there.

 

Enigma2 IPTV m3u to bouquet

E2m3u2bouquet

This post is obsolete : Please see e2m3u2bouquet homepage for latest version

Background

Bit of a side project this one, but following recent developments seemed a shame not to be getting the best out of the VU+ solo2 box.

Long story short there are some good IPTV providers out there, however the offering enigma2 wise seems to be a giant m3u file that you import into a single bouquet or manually configure with E-channeliser. Both reasonable approaches but a bit lacking in usability and some what time consuming.

Anyway a couple of nights research and a bit of messing about and I have working script to convert an m3u into enigma2 bouquets, with *currently limited* UK EPG support.

So what does it do?

  • Takes a single m3u file and creates enigma2 user bouquets based the m3u data
  • Also creates unique service references for use with EPG importers
  • Creates supporting files for EPG-Import plugin

NB: The script does not touch or change any of your existing bouquets

Where can i get it ?

Here e2m3u2bouquet

How do i use it?

  1. download the above file
  2. unzip the e2m3u2bouquet.py file
  3. download your service providers m3u playlist from their site
  4. ftp the e2m3u2bouquet.py to your engima2 box along with the m3u file you have downloaded from your provider (i would suggest to /home/root)
  5. ssh to your enigma2 box (using putty or some thing similar)
  6. cd to the correct directory if you are not already there cd /home/root
  7. make script executable chmod 777 e2m3u2bouquet.py
  8. run the script passing the name of your m3u file as a parameter ./e2m3u2bouquet.py nameofyourfile.m3u
  9. if the above step fails try python e2m3u2bouquet.py nameofyourfile.m3u
  10. reboot your enigma2 box

Additionally If you want epg data

  1. open EPG-Importer plugin (download it if you haven’t already got it)
  2. select sources (Blue button on openvix)
  3. enable the IPTV UK sources created by the script (only worth doing for UK channels currently as only rytec UK sources are currently included)
  4. Kick off a manual EPG import

How do I update my Channels

Download a new m3u file to your box and run the script again, this will wipe out all the previously created files and bouquets and redo the process.

I’ll look into automating this in the future time permitting.

How do I get rid of it ?

In the event that the changes are not for you simply run the script with an uninstall parameter, this will reverse all the changes made by the script

./ e2m3u2bouquet.py uninstall

Known Limitations

EPG for foreign channels not supported (Not sure it will be)

EPG for UK channels hit and miss currently (about 50%) – some work to be done here, ill be looking into this next

PIC icons – Not currently supported

Version history

0.1 – Beta version for limited testing

Known supported boxes

VU Plus Solo2 / Openvix 5
zGemma h2s
VU PLus Duo / OpenVix
Xtrend 7500 OpenPli
Zgemma Openvix

 

Support

ping me in the comments