Please read the Status Report Forum!

Use our own app called EPiG to get full EPG without needing an XML! You find it in your profile!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TVheadend EPG
#4
Hi folks,


I feel your pain in getting TV Headend working with EPG updates. I've been battling this for a loooooong time and finally have been successful. 

The approach I describe here is slightly different to the one above and uses the standard TVHeadend External XMLTV EPG grabber listed in the TVHeadEnd grabber page. The XMLTV EPG data is downloaded using a script, the script collects the EPG data and sends it to the TVHeadend Linux socket named xmltv.sock that is provided by the standard "External: XMLTV" grabber.

The EPG update script is executed every day based on a scheduled task running on the same system as TVHeadend is running on. (Linux Sockets can only send and receive data between programs running on the same system).


You've most likely been successful with the first part, ensuring the services in the M3U have been mapped in TVH:

  1. Create the IPTV Network and give it a friendly name such as “UK IPTV”
  2. Check the “Create Bouquet” option so that you can automatically map the offered services to channels via selection of the bouquet.
  3. 
Set the number of input streams based on your available bandwidth (I have 4 streams i.e: 1 watching, 3 recording).
  4. As soon as “Create” is clicked, the services offered will be scanned. They can be rescanned by clicking the Force Scan button if necessary.
  5. Wait until #Muxes = #Services
  6. If you are using the bouquet to map the services to channels, in the Configuration > Channel > EPG > Bouquet’s dialog, enable the bouquet for the network you created to automatically map the services to channels
Note that channels will not be visible in the Configuration > Channel / EPG > Channels dialog until mapping has been done!

With the IP Channels mapped now configure the EPG Grabber as follows:


  1. In the Tvheadend admin interface: Configuration > Channel / EPG / EPG Grabber Modules menu, enable the “External: XMLTV” grabber. This will be used to receive XMLTV EPG data via a script - All other grabbers that are not used can be disabled.
  2. In the EPG Grabbers dialog, note the path to xmltv.sock listed in the External: XMLTV" grabber settings (it will be grey and not possible to change it)
  3. Create the script file based on the code below replacing...{your-egg-best-filename} with the filename EPG-best have provided to you and...replacing {your path to xmltv.sock} with the path you noted from your installation of TVHeadend.
  4. Save the script as epgbest_to_xmlsock
  5. Create a Scheduled Task to execute the script every day at 03:00
Code:
#!/bin/sh -v

URL="https://epg.best/{your-epg-best-filename}.xml.gz"
XML=$(mktemp -u)
SOCKET="/{your path to xmltv.sock}/xmltv.sock"

curl -so $XML $URL

if gzip -t $XML; then
       zcat $XML | socat -dd stdin UNIX-CONNECT:$SOCKET

fi

rm $XML

Note that my installation was on a Synology running DSM6.0, I didn't need to change permissions for the script to be executable - your Linux installation may require that (I'm not a Linux expert).

After the first setup of the grabber, two manual executions of the script are required:
  • The first run will collect channels and populate the EPG Grabber Channels dialog.
  • The second run will collect broadcasts associated with the channels and populate the Electronic Program Guide.
Hope others find this useful.
Reply


Messages In This Thread
TVheadend EPG - by AAJarvis - 03-31-2020, 01:42 PM
RE: TVheadend EPG - by Wally73 - 04-02-2020, 02:32 PM
RE: TVheadend EPG - by jeremyrem - 04-08-2020, 06:46 PM
RE: TVheadend EPG - by solomalee - 01-24-2021, 05:04 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)