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
Online
EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

I created a batchfile for windows ... it uses curl and some simple commands to get the guide for OTA and Cable....

Code: Select all

CD /d "%~dp0"
curl http://10.0.0.154/discover.json > devauth.txt
SET /P DEVICEID=<devauth.txt
set DEVICEID=%DEVICEID%
set DEVICEID=%DEVICEID:*DeviceAuth=%
echo %DEVICEID%
set DEVICEID=%DEVICEID:~3,24%
curl --compressed http://api.hdhomerun.com/api/xmltv?DeviceAuth=%DEVICEID% > CableEPG.xml

curl http://10.0.0.111/discover.json > devauth.txt
SET /P DEVICEID=<devauth.txt
set DEVICEID=%DEVICEID%
set DEVICEID=%DEVICEID:*DeviceAuth=%
echo %DEVICEID%
set DEVICEID=%DEVICEID:~3,24%
curl --compressed http://api.hdhomerun.com/api/xmltv?DeviceAuth=%DEVICEID% > OTAEPG.xml
exit

rpcameron
Posts: 1106
Joined: Fri Mar 25, 2016 9:55 am
x 4

Re: XMLTV guide data

Post by rpcameron »

I believe if you concatenate all DeviceIDs together, you will get a single XMLTV file with the guide data for both tuners.

Online
EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

rpcameron wrote: Sat Apr 24, 2021 11:11 am I believe if you concatenate all DeviceIDs together, you will get a single XMLTV file with the guide data for both tuners.
Yes thanks for the info .... in my case use I like them separate. But I would like to see what you mean by concatenate ? Device Id's

Ken.F
Posts: 2540
Joined: Fri Apr 05, 2013 9:20 am
Device ID: 1041A706, 1043EB32, 104BAD9E, 13168DC5, 1322A7AC
Location: West Rockhill, PA
x 5

Re: XMLTV guide data

Post by Ken.F »

EddieP wrote: Sat Apr 24, 2021 12:06 pm Yes thanks for the info .... in my case use I like them separate. But I would like to see what you mean by concatenate ?
Put the DeviceAuth from each device together on the same line one after another.

rpcameron
Posts: 1106
Joined: Fri Mar 25, 2016 9:55 am
x 4

Re: XMLTV guide data

Post by rpcameron »

EddieP wrote: Sat Apr 24, 2021 12:06 pm
rpcameron wrote: Sat Apr 24, 2021 11:11 am I believe if you concatenate all DeviceIDs together, you will get a single XMLTV file with the guide data for both tuners.
Yes thanks for the info .... in my case use I like them separate. But I would like to see what you mean by concatenate ? Device Id's
If you have one tuner with DeviceID DEADBEEF, and it gives you a DeviceAuth of 111111111, and a second tuner CAFEBABE, and its DeviceAuth is 22222222, then when you request your XMLTV, you would include DeviceAuth=1111111122222222.

Online
EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

rpcameron wrote: Sat Apr 24, 2021 12:26 pm
EddieP wrote: Sat Apr 24, 2021 12:06 pm
rpcameron wrote: Sat Apr 24, 2021 11:11 am I believe if you concatenate all DeviceIDs together, you will get a single XMLTV file with the guide data for both tuners.
Yes thanks for the info .... in my case use I like them separate. But I would like to see what you mean by concatenate ? Device Id's
If you have one tuner with DeviceID DEADBEEF, and it gives you a DeviceAuth of 111111111, and a second tuner CAFEBABE, and its DeviceAuth is 22222222, then when you request your XMLTV, you would include DeviceAuth=1111111122222222.
Tried that it only gave me guide data from 1 device.

But this hack worked ...

Code: Select all

CD /d "%~dp0"
curl http://10.0.0.154/discover.json > devauth.txt
SET /P DEVICEID=<devauth.txt
set DEVICEID=%DEVICEID%
set DEVICEID=%DEVICEID:*DeviceAuth=%
echo %DEVICEID%
set DEVICEID=%DEVICEID:~3,24%
curl --compressed http://api.hdhomerun.com/api/xmltv?DeviceAuth=%DEVICEID% > GUIDEALL.xml

curl http://10.0.0.111/discover.json > devauth.txt
SET /P DEVICEID=<devauth.txt
set DEVICEID=%DEVICEID%
set DEVICEID=%DEVICEID:*DeviceAuth=%
echo %DEVICEID%
set DEVICEID=%DEVICEID:~3,24%
curl --compressed http://api.hdhomerun.com/api/xmltv?DeviceAuth=%DEVICEID% >> GUIDEALL.xml
exit

nickk
Silicondust
Posts: 20163
Joined: Tue Jan 13, 2004 9:39 am
x 376

Re: XMLTV guide data

Post by nickk »

Confirming, you should concatenate the DeviceAuth strings together into one request.

Nick

Online
EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

nickk wrote: Sat Apr 24, 2021 2:06 pm Confirming, you should concatenate the DeviceAuth strings together into one request.

Nick
This did not work for me ... The substitutions were incorrect working and fixed below.

Code: Select all

CD /d "%~dp0"
curl http://10.0.0.111/discover.json > devauth.txt
SET /P DEVICEID=<devauth.txt
set DEVICEID=%DEVICEID%
set DEVICEID=%DEVICEID:*DeviceAuth=%
echo %DEVICEID%
set DEVICEID=%DEVICEID:~3,24%

curl http://10.0.0.154/discover.json > devauth2.txt
SET /P DEVICEID2=<devauth2.txt
set DEVICEID2=%DEVICEID2%
set DEVICEID2=%DEVICEID2:*DeviceAuth=%
echo %DEVICEID2%
set DEVICEID2=%DEVICEID2:~3,24%
set DEVICEALL=%DEVICEID%%DEVICEID2%
curl --compressed http://api.hdhomerun.com/api/xmltv?DeviceAuth=%DEVICEALL% > Fullguide.xml
Last edited by EddieP on Sat Apr 24, 2021 2:54 pm, edited 1 time in total.

Online
EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

Thanks NICK see my error now.... and all the others that contributed and helped me.. thanks

JDazell
Posts: 267
Joined: Fri Sep 09, 2011 4:19 pm
x 10

Re: XMLTV guide data

Post by JDazell »

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.
Nick
Not to be dense, but I do not get the purpose of this new "XMLTV format guide" service?
Jeff

FoodLioon
Posts: 71
Joined: Wed Feb 12, 2020 9:22 pm
x 1

Re: XMLTV guide data

Post by FoodLioon »

JDazell wrote: Tue Apr 27, 2021 11:16 am Not to be dense, but I do not get the purpose of this new "XMLTV format guide" service?
Jeff
You can use the guide data in other applications like NextPVR. Extremely useful if you only have sporadic internet access. You could download the data every few days and be mostly ok.

JDazell
Posts: 267
Joined: Fri Sep 09, 2011 4:19 pm
x 10

Re: XMLTV guide data

Post by JDazell »

OK then

Online
EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

JDazell wrote: Tue Apr 27, 2021 11:16 am
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.
Nick
Not to be dense, but I do not get the purpose of this new "XMLTV format guide" service?
Jeff
I use it as input into plex since plex only handles 1 lineup at a time ... it does not support OTA and Cable lineups only 1 or the other.

Online
EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

Plex will be releasing soon the ability to add multiple lineups.

colinhiccup
Posts: 2
Joined: Wed Nov 03, 2021 6:36 pm

Re: XMLTV guide data

Post by colinhiccup »

Does this have a wide roll out?

With a DVR subscription it returns "not subscribed" for me

Colin

Post Reply