Queries an HDHomeRun and writes an XMLTV guide file you can import into anything that reads XMLTV.
273
A tiny Docker container that queries your local HDHomeRun and writes an XMLTV guide file you can import into Jellyfin, Emby, Kodi, TVHeadend, NextPVR, Channels DVR, or anything else that reads XMLTV.
# edit HD_IP and TZ in docker-compose.yml, then:
docker compose up -d --build
docker compose logs -f
Your guide appears at ./guide/guide.xml (and at http://<docker-host>:8080/guide.xml).
Without compose:
docker build -t hdhomerun-xmltv .
docker run -d --name hdhomerun-xmltv --restart unless-stopped \
-e HD_IP=192.168.1.50 -e TZ=America/New_York \
-v /path/to/guide:/data -p 8080:8080 \
hdhomerun-xmltv
| Variable | Default | Description |
|---|---|---|
HD_IP | (required) | IP or hostname of the HDHomeRun. Several devices: comma-separated (192.168.1.50,192.168.1.51). |
TZ | UTC | IANA timezone, e.g. Europe/Rome. Used for log timestamps and for programme times when building from the JSON guide. |
OUTPUT_DIR | /data | Where the file is saved. Mount a host folder here. |
OUTPUT_FILE | guide.xml | File name inside OUTPUT_DIR. |
REFRESH_HOURS | 12 | How often to rebuild the guide. |
GUIDE_MODE | auto | auto = official XMLTV, fall back to JSON; xmltv = official only; json = JSON guide only. |
GUIDE_DAYS | 3 | Days of guide to build in JSON mode (1-14). |
HTTP_PORT | 8080 | Built-in web server port. 0 disables it. |
WRITE_GZIP | false | Also write guide.xml.gz. |
FILTER_TO_LINEUP | true | JSON mode: only include channels that are in the tuner's lineup. |
XMLTV_LANG | en | Language code on titles and descriptions. |
RUN_ONCE | false | Write the file once and exit (handy with host cron). |
DeviceAuth (http://<HD_IP>/discover.json).https://api.hdhomerun.com/api/xmltv returns 14 days of
XMLTV. SiliconDust documents this as requiring an HDHomeRun DVR subscription./api/guide) and converts it to XMLTV itself. SiliconDust asks that this API not be used
for bulk downloads, so the default is 3 days, fetched in 24-hour chunks with a pause between.The container needs outbound internet access to api.hdhomerun.com plus LAN access to the device.
It does not need host networking.
Jellyfin: Dashboard > Live TV > TV Guide Data Providers > Add > XMLTV, then set
File or URL to /path/inside/jellyfin/guide.xml or http://<docker-host>:8080/guide.xml.
Then map channels (the numbers and names should auto-match).
Emby: Settings > Live TV > Add guide data provider > XMLTV, same File or URL options.
Others: point the XMLTV/EPG setting at the same URL or file.
Channel IDs in the JSON-built guide are the HDHomeRun guide numbers (e.g. 3.1), and each
channel also carries display names for the callsign and for "number callsign".
cannot query HDHomeRun: check HD_IP and that the container can reach it
(docker exec hdhomerun-xmltv wget -qO- http://<HD_IP>/discover.json).TZ to an IANA name (America/Chicago, not CST).user: "UID:GID" in compose to match the folder owner.docker ps shows unhealthy if no fresh file was written for roughly two refresh intervals.docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t yourname/hdhomerun-xmltv --push .
Content type
Image
Digest
sha256:1bb130027…
Size
17.2 MB
Last updated
7 days ago
docker pull nekkron/hdhomerun-xmltv