XMLTV guide data

Want to write your own code to work with a HDHomeRun or work with the HDHomeRun DVR? We are happy to help with concepts, APIs, best practices.
Post Reply
lwizard
Posts: 10
Joined: Sun Apr 06, 2025 2:27 am

Re: XMLTV guide data

Post by lwizard »

Yes, I think so. My license seems to be not assigned to any device. At the same way I can not assign it and also can not delete and generate a new one from the web.

isriam
Posts: 3
Joined: Sat May 17, 2025 8:19 am

Re: XMLTV guide data

Post by isriam »

signed up for this and deployed a python app that will query and download for me. however can someone explain why the tvg-logo is not in the hdhomerun m3u and only in the xmltv? I believe you should add these to the EXTINF data.

#EXTM3U
#EXTINF:-1 channel-id="3.1" channel-number="3.1" tvg-name="KTVK-HD" group-title="Favorites",3.1 KTVK-HD
http://192.0.2.10:5004/auto/v3.1
#EXTINF:-1 channel-id="3.2" channel-number="3.2" tvg-name="Comet",3.2 Comet
http://192.0.2.10:5004/auto/v3.2
#EXTINF:-1 channel-id="3.3" channel-number="3.3" tvg-name="Outlaw",3.3 Outlaw
http://192.0.2.10:5004/auto/v3.3
#EXTINF:-1 channel-id="3.4" channel-number="3.4" tvg-name="Paid Ad",3.4 Paid Ad
http://192.0.2.10:5004/auto/v3.4
#EXTINF:-1 channel-id="3.5" channel-number="3.5" tvg-name="Weather",3.5 Weather
http://192.0.2.10:5004/auto/v3.5
#EXTINF:-1 channel-id="5.1" channel-number="5.1" tvg-name="KPHO-HD" group-title="Favorites",5.1 KPHO-HD
http://192.0.2.10:5004/auto/v5.1

isriam
Posts: 3
Joined: Sat May 17, 2025 8:19 am

Re: XMLTV guide data

Post by isriam »

also here is a quick and dirty python script you can run with a cronjob.

Code: Select all

#!/usr/bin/env python3
import requests

# Get DeviceAuth from local URL
discover_url = "http://192.168.1.50/discover.json"
response = requests.get(discover_url)
device_auth = response.json().get("DeviceAuth")

# Download XMLTV with DeviceAuth
xmltv_url = f"https://api.hdhomerun.com/api/xmltv?DeviceAuth={device_auth}"
headers = {"Accept-Encoding": "gzip"}
response = requests.get(xmltv_url, headers=headers)

# Save response to xmltv.xml
with open("xmltv.xml", "wb") as f:
    f.write(response.content)

Online
signcarver
Expert
Posts: 11424
Joined: Wed Jan 24, 2007 1:04 am
Device ID: 10A05954 10802091 131B34B7 13231F92 1070A18E 1073ED6F 15300C36
x 40

Re: XMLTV guide data

Post by signcarver »

isriam wrote: Sat May 17, 2025 8:24 am signed up for this and deployed a python app that will query and download for me. however can someone explain why the tvg-logo is not in the hdhomerun m3u and only in the xmltv? I believe you should add these to the EXTINF data.

#EXTM3U
#EXTINF:-1 channel-id="3.1" channel-number="3.1" tvg-name="KTVK-HD" group-title="Favorites",3.1 KTVK-HD
http://192.0.2.10:5004/auto/v3.1
#EXTINF:-1 channel-id="3.2" channel-number="3.2" tvg-name="Comet",3.2 Comet
http://192.0.2.10:5004/auto/v3.2
#EXTINF:-1 channel-id="3.3" channel-number="3.3" tvg-name="Outlaw",3.3 Outlaw
http://192.0.2.10:5004/auto/v3.3
#EXTINF:-1 channel-id="3.4" channel-number="3.4" tvg-name="Paid Ad",3.4 Paid Ad
http://192.0.2.10:5004/auto/v3.4
#EXTINF:-1 channel-id="3.5" channel-number="3.5" tvg-name="Weather",3.5 Weather
http://192.0.2.10:5004/auto/v3.5
#EXTINF:-1 channel-id="5.1" channel-number="5.1" tvg-name="KPHO-HD" group-title="Favorites",5.1 KPHO-HD
http://192.0.2.10:5004/auto/v5.1
The m3u is generated by the device which only has the scan results (virtual channel number and name) and "Favorites" (if you make it so but note disabled can be shown with the ?show=all parameter but won't give it such title) and has no concept of logos since that information doesn't come from the scan. Many applications will work better if the logo was also stored locally (some read such data from another file it may create from the m3u but for some reason may only put the filename there not the http link and/or uses only the tvg-name to find such a file)

Though the m3u is a convenience, it often should be edited to have better data... for instance it looks like your market is phoenix and there channel 41 would have KPDF-CD for the name of all sub channels, but guide data is available for them (though I think SD currently has nearly all of them wrong as last I checked 41.4 is apparently JTV-Espanol but they label it as QVC but provide the guide that is actually more in line with the infomercial that was on 41.1 and the 41.1 guide is not correct but it is hard for me to figure out what those channels are actually showing).

isriam
Posts: 3
Joined: Sat May 17, 2025 8:19 am

Re: XMLTV guide data

Post by isriam »

I'm using an application called threadfin that combines multiple m3u and xml into a single m3u. its very helpful for iptv streams, hdhomerun, and plex. The issue is the maintainer states channel logo should be in the m3u not the xml. I think there should be an option to include both. I've manually pulled the png logo from the xmltv and added it to the m3u but its cumbersome.

nickk
Silicondust
Posts: 20675
Joined: Tue Jan 13, 2004 9:39 am
x 336

Re: XMLTV guide data

Post by nickk »

isriam wrote: Sat May 17, 2025 12:19 pm I'm using an application called threadfin that combines multiple m3u and xml into a single m3u. its very helpful for iptv streams, hdhomerun, and plex. The issue is the maintainer states channel logo should be in the m3u not the xml. I think there should be an option to include both. I've manually pulled the png logo from the xmltv and added it to the m3u but its cumbersome.
There are no channel logos in the broadcast, the only human content in the broadcast is the virtual channel number and a name as set by the broadcaster (which won't be the same as the name set by the guide vendor).

The channel logos we provide are a guide feature. For example if the wrong guide was applied to the channel you would see the logo for the guide, not the the actual channel (because the actual channel doesn't provide a logo).

The best real-world handling is to use the m3u logo when present, with fallback to the xmltv logo if there is no logo in the m3u.

davide67
Posts: 1
Joined: Sun Feb 18, 2024 4:44 am

Re: XMLTV guide data

Post by davide67 »

Hi guys, have patience but in the Mac environment I don't understand a accident.
Having an active subscription (124111f5) with Windows through a stupid NPVR script I was able to download the EPG guide in XML format daily for Emby.
However, migrating to macOS everything seems more complicated.
For now I managed to obtain only the DeviceAuth and device ID. How should I proceed to create a script?
Thanks for the help

lwizard
Posts: 10
Joined: Sun Apr 06, 2025 2:27 am

Re: XMLTV guide data

Post by lwizard »

nickk wrote: Fri May 16, 2025 12:09 pm
lwizard wrote: Fri May 16, 2025 9:23 am I suspect that my subscription is no longer active, but don't know why.
I paid few months ago...
Looks like there is a problem with your account on our side... investigating...
Any news?
I wrote to shop support, but they didn't answer me.
I bought subscription only for a reliable EPG, but now I'm not able to use what I paid for.

Thanks!

nickk
Silicondust
Posts: 20675
Joined: Tue Jan 13, 2004 9:39 am
x 336

Re: XMLTV guide data

Post by nickk »

lwizard wrote: Tue May 20, 2025 1:01 am Any news?
I wrote to shop support, but they didn't answer me.
I bought subscription only for a reliable EPG, but now I'm not able to use what I paid for.
I know support tried a few things but were unsuccessful.
I think I have a solution but I am on a plane right now with intermittent internet... I will try to get it done at the hotel.
We will get it working for you.

lwizard
Posts: 10
Joined: Sun Apr 06, 2025 2:27 am

Re: XMLTV guide data

Post by lwizard »

Thank you!
Very strange what is happening...

nickk
Silicondust
Posts: 20675
Joined: Tue Jan 13, 2004 9:39 am
x 336

Re: XMLTV guide data

Post by nickk »

lwizard wrote: Wed May 21, 2025 6:04 am Thank you!
Very strange what is happening...
Please check your private messages...

lwizard
Posts: 10
Joined: Sun Apr 06, 2025 2:27 am

Re: XMLTV guide data

Post by lwizard »

I write here to let other know that everything is well with support.
I solved the problem.
Thanks.

Post Reply