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
 

sunash

Newbie
TK Supporter
Hi Ravstar,
I, along with others here am having the same error: My xml HHMM is: and I want to adjust it by: +0200
am using willow's image on zgemmah9s. tried all i could to fix it, but just can't. Hope you can help.
 

ravstar1

Newbie
Thread starter
Hi @sunash @easytiger, sorry for taking long to respond to you guys. been extremely busy at work.

Can you try to download the .xml file and send this over to me so I can see if I need to tweak the script little bit to help you here. You can download the .xml file by using the following command in putty.

wget -O /media/hdd/iptvepg.xml "http://XYZ.COM:80/xmltv.php?username=USERNAME&password=PASSWORD&next_days=7" && gzip -f /media/hdd/iptvepg.xml > /media/hdd/iptvepg.xml.gz

hit enter

Please replace the characters in bold with your IPTV url details and this will download iptvepg.xml.gz file in you HDD main folder i.e. /media/hdd/.

Don't worry this file won't contain any confidential information and would be anywhere between 8mb to 30mb in size so if you can attach and send it to me here or use wetransfer and share the link.

I hopefully reply back to you guys sooner to resolve this issue.

Cheers.
 

ravstar1

Newbie
Thread starter
@sunash @easytiger @rioflex I hope I have fixed the issue so you can check and confirm. Please uninstall the previously installed script before trying to reinstall it by following below steps.

Paste below text using SSH client (putty) and hit enter

cd /usr/script && ./uninstall1.sh

Now try to install the script again by entering below text in SSH client (putty) 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

Run the script and report any errors.

Cheers
 

sunash

Newbie
TK Supporter
Hello ravstar1, Absolutly no worries. You don't have to apologize. We are very grateful to you for helping us with freebies even while running a normal life. Thank you so much. Sorry for the late reply on my part, but just came back home from a social visit and saw your message. Will do as you mention and let you know of the outcome asap. (y)(y)(y)
 

sunash

Newbie
TK Supporter
Hello ravstar1, sorry to trouble you but the result is the same as before. in fact, this time it just says: xml hhmm is . as seen in the pic of the script result. also enclosed is my xml file as requested. Hope you can sort it out. Thank you very much.
 

Attachments

  • epg error result.jpg
    epg error result.jpg
    300 KB · Views: 1
  • iptvepg.rar
    9.6 KB · Views: 1

ravstar1

Newbie
Thread starter
Hello ravstar1, sorry to trouble you but the result is the same as before. in fact, this time it just says: xml hhmm is . as seen in the pic of the script result. also enclosed is my xml file as requested. Hope you can sort it out. Thank you very much.
Hi @sunash

The file you have attached doesn't seem to be right and doesn't contain any epg information hence the script is unable to fetch data from it. I would recommend the following steps to check if this resolve the issue.

Uninstall the script with command cd /usr/script && ./uninstall1.sh
Then in your enigma2 box, go into Menu>plugins>Jedimakerxtream>playlists and select the playlist you are willing to correct the epg for in case you are using multiple providers.
Once you are inside playlist, you will see EPG url right at the bottom and there would some text written i.e. http://XYZ.COM:80/xmltv.php?username=USERNAME&password=PASSWORD
1627285482762.png

Check if this is written exactly the same way I have mentioned in above step. Don't change anything there.
Now go back twice in jedimaker main menu where you will see options i.e. playlists, settings, update bouquets, etc.
1627285599312.png
select update bouquets and this will start updating the bouquets.
Once completed, try to install my script again and check if this works ok this time.
wget -O /tmp/setup.sh "https://github.com/ravstar/Enigma2/raw/main/setup.sh" && cd /tmp/ && chmod 755 setup.sh && ./setup.sh

If not, then try to use the EPG url (as mentioned in step 3 above) to grab the file as I mentioned in my previous posts.

wget -O /media/hdd/iptvepg.xml "http://XYZ.COM:80/xmltv.php?username=USERNAME&password=PASSWORD&next_days=7" && gzip -f /media/hdd/iptvepg.xml > /media/hdd/iptvepg.xml.gz
 

sunash

Newbie
TK Supporter
Hello ravstar1,
did what you suggested but unfortunately, the result is the same. just one question, will your script work with any image or just openatv? because i have open vix 6.4 under willow's. attached are the result of doing what you suggested and a new copy of the file downloaded as mentioned.
hope this one helps.
iptvepg.xml.gz (link to my dropbox since i can't upload the file here saying type not supported), but a jpeg of the script result is attached.
 

Attachments

  • epg script report.jpg
    epg script report.jpg
    305.2 KB · Views: 3

sunash

Newbie
TK Supporter
Hi ravstar1,
apologies for the delay but here is the file downloaded xml file.
 

Attachments

  • iptvepg.xml.zip
    6.8 MB · Views: 3

ravstar1

Newbie
Thread starter
I have made another tweak in the script so follow below steps and report if the issue has now been resolved.

Uninstall the script with command cd /usr/script && ./uninstall1.sh

Then in your enigma2 box, go into Menu>plugins>Jedimakerxtream

1627285599312.png


select update bouquets and this will start updating the bouquets.
Once completed, try to install my script again and check if this works ok this time fingers crossed

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

If not then confirm me the version of jedimaker extreme you are using by going into 'about' in main menu of jedi and also the screenshot of error.

Cheers
 

sunash

Newbie
TK Supporter
Hello ravstar1,
sorry but the result is the same. attached are the screenshots of the error report and the details of the jedimakerxtream plugin.
btw, can your script run on any image as long as the bouquets are created by jedimaker as mentioned?
 

Attachments

  • Jedi Details.jpg
    Jedi Details.jpg
    25.2 KB · Views: 4
  • script report 1.jpg
    script report 1.jpg
    230.9 KB · Views: 4
  • script report 2.jpg
    script report 2.jpg
    344.8 KB · Views: 3

ravstar1

Newbie
Thread starter
Hello ravstar1,
sorry but the result is the same. attached are the screenshots of the error report and the details of the jedimakerxtream plugin.
btw, can your script run on any image as long as the bouquets are created by jedimaker as mentioned?
I have checked this on Open ATV and Openvix on my Zgemma 9H combo it is working perfectly.

Yes, It is meant to work on any image as long as you are using jedimaker to create bouquets.

Can you also check in jedimaker, you have selected Yes for 'Use your provider EPG'

If this is no then you have to create bouquets again by selecting it as Yes.

1627421806890.png

I can connect to your box via team viewer to check and resolve the issue as a last option if possible.
 
Top