Setup tvheadend and FritzBox 6591 on Windows 10

Post Reply
Frank
Posts: 9
Joined: Sunday 4. August 2019, 23:05

Setup tvheadend and FritzBox 6591 on Windows 10

Post by Frank »

First of all:
I have tried 2 configurations on the Windows 10 PC:
  1. tvheadend on current Ubuntu and WSL2
  2. tvheadend on Ubuntu 16.04 LTS and WSL1
As I didn't get the WSL2 version to work, I will only follow the WSL1 way, here.

So, step by step:
  1. As described here, install WSL1 via Powershell:

    Code: Select all

    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  2. As described here, download and install Ubuntu 16.04 via Powershell:

    Code: Select all

    Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile Ubuntu.appx -UseBasicParsing
    

    Code: Select all

    Add-AppxPackage .\Ubuntu.appx
    
  3. Open the Ubuntu 16.04 app, setup your user+password and do the usual updating:

    Code: Select all

    sudo apt update && sudo apt upgrade
    
  4. As described here, install some packages

    Code: Select all

    sudo apt -y install coreutils wget apt-transport-https lsb-release ca-certificates
    sudo wget -qO- https://doozer.io/keys/tvheadend/tvheadend/pgp | sudo apt-key add -
    
    add the package repo to your distibution:

    Code: Select all

    sudo sh -c 'echo "deb https://apt.tvheadend.org/unstable $(lsb_release -sc) main" | tee -a /etc/apt/sources.list.d/tvheadend.list'
    
    and finally install tvheadend:

    Code: Select all

    sudo apt update
    sudo apt install tvheadend
    
  5. During installation, you will be asked for an admin user+password for tvheadend. After the installation has finished, I needed to add a parameter to /etc/default/tvheadend so that it recognized the FritzBox. Just change the last line to (hint: sudo nano /etc/default/tvheadend):

    Code: Select all

    TVH_ARGS="--satip_xml http://<ip_of_your_FritzBox>:49000/satipdesc.xml"
    
    and set the correct user group for user hts:

    Code: Select all

    sudo adduser hts video
    
    Finally, restart tvheadend:

    Code: Select all

    sudo service tvheadend restart
    
  6. Launch a browser to localhost:9981. At the first time, Windows Defender should pop up and ask for permissions. Just grant them. In the browser, you can log in to tvheadend with the user you created during tvheadend installation. Then, just follow the setup wizard and change the Pass specinv setting of the 4 tuners to "On"
  7. After the setup has finished, take some time to relax, have a coffee, ... Afterwards, the Muxes and Services should be there. Cheers!
I will not go into the details of channel setup etc. as most of it is straightforward. Especially, as there is a great documentation here.

Nevertheless, I have found a fairly easy way to autostart tvheadend:
  1. First, enable starting the tvheadend service without a password.

    Code: Select all

    sudo nano /etc/sudoers.d/service
    
    And add the line

    Code: Select all

    %sudo   ALL=(ALL) NOPASSWD: /usr/sbin/service *
    
  2. Then, all that needs to be done is adding a basic task to the Windows Task Scheduler with the simple command to be executed at user login:

    Code: Select all

    powershell -command ubuntu1604.exe run "sudo service tvheadend start"
    
    That's it! :)
Frank
Posts: 9
Joined: Sunday 4. August 2019, 23:05

Re: Setup tvheadend and FritzBox 6591 on Windows 10

Post by Frank »

For my specific setup (with a 4300GE and internal GPU), 2 settings were crucial to make it work:
  1. In tvheadend, the bind ip address for the FritzBox must be set to the tvheadend server ip.
  2. In Kodi, hardware acceleration must be disabled (in player settings). By the way: The same applies for VLC.
Post Reply