Tvheadend / DVBLink Integration

@lauridsd said:
I get the translated tvh channel list from your script. That probably means my nginx proxy isn’t working, right?

I realised that it works when i just enter 192.168.7.186:5004 in Plex DVR. Adding the tuner works flawlessly, but i can’t record anything because every recording fails.

Upload your PMS logs (when PMS is trying to record) to pastebin and post the link here

Thank you for still helping me out, i really appreciate that! :slight_smile:

I attached 2 logs, one where i tried to start a recording and one where i added tvhProxy to Plex DVR

@lauridsd said:
I get the translated tvh channel list from your script. That probably means my nginx proxy isn’t working, right?

I realised that it works when i just enter 192.168.7.186:5004 in Plex DVR. Adding the tuner works flawlessly, but i can’t record anything because every recording fails.

I had the same issue … so you use the :5400 URL during the DVR setup process? That does not work later, as the server will try to call 192.168.7.186:5400:5400/auto/v**?**** to retrieve the stream for recording. And the :5400:5400 will give you a 404 result I assume.

I use apache to forward the port :80 to :5400, as suggested by jkaberg. These four lines in my 000-default.conf make it work. Pre-requisits is to enable modproxy_http.

ProxyPreserveHost On
ProxyRequests Off
ServerName iphnasvdr
ProxyPass / http://localhost:5004/
ProxyPassReverse / http://localhost:5004/

Maybe that helps and you try that instead of nginx.

I’m an ubuntu novice but have no luck with the above. I’ve installed apache, enabled proxy_http, and updated the 000-default.conf file but no luck with it appearing in plex.

I ran into the same as lauridsd using nginx.

In my case tvheadend runs on ubuntu and plex on windows 10.

Well, the most important is that you actually test if the conf works in apache2 (or nginx). Did you reload apache/restart ?

What happens when you call http://PUTYOURAPACHEIPHERE/discover.json ? it should show a json very similar to this one:

{ "BaseURL": "http://127.0.0.1:5004", "DeviceAuth": "test1234", "DeviceID": "12345678", "FirmwareName": "hdhomeruntc_cablecard", "FirmwareVersion": "20150826", "FriendlyName": "tvhProxy", "LineupURL": "http://127.0.0.1:5004/lineup.json", "ModelNumber": "HDHR3-4DC", "TunerCount": 6 }

Thank you iPhonedation, i got it working with apache! I was able to start a recording and can see the subscription in TVheadend. Hopefully it’ll work out fine.

Thanks everybody for the help!

Edit: I cheered too early. All recordings get aborted after a few seconds.
Edit2: Now it works. No idea why. But it works and i’m happy :slight_smile:

Json appears ok

{
“BaseURL”: “http://127.0.0.1:5004”,
“DeviceAuth”: “test1234”,
“DeviceID”: “12345678”,
“FirmwareName”: “hdhomeruntc_atsc”,
“FirmwareVersion”: “20150826”,
“FriendlyName”: “tvhProxy”,
“LineupURL”: “http://127.0.0.1:5004/lineup.json”,
“ModelNumber”: “HDTC-2US”,
“TunerCount”: 6
}

@iPhonedation said:
{ "BaseURL": "http://127.0.0.1:5004", "DeviceAuth": "test1234", "DeviceID": "12345678", "FirmwareName": "hdhomeruntc_cablecard", "FirmwareVersion": "20150826", "FriendlyName": "tvhProxy", "LineupURL": "http://127.0.0.1:5004/lineup.json", "ModelNumber": "HDHR3-4DC", "TunerCount": 6 }

How can you up the tunercount? I have 4 tuners in TVH but plex only lists 2.

@lauridsd said:

@iPhonedation said:
{ "BaseURL": "http://127.0.0.1:5004", "DeviceAuth": "test1234", "DeviceID": "12345678", "FirmwareName": "hdhomeruntc_cablecard", "FirmwareVersion": "20150826", "FriendlyName": "tvhProxy", "LineupURL": "http://127.0.0.1:5004/lineup.json", "ModelNumber": "HDHR3-4DC", "TunerCount": 6 }

How can you up the tunercount? I have 4 tuners in TVH but plex only lists 2.

I’ve commited an update that lets you set tuner count, change this config value to your tuner count tvhProxy/tvhProxy.py at master · jkaberg/tvhProxy · GitHub

Restarted plex and seems to started working for me. Thanks for the files.

Might be an easy answer for some! :slight_smile:

How does one setup the tvhproxy.service? I have the file edited as necessary but in terms of running it in ubuntu how does one go about doing that?

thanks

@7moonjanx7 said:
Might be an easy answer for some! :slight_smile:

How does one setup the tvhproxy.service? I have the file edited as necessary but in terms of running it in ubuntu how does one go about doing that?

thanks

Which version of ubuntu ? The one in the GitHub repo is for > 14.10, using systemd not upstart. Google for it, it probably belongs to some init or systemd folder and then you need to activate it (using systemctl or so).

If you use 14.10 or smaller number, I can share a upstart init-file I use.

I’m using Ubuntu 16.04. I’ve messed about with systemctl but no luck so far. Manually running python tvhProxy.py is only option working for me so far.

@7moonjanx7 said:
I’m using Ubuntu 16.04. I’ve messed about with systemctl but no luck so far. Manually running python tvhProxy.py is only option working for me so far.

Check the Github repo, there is an complete guide there…

@jkaberg said:
I’ve commited an update that lets you set tuner count, change this config value to your tuner count tvhProxy/tvhProxy.py at master · jkaberg/tvhProxy · GitHub

Thanks for this! It seems that PMS caches the tuner count for a device even when the DVR is deleted and re-created. Changing the tvhProxy device ID forced PMS to see a new device and get the correct tuner count.

Anyone else having the problem that Plex records the wrong channel with tvhProxy?

@lauridsd said:
Anyone else having the problem that Plex records the wrong channel with tvhProxy?

If it does then you’ve mapped the wrong channel either in Tvheadend or Plex

Yes, seems like my channelmappings were reset in plex :frowning:

Any chance someone can dockerize this, with params for the config values

Hi. First of all! Great work.

Do the setup and love the “new” Plex. Some things i have not discovered. How can i use ma thveadend epg? i only can use cable on the tuner, no antenna.

My First recording was working, but i have a problem with start and endtime. the recordong starts two minutes to early. so i have not the full FIlm on it.

And one big question… can i view it live :slight_smile:

brgds