TVHeadend EPG not populating

Hi all, it’s my first post so let me first thank the developers for their fantastic work and the great forum community.

I have an X96 and another Chinese box, both AML S905X 1G/8G running CE 8.99.2. They were on LE until I switched them to CE a few months ago and never looked back as I’m very happy with CE.

They’re working exactly the way I want them to apart from a couple of things, one is the TVHeadend EPG not populating, for the other I’ll start another topic.

I’m using TVH server and client and I’d like to use Web XMLTV EPG. I’ve enabled Internal XMLTV on TVH server html config and configured this url on the addon settings: https://www.epg-guide.com/it.gz but the EPG won’t populate, below are some logs.

Anyone knows what I’m doing wrong or a better way to populate the EPG?

14:58:11.144 T:3708277616   DEBUG: Thread EPGUpdater start, auto delete: false
14:58:11.144 T:3976381296  NOTICE: EPG thread started
14:58:12.145 T:3880739696   DEBUG: Thread PVRGUIProgressHandler start, auto delete: true
14:58:12.145 T:3708277616   DEBUG: UpdateFromScraper: Updating EPG for channel 'Rai 2 HD' from client '2146250725'
14:58:12.145 T:3708277616   DEBUG: AddOnLog: Tvheadend HTSP Client: pvr.hts - get epg channel 96138279 start 1549634292 stop 1549634292
14:58:12.146 T:3708277616   DEBUG: AddOnLog: Tvheadend HTSP Client: pvr.hts - get epg channel 96138279 events 0
14:58:12.146 T:3708277616   DEBUG: UpdateFromScraper: Updating EPG for channel 'Canale5 HD' from client '2146250725'
14:58:12.146 T:3708277616   DEBUG: AddOnLog: Tvheadend HTSP Client: pvr.hts - get epg channel 242136867 start 1549634292 stop 1549634292
14:58:12.147 T:3708277616   DEBUG: AddOnLog: Tvheadend HTSP Client: pvr.hts - get epg channel 242136867 events 0
14:58:12.147 T:3708277616   DEBUG: UpdateFromScraper: Updating EPG for channel 'Rai 3 TGR Umbria' from client '2146250725'
14:58:12.147 T:3708277616   DEBUG: AddOnLog: Tvheadend HTSP Client: pvr.hts - get epg channel 307081457 start 1549634292 stop 1549634292
14:58:12.148 T:3708277616   DEBUG: AddOnLog: Tvheadend HTSP Client: pvr.hts - get epg channel 307081457 events 0
14:58:12.148 T:3708277616   DEBUG: UpdateFromScraper: Updating EPG for channel 'Sky TG24' from client '2146250725'
14:58:12.148 T:3708277616   DEBUG: AddOnLog: Tvheadend HTSP Client: pvr.hts - get epg channel 345623990 start 1549634292 stop 1549634292
14:58:12.148 T:3708277616   DEBUG: AddOnLog: Tvheadend HTSP Client: pvr.hts - get epg channel 345623990 events 0
14:58:12.149 T:3708277616   DEBUG: UpdateFromScraper: Updating EPG for channel 'Rai 1 HD' from client '2146250725'
14:58:12.149 T:3708277616   DEBUG: AddOnLog: Tvheadend HTSP Client: pvr.hts - get epg channel 363810550 start 1549634292 stop 1549634292
14:58:12.149 T:3708277616   DEBUG: AddOnLog: Tvheadend HTSP Client: pvr.hts - get epg channel 363810550 events 0
(continues for the other channels)

When you go into the web interface has tvheadend got the EPG Data. IE is kodi not getting it from tvheadend or is TVheadend not importing the XML?!

1 Like

Thanks for your reply and good point, 2 channels are there and they are also showing on Kodi, I hadn’t even seen them as they are toward the bottom of the list of channels. All other EPG grabber modules are disabled so the 2 channels must come from the XML file, but then why not the others? The file does contain all the channels.

They have definitely not come from the over the air grabber? I Use the over the air grabber as 7 days Info is fine with me. Usually as soon as I add the channels the OTA grabber kicks in depending on your source. It looks like a TVHeadend / XML thing maybe the channel names aren’t matching properly. Someone else on the forum may have a better Idea I used to use XMLTV with MythTV back in the day and it was very easy to break. If Not I would try the TVHeadend forum because It looks like a tvheadend issue.

PS is there not a process in the channels in where you tell tvheadend which epg matches to each channel. I seem to remember doing it once and found it a ball ache so decided just to use OTA, Also you may well want to use OTA as well that way if the Program schedule changes you wont miss it.

I’d be happy with the OTA grabber too but there isn’t one on TVH’s list that covers all of Italy’s channels, the Sky Italia one has just a few, so I went the XML route.

Have you tried Over-the-air EIT:DVB Grabber? you may only get now and next but it is a start.

Yes, I’ve tried them all, getting a timeout for most of them including EIT: DVB

Feb 09 19:10:47 l1 tvheadend[2923]: epggrab: EIT: DVB Grabber - data completion timeout for 722MHz in DVB-T Italy

BTW do you have the same list of OTA grabbers that I do? As searching the net for a solution I saw a screenshot of a TVH with a much longer list. As I migrated my TVH from LE copying its config folder over to CE, so that could possibly be the problem eg. an outdated/incomplete list of grabbers (though TVH was the same version).

Yes I have 14 Grabbers same as you in the uk we have freeview and freesat grabbers that give us 7 days over the air so no real need for xml grabber unless you need more than 7 days.

See if it makes any difference if you change your URL to this http://62.210.91.138/it.gz ?
The URL in your first post does some sort of redirection to that address.

mecool:~ # curl https://www.epg-guide.com/it.gz
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.10.3</center>
</body>
</html>

On linux-like env its
cat /path/guide.xml | socat - UNIX-CONNECT:/root/.hts//tvheadend/epggrab/xmltv.sock

Dont know how its on jeOS, as on CE there is no socat.

1 Like

Yep, and there must be a way to do it from here too as my TV grabs OTA EPG no probs, no idea how to add a new OTA grabber to TVH though let alone configure it, haven’t found anything on the net and local websites seem to go for that XMLTV link.

You can install socat via Entware if you prefer to use External XMLTV instead of Internal XMLTV. However you can also use curl. (via kodi.tv)

2 Likes

Thanks, I’ve tried but no change. The strange thing is that 2 channels are grabbed from that file so it would look like it’s downloaded but then why are they all missing? A few missing would be normal due to names mismatches etc. but two out of that many doesn’t make sense.

To me it looks like the issue is that the tv_grab_file script (atleast when source type is set to Web) expects the file to be already decompressed/xml. This is the part that downloads the file

  elif [ "$XMLTV_TYPE" = "WEB" ]; then
    wget -qO - "$XMLTV_LOCATION_WEB"
    exit 0
  fi

where the “-O -” option in wget wants to output it directly to “stdout”. Technically you could pipe that to gzip and make it work but I would probably suggest to download it and use the source type file instead.

Why not use webgrab+ , its a little bit finiky to set up but the coreelec addon makes it fairly straightforward.

Yes, I confirm that if you use webgrab, you will not have problems. If you need help, ask too.

Thanks a lot to everyone who contributed. I went with the External XMLTV solution using curl as suggested by @Rascal and it works great.

For anyone looking for this in future: I enabled the External XMLTV EPG grabber module on TVH’s web interface. Then via ssh I created a script called epggrab in a new folder /storage/xmltv/

#!/bin/bash
rm /storage/xmltv/xmltv.log
rm /storage/xmltv/it

touch /storage/xmltv/xmltv.log
echo "Download starting..." >> /storage/xmltv/xmltv.log
echo "Time: $(date)" >> /storage/xmltv/xmltv.log

wget https://www.epg-guide.com/it.gz -P /storage/xmltv/
gunzip /storage/xmltv/it.gz -f

curl -d @/storage/xmltv/it -X POST -m 5 --unix-socket /storage/.kodi/userdata/addon_data/service.tvheadend42/epggrab/xmltv.sock http://google.com
echo "" >> /storage/xmltv/xmltv.log
echo "EPG Updated successfully." >> /storage/xmltv/xmltv.log
echo "Time: $(date)" >> /storage/xmltv/xmltv.log

Made it executeable

chmod a+x /storage/xmltv/epggrab

Made it to run at 3 am every day

crontab -e
00 3 * * * bash /storage/xmltv/epggrab
3 Likes

I get a curl timeout when script execution, but it’s OK.

After,I deleted my log files.I didn’t get EPG data in WEB port.
/storage/.kodi/userdata/addon_data/service.tvheadend43/dvr/log - This is the path where I deleted log files.

I don’t really understand where I’m wrong.
I use the default internal epg grabber, all channels have the epg assigned but nothing appears in the electronic guide.

EDIT: http://www.epgitalia.tv/xml/guide.xml is not updated, damn!
Work fine with https://www.epg-guide.com.