EPG listing via Windows 10 command line

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
Louis_S
Posts: 6
Joined: Tue Jan 25, 2022 8:01 am

EPG listing via Windows 10 command line

Post by Louis_S »

New user of this forum, but not new to the HDHomerun tuners. I've been streaming/recording TV programs using my Synology NAS, but I would like to do all this via the Windows 10 command line.

Connecting to the tuner (European HDHomerun Cuatro) via the command line, listing the channels and recording to a .ts file works fine, but I'm missing some parameters to list the EPG (electronic program guide) for the different channels. Also, after searching these forums and studying the hdhomerun_config help page, I can't find the command to stop the recording. Killing the command line with Windows Task Manager saves the stream to the specified .ts file, and the recorded file is just as expected (perfect!).

I have tried with "q", ctrl + x and other commands to stop the recording, but the command windows keeps listing the dots every 1 second as it should while recording.

So if anybody could provide these few commands that I'm missing, it would be appreciated a lot:
* Command to stop streaming/recording from the command line.
* Listing of the EPG and if possible, saving it to a file.

If the listing of the programs (time, title and description) can be saved to a json file, it would be just as I would prefer.

Thanks for any help on this!

jasonl
Silicondust
Posts: 15981
Joined: Sun Oct 28, 2007 9:23 pm
x 53

Re: EPG listing via Windows 10 command line

Post by jasonl »

Neither the HDHomeRun nor the hdhomerun_config program has the capability of parsing EPG data embedded within the broadcast. EPG data in the HDHomeRun app is retrieved from our servers. It is available to DVR subscribers in json format for use with other programs, but that's probably a lot more than you'd ever want to try to deal with in a command-line program.

There is a third-party program called HDHR-VCR that may something you want to look at for very simple time/channel based recording capabilities. https://cresstone.com/apps/HDHR-VCR/

Louis_S
Posts: 6
Joined: Tue Jan 25, 2022 8:01 am

Re: EPG listing via Windows 10 command line

Post by Louis_S »

Thanks a lot for the information!

The program guide using the Synology NAS is working pretty good, but it's possible to make it a lot easier/userfriendly. When I say "Windows command line", I'm talking about implementing the features in my software, just like I use exiftool and ffmpeg (two absolutely great programs), within my software, "invisible" for the user.

I checked up the HDHR-VCR in your link and it's very close to what I'm looking for, but it seems to be US-based, so not very usable in Spain.

Looking at the DVR subscription options, the price seems reasonable for the service. But I can't find any information about broadcasting where I live, so I guess I'm out of luck for my plans.

But, I have used your excellent tuners for more than 10 years now, and they work without any problems at all. With your update, I know a bit more how this is working, so no changes for my use.

Again, thanks for update on this!

Online
nickk
Silicondust
Posts: 18221
Joined: Tue Jan 13, 2004 9:39 am
x 166

Re: EPG listing via Windows 10 command line

Post by nickk »

Hi,

You can specify a duration when recording from the command line... for example to make a 30 minute recording from channel 5.1:
http://hdhomerun.local:5004/auto/v5.1?duration=1800

XMLTV guide is provided as part of the DVR guide service ($35/year).
1) Get the current DeviceAuth from the HDHomeRun:
http://hdhomerun.local/discover.json
2) Request the XMLTV guide:
https://api.hdhomerun.com/api/xmltv?DeviceAuth=XXX
The xmltv request must specify support for gzip encoding. The resulting XML is quite large containing 14 days of guide.

Nick

Louis_S
Posts: 6
Joined: Tue Jan 25, 2022 8:01 am

Re: EPG listing via Windows 10 command line

Post by Louis_S »

The recording example is very useful, so saved, and will be tested as soon as possible!

Regarding the DVR subscription, I have to check a bit more how everything is put together.

Thanks!

Louis_S
Posts: 6
Joined: Tue Jan 25, 2022 8:01 am

Re: EPG listing via Windows 10 command line

Post by Louis_S »

I tried the recording code provided further up, but I'm not a subscriber, so no go for recording.

Do you provide subscription for TV channels in Spain?

Thanks!

Online
nickk
Silicondust
Posts: 18221
Joined: Tue Jan 13, 2004 9:39 am
x 166

Re: EPG listing via Windows 10 command line

Post by nickk »

Louis_S wrote: Sun Jan 30, 2022 5:48 am Do you provide subscription for TV channels in Spain?
Yes

Louis_S
Posts: 6
Joined: Tue Jan 25, 2022 8:01 am

Re: EPG listing via Windows 10 command line

Post by Louis_S »

Well, that was new information to me!

I have checked the availability a few times from your web pages, but couldn't find any information about my area. The (few) channels I need are on orange.es and movistarplus.es (and probably from other providers). Do you have a list of EPG providers in Spain, just to check that I don't order something I don't need? I ask because I found a "eu-tvguide" or something that listed a lot of channels from Spain, but none of the ones I use.

Thanks!

Online
nickk
Silicondust
Posts: 18221
Joined: Tue Jan 13, 2004 9:39 am
x 166

Re: EPG listing via Windows 10 command line

Post by nickk »

Try running the HDHomeRun app - it has 24h of free live TV guide.

Then let me know the Device ID of your HDHomeRun and any important channels that are missing guide or have the wrong guide - I can double check our mapping.

Nick

Louis_S
Posts: 6
Joined: Tue Jan 25, 2022 8:01 am

Re: EPG listing via Windows 10 command line

Post by Louis_S »

A bit of correction from my side: I have used your tuners (2x HDHR5-4DT) for a long time connected to my local network via a Synolgy NAS, and recorded using the Synology Video Station, and I must say, with great success!

But the channels listed on the Synology NAS are provided by the HDHomerun tuners? I guess this is correct? about 80 channels are listed on each tuner, and the ones that I have used are of course there (I'm just trying to understand how all this is put toghether).

So what I need the EPG data for, is to make my own lists using my own software. The software can read json and/or XML at great speed and will be corrected/adjusted as needed. With internet connection of 300Mbps it should be relatively quick to download the data. Please note, this is not for commerical use (as of now). If this specific project should be of any interest to others, I will contact Silicondust if needed, or just check what is accepted or not.

I don't feel confortable listing my two HDHomerun device id's here, but you have my e-mail, so maybe it would be a better idea to communicate via e-mail, and update this thread if there is more information that might be interesting for others.

I ran the HDHomerun program (or app), but I can't find any downloaded EPG in the folders (Windows 10, users\username\appdata\local or roaming).

Thanks!

Online
nickk
Silicondust
Posts: 18221
Joined: Tue Jan 13, 2004 9:39 am
x 166

Re: EPG listing via Windows 10 command line

Post by nickk »

Drop me a Private Message with your Device IDs...

Post Reply