Using XMLTVGUI and the WebEPG plugin to get the Sly EPG on the CubeRevo range (IP9000
Concept.
XMLTV is a system whereby television schedules are made available for Internet download. For the UK, the main service is provided by the Radio Times.
A grabber downloads information, and creates file in xml format.
The WebEPG plugin parses this information and, based on a configuration file, populates the EPG of the box with programme information.
Initial configuration.
This is rather time consuming, but only needs to be done once.
Stage 1. The grabber.
There are many grabbers available, but the one I recommend you use is xmltvgui which you can download from
XMLTV GUI
It is available in both Windows and Linux formats. I will assume you're using the Windows version.
Start xmltvgui and configure to your time zone, and personal preferences. Do NOT check the "sort" option. Under "grabbers" select UK_RT. Select "channels", then "refresh" to make sure the list is up to date. Pick the channels you want, and move them to "selected channels". Don't select more than about 50 or so - it makes everything take too long. One time saving idea is to select only the channels you have in your box's Favorites list - you'll see why in a minute
Stage 2. Create a working webepg.list file
The purpose of webepg.list is to match a channel on your receiver with a listing in the grabber xml file. The creation is in three stages.
(1) Creating the list of receiver channel IDs.
If you just want the EPG for your favorites, then select the webepg plugin from your plugins menu and select "dump favorites as a webepg.list
If you want more than just your favorites, you'll need to tune to each channel in turn and select "Save EPG Channel ID to webepg.list". This can take a long time, but remember - it only has to be done once. A file named webepg.list will be created in /var
(2) Extracting channel IDs from a data.xml file.
Back on your computer, run xmltvgui and select "grab listings". This will create a file named data.xml in the directory specified in your preferences. Once it is created, open this file in your favourite text editor. The beginning of it is a list of channels and their xmltvgui i.d., e.g.
<channel id="UK_RT_92">
<display-name lang="en">BBC1</display-name>
</channel>
<channel id="UK_RT_105">
<display-name lang="en">BBC2</display-name>
</channel> From this we can see that the ID for BBC1 is UK_RT_92, and for BBC2 is UK_RT_105. You will have similar references for every channel you chose to grab. My suggestion is that you print off just this top section of the file; i.e. from the top as far as the first <programme start=.
(3) Matching channel ids to receiver ids.
You need to edit webepg.list in Unix format. There are several ways (you could just Telnet in and use vi for example) but it's probably easiest to FTP the webepg.list found in /var to your computer and open it in any Unix compatible text editor (I use Dana). It will look something like this:
XMLTV_CHANNELID_HERE,39,2,2050,6904 #BBC 1 CI - ASTRA 2A-B-D(28.2E)
XMLTV_CHANNELID_HERE,78,2,2045,6302 #BBC 2 England - ASTRA 2A-B-D(28.2E)
The figures identify the channel internally in the IPBox, the comment on the right is the channel name.
What you now do is to exine the list you printed off from data.xml and instead of XMLTV_CHANNELID_HERE put the channel id from data.xml, i.e.
UK_RT_92,39,2,2050,6904 #BBC 1 CI - ASTRA 2A-B-D(28.2E)
UK_RT_105,78,2,2045,6302 #BBC 2 England - ASTRA 2A-B-D(28.2E)
When you've finished, FTP your edited file back to /var in your box.
If you've got it right (i.e. the same channels are grabbed as are listed in webepg.list and the right ids are matched to the right channels) everything should now run smoothly. Even if you've made the odd mistake, it won't stop the rest from working. In other words, a channel grabbed and listed in data.xml but not listed in webepg.xml will be ignored; a channel in webepg.xml for which there is no data will simple remain empty. If you match the wrong id to a channel, you'll get the wrong programmes listed.
Stage 3. Uploading and symlinking.
The amount of data contained in the data.xml file may well be too large to fit into the /var directory of your box. Also, the webepg plugin looks for file.xml.
My suggested way of going about things is to create a file on your receiver hard disk named epgdata, upload data.xml to it, and symlink file.xml in /var to it.
So telnet into your box and create the epg directory (i.e.
mkdir /media/epgdata)
FTP the data.xml file on your PC to /media/epgdata on your box.
Symlink this to /var/file.xml (
ln -s /media/epgdata/file.xml /var/file.xml)
Stage 4. Running the plugin.
Simply run the webepg_import plugin and assuming you've done everything correctly your EPG will have a week's programmes for your favourite channels.
Congratulations, you've got it set up. The hard work is done.
Day to day running.
To keep the data up to date, you'll need to run xmltvgui regularly, import data.xml to your box and run the webepg_import plugin. There's only one extra step you'll need. Every time the plugin is run, it renames file.xml to file.xml.imported. We need to rename it back. So before running the plugin, Telnet in and simply give the command
mv /var/file.xml.imported /var/file.xml
On reboot, the EPG information is lost, so the plugin is normally configured to run at boot time. In this case, it uses file.xml.imported rather than file.xml and so runs without your intervention.
thanks to billnot