@jkaberg / @iPhonedation ~ I’m not sure I understand how we’re using the wrong channel numbers in the URLs. If you look at the channel mapping for my device:
If we used 002 or 356 (the Gracenote channel number) the recording wouldn’t work, but everything works fine over here. We specifically use the device channel number.
(Also, BTW, the reason we don’t use the URLs passed back from HDHR directly is that they are always with respect to the LAN, and we support accessing HDHR devices remotely.)
@elan said: @jkaberg / @iPhonedation ~ I’m not sure I understand how we’re using the wrong channel numbers in the URLs. If you look at the channel mapping for my device:
If we used 002 or 356 (the Gracenote channel number) the recording wouldn’t work, but everything works fine over here. We specifically use the device channel number.
I’ll take a look when I get home from work (I based my conclusions on what @iPhonedation said). But if that’s true then my standpoint is still where it was, you should respect the URL key in lineup.json anyhow (even if it normally never changes).
I am running a new test here, with new ID for the HDHR that the proxy emulates and then I will see. Thanks @elan … I will post an update later/tomorrow.
One small note: the current Plex implementation is hardcoded to use port 5004 when recording from HDHR (it will append 5004 to any url), so an current workaround is to create an virtual web host, proxy it to tvhProxy (on port 80). Add the virtualhost to your host’s file, then setup Plex DVR to use the virtual host.
I hope the Plex engineers see’s this post and alters the behaviour.
Awesome!
So far the proxy seems to be working well and it’s fantastic to get this kind of use out of a USB tuner that was otherwise gathering dust (Hauppauge HVR-950).
A few notes:
If tvheadend is configured with a webroot for reverse proxy, adding the webroot to the end of the URL in the proxy config works fine
[Resolved] ATSC has channel numbers as x.y and the proxy would crash when it tried to evaluate the channel as int(). I’m no developer so there’s probably a different/better way to do this but evaluating as float was enough to get it going - there’s a PR open for this.
[Resolved] The README could use an update to indicate that a web server and virtual host config are currently necessary to make this work (also removing the portion about setting the Plex URL to URL:5004 since we need the virtual host) - if you’d like a PR for the doc update let me know.
[Resolved] Plex’s minimum number of 2 detected tuners will likely cause issues if you have a single tuner and schedule overlapping recordings. So far this is the only user-facing functionality gap I’m seeing.
[Resolved] The tvheadend user’s number of connections should be limited to the number of tuners available to prevent other apps from interfering with Plex recordings - found this out when a recording in progress by Plex was ended when I launched Kodi and it stole the tuner (recording via Kodi or tvheadend directly seems to keep a lock on the recording and not allow interruptions regardless of the number of connections).
In case it’s useful, here’s a sample nginx config after setting “127.0.0.1 tvhproxy” in /etc/hosts:
One small note: the current Plex implementation is hardcoded to use port 5004 when recording from HDHR (it will append 5004 to any url), so an current workaround is to create an virtual web host, proxy it to tvhProxy (on port 80). Add the virtualhost to your host’s file, then setup Plex DVR to use the virtual host.
I hope the Plex engineers see’s this post and alters the behaviour.
Awesome!
So far the proxy seems to be working well and it’s fantastic to get this kind of use out of a USB tuner that was otherwise gathering dust (Hauppauge HVR-950).
A few notes:
ATSC has channel numbers as x.y and the proxy would crash when it tried to evaluate the channel as int(). I’m no developer so there’s probably a different/better way to do this but evaluating as float was enough to get it going - there’s a PR open for this.
The README could use an update to indicate that a web server and virtual host config are currently necessary to make this work (also removing the portion about setting the Plex URL to URL:5004 since we need the virtual host) - if you’d like a PR for the doc update let me know.
Plex’s minimum number of 2 detected tuners will likely cause issues if you have a single tuner and schedule overlapping recordings. So far this is the only user-facing functionality gap I’m seeing.
If tvheadend is configured with a webroot for reverse proxy, adding the webroot to the end of the URL in the proxy config works fine
The tvheadend user’s number of connections should be limited to the number of tuners available to prevent other apps from interfering with Plex recordings - found this out when a recording in progress by Plex was ended when I launched Kodi and it stole the tuner (recording via Kodi or tvheadend directly seems to keep a lock on the recording and not allow interruptions regardless of the number of connections).
In case it’s useful, here’s a sample nginx config after setting “127.0.0.1 tvhproxy” in /etc/hosts:
Thanks for giving tvheadend folks like me a chance to dig into Plex DVR!
In its current state, the proxy is just a proof of concept. However I agreed about the documentation and other stuff you said. Send me an PR on the documentation part, if you’d be so kind
In its current state, the proxy is just a proof of concept.
The great part is that it is quite functional even though further improvements require PMS fixes.
However I agreed about the documentation and other stuff you said. Send me an PR on the documentation part, if you’d be so kind
When we will see tvheadend add to the offical beta ? @elan
Do you guys plan to add Tvheadend support in the beta version or will it be HDHR device only ?
So this thread has a lot of talk about TVHeadend and not so much about DVBLink anymore. It’s unclear to me what the best way of testing the integration for DVBLink would be and what functionality is currently available. Any pointers?
Does this work if the proxy runs on another machine than plex? I have TVH and the proxy on Ubuntu, and Plex on macOS. I don’t know how to access the tvhproxy virtual host from macOS.
@lauridsd said:
Does this work if the proxy runs on another machine than plex? I have TVH and the proxy on Ubuntu, and Plex on macOS. I don’t know how to access the tvhproxy virtual host from macOS.
just make sure you set the host file on your macOS, I’ve just corrected this in the readme @ github
So i have nginx running on my Ubuntu machine (where TVHeadend runs), started the proxy there too.
I pointed tvhproxy to my ubuntu ip on my Mac’s (where PMS runs) /etc/hosts
Now when i add tvhproxy in Plex’s DVR settings i get a spinning loading icon while adding, but after ~5 sec i get this:
There was a problem adding the device: tvhproxy
It seems like it finds something but there’s another problem, because when i add a random IP in my LAN i don’t even get the 5 sec loading time, instead it directly shows the error.
@lauridsd said:
So i have nginx running on my Ubuntu machine (where TVHeadend runs), started the proxy there too.
I pointed tvhproxy to my ubuntu ip on my Mac’s (where PMS runs) /etc/hosts
Now when i add tvhproxy in Plex’s DVR settings i get a spinning loading icon while adding, but after ~5 sec i get this:
There was a problem adding the device: tvhproxy
It seems like it finds something but there’s another problem, because when i add a random IP in my LAN i don’t even get the 5 sec loading time, instead it directly shows the error.
Did you set up the virtual host with nginx and reloaded the config?
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.