Metabroadcast Atlas Listings Grabber

From MythTV Official Wiki
Revision as of 09:55, 13 September 2015 by Stevegoodey (talk | contribs) (Typos.)

Jump to: navigation, search

Atlas (tv_grab_uk_atlas) is a new service from Metabroadcast, taking over UK listings data from Radio Times (tv_grab_uk_rt). UK users wanting 14 days of detailed listings data will have to move to this service in 2015, or move to EPG data instead.

The process is pretty straightforward if you already have Radio times setup and working. You can also follow these steps if you are moving from EPG data to using XMLTV for the first time.

-Get an API key

Each user of Atlas needs their own API key, this is free and can be done instantly via the Metabroadcast website. Visit

Follow the links and sign in using Google/Twitter/Github

Enter Name/Email/Website ( will do, doesn't matter)

Create a new application, give it a name and URL again.

Add "PA" and "UK Channel Lineups" to your enabled list (I have "PA" at the top) and enable content matching.

Make a note of the API key you are given on this page.

-XMLTV install

We must now ensure our XMLTV version is new enough to include the Atlas grabber. Version 0.5.65 or later ( is required.

For Ubuntu users, using the mythbuntu PPA is the easiest way to get up-to-date:

sudo add-apt-repository ppa:mythbuntu/xmltv sudo apt-get update sudo apt-get upgrade

Or manually downloading as required:

-Backend Setup Now we can make the required changes in Mythtv backend.

Enter the backend setup, go to "Video Sources" and flick through the list until you find the UK Atlas grabber. As per Radio Times, run through the config and select your region etc, a config file will be created with your channels. Here is where you will also have to add your API key.

To test, you can remove all program data and then run mythfilldatabase, the following mysql will empty program data table:

truncate program;

Now run mythfilldatabase and see if you get program data.

One thing you will have to change if coming from Radio Times listings, is to wherever your mythfilldatabase command runs from, it may well be run as:

mythfilldatabase --allatonce

or similar

Atlas does not support this and should be ran with "--refresh 0-99" instead. Edit this in your backend setup/crontab/etc as required.


You can test things are working by running the following:

tv_grab_uk_atlas --config-file /home/**username**/.xmltv/tv_grab_uk_atlas.conf --hours 1 > grab.log

You can then scan through the output and you should see lots of nice channel data!

For example, during setup, I was getting data on a fairly hit and miss basis, turns out in the end, Atlas were having server issues on the weekend I was doing my setup. But the process went as follows:

Data was missing for random channels, at random times no random days. Ran the above command, looked through the output. This shows all of the API calls being made to the Atlas service, like:,broadcasts,series_summary,brand_summary,people,channel&****APIKEYHERE****

In return, I sporadically got:

{"error":{"message":"An internal server error occurred","error_code":"INTERNAL_ERROR","error_id":"b033a50d-049e-492b-917e-425d51f506bb"}}

Refreshing the API call gave me data back on about one in five refreshes, which turned out to be the server issues. You may however get other good feedback from doing these steps if your having issues


You will also need to make sure your XMLTV IDs are correctly matched to channels, as per Radio Times grabber. I find this is done best through the Mythweb channel editor.

Use /home/**username**/.xmltv/supplement/tv_grab_uk_atlas/

Which has a nice list of channels, regional variants and their IDs.

Add any missing ones, check/un-check "useonairguide" for channels with no ID, re-run mythfilldatabase and check your listing for missing data.

Be aware, that this file lists IDs for multiple platforms, such as Freeview and Virgin. Make sure you get the right one, Channel 5 for example has "" for "FreeView" and "" for others.

If you still have channels that now have IDs, but no data downloaded, then check your grabber config file, created when running the Atlas setup in Myth Backend:

/home/**username**/.mythtv/**video source name**.xmltv

Here you will see all of the channels, represented by a four character code:

channel=cbm4 channel=cbcQ channel=cbcR

If one of your channels is not listed here, then add it manually, using the matching codes you will have seen in the supplement file we looked in before. I had to add three missing ones, that the grabber setup process had not, for whatever reason. This could have been fixed since in a newer version.

Next step, if you are still having issues, is to make sure the provided XMLTV ID is actually providing data. We can check this with a manual API call, as follows:,broadcasts,series_summary,brand_summary,people,channel&**API KEY HERE**

Replace the "channel_id" code with the one you wish to test and you should get some data back, quite a lot if it is working and only a few if not, hopefully obvious.

The API call URLs can be found from the output of the command we ran earlier in troubleshooting:

tv_grab_uk_atlas --config-file /home/user/.xmltv/tv_grab_uk_atlas.conf --hours 1 --debug > grab.log

Every channel ID the grabber is getting data for will be shown in this file, so you can do a search on channel or XMLTV ID etc.

Lastly, I also had a few channels with no data from on air/EPG. This seemed to be because they were borderline tunable, so just hid these channels in Mythweb channel editor.


I found the Atlas support to be very helpful, when I was having issues getting guide data. Do give them a shout if you need help -!forum/atlasapi