EPG from Enigma2 STB - as IPTV

Post here your ideas on how to make TVMosaic product better
Post Reply
Amatøren
Posts: 46
Joined: Mon Mar 26, 2018 8:27 am

EPG from Enigma2 STB - as IPTV

Post by Amatøren » Mon Apr 30, 2018 6:14 pm

Hi.

On DVBLink it was support for EPG from Enigma2 STB with EPG from the STB.

I have tested the new version and it has a great improvment now. Thanks to Oberon & team!

Now streaming from my VU+ Duo2 works perfect. Recording & playback also.

I have a script that creat a m3u playlist.

Some lines from the top:

Code: Select all

#EXTM3U
#EXTINF:-1  tvg-chno="1" tvg-id="NRK1 HD",NRK1 HD
http://192.168.0.205:8001/1:0:19:40F:46:46:E080000:0:0:0:
#EXTINF:-1  tvg-chno="2" tvg-id="TV 2 HD (N)",TV 2 HD (N)
http://192.168.0.205:8001/1:0:19:1BA1:44:46:E080000:0:0:0:
#EXTINF:-1  tvg-chno="3" tvg-id="NRK2 HD",NRK2 HD
http://192.168.0.205:8001/1:0:19:410:46:46:E080000:0:0:0:
I got perfect channel sorting by number.

If I change tvg-id (is it correct tag?) from the ID in xmltv file to WEB call for EPG, I hope TV Mosaic also can direct import the EPG from the STB (as DVBLink for Dreambox).

Code: Select all

#EXTM3U
#EXTINF:-1  tvg-chno="1" tvg-id="http://192.168.0.205/web/epgservice?sRef=1:0:19:40F:46:46:E080000:0:0:0:",NRK1 HD
http://192.168.0.205:8001/1:0:19:40F:46:46:E080000:0:0:0:
#EXTINF:-1  tvg-chno="2" tvg-id="http://192.168.0.205/web/epgservice?sRef=1:0:19:1BA1:44:46:E080000:0:0:0:",TV 2 HD (N)
http://192.168.0.205:8001/1:0:19:1BA1:44:46:E080000:0:0:0:
#EXTINF:-1  tvg-chno="3" tvg-id="http://192.168.0.205/web/epgservice?sRef=1:0:19:410:46:46:E080000:0:0:0:",NRK2 HD
http://192.168.0.205:8001/1:0:19:410:46:46:E080000:0:0:0:

Short example from EPG download (from one channel):

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<e2eventlist>
	<e2event>
		<e2eventid>14964</e2eventid>
		<e2eventstart>1525110300</e2eventstart>
		<e2eventduration>2400</e2eventduration>
		<e2eventcurrenttime>1525111783</e2eventcurrenttime>
		<e2eventtitle>Planet Plast</e2eventtitle>
		<e2eventdescription>(Ep. 4:4/s1).  Kan vi rydde opp i dette?</e2eventdescription>
		<e2eventdescriptionextended>Dokumentarserie. Line Elvsåshagen vil redde hvalene, fiskene og fuglene som dør av plasten i havet. Finnes det noe vi kan gjøre, eller er det allerede for sent?</e2eventdescriptionextended>
		<e2eventservicereference>1:0:19:40F:46:46:E080000:0:0:0:</e2eventservicereference>
		<e2eventservicename>NRK1 HD</e2eventservicename>
	</e2event>
	<e2event>
		<e2eventid>14965</e2eventid>
		<e2eventstart>1525112700</e2eventstart>
		<e2eventduration>1800</e2eventduration>
		<e2eventcurrenttime>1525111783</e2eventcurrenttime>
		<e2eventtitle>Norge nå</e2eventtitle>
		<e2eventdescription>(Ep. 68:78/s1).  Norsk talkshow.</e2eventdescription>
		<e2eventdescriptionextended>Hvert år dør rundt én million sjøfugl på grunn av plastsøppel i havet. Norge nå sender direkte fra Runde i Møre og Romsdal, der 500.000 sjøfugl hekker i sommerhalvåret.</e2eventdescriptionextended>
		<e2eventservicereference>1:0:19:40F:46:46:E080000:0:0:0:</e2eventservicereference>
		<e2eventservicename>NRK1 HD</e2eventservicename>
	</e2event>
</e2eventlist>
Attachments
playlist_and_epg.zip
(7.24 KiB) Downloaded 252 times

gyugyo
Posts: 19
Joined: Wed Mar 21, 2018 9:55 am

Re: EPG from Enigma2 STB - as IPTV

Post by gyugyo » Tue May 01, 2018 8:57 pm

Until you are ready to do + want someone to be useful.
I wrote a python script to my NAS for PLEX that makes XMLTV xml from the Enigma2 BOX EPG (OpenWebIf)

Because PLEX did not synchronize the channel to which channel_id contained space in the associated XMLTV file.
That is why there is a point to replace all spaces.
This is my first and last thing written in python, so it's not the most profitable.
You must manually enter channels into a list that you want to download.
Until the pros are doing better than the one who can use it a bit.

I'm running the Synology NAS Task Scheduler twice a week for this script:

python /volume1/homes/gyugyo/python/exml.py
cp -f /volume1/Plex/tvguide.xml /volume1/TVMosaic/xmltv/tvguide.xml

The /volume1/Plex/tvguide.xml file for exmlt.py is set as a target to copy the second line to the TVMOSAIC directory.

NAS runs 2.7-bit Python (pre-installed). I think it can be used on another site that is installed / already part of the system preinstalled,
but surely I do not know. I'm working on Synology NAS under 6.1.x -DSM

In the file, you will need to enter the username and password for the ip address and port of the box. Where to save xml. And the channel list.
id_lista = ['1:0:19:40:26:1:FFFF0000:0:0:0:','1:0:1:37:24:1:FFFF0000:0:0:0:','1:0:1:3F:26:1:FFFF0000:0:0:0:']
xml_save='/volume1/directory_name/tvguide.xml'#xml save location.
usern= 'root'#OpenWebif Username
passw= 'password'#OpenWebif password
ipc= '192.168.0.100'#OpenWebif ip
port='80'#OpenWebif port if not the default. Sample: '8888'
exml.zip
(2.19 KiB) Downloaded 238 times

Amatøren
Posts: 46
Joined: Mon Mar 26, 2018 8:27 am

Re: EPG from Enigma2 STB - as IPTV

Post by Amatøren » Tue May 01, 2018 9:36 pm

Thanks for the information.

I have made a bash script on my CentOS server (it also works on my VU+ Duo2) that can provide both m3u channel list (with parameter GET_ALL) and xmltv EPG file.

With parameter PRINT I got report in console window.

So getting EPG I have a solution, but it would be more smooth if TV Mosaic could download and decode the EPG automatically. DVBLink for Dreambox does it.

praze
Posts: 1
Joined: Tue Mar 19, 2019 10:01 am

Re: EPG from Enigma2 STB - as IPTV

Post by praze » Tue Mar 19, 2019 10:04 am

I've also made a custom Python script to extract the EPG info from the Enigma2 box using OpenWebif and converting it to an "decent" XMLTV for Plex.

https://github.com/cvarelaruiz/owi2plex

Still few issues but I hope to improve it in the following days (any help also appreciated).

Jeromim
Posts: 1
Joined: Mon May 27, 2019 10:35 pm

Re: EPG from Enigma2 STB - as IPTV

Post by Jeromim » Mon May 27, 2019 10:39 pm

I'm trying to install on openatv and this is giving installation error. Could someone help me with this error?

root@vuuno4k:~# pip install owi2plex
Collecting owi2plex
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Requirement already satisfied: future==0.17.1 in /usr/lib/python2.7/site-packages (from owi2plex) (0.17.1)
Collecting lxml==4.3.2 (from owi2plex)
Using cached https://files.pythonhosted.org/packages ... 3.2.tar.gz
Requirement already satisfied: requests==2.21.0 in /usr/lib/python2.7/site-packages (from owi2plex) (2.21.0)
Requirement already satisfied: click==7.0 in /usr/lib/python2.7/site-packages (from owi2plex) (7.0)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/lib/python2.7/site-packages (from requests==2.21.0->owi2plex) (1.24.3)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests==2.21.0->owi2plex) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python2.7/site-packages (from requests==2.21.0->owi2plex) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests==2.21.0->owi2plex) (2019.3.9)
Installing collected packages: lxml, owi2plex
Running setup.py install for lxml ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/var/volatile/tmp/pip-install-b_2p8a/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/volatile/tmp/pip-record-71Gwci/install-record.txt --single-version-externally-managed --compile:
Building lxml version 4.3.2.
Building without Cython.
ERROR: /bin/sh: xslt-config: command not found

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/lxml
copying src/lxml/doctestcompare.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/pyclasslookup.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/cssselect.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/usedoctest.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/__init__.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/ElementInclude.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/builder.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/_elementpath.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/sax.py -> build/lib.linux-armv7l-2.7/lxml
creating build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.linux-armv7l-2.7/lxml/includes
creating build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/defs.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/formfill.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/clean.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/__init__.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/builder.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/diff.py -> build/lib.linux-armv7l-2.7/lxml/html
creating build/lib.linux-armv7l-2.7/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.linux-armv7l-2.7/lxml/isoschematron
copying src/lxml/etree.h -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/etree_api.h -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/lxml.etree.h -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/includes/schematron.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/__init__.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.linux-armv7l-2.7/lxml/includes
creating build/lib.linux-armv7l-2.7/lxml/isoschematron/resources
creating build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/rng
creating build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl
creating build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.linux-armv7l-2.7
creating build/temp.linux-armv7l-2.7/src
creating build/temp.linux-armv7l-2.7/src/lxml
arm-oe-linux-gnueabi-gcc -march=armv7ve -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a15 -pthread -fno-strict-aliasing -Os -pipe -g -feliminate-unused-debug-types -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/etree.c -o build/temp.linux-armv7l-2.7/src/lxml/etree.o -w
unable to execute 'arm-oe-linux-gnueabi-gcc': No such file or directory
Compile failed: command 'arm-oe-linux-gnueabi-gcc' failed with exit status 1
creating tmp
cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitliu58i.c -o tmp/xmlXPathInitliu58i.o
unable to execute 'cc': No such file or directory
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
error: command 'arm-oe-linux-gnueabi-gcc' failed with exit status 1

----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/var/volatile/tmp/pip-install-b_2p8a/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/volatile/tmp/pip-record-71Gwci/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /var/volatile/tmp/pip-install-b_2p8a/lxml/

Post Reply