Using a Fritz!Box 6490 as Tuner for Tvheadend

On 2016-08-01 a law came into force, allowing customers in Germany to use any internet router they want, as long as it meets the providers requirements. On that day I decided to buy a Fritz!Box 6490, for three reasons: 1. I wanted to replace the crappy router my provider gave me (which didn't even have WiFi) 2. besides its routing function, it is able to stream up to 4 concurrent TV programs into the Network 3. it was the only device that fulfilled the above-mentioned requirements. I wanted to setup [Tvheadend]( to act as an intermediate between clients and the router, because it would allow me to have an EPG, stream the same program to 2 clients, while only occupying a single stream of the Fritz!Box, and allow me to record TV shows. As you can see from the date of this post, it took me one year to figure out how to do it. # Prerequisites I am using Tvheadend (Build: 4.0.9-16~g63c1034~xenial) on a virtual Debian 9.1.0 (x86) with 2GB RAM, 2 vCPUs and 10GB disk together with a Fritz!Box 6490 with Fritz!OS 6.83. This tutorial however should also work with an AVM FRITZ!WLAN Repeater DVB-C (note that the repeater only allows 2 concurrent streams). To use the full potential of the Fritz!Box you either need 4 network cards1 or add sub-interfaces to your main network interface. This is due to the fact that the Fritz!Box only allows one stream per IP address. If you are okay with just one stream for your Tvheadend box you don't need this. Adding sub-interfaces is as easy as adding this to your /etc/network/interfaces:
auto eth0:1
iface eth0:1 inet static

auto eth0:2
iface eth0:2 inet static

auto eth0:3
iface eth0:3 inet static
Note that these sub-interfaces can not use DHCP, because they use the same MAC address as their parent interface and there can only be one DHCP IP address per MAC address. You should change the interface name (eth0) and the addresses according to your network-layout. # Tvheadend Setup Just use the following commands to install Tvheadend. I used the Xenial build, because there is no build for Debian stretch as of today. This build however depends on libssl1.0.0 which is not available in the Debian stretch repositories, so I used an evil hack to install it.
apt install dirmngr
apt-key adv --keyserver hkp:// --recv-keys 379CE192D401AB61
echo "deb xenial stable" | tee -a /etc/apt/sources.list
apt update
dpkg -i libssl1.0.0_1.0.1t-1+deb8u6_i386.deb
apt install tvheadend
# Configuring TvHeadend First open /etc/init.d/tvheadend, find the line reading ARGS="-f" and append something like --satip_xml within the quotes. save the file and restart Tvheadend. Open up your new TVheadend web interface by pointing your Browser to, and go to Configuration → DVB Inputs → TV adapters. You should see something like this: If you are using the repeater, this is okay. The Fritz!Box however reports a wrong number of tuners. To get all 4 tuners, just set Tuner Configuration from Auto to DVBC-4. Next, go to the Network tab and add a new DVB-C Network. Name it however you want and make sure to select your cable provider in the Pre-defined Muxes field. Now go back to the TV adapters tab and change the following settings for each tuner: - Enabled: checked - Networks: [the network you just created] - Next tune delay in ms (0-2000): 500 - Tuner bind IP address: [one of your servers 4 IP Adresses. Each tuner needs his own IP!] Last step: Got to Configuration → Channel/EPG → EPG Grabber. Change EPG scan timeout in seconds (30-7200) to 30 seconds, disable all Modules but EIT: DVB Grabber. That's it. You can now start scanning for TV channels: Go Back to the Configuration → DVB Inputs → Networks tab, select your network and press the force scan button. Go to the Muxes tab and watch Scan Status column, until each row says IDLE. For me, this didn't work very well, most rows showed FAIL in the Scan Status cell. For each failed row, do the following: select row, press edit, set Scan Status to ACTIVE, wait for it to go back to IDLE. Now all scan status cells should show OK and you should have a bunch of services in your services tab. Press Map All, select all checkboxes and wait. Congratulations, your Tvheadend setup is ready to use!
  1. which is what I did, because my machine is virtual so adding a NIC is just a mere mouse click []

6 Replies to “Using a Fritz!Box 6490 as Tuner for Tvheadend”

  1. Super Tutorial! Danke! Anfänglich hatte ich ein paar Schwierigkeiten aber ich denke, nun habe ich es zum Laufen gebracht. Eine einzige Frage habe ich noch (da bin ich selbst nicht so stark mit IP-Adressen usw...): Ich hab den Tvheadend-Server auf einem Raspberry Pi laufen. Momentan sieht die /etc/network/interfaces noch recht leer aus. Muss ich, wenn ich alle 4 Tuner benutzen möchte, 4 IP-Adressen vergeben?
  2. ​Hallo zusammen, vielen Dank blog und die Kommentare. Da ich auch davon profitiert habe hier noch ein paar Hinweise von mir die ggf. weiter helfen / meine Probleme gelöst hatten: Meine config: - HTS Tvheadend 4.3.99rc1~221c29b​ - FRITZ!Box 6590 Cable​ / FRITZ!OS: 07.12​ - Kabel über UnityMedia, ehemals Kabel BW, heute Vodavone Mein Probleme: 1. gar keine Sender: Lösung: alles löschen (MUXE und Network) und komplett neu machen - ich hatte wohl mit dem Zauberer daneben gelegen 2. nicht alle Sender sind da. Lösung: Die MUXE welche im Scan Result auf FAIL oder NONE stehen im Scan Status auf 'IDLE' stellen. Vor allem die Scan Status 'ACTIVE' und Scan Result 'NONE' waren meine vermissten Sender. Anmerkung: Ich musste keine virtuellen IPs erstellen und auf dem Netzwerk Adapter pflegen. Geht wohl ab OS 7.00 Ich hoffe das hilft weiter. Grüße
  3. Hi, Great tutorial! However, I fail to integrate my Fritz!Box at which is located in a different network than TvHeadEnd in 192.168.4.X. The IP routing is fine, as I can access and also rtsp streams from 192.168.4.X. I already adapted /etc/init.d/tvheadend where I replaced ARGS="-f" by ARGS="-f --satip_xml". But even after restarting tvheadend by "sudo service tvheadend restart", the list of tuners remained empty. Do you have a hint? Thank you very much! Best regards, Peter
  4. Hi, thanks for the tutorial. Like other ppl, I had the problem that TVheadend didn't find any services. I fixed this by setting "Pass specinv = OFF", like described here:

Leave a Reply

Your email address will not be published. Required fields are marked *