EPG to xml from Enigma2

For people that has interesset in get EPG to xml from Enigma2

Don’t know where to put it…

Make the script to run by: chmod +x stb_epg.sh

Run the script with help parameter first time: ./stb_epg.sh HELP if you need help for parametes.

First time the script is used you to get data from your STB use the parameter GET_ALL

It is to force the creation of channel list from bouquets.

So every time you change your boquets on your STB you have to run the script with GET_ALL

This is done for keep WEB request to the STB as low as possible.

stb_epg.zip (10.0 KB)

1 Like

Thanks for this skript. I moved it to my Synology and started. the then comes an error that stb1_bouquet_1_channel_listing.xml is missing. An XML-File was created with the following content:

<?xml version="1.0" encoding="UTF-8"?> What can I do?

Have runned it manually or by cron job?

I haven’t testet it by cron job yet.

The file stb1_bouquet_1_channel_listing.xml will be the header for the epg file.

Do you have password set for WEB interface on your STB? If so it will not download with wget. - Do you have wget installed on your NAS?

Then the script has to be modified to support password. I belive wget can handle it.

I have only runned it on CentOS as normal user.

Another possibility is the same I discover when I tried to run it on the STB. It is a minimum Linux distribution so several of my declare and other Linux commands are not supported.

If you run it in console window use the parameter PRINT_ALL for all (debug) output.

Sorry, I don’t know the Linux version (or if it is a full/minimum) on the Synology.

It may possibility the it is Debian version and I haven’t testet the scriot on Debian Linux. I know several things are different between Linux Distros.

I have scripts for weather and survailiance (IP camera) running on my CentOS server and I had to make a modification for Debian on Banana Pi for a college. A small script tunning was also done when he moved to Orange Pi with Armbian. - So it can be just as simple as Linux version…

I started to make the Debian version. Not tested as final, but try to change Linux version in config file.

You can edit the config file so path to linux commands match what you have on your NAS.

BUT you can’t change the parameter tag. If you do you have to change the script!

I have to say:

  • The script is not perfect
  • The script is not finished because I have not got Plex Live&DVR to work yet…

I started the script at the console. Wget could be the problem. password is just enabled on https-connections. I’l try to deactivate it. The second ist I would like to use curl with the script.

Thanks a lot.

Do you think it is possible to change from wget to curl? I can remember, that I had have an problem with an plex plugin and wget too.

in between I checked the folders of wget, mkdir, usw. and tested again. Same issue with the missing xml-file. The script doesn’t generate any logs or tmp-Files. Just the defined folders does exist after the first run and in folder XMLTV the file stb1_xmltv.xml exists with the following content:

<?xml version="1.0" encoding="ISO-8860-2"?>

If I create an empty stb1_bouquet_1_channel_listing.xml in the folder bouquets, the script runs shortly but the stb1_xmltv.xml just get a new change time.

best regards.

I can’t say anything else than TRY:wink:

(Almost…)All directories will be empty and the the top header " <?xml version=“1.0” encoding=“ISO-8860-2”?>" that is not downloaded will be the only result if you don’t get any downloaded data from your STB.

Nothing downloaded = nothing to work with…

As I wrote before: Script is not finished…

But I got xml file with EPG on my CentOS 7 server.

You may check parameter setting for curl. It can be som difference from wget!

You can test it out in command line before editing the script.

Forgot to write that first time the script is used you have to use the parameter GET_ALL

It is to force the creation of channel list from bouquets.

So every time you change your boquets on your STB you have to run the script with GET_ALL

This is done for keep WEB request to the STB as low as possible.

Sorry…

I tested the script on my ubuntu server and received the same “file not found errors”.

I have two questions which are related to this regarding the config:

  • Is the port meant to be the webif port? Dunno what port 8001 is meant to be.
  • What is the correct name for the bouquet? Is it case-sensitve? I wanted to test the standard “Favourites (TV)”, which is written lower case in the respective file in /etc/enigma2 and without the brackets…

Edit: Got it working :slight_smile:
To answer my questions: yes webif port (in my case 80) and it is the “clear name” of the Bouquet, in my case meaning “Favourites (TV)” with the brackets.

1 Like

In Linux normally every thing are case sensitive… unless the script/program convert for you.

8001 is the streaming port (and yes as you discovered WEB port is 80). 8001 are used to create the m3u file if you want to use the STB as IP source/tuner (for example in TV Mosaic). I put the port number as parameter if someone needs to change it. I thought that was better than hard code it in the script.

I have not tested with Favourites (TV) only with a bouquets name that I have created. So not tested with any special characters…

I see, so changing the port to 80 actually didn’t do anything… So it was probably only the malformated bouquet name which led to the error.
So thanks a lot for the script! Plex is still importing the xml… Emby was done with that in no time :smiley:

I just realised, that all my airings are wrong in starting time, no matter what I set in the cfg, it always seems to use UTC, instead of UTC+2. Any ideas?
Maybe my server has wrongly set time zone, will check that later.

Edit: Times on my server seem to be correct, but both Plex and emby seem to ignore the time added to the UTC. Therefore, the starting time is always UTC instead of my local time.

Edit2: I had to set UTC +0000, now it is working as it should. Dunno why, but that is how it is :smiley:
Thanks for the kick-ass script!

Hello,

I tested some configurations (hrtunerProxy 4.0, HRTunerProxy-Master). Finaly I removed my script and used the original with param GET_All. XML data is generating fine and Plex can use the file to Setup DVR. Playing an channel files even. Now I started a recording after Setup with the XML-File. That works fine. What’s that? attached my actual Logfiles of Plex. Plex Media Server Logs_2018-10-09_21-18-52.zip (6,4 MB)

@Coxeroni: Also I discovered that I had to set UTC offset to 0000 for Plex. By DVBLink (former for TV Mosaic) for linking Enigma STB to Windows Media Center there I had to use offset from UTC time for getting correct EPG time. That’s the reason I implemented it as a variable to adjust when I tested out TV Mosaic (That was the reason of starting creation of the script).

Because several people are testing it, I will see if I can add some ideas later.

@ blinddark: How did you assign tuner’s to get it to work.

Still have big problems… I’m running version 1.13.8.5395

HRTunerProxy works with Emby, but not with Plex… Do you have another script on your server?

Is it my script you use?

Hello,

My tuners are working well with epg from Plex/Gracenote. Iam using your orig script now and pms 1.13.9.

Just to be clear: I didn’t want to complain about it, just wanted to report back that +0000 had to be used :wink:
And I first thought that it was a problem on my side.
Thanks for the explanation why this variable is useful.

I can report, that my Uno 4k SE with the latest HRTunerProxy works fine with Plex and Emby with your xmltv.
I would be glad to tell you my secret, but I don’t know it myself :smiley:

1 Like

Nothing can be taken as complain. - Free + not forced to be used = Your risk…:laughing:

I will NEVER create scripts for deleting data or equipment - If som odd happends it is not my ide. = I want friends NOT enemies

The script was just created for testing TV Mosaic, but I like Plex better. I’m glad to finally have some to share not only use what other shares.

OK, then I have to test again.

No.

I found version 1.13.9.5439 - No help.

Several people has reverted to 1.13.7.xxxx

Have to look for it tomorrow.

Other scripts for epg or Plex arn’t running. I activated logging and there are the following errors.

/stb_epg.sh: line 1285: ((: 1(10): syntax error in expression (error token is “(10)”)
/stb_epg.sh: line 1285: ((: 3(12): syntax error in expression (error token is “(12)”)
/stb_epg.sh: line 1285: ((: 4(12): syntax error in expression (error token is “(12)”)
/stb_epg.sh: line 1285: ((: 23(15): syntax error in expression (error token is “(15)”)
/stb_epg.sh: line 1285: ((: 2(10): syntax error in expression (error token is “(10)”)
/stb_epg.sh: line 1285: ((: 23(15): syntax error in expression (error token is “(15)”)
/stb_epg.sh: line 1285: ((: 2(10): syntax error in expression (error token is “(10)”)
/stb_epg.sh: line 1285: ((: 5(12): syntax error in expression (error token is “(12)”)
/stb_epg.sh: line 1285: ((: 6(12): syntax error in expression (error token is “(12)”)
/stb_epg.sh: line 1285: ((: 24(15): syntax error in expression (error token is “(15)”)
/stb_epg.sh: line 1285: ((: 3(10): syntax error in expression (error token is “(10)”)
/stb_epg.sh: line 1285: ((: 3(10): syntax error in expression (error token is “(10)”)
/stb_epg.sh: line 1285: ((: 7(12): syntax error in expression (error token is “(12)”)
/stb_epg.sh: line 1285: ((: 8(12): syntax error in expression (error token is “(12)”)
/stb_epg.sh: line 1285: ((: 25(15): syntax error in expression (error token is “(15)”)
/stb_epg.sh: line 1285: ((: 4(10): syntax error in expression (error token is “(10)”)

Mit freundlichen Grüßen
Fam. Lippek