Tutorial configuración mhw2epgdownloader en Crossepg

sergiotas

BH Lover
Mhw2epgdownloader
El mhw2epgdownloader permite la descarga y el formateo de la guía electrónica para distintos proveedores vía satélite que se basan en los protocolos mhw1 y mhw2. Funciona en sistemas con el DVBAPI para Linux. Los más populares son enigma1, enigma2, mythtv… Puede aparecer como binario independiente para mythtv, plugin e1 para mv, plugin e2 o embebido en crossepg.


Funcionamiento interno de mhw2epgdownloader.
El mhw2epgdownloader formatea la guía electrónica en una base de datos sqlite3. En principio dicha base de datos se crea en memoria, pero para su estudio y análisis se puede guardar en un fichero. Para eso, debemos activar en el fichero de configuración –normalmente mhw2epgdownloader.conf- las siguientes variables:
Code:
dbinmemory = 0
dbfile = /tmp/mhw2epg.db
Después de ejecutar el mhw2epgdownloader en cualquiera de sus formatos podemos accede a la base de datos. Podemos utilizar cualquier herramienta de gestión de bases de datos sqllite3 como por ejemplo el SQLiteStudio.
La base de datos consta de varias tablas:
Code:
Channels
Channels_copy
Events
Settings
Summaries
Themes
Las principales tablas son channels, events y summaries. Un ejemplo de consulta podría ser:
Resumen de todos los canales descargados, total de eventos, fecha de primer evento y fecha último evento.
Code:
SELECT c.channel_id, c.channel, c.network, c.transponder, c.service,
(SELECT count(event_id) FROM events e WHERE e.channel_id=c.channel_id) as totalevents,
(SELECT dateev FROM events e WHERE e.channel_id=c.channel_id ORDER BY dateev ASC LIMIT 1) as first_event,
(SELECT dateev FROM events e WHERE e.channel_id=c.channel_id ORDER BY dateev DESC LIMIT 1) as last_event
FROM channels AS c;


Funcionamiento interno del mhw2epgdownloader embebido en crossepg.
En crossepg puedes encontrar el mhw2epgdownloader en /usr/crossepg/scripts/mhw2epgdownloader o en /var/crossepg/scripts/mhw2epgdownloader dependiendo de la imagen
Los ficheros de configuración son mhw1_csdfrance.conf, mhw1_csdnl.conf, mhw1_cyfra.conf y mhw2_dplus.conf
Cada canal se determina por servico:transponder:red. En enigma2 puedes ver la información de cada canal pulsando menú -> información -> Canal -> PIDS
SID: servicio
TSID: Transponder
ONID: Red
La información del epg a veces no viene de forma correcta. Pueden ocurrir tres casos:
1) Que la información del epg de un determinado canal venga correctamente.
2) Que la información del epg de un determinado canal no exista, pero que exista dicha información en un canal clon.
Por ejemplo , para Francia el canal TF1 HD no trae epg, pero el canal TF1 sí trae epg.
Dado que el canal es de csdfrance hay que añadir una línea en el fichero de configuración mhw1_csdfrance.conf
Code:
channel copy = 20AE:432:1:TF1 -> 2329:0442:1:TF1 HD

3) Que la información del epg de un determinado canal venga definido de forma incorrecta en servicio:transponder:red
Por ejemplo, para España el canal C+LIGA HD viene en con la información incorrecta, dado que viene asociada a un canal de promoción. Habría que añadir una línea en el fichero de configuración mhw2_dplus.conf
Code:
channel replace = 7611:408:1:C+LIGA HD -> 7852:0:0:C+LIGA HD

Sabremos que un canal viene definido de forma incorrecta si los parametros service, transponder y network en la base de datos no se corresponden con el canal adecuado.
 

Matrix10

Administrator
Ejemplo mhw1_csdfrance.conf: algunos CSD Francia canales HD
EXAMPLE mhw1_csdfrance.conf file : some CSD FRANCE HD Channels


No te olvides de desactivar el EPG MHW en el imagee
Si utiliza CrossEPG MHW
Ponga todo>> no

en Bluebutton>> Red>> Red>> configuración EPG

Do not forget to disable MHW EPG within the image
If you use CrossEPG MHW
Put everything >> no
in Bluebutton>>Red>>Red>>EPG setup




#--------------------------------------------------------------
#
# mhw2epgdownloader Configuration file
#
# EPG Data collector
#
#--------------------------------------------------------------
#--------------------------------------------------------------
# LOG SECCTION
#--------------------------------------------------------------
log enable = 1
log file = /tmp/mhw1_csdfrance.log
#--------------------------------------------------------------
# SETTINGS SECCTION
#--------------------------------------------------------------
max events = 22000
max summaries = 8000
# Numero de pasadas, a mas pasadas, mas probabilidad de que descarguemos
# una programacion mas completa, pero mas lento
repeat = 1
# base de datos sqlite3
dbfile = mhw2epg.db
# Crear la base de datos sqlite3 en memoria
dbinmemory = 1
# Juego de caracteres
# El formato via satelite es LATIN1 o ISO-8859-1
# lo podemos convertir a UTF8
latin1 to utf8 = 1
# Segundos que varia programacion con respecto al satelite
seconds to add = 0
# Ejecutar antes de la descarga
run before =
# Ejecutar despues de la descarga y exportaciones
# {param: xmltv channels file} {param: xmltv events file} {param: total channels} {param: total themes} {param: total events} {param: total summaries} {param: utf8}
run after =
# dispositivo
device = autodetect
#--------------------------------------------------------------
# EXPORT SECCTION
#--------------------------------------------------------------
# mv format
mv enable = 0
mv file = /media/hdd/mv/ec-save/epg.dat
# xmltv format
xmltv enable = 0
xmltv events file = xmltv/tdteam.events.xml
xmltv channels file = xmltv/tdteam.channels.xml
# crossepg format
crossepg enable = 1
crossepg db_root path = autodetect
crossepg libcrossepg path = autodetect
#--------------------------------------------------------------
# CHANNELS REPLACE SECCTION
#--------------------------------------------------------------
# channel replace = service:transponder:network:name -> service:transponder:network:name

#--------------------------------------------------------------
# CHANNELS COPY SECCTION
#--------------------------------------------------------------
# channel copy = service:transponder:network:name -> service:transponder:network:name
channel copy = 20AE:432:1:TF1 -> 2329:0442:1:TF1 HD
channel copy = 20B6:432:1:FRANCE 2 -> 232A:442:1:FRANCE 2 HD
channel copy = 200E:430:1:CINE+ PREMIER -> 2455:0440:1:CINE+ PREMIER HD
channel copy = 200B:430:1:CANAL+ CINEMA -> 2263:0438:1:CANAL+ CINEMA HD
channel copy = 200A:430:1:CANAL+ DECALE -> 2262:0438:1:CANAL+ DECALE HD
#--------------------------------------------------------------
# CHANNELS DELETE SECTION
#--------------------------------------------------------------
#channel delete = 9999:222:1:TELEBASURA
 

sergiotas

BH Lover
mhw2_dplus.conf

Code:
#--------------------------------------------------------------
#
# mhw2epgdownloader Configuration file
#
# EPG Data collector
#
#--------------------------------------------------------------
 
#--------------------------------------------------------------
# LOG SECCTION
#--------------------------------------------------------------
 
log enable = 1
log file = /tmp/mhw2_dplus.log
 
#--------------------------------------------------------------
# SETTINGS SECCTION
#--------------------------------------------------------------
 
max events = 22000
max summaries = 8000
 
# Numero de pasadas, a mas pasadas, mas probabilidad de que descarguemos
# una programacion mas completa, pero mas lento
repeat = 1
 
# base de datos sqlite3
dbfile = mhw2epg.db
 
# Crear la base de datos sqlite3 en memoria
dbinmemory = 1
 
# Juego de caracteres
# El formato via satelite es LATIN1 o ISO-8859-1
# lo podemos convertir a UTF8
latin1 to utf8 = 1
 
# Segundos que varia programacion con respecto al satelite
seconds to add = 0
 
# Ejecutar antes de la descarga
run before =
 
# Ejecutar despues de la descarga y exportaciones
# {param: xmltv channels file} {param: xmltv events file} {param: total channels} {param: total themes} {param: total events} {param: total summaries} {param: utf8}
run after =
 
# dispositivo
device = autodetect
 
#--------------------------------------------------------------
# EXPORT SECCTION
#--------------------------------------------------------------
 
# mv format
mv enable = 0
mv file = /media/hdd/mv/ec-save/epg.dat
 
# xmltv format
xmltv enable = 0
xmltv events file = xmltv/tdteam.events.xml
xmltv channels file = xmltv/tdteam.channels.xml
 
# crossepg format
crossepg enable = 1
crossepg db_root path = autodetect
crossepg libcrossepg path = autodetect
 
#--------------------------------------------------------------
# CHANNELS REPLACE SECCTION
#--------------------------------------------------------------
# channel replace = service:transponder:network:name -> service:transponder:network:name
 
channel replace = 746c:3f0:1:C+ACCION -> 7472:3f0:1:C+ACCION
channel replace = 746d:3f0:1:C+COMEDIA -> 7473:3f0:1:C+COMEDIA
channel replace = 746e:3f0:1:C+DCINE -> 7474:3f0:1:C+DCINE
 
channel replace = 7611:408:1:C+LIGA HD -> 7852:41a:1:C+LIGA HD
channel replace = 7612:408:1:CANAL+1 HD -> 74cc:3f8:1:CANAL+1 HD
channel replace = 7625:408:1:HOLLYWOODHD -> 7882:414:1:HOLLYWOODHD
channel replace = 7624:408:1:COSMO HD -> 74ff:420:1:COSMO HD
channel replace = 7626:408:1:TNT HD -> 7883:414:1:TNT HD
channel replace = 7613:408:1:C+ACCION HD -> 7500:420:1:C+ACCION HD
channel replace = 7614:408:1:C+COMEDIA HD -> 7851:41a:1:C+COMEDIA HD
channel replace = 7615:408:1:C+DCINE HD -> 7502:420:1:C+DCINE HD
channel replace = 7616:408:1:C+XTRA HD -> 74cf:3f8:1:C+XTRA HD
channel replace = 7617:408:1:CINEMAGIC HD -> 7820:428:1:CINEMAGIC HD
channel replace = 7618:408:1:C+FUTBOL HD -> 74cd:3f8:1:C+FUTBOL HD
channel replace = 7619:408:1:C+DEPORT HD -> 7822:428:1:C+DEPORT HD
channel replace = 761a:408:1:EUROSPORT HD -> 7501:420:1:EUROSPORT HD
channel replace = 761b:408:1:CALLE 13 HD -> 781f:428:1:CALLE 13 HD
channel replace = 761c:408:1:FOX HD -> 74fe:420:1:FOX HD
channel replace = 761d:408:1:AXN HD -> 7850:41a:1:AXN HD
channel replace = 761e:408:1:NATGEOGRAPHD -> 7821:428:1:NATGEOGRAPHD
channel replace = 7623:422:1:VIAJAR HD -> 74ce:3f8:1:VIAJAR HD
channel replace = 761f:408:1:MTVNHD -> 6fb8:42c:1:MTVNHD
channel replace = 7620:408:1:MEZZO HD -> 781e:428:1:MEZZO HD
channel replace = 7622:408:1:TAQUILLA HD -> 7854:41a:1:TAQUILLA HD
channel replace = 7621:408:1:CANAL+ 3D -> 7855:41a:1:CANAL+ 3D
channel replace = 75fa:408:1:C+DEPORT2 HD -> 7853:41a:1:C+DEPORT2 HD
channel replace = 7627:408:1:NG WILD HD -> 7884:414:1:NG WILD HD
channel replace = 7628:408:1:SYFY HD -> 7885:414:1:SYFY HD
 
#--------------------------------------------------------------
# CHANNELS COPY SECCTION
#--------------------------------------------------------------
# channel copy = service:transponder:network:name -> service:transponder:network:name
 
 
#--------------------------------------------------------------
# CHANNELS DELETE SECTION
#--------------------------------------------------------------
#channel delete = 9999:222:1:TELEBASURA
 

sergiotas

BH Lover
Mhw2epgdownloader

This tool allows EPG download and format for several Sat providers based on mhw1 and mhw2 protocol. It works on Linux DVBAPI systems such as the most popular Enigma1, Enigma2, MythTV… It can work like standalone binary on MythTV, Plugin for mv on E1, Plugin for E2 or embedded inside crossepg.

Internals: How it works

Mhw2epgdownloader formats the EPG using an SQLite3 data base. This database is loaded inside memory, but for analysis or study it can also be loaded to a file. To enable use of output to a file you need to activate the following variables inside the conf file (e.g. mhw2epgdownloader.conf):
Code:
dbinmemory = 0
dbfile = /tmp/mhw2epg.db
After these changes and mhw2epgdownloader execution in any binary format you can access the database using any management tool for SQLite3 (e.g. SQLiteStudio).
The Data Base includes several tables:
Code:
Channels
Channels_copy
Events
Settings
Summaries
Themes
The main tables are channels, events and summaries. A query example could be the following:
Summary of all channels downloaded, events total, first event date and last event date.
Code:
SELECT c.channel_id, c.channel, c.network, c.transponder, c.service,
(SELECT count(event_id) FROM events e WHERE e.channel_id=c.channel_id) as totalevents,
(SELECT dateev FROM events e WHERE e.channel_id=c.channel_id ORDER BY dateev ASC LIMIT 1) as first_event,
(SELECT dateev FROM events e WHERE e.channel_id=c.channel_id ORDER BY dateev DESC LIMIT 1) as last_event
FROM channels AS c;

Sample query result for csdfrance:
http://team.tododream.com/mhw2epgdownloader/france_resume.txt


Embedded crossepg internals

Inside the crossepg extension you can find the mhw2epgdownloader inside /usr/crossepg/scripts/mhw2epgdownloader or /var/crossepg/scripts/mhw2epgdownloader it all depends on the image used.

The configuration files are the following: mhw1_csdfrance.conf, mhw1_csdnl.conf, mhw1_cyfra.conf and mhw2_dplus.conf.

Each channel is defined by service:transponder:net. Inside any Enigma2 image you can find the information for each channel selecting:
Menu -> Info -> Channel -> PIDS
Code:
 SID: Service
TSID: Transponder
ONID: Net
Sometimes the EPG info does not download in the correct format. There are three different cases this downloaded info:

1) The EPG info for one channel downloads Ok.

2) The EPG info for one channels does not exist but there is that information inside another clon channel.

e.g. France channel TF1 HD there is no EPG but regular TF1 channel does include the EPG info.
As this channel is from csdfrance we need to add one line inside the configuration file mhw1_csdfrance.conf
Code:
channel copy = 20AE:432:1:TF1 -> 2329:0442:1:TF1 HD

3) The EPG info for one channels comes incorrectly inside the service:transponder:net format.

e.g. Spain channel C+ LIGA HD comes with the incorrect information as it is joined inside a promotional channel so we need to add the following line to the config file mhw2_dplus.conf
Code:
channel replace = 7611:408:1:C+LIGA HD -> 7852:0:0:C+LIGA HD
We can verify that one channels comes with the incorrect format if the parameters service, transponder and network inside the downloaded database does not match the correct channel.

expecial thanks to tinos for translation
 

sergiotas

BH Lover
Plugin enigma1 para descargar el epg con el mhw2epgdownloader para mv
Las reglas en los ficheros de configuración son diferentes, porque el mv funciona con nombres

Plugin enigma1 for epg download with mhw2epgdownloader for mv. Los ficheros anteriores de configuración son para crossepg
The rules in configuration files are diferent, because the mv works with channels names. The last configuration files was for crossepg.
http://team.tododream.com/mhw2epgdownloader/mhw2epgdownloader.e1.plugin.1.0.11.tar.gz

Regards
 

superplakis

Vu+ User
Plugin enigma1 para descargar el epg con el mhw2epgdownloader para mv
Las reglas en los ficheros de configuración son diferentes, porque el mv funciona con nombres

Plugin enigma1 for epg download with mhw2epgdownloader for mv. Los ficheros anteriores de configuración son para crossepg
The rules in configuration files are diferent, because the mv works with channels names. The last configuration files was for crossepg.
http://team.tododream.com/mhw2epgdownloader/mhw2epgdownloader.e1.plugin.1.0.11.tar.gz

Regards
Funciona perfecto socio...que gustazo...ver la programacion hasta el infinito y mas alla!!!!!

MUY BUEN TRABAJO y MEJOR EXPLICADO!!!!
 

Palinkat

Vu+ User
Mhw2epgdownloader

This tool allows EPG download and format for several Sat providers based on mhw1 and mhw2 protocol. It works on Linux DVBAPI systems such as the most popular Enigma1, Enigma2, MythTV… It can work like standalone binary on MythTV, Plugin for mv on E1, Plugin for E2 or embedded inside crossepg.

Internals: How it works

Mhw2epgdownloader formats the EPG using an SQLite3 data base. This database is loaded inside memory, but for analysis or study it can also be loaded to a file. To enable use of output to a file you need to activate the following variables inside the conf file (e.g. mhw2epgdownloader.conf):
Code:
dbinmemory = 0
dbfile = /tmp/mhw2epg.db
After these changes and mhw2epgdownloader execution in any binary format you can access the database using any management tool for SQLite3 (e.g. SQLiteStudio).
The Data Base includes several tables:
Code:
Channels
Channels_copy
Events
Settings
Summaries
Themes
The main tables are channels, events and summaries. A query example could be the following:
Summary of all channels downloaded, events total, first event date and last event date.
Code:
SELECT c.channel_id, c.channel, c.network, c.transponder, c.service,
(SELECT count(event_id) FROM events e WHERE e.channel_id=c.channel_id) as totalevents,
(SELECT dateev FROM events e WHERE e.channel_id=c.channel_id ORDER BY dateev ASC LIMIT 1) as first_event,
(SELECT dateev FROM events e WHERE e.channel_id=c.channel_id ORDER BY dateev DESC LIMIT 1) as last_event
FROM channels AS c;

Sample query result for csdfrance:
http://team.tododream.com/mhw2epgdownloader/france_resume.txt


Embedded crossepg internals

Inside the crossepg extension you can find the mhw2epgdownloader inside /usr/crossepg/scripts/mhw2epgdownloader or /var/crossepg/scripts/mhw2epgdownloader it all depends on the image used.

The configuration files are the following: mhw1_csdfrance.conf, mhw1_csdnl.conf, mhw1_cyfra.conf and mhw2_dplus.conf.

Each channel is defined by service:transponder:net. Inside any Enigma2 image you can find the information for each channel selecting:
Menu -> Info -> Channel -> PIDS
Code:
 SID: Service
TSID: Transponder
ONID: Net
Sometimes the EPG info does not download in the correct format. There are three different cases this downloaded info:

1) The EPG info for one channel downloads Ok.

2) The EPG info for one channels does not exist but there is that information inside another clon channel.

e.g. France channel TF1 HD there is no EPG but regular TF1 channel does include the EPG info.
As this channel is from csdfrance we need to add one line inside the configuration file mhw1_csdfrance.conf
Code:
channel copy = 20AE:432:1:TF1 -> 2329:0442:1:TF1 HD

3) The EPG info for one channels comes incorrectly inside the service:transponder:net format.

e.g. Spain channel C+ LIGA HD comes with the incorrect information as it is joined inside a promotional channel so we need to add the following line to the config file mhw2_dplus.conf
Code:
channel replace = 7611:408:1:C+LIGA HD -> 7852:0:0:C+LIGA HD
We can verify that one channels comes with the incorrect format if the parameters service, transponder and network inside the downloaded database does not match the correct channel.

expecial thanks to tinos for translation
Hey guys, sorry to post in English but my Spanish is not up to the level :)
I have tried this script for Csat France first with the version that comes with CrossEPG in BH 1.7.2 (1.0.9). The script runs, finding events and getting descriptions etc, conversion happens and EPG get loaded. Unfortunately the EPG is empty for Csat France channels.
I then updated to 1.0.11 manually, same issue is happening. The weirdest thing is I can't access the log file at all, to open or copy from the box, Filezilla tells me access denied. So I can't report any log here.
Thanks for th help

Pt
 

Matrix10

Administrator
shot8.jpgshot9.jpg
Hey guys, sorry to post in English but my Spanish is not up to the level :)
I have tried this script for Csat France first with the version that comes with CrossEPG in BH 1.7.2 (1.0.9). The script runs, finding events and getting descriptions etc, conversion happens and EPG get loaded. Unfortunately the EPG is empty for Csat France channels.
I then updated to 1.0.11 manually, same issue is happening. The weirdest thing is I can't access the log file at all, to open or copy from the box, Filezilla tells me access denied. So I can't report any log here.
Thanks for th help

Pt

Is not true

If you replaced mhw2epgdownloader with new one 1.0.11 you have EPG on SD channels.
If you want to have the same EPG on the HD channels you have to make a config file as explained above.

AGN file you have to replace/overwrite in (this file chmod 755)

/usr/crossepg/scripts/mhw2epgdownloader/
 

Attachments

  • mhw2epgdownloader.zip
    339.8 KB · Views: 187

ohcnehc

Vu+ Newbie
Buenas,

aunque mi deco no es un VU, igual podéis ayudarme. Tenía instalada en un GM990 una imagen del PKT en la que, no se cómo, conseguí poner como provider el mhw2 para descargar la epg. He reinstalado la misma imagen porque el deco se quedó colgado de manera irrecuperable y ahora, aunque instale el mhw2 desde diferentes sitios tengo los siguientes problemas:

- No se me añade como provider del crosspeg, por lo que tengo que ejecutarlo manualmente desde los los plugins
- Aunque lo ejecute manualmente desde PORTADA, veo como se descarga todos los canales pero no lo exporta al crossepg y por tanto no me lo carga.

Agradecería que alguien me orientara al respecto.

Gracias,
 

themadrix

Vu+ Newbie
Hola a todos:

¿Hay alguna manera de lograr que el CrossEPG baje los datos de una semana completa? Con la configuración de MHW solo descarga unos 4 días.
Un saludo ¿Habría que aumentar los valores de los parámetros max events = 22000 y max summaries = 8000?

Un saludo y muchas gracias!
 

Darg

Vu+ Newbie
Sergiotas, eres un maestro tio, Olé tus huevos, perdon por la expression, pero eres un crack chaval, mis respetos.
 

Pepeteo

Vu+ Newbie
Hola, necesito un poco de ayuda, por favor. Tengo la ultima imagen BH en mi VU+ ZERO, lista de canales al dia IPTV, y no entiendo por que desde hace unos 3 dias he dejado de ver el EPG semanal y solo veo el ahora y despues. Lo estava viendo desde hace mas de un año y de repente sin hacer nada no lo veo, he formateado de nuevo el USB, he probado en fat-32 y exfat, por si era el USB, nada, he trasteado los parametros segun veo los manuales del foro del EPG y el CROSSEPG, nada de nada. Intento averiguar por mis medios a ver que ocurre y ya no se que mas hacer, me he descargado el archivo en zip mhw2epgdownloader, y la verdad es que no se bien que hacer con el. Sergiotas, o alguien que me pueda ayudar, que necesito, de donde lo bajo y como lo tengo que hacer para ver el EPG semanal de nuevo. Gracias de antemano. Salu2.
 

Pepeteo

Vu+ Newbie
Ya lo arregle, me descargue manualmente los providers, los meti en su carpeta correspondiente del deco y ya esta. Bueno pues de todas formas gracias. Salu2.
 
Top