HDHR emulation of Enigma

Hi,

I don’t have an HDHR device but have an Enigma box with WebIf and got impatient waiting for DVR for Enigma from Plex. Not bugging them, it’s still in beta :slight_smile:

Anyways, I’m running PMS on windows so don’t want to delve into the possible linux solutions so I wrote my own self hosting web api which masquerades as an HDHR device and communicates with my Enigma box. I can now utilise the DVR functionality in Plex and record content from my Enigma box.

I’ve made the app available here for anyone else in a similar situation.

Some screenshots:

any chance for source code?, I might be able write a E2 plugin to configure this setup.

@andyblac1974 said:
any chance for source code?, I might be able write a E2 plugin to configure this setup.

No problem. It was banged together as a prototype so no unit tests.

You can also modify the tvhproxy to use an enigma box. I did this for minisatip and it works. As I am not a programmer, I created the channel list in a json file manually and put it on a local web server.

mistake post

good evening mate
nice little plugin
Im trying to use this on my windows laptop I have here spare at home.
I’m struggling to get my plex server to detect the HDHR emu.
in the host section , I have the laptops local ip, I left the port at 5004.
in the bottom section I put in my E2 box IP, and left the existing ports as it,
I can start the plugin no problem, but as I said, plex dvr fails to detect it.
the only difference between us is I do not run PMS on windows I run it on my SynologyNAS.
any ideas?

@rossi2000 said:
I can start the plugin no problem, but as I said, plex dvr fails to detect it.
the only difference between us is I do not run PMS on windows I run it on my SynologyNAS.
any ideas?

Sounds like you need to open port 5004 on your firewall. I’ve added a button which creates the firewall rule for you or you can create one yourself in windows firewall. You can check to make sure it’s visible by entering the url in your browser:

http://hostip:5004/discover.json

where hostip is the IP address from the app.

hmm, no probs I’ll double check that tonight,
I’m pretty sure I disabled the whole firewall beforehand.

hi mate

just checked, ye i did have the fiewall disabled.
i also checked the url above what you suggested and it returned this:-

{“BaseURL”:“http://192.168.0.217:5004”,“DeviceAuth”:“test1234”,“DeviceID”:“12345677”,“FirmwareName”:“vuultimo4k”,“FirmwareVersion”:“20170220”,“FriendlyName”:“HDHRenigma”,“LineupURL”:“http://192.168.0.217:5004/lineup.json",“ModelNumber”:“Ultimo4K”,"TunerCount”:18}

heres my config in the plugin:-

plexdvr, just gives me a spinner for a long while whilst searching for it, its also the same if I manually put in the ip for detection.

plexdvr will not be able to auto detect it. You’ll need to enter 192.168.0.217:5004 into plex, including the port.

ahh bingo, thats detected it!
now to have a play, I’ve never used plex dvr before, I was waiting for something like this that can utilise my E2 box with many tuners of all different types.

hi mate,

ok I progressed a little bit through the setup and come across a couple of issues.

  1. it is only listing one channel from my receiver.
  2. I cannot change from Cable to Terrestrial. (is it only coded for cable?)

is there any other setup involved?
tia

I use Wooshbuild which stores channel numbers in the name of the channel. I use this fact to be able to pull both the channel number and the name from the channel and ignore any that don’t match this. For example “101 BBC One” will be detected and used since it starts with a number but “BBC One” will not be used. I see its detected one channel because the name of that channel just happens to be “5 USA” which starts with a number. Rename a couple of channels in your bouquet on your box or create a new bouquet with channel names in the expected format.

Ignore the Cable dropdown. It’s not really relevant. I don’t have Cable either.

I use OpenViX,
thanks for the info.
I will do some more tests!

thanks

good evening

great work on this.
got it all working, just for testing purposes I renamed quite a few channels with numbers and now I’m able to pick them up and map them. :slight_smile:

I think I encountered a bug, but I’m not sure if thats with plex dvr or the emu. I will test more and report back.

Hi Mate

everything seems to be going ok with it apart from this bug,

when the program/movie has finished the recording doesn’t stop unless I manually cancel the recording.

@rossi2000 said:
Hi Mate

everything seems to be going ok with it apart from this bug,

when the program/movie has finished the recording doesn’t stop unless I manually cancel the recording.

Same here, this is really great. Only problem remaining is that the recordings do not end automatically.

@andyblac1974 said:
any chance for source code?, I might be able write a E2 plugin to configure this setup.

Do you still intend to make an E2 plugin? That would be amazing.

@linkem said:

@andyblac1974 said:
any chance for source code?, I might be able write a E2 plugin to configure this setup.

Do you still intend to make an E2 plugin? That would be amazing.

I took a quick look, but I am not used to windows code, I need more time to try to understand what this is doing.

or may the OP could show me the API commands that plex is calling.

@andyblac1974 said:
I took a quick look, but I am not used to windows code, I need more time to try to understand what this is doing.

or may the OP could show me the API commands that plex is calling.

In order to masquerade as an HDHomeHub we need 4 endpoints

  1. http://HomeHubIP:HomeHubPort/discover.json
    Single record. Retrieved some data from WebIf using the following endpoints:
    http://WebIfIP:WebIfPort/web/about
    http://WebIfIP:WebIfPort/web/deviceinfo
    {“BaseURL”: “http://HomeHubIP:HomeHubPort”,
    “DeviceAuth” = “test1234”,
    “DeviceID” = “12345677”,
    “FirmwareName” = “abcdef”, //////retrieved from http://WebIfIP:WebIfPort/web/deviceinfo
    “FirmwareVersion” = “20170101”, //////retrieved from http://WebIfIP:WebIfPort/web/deviceinfo
    “FriendlyName” = “HomeHubFake”,
    “LineupURL” = “http://HomeHubIP:HomeHubPort/lineup.json”,
    “ModelNumber” = “Model1234”, //////retrieved from http://WebIfIP:WebIfPort/web/about
    “TunerCount”: 2} //////retrieved from http://WebIfIP:WebIfPort/web/about
  2. http://HomeHubIP:HomeHubPort/lineup_status.json
    Single record. Hardcoded.
    {“ScanInProgess”: 0, “ScanPossible”: 0, “Source”: “Cable”, “SourceList”: [{“Cable”}]}
  3. http://HomeHubIP:HomeHubPort/lineup.json
    Multiple records, one for each channel which looks like:
    [{“GuideNumber”:“101”,“GuideName”:“BBC One HD”,“URL”:“http://HomeHubIP:HomeHubPort/auto/v101”},
    {“GuideNumber”:“102”,“GuideName”:“BBC Two HD”,“URL”:“http://HomeHubIP:HomeHubPort/auto/v102”}]
    Channel numbers and names retrieved from http://WebIfIP:WebIfPort/web/getallservices and
    4.http://HomeHubIP:HomeHubPort/auto/{channel}
    Just redirect to WebIf by finding the relevant Service Reference from http://WebIfIP:WebIfPort/web/getallservices for the specified channel and build the URL as http://WebIfIP:WebIfPort/ServiceReference

That should be it. I’m sure you can also add authentication.

thx, but what about duration handling ?