Is this service also available in EUR?nickk wrote: ↑Thu Nov 28, 2019 10:13 am We are testing a new service providing 14-day XMLTV format guide data to customers who are paying for the HDHomeRun guide.
API: https://api.hdhomerun.com/api/xmltv?DeviceAuth=xxx
DeviceAuth comes from the HDHomeRun unit - for coding you get it from discover but for testing the easiest is to get it from
http://<ip of hdhomerun>/discover.json
If you have more than one HDHomeRun unit pull the DeviceAuth from each and concatenate them together.
The API will return the set of all channels across HDHomeRun units. For example if you have a HDHomeRun unit for cable and a HDHomeRun unit for antenna the API will return 14-day guide for all cable and antenna channels combined.
The API works in all supported countries.
Nick
XMLTV guide data
Re: XMLTV guide data
-
- Expert
- Posts: 11096
- Joined: Wed Jan 24, 2007 1:04 am
- Device ID: 10A05954 10802091 131B34B7 13231F92 1070A18E 1073ED6F 15300C36
- x 40
Re: XMLTV guide data
Launch the hdhomerun app... the guide data is the same, just delivered differently, so if you get guide data there, have a modern tuner, and you subscribe to the dvr service, the xml version of the guide is available.
Re: XMLTV guide data
Guide data is available for some Dutch channels but not many: NPO1, 2, and 3 , RTL4, NET5, RTL5, SBS 6, RTL7, RTL8, Eurosport, Eurosport 2, National Geographic, Discovery, and Veronica/Disney XD.
-
- Posts: 98
- Joined: Tue Dec 10, 2013 8:38 am
- x 1
Re: XMLTV guide data
Thank you! This was really helpful. I tried this bash script on Mac OS X and, after giving execute permissions using chmod +x <name>, the bash script works fine from terminalgr33k wrote: ↑Sat Feb 08, 2020 12:08 pm Ok...so I got it running, but I realized the key is not static...it seems to change after a while (I don't know how long but at least every day if not sooner you will have a newer key). So I had to modify the script to be able to obtain the key first, and then pass it as a variable to the script each time to successfully download the TVGuide data![]()
Well - that appears to be easy enough. You need to have an app called jq (https://stedolan.github.io/jq/) installed though. You should be able to apt install jq or yum install jq for an easy install. With that...here we have:
Now of course you have to replace 192.168.10.143 with the IP of YOUR HDHomeRun...but that's about itCode: Select all
#!/bin/bash echo 'Getting Current Key from HDHomeRun...' KEY=$(curl http://192.168.10.143/discover.json | jq -r .DeviceAuth) echo 'Current Key is' $KEY #optional echo 'Downloading TV Guide Data...' curl --compressed api.hdhomerun.com/api/xmltv?DeviceAuth=$KEY > xmltvlist.xml echo 'Done!'
![]()
![Smile :)](./images/smilies/icon_e_smile.gif)
On Mac OS X when I tried to run this script using crontab the generated .xml file was empty. The fix for me was to add a PATH= statement to the script like this. On my system jq is in /usr/local/bin, so perhaps that is why an explicit path is needed. I still need to test this through a KEY change.
Code: Select all
#!/bin/bash
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin # Fix for crontab.
echo 'Getting Current Key from HDHomeRun...'
KEY=$(curl http://192.168.50.19/discover.json | jq -r .DeviceAuth)
echo 'Current Key is' $KEY #optional
echo 'Downloading TV Guide Data...'
curl --compressed api.hdhomerun.com/api/xmltv?DeviceAuth=$KEY > ~/Downloads/xmltvlist.xml
echo 'Done!'
-
- Posts: 98
- Joined: Tue Dec 10, 2013 8:38 am
- x 1
Re: XMLTV guide data
Is it possible to add one extra line for the episode-num system comforming to "xmltv_ns" ?
Example given this:
include one extra line:
See reference: https://github.com/XMLTV/xmltv/blob/master/xmltv.dtd
Thanks.
UPDATE: I've written (or rather hacked
) a python file to convert the .xml file into a version that includes episode-num "xmltv_ns" lines.
I also added a line to help indicate a show is a repeat. If a show does not contain this "new" line: then add this line:
Example given this:
Code: Select all
<episode-num system="onscreen">S24E76</episode-num>
Code: Select all
<episode-num system="onscreen">S24E76</episode-num>
<episode-num system="xmltv_ns">23.75.0</episode-num>
Thanks.
UPDATE: I've written (or rather hacked
![Smile :)](./images/smilies/icon_e_smile.gif)
I also added a line to help indicate a show is a repeat. If a show does not contain this "new" line:
Code: Select all
<programme>
...
<new />
...
</programme>
Code: Select all
<programme>
...
<previously-shown />
</programme>
-
- Posts: 1
- Joined: Mon May 25, 2020 1:43 pm
Re: XMLTV guide data
I've just subscribed but im still getting "not subscribed"
Re: XMLTV guide data
It sounds like you're the same Steve that filed a support ticket, where we sent you the activation link, but if not, please open a support ticket and I can look into it: https://www.silicondust.com/support/trouble-ticket/stevedparry wrote: ↑Mon May 25, 2020 1:45 pm I've just subscribed but im still getting "not subscribed"
Re: XMLTV guide data
I didn't want to install jq so I just adapted the script to use awk instead. It's marginally more brittle, since it just string-parses out the needed key, but that's all we really need. Should work out of the box on any system with awk and curl, which is most, heh.gr33k wrote: ↑Sat Feb 08, 2020 12:08 pm Ok...so I got it running, but I realized the key is not static...it seems to change after a while (I don't know how long but at least every day if not sooner you will have a newer key). So I had to modify the script to be able to obtain the key first, and then pass it as a variable to the script each time to successfully download the TVGuide data![]()
Well - that appears to be easy enough. You need to have an app called jq (https://stedolan.github.io/jq/) installed though. You should be able to apt install jq or yum install jq for an easy install. With that...here we have:
Now of course you have to replace 192.168.10.143 with the IP of YOUR HDHomeRun...but that's about itCode: Select all
#!/bin/bash echo 'Getting Current Key from HDHomeRun...' KEY=$(curl http://192.168.10.143/discover.json | jq -r .DeviceAuth) echo 'Current Key is' $KEY #optional echo 'Downloading TV Guide Data...' curl --compressed api.hdhomerun.com/api/xmltv?DeviceAuth=$KEY > xmltvlist.xml echo 'Done!'
![]()
Code: Select all
#!/bin/bash
echo 'Getting Current Key from HDHomeRun...'
KEY=$(curl http://192.168.1.126/discover.json | sed -E 's/.*"DeviceAuth"\s*:\s*"([^"]+)".*/\1/g')
echo 'Current Key is' $KEY #optional
echo 'Downloading TV Guide Data...'
curl --compressed api.hdhomerun.com/api/xmltv?DeviceAuth=$KEY > xmltvlist.xml
echo 'Done!'
Re: XMLTV guide data
Hey Nick,nickk wrote: ↑Thu Nov 28, 2019 10:13 am We are testing a new service providing 14-day XMLTV format guide data to customers who are paying for the HDHomeRun guide.
API: https://api.hdhomerun.com/api/xmltv?DeviceAuth=xxx
DeviceAuth comes from the HDHomeRun unit - for coding you get it from discover but for testing the easiest is to get it from
http://<ip of hdhomerun>/discover.json
If you have more than one HDHomeRun unit pull the DeviceAuth from each and concatenate them together.
The API will return the set of all channels across HDHomeRun units. For example if you have a HDHomeRun unit for cable and a HDHomeRun unit for antenna the API will return 14-day guide for all cable and antenna channels combined.
The API works in all supported countries.
Nick
So I'm curious about something, which maybe you can answer. This service is run off of your servers, which means as guide data is fetched by whatever service people need to write, they pulling 20+ MB from you. It's fast, don't get me wrong, but have you guys (SiliconDust) considered adding a "job", occurring on some frequency, to run from the actual HDHomeRun device, and caching this data locally? This way, we wouldn't need to write scripts to fetch the DeviceAuth or a special cron to pull it, or a place to store the resulting data. We could instead just refer to a local IP/URL, just like the /recorded_files.json or /lineup.xml files/URLs on our local devices, rather than hitting your server.
As an additional question, I'm attempting to get this data to mesh well with NextPVR. I'm able to pull both the channel lineup and this API's guide data, via my earlier posted updated script, but for some reason, NextPVR doesn't seem to be able to mate the two together, I assume due to some mismatch in channel display-name or a misaligned unique identifier. Is there some way to tell the API that I'd like a certain "display-name" as the channel identifier or something that I'm missing? I'm relatively new to the TV/PVR/XMLTV/Guide stuff, so any advice you can offer would be appreciated. Overall I've been pretty pleased with the capabilities of the device, but I've gone down this route due to various reasons that can be reserved for a future conversation.
Re: XMLTV guide data
Usually a DVR would pull guide data once a day (random time) and use it locally.
If you are pulling data more often please let me know a bit more about the approach.
Nick
If you are pulling data more often please let me know a bit more about the approach.
Nick
Re: XMLTV guide data
@Brak I had a look at someone's XMLTV from this API, and discussed it with @sub the developer and currently NextPVR doesn't support multiple display-name markup from this source. He has added support for the next release. You might be able to fake it in the meantime by modifying the second lineBrak wrote: ↑Fri Jul 31, 2020 3:38 pmAs an additional question, I'm attempting to get this data to mesh well with NextPVR. I'm able to pull both the channel lineup and this API's guide data, via my earlier posted updated script, but for some reason, NextPVR doesn't seem to be able to mate the two together
<tv source-info-url="https://www.hdhomerun.com/" source-info-name="HDHomeRun" generator-info-name="mc2xml">
You only need to do this manual edit for the Auto Map daily runs will work fine
@nickk after looking at the source XMLTV as a general comment for SiliconDust I think the TMS long name should be included, some cable names can be pretty cryptic.
Martin
Re: XMLTV guide data
Thanks to OP for exposing the API and thanks to Brak for the quick script. I was using zap2xml to fetch TV listings from Zap2It but this is much nicer.Brak wrote: ↑Fri Jul 31, 2020 12:36 pmI didn't want to install jq so I just adapted the script to use awk instead. It's marginally more brittle, since it just string-parses out the needed key, but that's all we really need. Should work out of the box on any system with awk and curl, which is most, heh.gr33k wrote: ↑Sat Feb 08, 2020 12:08 pm Ok...so I got it running, but I realized the key is not static...it seems to change after a while (I don't know how long but at least every day if not sooner you will have a newer key). So I had to modify the script to be able to obtain the key first, and then pass it as a variable to the script each time to successfully download the TVGuide data![]()
Well - that appears to be easy enough. You need to have an app called jq (https://stedolan.github.io/jq/) installed though. You should be able to apt install jq or yum install jq for an easy install. With that...here we have:
Now of course you have to replace 192.168.10.143 with the IP of YOUR HDHomeRun...but that's about itCode: Select all
#!/bin/bash echo 'Getting Current Key from HDHomeRun...' KEY=$(curl http://192.168.10.143/discover.json | jq -r .DeviceAuth) echo 'Current Key is' $KEY #optional echo 'Downloading TV Guide Data...' curl --compressed api.hdhomerun.com/api/xmltv?DeviceAuth=$KEY > xmltvlist.xml echo 'Done!'
![]()
Code: Select all
#!/bin/bash echo 'Getting Current Key from HDHomeRun...' KEY=$(curl http://192.168.1.126/discover.json | sed -E 's/.*"DeviceAuth"\s*:\s*"([^"]+)".*/\1/g') echo 'Current Key is' $KEY #optional echo 'Downloading TV Guide Data...' curl --compressed api.hdhomerun.com/api/xmltv?DeviceAuth=$KEY > xmltvlist.xml echo 'Done!'
Re: XMLTV guide data
BTW - if you only have one device you can use:
http://hdhomerun.local/discover.json
http://hdhomerun.local/discover.json