Mettbrot

TVheadend plugin for unRaid 6

Recommended Posts

This plugin installs a stable version of tvheadend, a TV streaming backend, on your unRaid machine. It supports DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, SAT>IP and HDHomeRun as input sources.

Install it via the Plugin Page of unRaid's webGUI:
https://raw.githubusercontent.com/Mettbrot/unRAID/master/tvheadend.plg

In order to work correctly with an USB or PCI(e) tuner you may attach to your machine, you need to replace the bzroot and bzimage files on your flash drive with the ones provided by CHBMB here. Select your version and then 'libreelec'!. They contain the drivers needed to recognize your hardware.

 

After installation you will find a tvheadend Icon in your settings. There you can see if your tuner has been recognized and installed properly. You should set the config directory to a persistent path (I recommend the cache drive), and finally set your superuser login and password under "advanced configuration".

 

After it started you can reach the tvheadend configuration interface via http://tower:9981 where you use your superuser credentials to login.

There is a setting to automatically wake up for recordings, which is explained in detail here.

 

Shoutout to piotrasd and WW for their original work on this plugin and their help - it has come a long way!

Please give me feedback on how it works for you. Thank you!

Changelog:

2017.11.06: update to TvHeadend 4.2.4-10

2017.08.02: update to TvHeadend 4.2.3

2017.04.29: updated to TvHeadend 4.2.1 STABLE

2016.05.11: update to TvHeadend 4.1-2409

2016.05.11: update to TvHeadend 4.1 PLEASE BACK UP YOUR DATABASE
2016.03.23: update to TvHeadend 4.0.9
2016.01.15: update to TvHeadend 4.0.8, fix loading of settings, add setting for wakeup script
2015.10.29: update to TvHeadend 4.0.7
2015.10.05: Implement missing policy parts and update to TvHeadend 4.0.6
2015.08.24: Adapt to Unraid 6.1 security policy
2015.06.25: TVheadend version 4.0.5
2015.06.09: Initial version. TVheadend version 4.0.4

Edited by Mettbrot
  • Upvote 1

Share this post


Link to post
Share on other sites

Mettbrot, do you mind changing the title of your topic a little, e.g. TVheadend plugin for unRAID 6

 

I use the term dynamix to indicate plugins written by me, and of course this plugin isn't.

Share this post


Link to post
Share on other sites

Mettbrot, do you mind changing the title of your topic a little, e.g. TVheadend plugin for unRAID 6

 

I use the term dynamix to indicate plugins written by me, and of course this plugin isn't.

 

That's what I love about this forum, everyone is so polite, I think Mettbrot just named it that to indicate it was written for your beautifully designed webui. 

Share this post


Link to post
Share on other sites

This is amazing work from everyone and i look forward to trying it!

 

For us wanting to live on the bleeding edge, is there an easy way to switch to unstable builds?

Share this post


Link to post
Share on other sites

I can imagine one for the future. But tvheadend just branched their repository for the 4.0 version. For the time being, stable and "unstable" are quite the same.

Share this post


Link to post
Share on other sites

I am running the latest 6.1rc2 of UnRaid trying to get my TVHeadend to work with my HDhomerun 3 channel tuner.  I was hoping the new build contained the media files I needed for TVHeadend to recognize my tuner,  it did not, So digging around I found the Linux files on their website at silicon dust. I have the Emby TVheadend plugin on my server trying to avoid a VM.  What must I do to get these files libhdhomerun and config_gui in the boot system of Unraid?

 

I am hoping I am not going down the wrong rabbit hole because linux is new to me. Any help is appreciated by the way I drive a tractor trailer and my man pride keeps from asking directions. So this is a very humbling experience indeed.

Share this post


Link to post
Share on other sites

I am running the latest 6.1rc2 of UnRaid trying to get my TVHeadend to work with my HDhomerun 3 channel tuner.  I was hoping the new build contained the media files I needed for TVHeadend to recognize my tuner,  it did not, So digging around I found the Linux files on their website at silicon dust. I have the Emby TVheadend plugin on my server trying to avoid a VM.  What must I do to get these files libhdhomerun and config_gui in the boot system of Unraid?

 

I am hoping I am not going down the wrong rabbit hole because linux is new to me. Any help is appreciated by the way I drive a tractor trailer and my man pride keeps from asking directions. So this is a very humbling experience indeed.

 

As far as I know the HDHomeRun is a network tuner so doesn't need drivers, I do MediaBuild versions of Unraid for those of us with DVB devices, but I don't think homerun users need them.

 

From what I can tell from reading silicondust's website you need to configure the homerun but you don't need to do that from Unraid,, you could use your Windows or Mac desktop / laptop.

 

Once you've done that then get TVHeadEnd to use the newly configured homerun.

 

Get that done then start thinking about Emby and plugins.

 

One step at a time my mate...  ;)

Share this post


Link to post
Share on other sites

I don't know anything about hdhomerun tuners; i have never used them. BUT I know that support has recently been added to tvheadend itsself. This means they should work out of the box. There is a button "discover SAT>IP tuners" in tvheadend maybe you try that :)

As CHBMB said maybe you'll need to configure the adapter first using a windows machine.

Share this post


Link to post
Share on other sites

I don't know anything about hdhomerun tuners; i have never used them. BUT I know that support has recently been added to tvheadend itsself. This means they should work out of the box. There is a button "discover SAT>IP tuners" in tvheadend maybe you try that :)

As CHBMB said maybe you'll need to configure the adapter first using a windows machine.

 

Well I cant seem to get TVheadend to start now that I installed the three tuner unstable version. Hoping it had what I was looking for. I will try to reconfigure my HDHRTuner from windows and maybe revert back to the stable build with one tuner. Unless someone can tell me whats wrong by looking at the log?

 

Jul 28 09:57:38 Narnia logger: Tvheadend-Unstable-3-DVB-Tuner: Error response from daemon: Cannot start container Tvheadend-Unstable-3-DVB-Tuner: error gathering device information while adding custom device "/dev/dvb/adapter0/demux0": lstat /dev/dvb/adapter0/demux0: no such file or directory Error: failed to start containers: [Tvheadend-Unstable-3-DVB-Tuner]

 

 

Share this post


Link to post
Share on other sites

I don't know anything about hdhomerun tuners; i have never used them. BUT I know that support has recently been added to tvheadend itsself. This means they should work out of the box. There is a button "discover SAT>IP tuners" in tvheadend maybe you try that :)

As CHBMB said maybe you'll need to configure the adapter first using a windows machine.

 

Well I cant seem to get TVheadend to start now that I installed the three tuner unstable version. Hoping it had what I was looking for. I will try to reconfigure my HDHRTuner from windows and maybe revert back to the stable build with one tuner. Unless someone can tell me whats wrong by looking at the log?

 

Jul 28 09:57:38 Narnia logger: Tvheadend-Unstable-3-DVB-Tuner: Error response from daemon: Cannot start container Tvheadend-Unstable-3-DVB-Tuner: error gathering device information while adding custom device "/dev/dvb/adapter0/demux0": lstat /dev/dvb/adapter0/demux0: no such file or directory Error: failed to start containers: [Tvheadend-Unstable-3-DVB-Tuner]

 

You're posting in the plugin for TVheadEnd thread, pretty sure you're using the docker So head over to the docker thread and post there and see if saarg can help as he is more familiar with homerun I think.  The link to the correct thread is in my signature.

Share this post


Link to post
Share on other sites

I don't know anything about hdhomerun tuners; i have never used them. BUT I know that support has recently been added to tvheadend itsself. This means they should work out of the box. There is a button "discover SAT>IP tuners" in tvheadend maybe you try that :)

As CHBMB said maybe you'll need to configure the adapter first using a windows machine.

 

Well I cant seem to get TVheadend to start now that I installed the three tuner unstable version. Hoping it had what I was looking for. I will try to reconfigure my HDHRTuner from windows and maybe revert back to the stable build with one tuner. Unless someone can tell me whats wrong by looking at the log?

 

Jul 28 09:57:38 Narnia logger: Tvheadend-Unstable-3-DVB-Tuner: Error response from daemon: Cannot start container Tvheadend-Unstable-3-DVB-Tuner: error gathering device information while adding custom device "/dev/dvb/adapter0/demux0": lstat /dev/dvb/adapter0/demux0: no such file or directory Error: failed to start containers: [Tvheadend-Unstable-3-DVB-Tuner]

 

If you read the first post there you will see that you're trying to passthrough DVB tuners, which you don't have, you have a homerun.  So use the docker version with no tuners passed through..  ;)

Share this post


Link to post
Share on other sites

I don't know anything about hdhomerun tuners; i have never used them. BUT I know that support has recently been added to tvheadend itsself. This means they should work out of the box. There is a button "discover SAT>IP tuners" in tvheadend maybe you try that :)

As CHBMB said maybe you'll need to configure the adapter first using a windows machine.

 

Well I cant seem to get TVheadend to start now that I installed the three tuner unstable version. Hoping it had what I was looking for. I will try to reconfigure my HDHRTuner from windows and maybe revert back to the stable build with one tuner. Unless someone can tell me whats wrong by looking at the log?

 

Jul 28 09:57:38 Narnia logger: Tvheadend-Unstable-3-DVB-Tuner: Error response from daemon: Cannot start container Tvheadend-Unstable-3-DVB-Tuner: error gathering device information while adding custom device "/dev/dvb/adapter0/demux0": lstat /dev/dvb/adapter0/demux0: no such file or directory Error: failed to start containers: [Tvheadend-Unstable-3-DVB-Tuner]

 

If you read the first post there you will see that you're trying to passthrough DVB tuners, which you don't have, you have a homerun.  So use the docker version with no tuners passed through..  ;)

 

Thanks CHBMB I will do that.

Share this post


Link to post
Share on other sites

I don't know anything about hdhomerun tuners; i have never used them. BUT I know that support has recently been added to tvheadend itsself. This means they should work out of the box. There is a button "discover SAT>IP tuners" in tvheadend maybe you try that :)

As CHBMB said maybe you'll need to configure the adapter first using a windows machine.

 

Well I cant seem to get TVheadend to start now that I installed the three tuner unstable version. Hoping it had what I was looking for. I will try to reconfigure my HDHRTuner from windows and maybe revert back to the stable build with one tuner. Unless someone can tell me whats wrong by looking at the log?

 

Jul 28 09:57:38 Narnia logger: Tvheadend-Unstable-3-DVB-Tuner: Error response from daemon: Cannot start container Tvheadend-Unstable-3-DVB-Tuner: error gathering device information while adding custom device "/dev/dvb/adapter0/demux0": lstat /dev/dvb/adapter0/demux0: no such file or directory Error: failed to start containers: [Tvheadend-Unstable-3-DVB-Tuner]

 

If you read the first post there you will see that you're trying to passthrough DVB tuners, which you don't have, you have a homerun.  So use the docker version with no tuners passed through..  ;)

 

Thanks CHBMB I will do that.

I'll just say Amen to what CHBMB said ;)

Share this post


Link to post
Share on other sites

I'll judt say Amen to what CHBMB said ;)

 

I see what you're doing there, you're trying to wind me up and I'm not buying into it....  ;D

Share this post


Link to post
Share on other sites

I'll judt say Amen to what CHBMB said ;)

 

I see what you're doing there, you're trying to wind me up and I'm not buying into it....  ;D

;D You think you're not buying into it, but just wait and see  ;)

Share this post


Link to post
Share on other sites

Is this working on 6.1 RC5?  I installed the plugin while on unraid 6.01, I hit install in settings but noticed my tv card wasn't detected. I installed the 6.1 RC5 mediabuild kernels, and after rebooting the card is now detected, but the install button does not work and the plugin says it isn't installed.

 

EDIT:

I noticed that when I press the install button, at the bottom of the webpage I very briefly see this message before the webpage refreshes:

 

sh: /usr/local/emhttp/etc/rc.d/rc.tvheadend: No such file or directory

 

 

Share this post


Link to post
Share on other sites

Is this working on 6.1 RC5?  I installed the plugin while on unraid 6.01, I hit install in settings but noticed my tv card wasn't detected. I installed the 6.1 RC5 mediabuild kernels, and after rebooting the card is now detected, but the install button does not work and the plugin says it isn't installed.

 

EDIT:

I noticed that when I press the install button, at the bottom of the webpage I very briefly see this message before the webpage refreshes:

 

sh: /usr/local/emhttp/etc/rc.d/rc.tvheadend: No such file or directory

 

Installation failed due to the new and more strict security policy in v6.1.

 

Plugins need to run their scripts from within their own folder, i.e. they can not start from an arbitrary location anymore.

 

Plugin creators are encouraged to update their plugins to follow the latest security guidelines. See also this topic

Share this post


Link to post
Share on other sites

Hey I moved the rc script to /usr/local/emhttp/plugins/<plugin-name>/scripts/. An update should be available in the plugin manager.

 

In the thread you linked Tom says it is recommended to just use

/plugins/<plugin-name>/scripts/

and not the long form like you did in your sleep plugin (where I looked to adapt the location :) ). Doesn't this apply to rc scripts too?

 

Thanks for the help.

Share this post


Link to post
Share on other sites

Hey I moved the rc script to /usr/local/emhttp/plugins/<plugin-name>/scripts/. An update should be available in the plugin manager.

 

In the thread you linked Tom says it is recommended to just use

/plugins/<plugin-name>/scripts/

and not the long form like you did in your sleep plugin (where I looked to adapt the location :) ). Doesn't this apply to rc scripts too?

 

Thanks for the help.

 

It depends on how you call the script.

 

When using a <form> control together with update.htm or update.php then you need to use the short-hand notation. This is the preferred choice.

 

When using a direct execution then the full path needs to be given.

 

The syslog keeps track of commands which are NOT executed, for testing purposes you can check the syslog to see if all works as expected.

 

Share this post


Link to post
Share on other sites

Just a quick note. I updated the tvh pack to the latest 4.0.7 version!

Edited by Mettbrot

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Copyright © 2005-2017 Lime Technology, Inc. unRAID® is a registered trademark of Lime Technology, Inc.