Jellyfin HDHomeRun EPG Puller

If you are using Jellyfin on Linux, have a HDHomeRun cable tuner, AND have paid for the DVR feature – you may be wondering “Do I really have to pay for a separate EPG service in Jellyfin?!?!”

Answer is: NO – You can use the EPG data that you paid for with HDHomeRun

I have created a small script that will query HDHomeRun network cable tuner’s key, and use that key to download a EPG compatible with Kodi 🙂

You can make a file called pullhdhomerunxmltv.sh and put the following in it:

#!/bin/bash
echo 'Getting Current Key from HDHomeRun...'
KEY=$(curl http://192.168.10.2/discover.json | jq -r .DeviceAuth)
echo 'Current Key is' $KEY #optional line
echo 'Downloading TV Guide Data...'
curl --compressed https://api.hdhomerun.com/api/xmltv?DeviceAuth=$KEY > /data/Containers/jellyfin/xmltvlist.xml
echo 'Done!'

As you can see…This script is pretty simple. For most, no need for me to explain what it’s doing once you see it. However, to make it easy for everyone – I will explain a few things you must modify to make it suit your needs:

  1. Change 192.168.10.2 to the IP of YOUR HDHomeRun device.
  2. Change /data/Containers/jellyfin/xmltvlist.xml to save the epg file where YOU want it.
  3. Don’t forget to give execute permissions to the script:
chmod +x pullhdhomerunxmltv.sh

If this is not working – please make sure you have DVR service active on your HDHomeRun tuner. EPG is part of that service (gotta know when a show plays to automatically record it!).

Hope this helps some of you Jellyfin users out. I prefer watching TV with Kodi…but if you have to stream it to your phone or remotely – It comes in handy having it in Jellyfin too!

UPDATE: 2/25/2022 – The 2nd curl command appears to now require https:// being included. I’ve updated the code above. If you using it already, you’ll have to modify your script. If you are setting it up new for the first time – just copy and current script as it’s updated and should be good to go!