Mhw2epgdownloader for CrossEPG

Matrix10

Administrator
Direct download EPG for some providers/channels from satellite
with Mhw2epgdownloader for CrossEPG

Once again thank @sergiotas for coming to our forum
and the new version.


More about that in the Spanish section.

http://www.vuplus-community.net/boa...hw2epgdownloader-en-crossepg.4811/#post-40155

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
 

Attachments

  • shot1.jpg
    shot1.jpg
    854.1 KB · Views: 52
  • shot2.jpg
    shot2.jpg
    767.9 KB · Views: 52
  • shot4.jpg
    shot4.jpg
    583.6 KB · Views: 48
  • shot4.jpg
    shot4.jpg
    583.6 KB · Views: 45

Palinkat

Vu+ User
I posted this in the Spanish section but it might not get picked up, apologies for double posting in advance:
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
I posted this in the Spanish section but it might not get picked up, apologies for double posting in advance:
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.
(I would ask if someone could make a good config file for HD channels and post on our forum in this thread.)

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

/usr/crossepg/scripts/mhw2epgdownloader/

RESTART IMAGE
 

Attachments

  • mhw2epgdownloader.zip
    339.8 KB · Views: 15

Matrix10

Administrator
shot0.jpg An example for some HD channels using the EPG from SD channels.

config file mhw1_csdfrance.conf for CSD France you can find and replace in
/usr/crossepg/scripts/mhw2epgdownloader/

#--------------------------------------------------------------
#
# 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 = 2009:430:1:CANAL+ -> 2261:0438:1:CANAL+ 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
channel copy = 200D:430:1:CANAL+ FAMILY -> 2265:0438:1:CANAL+ FAMILY HD
channel copy = 209F:432:1:C CINEMA PREMIER -> 2329:0442:1:CINE+ PREMIER HD
#--------------------------------------------------------------
# CHANNELS DELETE SECTION
#--------------------------------------------------------------
#channel delete = 9999:222:1:TELEBASURA

all channel info you can see in MENU>>Information>>Service

My example in zip file
 

Attachments

  • mhw1_csdfrance.zip
    1,020 bytes · Views: 8

Palinkat

Vu+ User
Thanks a lot Mate, it's working now fine, I don't know what I was doing before.
Although not all channels are getting populated and as you can see, titles names are getting truncated. It's still quite good I have to say but might just be using alternative epgs.

Thanks!!
 

fced

Vu+ Newbie
Hello,
i'm trying Blackhole 1.7.3 on my VU+Solo...
I was on VTI 4.0/4.1 and before i was on VIX (before before, i was on Blackhole with my DM800)...
All those images get standard 3 days Csat epg by going on "Guide TV" channel... without any external software (like crossepg)...
I tried mhw2epgdownloader but results seem to be differen( des titres epg sont en doubles dans single EPG avec une heure de décalage)

Can someone tell me why on Blackhole, we need mhw2epgdownloader to get an more than 2 hours EPG, (on all others images, we have 3 days epg without any external software)


Any idea please ?

Thanks
 

fced

Vu+ Newbie
Hello,
I can now confirm, Csat epg with mhw2epgdownloader is not as accurate as the standard 3days EPG we have on others images (on guide tv channel)...
For example,
- Star trek on cine FX, wich is at 16h30 GMT, is at 18h30 GMT with mhw2epgdownloader
- Some others programm appear double in Epg Single view...
Any idea to solve this problem and get an accurate EPG ?
Any help please ?
Thanks
 
Top