Forums » Tutorial and setups »
EPG with IPTV provider
Added by Jim West almost 6 years ago
Can't seem to get EPG for my new iptv provider. The IPTV provider gave me a URL specifically for EPG.
Are there some tools to add the url as one of the epg grabbers? I don't see any tools available in TvHeadEnd server.
I have a Ubuntu 18 Server only running TVENDHEAD (Backend). I have two Rasberry Pi 3 running OMSC with tvheadend add-on client.
Everything works great! I can see all channels, but no EPG.
I've spent many hours searching for for anwswers, but find some answers in posts from 4 years ago and know they're not relevant to current version.
Any suggestions would help.
Thank you!
Replies (3)
RE: EPG with IPTV provider - Added by Ron L almost 6 years ago
If the URL lets you download an xmltv file there is a simple grabber you can install called tv_grab_file. It just reads the file after it's been downloaded by something else. If you google there are tutorials online as to getting that set up to work with TVH.
AFAIK TVH has no way to download an xmltv file on it's own. Probably something that could be a feature request.
RE: EPG with IPTV provider - Added by Hiro Protagonist almost 6 years ago
The usual way to do this is to create a small script that grabs the data for TVH.
The script can either write the data to a file, or pipe it into the TVH socket.
For a file, you'll need to enable INTERNAL:tv_grab_file, for the socket you'll need to enable
EXTERNAL: XMLTV - these can be found in Configuration Channel/EPG EPG Grabber Modules.
You may need to install tv_grab_file if you want to use it & your system doesn't have it already.
You script should do something like:
curl -sSL 'URL' > /tmp/xmltv.xml
or
curl -sSL 'URL' | nc -w 5 -U .hts/tvheadend/epggrab/xmltv.sock
Note that there are several versions of 'nc' and only one of them is capable of writing to a Unix socket,
you may need to use 'socat' instead you should be able to find examples by searching the forum.
Run your script manually while looking at the log file in the TVH gui [click on the icon that looks like two ^ at the bottom right],
if it works you will see a message indicating that episodes were updated.
Once you have the script working, use crontab to run it once per day.
RE: EPG with IPTV provider - Added by Jim West almost 6 years ago
Thank you, Hiro.
Yes, I did something similar. Downloaded tv_grab_file from git. Grabbed the epg from provider's url and saved it in /home/hts/.xmltv.
I did this manually and I could see the resulting updated EPG on my frontend PI3 OMSC with TvHeadEnd Client.
I was unsuccessful in creating a script with PHP Curl, but I just tried your "curl -sSL 'URL' > /tmp/xmltv.xml" and it worked!
Thank you so much!
Now I'll figure out adding my simple script to crontab so it can update everyday.
Cheers!