Epg offset/timeshift tutorial for Enigma2 (Zgemma)

ravstar1

Newbie
NEW INSTRUCTIONS & UPDATED SCRIPT 14/01/2021 v1.2

What's new in v1.2
* No need to uninstall the previous version before updating to new version.
* Script will automatically remove the old cron without deleting other crons in the list.
* Daily update time changed to 06:10am as some providers update their epg.xml at 6:00am hence the script was unable to fetch the data at 6:00am.

Please note: This version will automatically remove the previous version of this script.

How to fix offset EPG of your IPTV provider
i.e. if your epg is ahead or behind and showing wrong program information. You can adjust the offset time between any range from 1 minute to up to 23 hours.

HOW DOES IT WORK: The below script will create a new source file for EPGimporter and fix the offset time issue of your provider's epg by downloading it onto your HDD and fixing it so you get the correct programme guide. This will also setup a daily cron that will update the data everyday at 6:00am

PLEASE NOTE: This will ONLY work if you have created bouquets and playlist with JediMakerxtreme

HOW TO EXECUTE: You only need to run the below script ONCE. Follow my setup by step guide.

Note: If 'Automatic live bouquet update' is enabled in your jedimakerextreme then make sure you set it's start time before 05:30am by going into jedimakerextreme > settings.

You will need SSH client: to connect to your Enigma2 box to run the below script, I personally use Putty available from Download PuTTY - a free SSH and telnet client for Windows

OpenATV users can use the terminal within OpenWebif

Step 1: Connect to your enigma2 box using SSH and login to your box

Step 2: Paste the below link and hit enter.


wget -O /tmp/setup.sh "https://github.com/ravstar/Enigma2/raw/main/setup.sh" && cd /tmp/ && chmod 755 setup.sh && ./setup.sh

Step 3: Follow instructions on the terminal and it will set everything up for you.

Point to be noted: The time taken by script from start to finish would depend on EPG data and processing power of your box. For example: my provider's epg.xml file is 40Mb in size so my Zgemma H9S takes around 9 mins to update the file everyday on other side Zgemma H2S takes 50-60 mins to update the file. But it will run in the background and won't interrupt if you are watching any programme.

Once done,

Step 4: go into epg importer

Look for an option named 'Clearing current EPG before import' and turn it to yes. (Note: you only need to clear EPG only once for the first run so no need to press save after turning it to Yes).

Import EPG manually by pressing yellow button.

EPGimporter will start importing EPG data.

Make sure you set your epg importer 'automatic start time' not before 7:10am

All done! Happy viewing.


IF you get an ERROR saying Script has been installed though it won't work until you follow one more step manually

it will print additional text saying

""My xml HHMM is: +/-four digits and I want to adjust it by: +/-four digits""

Then post that message here in this thread and I will give you one more command to run to fix the error.

If you would like to uninstall above script and changes it has made for any reason, then paste following link in your SSH client and hit enter.

cd /usr/script && ./uninstall1.sh
 
Last edited:

ravstar1

Newbie
Thread starter
NEW INSTRUCTIONS & UPDATED SCRIPT 14/01/2021 v1.2


What's new in v1.2

* No need to uninstall the previous version before updating to new version.

* Script will automatically remove the old cron without deleting other crons in the list.

* Daily update time changed to 06:10am as some providers update their epg.xml at 6:00am hence the script was unable to fetch the data at 6:00am.
 

wheelo

Admin
Staff member
TK Supporter
@ravstar1 It was simpler for me just to delete the whole thing and stop the confusion - was this someone copying your work and claiming it as there own??

Thanks @urie
 

ravstar1

Newbie
Thread starter
@ravstar1 It was simpler for me just to delete the whole thing and stop the confusion - was this someone copying your work and claiming it as there own??

Thanks @urie
@wheelo No looks like rioflex wanted to get help from me but wasn't aware that username and password are sensitive information and shouldn't be shared. I will update this in my post. But thanks for deleting the post.

@rioflex Please run 'Update Bouquets' in Jedimakerxtream first and then paste below link only once as it has pasted below

wget -O /tmp/setup.sh "https://github.com/ravstar/Enigma2/raw/main/setup.sh" && cd /tmp/ && chmod 755 setup.sh && ./setup.sh
 

rioflex

Newbie
Welcome to openATV for vuzero4k
openatv 6.4 vuzero4k

vuzero4k login:
Password:
Last login: Thu Mar 4 10:22:21 CET 2021 on pts/0
wget -O /tmp/setup.sh "https://github.com/ravstar/Enigma2/raw/main/setup.sh" && cd /tmp/ && chmod 755 setup.sh && ./[email protected]:~# wget -O /tmp/setup.sh "https://github.com/ravstar/Enigma2/raw/main/setup.sh" && cd /tmp/ && chmod 755 setup.sh && ./setup.sh
--2021-03-04 10:28:49-- https://github.com/ravstar/Enigma2/raw/main/setup.sh
Herleiden van github.com... 140.82.121.4
Verbinding maken met github.com|140.82.121.4|:443... verbonden.
HTTP-verzoek is verzonden; wachten op antwoord... 302 Found
Locatie: https://raw.githubusercontent.com/ravstar/Enigma2/main/setup.sh [volgen...]
--2021-03-04 10:28:50-- https://raw.githubusercontent.com/ravstar/Enigma2/main/setup.sh
Herleiden van raw.githubusercontent.com... 185.199.110.133, 185.199.108.133, 185.199.111.133, ...
Verbinding maken met raw.githubusercontent.com|185.199.110.133|:443... verbonden.
HTTP-verzoek is verzonden; wachten op antwoord... 200 OK
Lengte: 5130 (5,0K) [text/plain]
Wordt opgeslagen als: ‘/tmp/setup.sh’

/tmp/setup.sh 100%[===================>] 5,01K --.-KB/s in 0s

2021-03-04 10:28:50 (15,1 MB/s) - '‘/tmp/setup.sh’' opgeslagen [5130/5130]

uninstalling previous version of this script
rm: can't remove '/etc/epgimport/new.EPG.sources.xml': No such file or directory
rm: can't remove '/etc/hdd/epg/iptvepg.xml.gz': No such file or directory
no cron found
no cron found

Old cron removed
/etc/epgimport/jmx.line.cdn-ott.net.sources.xml: removed/xmltv.php?username=xxxxxxx&password=xxxxxxx&next_days=7
dddddd
ssssss
grep: ssssss: No such file or directory
Iptv url already exists in ssssss
starting new installation

This script will fix EPG offset issue for IPTV i.e. if your epg is ahead or behind and showing wrong program information.
You can adjust the offset time between any range from 1 minute to up to 23 hours.

One jedimaker playlist found: jmx.line.cdn-ott.net.sources.xml
jmx.line.cdn-ott.net.sources.xml, proceeding installation...


Enter the time you would like to offset including +/-HHMM
Example:
your epg is half an hour ahead then put -0030
your epg is an hour ahead then put -0100
your epg is two hours ahead then put -0200
your epg is half an hour behind then put +0030
your epg is an hour behind then put +0100
your epg is two hours behind then put +0200, and so on..

Enter time: +0100

jmx.line.cdn-ott.net.sources.xml jmx.line.cdn-ott.net.sources.xml

+0100
grep: jmx.line.cdn-ott.net.sources.xml: No such file or directory
/etc/epgimport/jmx.line.cdn-ott.net.sources.xml: removed/xmltv.php?username=xxxxxxx&password=xxxxxxx&next_days=7
grep: jmx.line.cdn-ott.net.sources.xml: No such file or directory
mport_jmx.line.cdn-ott.net.sources.xml_catname=
/media/hdd/epg/mport_jmx.line.cdn-ott.net.sources.xml_catname=.xml
--2021-03-04 10:29:07-- https://github.com/ravstar/Enigma2/raw/main/xmltv.sh
Herleiden van github.com... 140.82.121.4
Verbinding maken met github.com|140.82.121.4|:443... verbonden.
HTTP-verzoek is verzonden; wachten op antwoord... 302 Found
Locatie: https://raw.githubusercontent.com/ravstar/Enigma2/main/xmltv.sh [volgen...]
--2021-03-04 10:29:08-- https://raw.githubusercontent.com/ravstar/Enigma2/main/xmltv.sh
Herleiden van raw.githubusercontent.com... 185.199.109.133, 185.199.111.133, 185.199.108.133, ...
Verbinding maken met raw.githubusercontent.com|185.199.109.133|:443... verbonden.
HTTP-verzoek is verzonden; wachten op antwoord... 200 OK
Lengte: 693 [text/plain]
Wordt opgeslagen als: ‘/usr/script/xmltv.sh’

/usr/script/xmltv.s 100%[===================>] 693 --.-KB/s in 0s

2021-03-04 10:29:08 (13,1 MB/s) - '‘/usr/script/xmltv.sh’' opgeslagen [693/693]

sed: unmatched '|'
--2021-03-04 10:29:08-- https://github.com/ravstar/Enigma2/raw/main/uninstall1.sh
Herleiden van github.com... 140.82.121.4
Verbinding maken met github.com|140.82.121.4|:443... verbonden.
HTTP-verzoek is verzonden; wachten op antwoord... 302 Found
Locatie: https://raw.githubusercontent.com/ravstar/Enigma2/main/uninstall1.sh [volgen...]
--2021-03-04 10:29:09-- https://raw.githubusercontent.com/ravstar/Enigma2/main/uninstall1.sh
Herleiden van raw.githubusercontent.com... 185.199.110.133, 185.199.108.133, 185.199.111.133, ...
Verbinding maken met raw.githubusercontent.com|185.199.110.133|:443... verbonden.
HTTP-verzoek is verzonden; wachten op antwoord... 200 OK
Lengte: 538 [text/plain]
Wordt opgeslagen als: ‘/usr/script/uninstall1.sh’

/usr/script/uninsta 100%[===================>] 538 --.-KB/s in 0s

2021-03-04 10:29:09 (8,47 MB/s) - '‘/usr/script/uninstall1.sh’' opgeslagen [538/538]

sed: unmatched '|'
Daily cron added to run script daily at 06:10am
/etc/epgimport/jmx.line.cdn-ott.net.sources.xml: removed/xmltv.php?username=xxxxxxxx&password=xxxxxxxx&next_days=7: Schema ontbreekt.

xml HHMM is

./setup.sh: line 134: [: -eq: unary operator expected
ERROR: Script has been installed though it won't work until you follow one more step manually. Please make a note of following text

My xml HHMM is: and I want to adjust it by: +0100

Please follow the additional step mentioned in original post or reach out to 'ravstar'
 
Last edited by a moderator:

easytiger

Newbie
Hi getting error:
./setup.sh: line 134: [: -eq: unary operator expected
ERROR: Script has been installed though it won't work until you follow one more step manually. Please make a note of following text

My xml HHMM is: and I want to adjust it by: +0200
 
Top