HDHomeRun Emulator

Hi,

Does anyone know of any projects which emulate the HDHomeRun protocol?

I have a Hauppauge card on Linux and it would be great to use it with the new DVR feature

I would like this answer too. I have Windows 7 using WMC and just ordered the Hauppauge WinTV-quadHD the day before I received an email about this new feature. This card has 4 tuners. I haven’t even received it n the mail yet. Wondering if I can return it for a trade-in on a HDHomeRun if I have to.

I have not seen any yet but i wouldn’t be surprised to see one pop up

Would anyone be willing to log what PMS does towards the HdHomerun? I assume it is calling some XML/Json API with URLs. So if we have that and know how the stream is sent to PMS for recording - we could probably mimic this and create a wrapper for tools like tvheadend, VDR or even a SatIP server like Minisatip/Satpi.

Just my 2 cents …

Check this: https://github.com/vdomin/HDHRProxyIPTV

…haven’t tried it though. I have a Terratec DVB-C card and would love to see this support the Plex DVR feature as well.

henrik, thanks! That is from the guy that posted Youtube videos in 2010… I am not sure if this is the API plex uses,… from what I read in thread it seems to be a modern restful API they call. Maybe also an explanation why not every model of HDHR hardware is supported - just only the ones that have the restful API implemented.

I started to look into what is called by plex, but of course without hardware I will get nowhere. The autodiscover is a broadcast ssdp package. The direct IP/Hostname “ping” is a call of [IP-ADRESS]/discover.json

So what is required here is access to hardware and/or some wireshark log of the whole connection and so on. Than later also a tuning (requesting a .ts/.mkv h264) stream as well as potential EPG calls.

Or - the plex guys just give us docu/info and we can build on that :slight_smile:

This was one of my first thoughts too, been trying to dig up the documentation since the first Plex DVR announcement!

Here is a fairly simple HDHR assistant PHP app for a Synology NAS that connects to the HDHR and uses discover.json in Library.php

$discovery = file_get_contents('http://'.$this->config['hdhr'].'/discover.json');

From a brief skim read, the discover.json points to a lineup.json, which itself is documented in HDHR’s http development PDF

The format of the JSON files can be discerned from HDHR Assistant, we then need a bit of server side code listening for HTTP requests, and then proxying the request to either a TS stream from a USD/PCI device, or a TS stream from some other source, i.e. an IPTV service / headend.

So on port 5004 we need to provide:

/discover.json
/lineup.json
/auto/vXX.XX (ish) which then maps the XX.XX to a TS stream and pipes it out over HTTP.

This might all be the old way of doing things though. Time will tell.

There appears to be lots of ways to grab the stream from later versions of the HDHR’s… https://www.silicondust.com/hdhomerun/hdhomerun_tech.pdf
It’s got unicast and multicast available no doubt. Just no idea what the PlexDVR is looking for.

Looks like someone beat me to it!


This is a lightweight python proxy that makes Tvheadend look like an HDHomeRun.
I found it on the VDR forums, and a snapshot on pastebin simultaneously.
http://www.vdr-portal.de/index.php?page=Thread&postID=1278672
http://pastebin.com/7gE1xeUX
Going to try it tonight.

I have an earlier version of HDHR-US dual atsc tuner that is not supported… Any idea if there are solutions for this as well?

Hopefully plex will include support for these as well… I would have to assume it uses a very similar protocol

@stedaniels said:
Looks like someone beat me to it!
GitHub - jkaberg/tvhProxy: An small flask app to help Plex DVR connect with Tvheadend
This is a lightweight python proxy that makes Tvheadend look like an HDHomeRun.
I found it on the VDR forums, and a snapshot on pastebin simultaneously.
Aufnahmen automatisch verarbeiten (recode, Plex, etc.) - Capturen - Digitalisieren - Aufnehmen - VDR Portal
http://pastebin.com/7gE1xeUX
Going to try it tonight.

Yes, @jkaberg programmed the tvh proxy a while ago. The VDR proxy is done by seahawks and @gdachs and works as well, I am currently trying to optimize my setup with a bunch of docker containers.

@dragonmel if the older hdhr is support by either tvh or vdr, you can probably use one of the proxies with it, yes.

Fun fact: vdrProxy is based upon tvhProxy :slight_smile:

Let me know how it goes. It works flawless here.

1 Like

@jkaberg: yes, of course. You made a nice job!

Gerald

@jkaberg: what about to let the proxy listen on port 443 too? So that there is no need for nginx.

Next step could be to put it into a docker container.

Gerald

@gdachs thats easy enough, just create mulitple versions of tvhProxy.py but change the port to 80 in the second one

I don’t think Plex communicates with HDHR on port 443, as its hardcoded to port 80 and 5004

Sorry, my fault. I mixed it up, and you are right with two instances. Only a little bit ugly.

Gerald

anyone got a docker container or a good guide on how to set this up?

If there’s any NextPVR users, I have modified tvhProxy to work with it:

github.com/rogueosb/npvrProxy

Working on the vdrProxy has shown me that the current interface between the Plex-DVR and the Hdhomerun has a major flaw.
If you have 2 tuners you can record 2 channels, but VDR and TVH can record many more channels with 2 tuners. With two tuners you get 2 transponders and every transponder has more than one channel. It would have been much better if the Plex-DVR would use the SAT>IP protocol that gives access to the whole transponder. With minisatip the setup would get even much more easy than with VDR, or TVH. But maybe the Hdhomerun is too weak for streaming the whole transponder. So there might be financial/political reasons for this approach.

Gerald

Does anyone have some good instructions for setting this up?