Skip to content

Instantly share code, notes, and snippets.

@dataBaseError dataBaseError/PVR.md
Last active Sep 18, 2018

Embed
What would you like to do?
Setup details for installing MythTV with HDhomerun for Kodi

Prerequisites

In order to install the PVR system you must have:

  1. An antenna for capturing the broadcasted TV signal.

  2. HDHomeRun hardware such as the HDHomeRun DUAL. This system will connect to both the antenna and the LAN to make the broadcasted TV available to MythTV.

  3. Backend - A device which can run MythTV. This guide was tested using a Desktop computer running on Xubuntu 14.04. This device must connect to the LAN network.

  4. Frontend - A device which can watch the TV channels received by the antenna typically running Kodi. This device can be the same device as the one running MythTV however it does not have to be. This device should connect to the land network (however MythTV can be set up to allow for external access).

  5. HDHomeRun product software (found here).

  6. MythTV will run on the backend.

  7. Kodi (XBMC) will run on the frontend.

Hardware setup

Antenna & HDHomeRun

  1. Install the Antenna in a place which is likely to receive broadcasted signals. This position can be adjusted once the system is set up to find the most optimal position. It is a good idea to research the geography and location of broadcasting towers to make an informed decision on where to place the antenna initially.

  2. Connect the HDHomeRun box (in this case the HDHomeRun DUAL) to the antenna and the LAN (Ethernet connection).

Backend Device

This device should be able to run MythTV. Typically a desktop is used (since this device will be on constantly). It will need a strong Ethernet connection (since TV access will be over the Ethernet), either 100Mb/s - 1Gb/s should be fine connection speed. MythTV can perform some expensive tasks optional tasks (e.g. commercial removal). A computer with average graphical capabilities should be able to handle the these tasks however MythTV is fairly customizable allowing the user to control CPU and graphics card utilization. From experience a lower end gaming computer has performed quite well for both a frontend and backend.

Frontend Device

These devices only need to handle running Kodi which is able to run on various platforms (such as Linux, Windows and Android). A set on top Android box can be a perfectly viable frontend, just as a desktop computer. As stated before, depending on the backend device's capabilities it may be able to run the frontend software as well.

Backend Setup

Initial Software Setup

Please Note (Skip if you aren't running Linux and adjust based) Depending on which operating system you are using you might need to ensure that the computer's graphics drivers are installed. On Linux computers the open source drivers are used by default but tend to not perform as well as the propriety drivers provided by the hardware manufacturer.

  1. Install updates to the computer.

     sudo apt-get update
     sudo apt-get upgrade
    
  2. Open the Additional Drivers window (All Settings > Additional Drivers)

  3. Once it finishes searching for drivers, select the driver that has (proprietary, tested) (this will tend to work otherwise select an other version) and click on Apply Changes. You may need to enter your password to proceed.

Defining a static IP address

Please Note If you plan to use the MythTV service from other front ends beyond the backend (you plan to either have multiple frontend devices or have a distinct front and backend) you will need to provide an static ip address to MythTV device (the backend) to be able to point to the particular device on the frontend devices. This only applies if you wish to record shows through MythTV through the frontend interface. If you wish to just watch TV on the frontend then this is not needed.

  1. In the router define a static IP address for the computer

  2. On the back end computer define the static IP address in Network Manager (command line will not work as well unless you know what you're doing.

  3. Open Network Manager > Edit > Connection interface > Edit

  4. A new window should open up Click on the IPv4 Setting tab

  5. Change the method from Automatic (DHCP) to Manual

  6. Under the Addresses heading, click on Add

  7. Add the address static ip address for the address

  8. Define the network mask

  9. Define the gateway (find that out with nmcli dev list iface eth0 | grep IP4 adjust the interface eth0 as needed)

  10. Click Save and quit out of the network manager windows

HDHomeRun

  1. Build the library following the guide on their website (please note for xubuntu and other non gtk using distros the gui part wont work).

MythTV Setup

  1. Install MythTV and the mysql-server

     sudo apt-get install mysql-server mythtv-backend mythtv-database
    
  2. MySQL setup will require you to create root user password.

  3. For mythtv-database you will be promoted for configuring

    • Answer no if you do not wish to share the MythTV stuff from other computers
      • Otherwise yes
  4. Next you can run the mythtv-setup for the back-end

     sudo mythtv-setup
    
  5. Once the setup loads you should be asked for your country and desired language character set.

  6. The next option should ask for configuration settings for the database

  7. Ensure the mythtv user is setup to have access to the MythTV database mythtvconverg.

    • Hostname: localhost (default)
    • Port: 3306 (default)
    • Database name: mythconverg (default)
    • DB username: mythtv (default)
    • DB password: mythtv (default)
  8. Db setup part 2 leave both of the options blank and click Finish.

If the same window appears again mythtv couldn't gain access to the database. Ensure your mythtv account is set up right SET PASSWORD FOR 'mythtv'@'localhost' = PASSWORD('new password');

  1. The window should close and another similar window should open up for further configuration of the backend.

    • Note you cannot use your mouse here. Instead use the arrow keys for navigation, and enter for clicking
  2. Enter the general settings by pressing Enter. The following subsections will discuss each settings section.

General

Note This section assumes IPv4 is in use and disables IPv6. Since the settings related to IPv6 interfere with the connection of IPv4 devices.

  1. If you are using a separate machine for a front end change the IPv4 address to the static defined address. Note press the arrow buttons (Left or right) to change the address.

  2. Change the IPv6 address to empty.

  3. Again if you wish to use a separate machine for a front end under the heading Master Backend change the IP address field to the one defined above (the static IP address).

  4. Click 'Next >'

  5. On the second page set the follow for North America settings and click next once finished

    • TV format: NTSC for North America
    • VBI format: None
    • Channel Frequency table: us-bcast
  6. From the third page (Miscellaneous Settings) till the tenth page (Job Queue (Job Commands)) leave all of the settings as their default values. Click next.

  7. On the eleventh page (Program Schedule Downloading Options) turn on the automatically updating program listings. Once the option is clicked new options will appear on the page, leave them and click finish.

Capture cards

  1. Create a new capture card

  2. Set the card type to the type for your specific card

    • HDHomeRun networked tuner
  3. For the Available devices pick

    • 1040FB68-0
  4. In the Recording Options set the 'Max Recordings' to 1, then click finish

    • This change is required if we wish to make use of both tuners.
  5. Click finish for the capture device setup

  6. Follow the same steps above and make use of the other tuner for the available devices.

  7. Once finished settings up the second card click 'Esc' to return to the main options window.

Recording Profiles

  1. Ensure HDHomeRun Recorders group is available
  • If the profile group is not found use the device from the previous steps

Video Sources

  1. Hit Enter for 'New Video Source'

  2. Enter a name you will remember for the source

    • Source 1
  3. For Listings grabber select 'Transmitted guide only (EIT)'

  4. For the rest of the settings on the page leave them as default (default, -1). Click Finish

  5. Press 'Esc' to return to the main menu.

Input Connections

  1. Click on the first option (the first device).

  2. Set the display name to Input 1

  3. Set Video source to 'Source 1' (the name give in the previous setup menu).

  4. For Use quick tuning use 'Live TV only'

    • 'Never' did not seem to work as well.
  5. Click on Scan for channels. Please Note if you are unhappy with the channel listing, you can attempt to move your antenna to a more optimal position and re-scan the channel listings.

  6. For scanning use all default options and click next. Please note this scanning may take a while to finish

    • It is not necessary to scan for a second tuner in the same location.
  7. Once the scan is complete it will indicate its results, click on 'insert all'.

    • This is in the case of no conflicts
    • Not if you are using a second tuner it will ask to update (if no new channels are found)
  8. It may report its progress about various channels each time click on 'insert all'.

    • this is again in the case of no conflicts.
  9. Click on finish and proceed to the next page by click next

  10. Leave the options as their default settings and click finish

  11. Now click on the next tuner and repeat from step 2 until at the end of the list.

  12. Press 'Esc' to move onto the next menu.

Channel Editor

  1. This is a editor for channels. For advanced users you may wish to adjust the channels, however nothing is required here. Do nothing and proceed to the next step.

Source Editor

  1. Leave these as their default
    • Might want to set these to local folders inside home or provide symbolic link access.

System Events

  1. Do nothing this is more just for advanced customization.

Finishing MythTV Setup

  1. Once you have finished configuring MythTV press 'Esc' in the main menu.

  2. Once you exit you will be asked if you wish to start the MythTV backend, press 'Yes'

    • This may request your administrative password.
  3. After providing your admin password you will be promoted for another window asking if you wish to run mythtvfilldatabase, click yes.

  4. Congrats you have finished setting up MythTV backend.

MythTV and Kodi

Note Kodi was previously named XBMC.

Install Kodi

Please note Kodi can often be installed through package management but can also be downloaded from here.

Linux Install

  1. A guide for installing on linux can be found here

  2. Install necessary packages

     sudo apt-get install python-software-properties pkg-config
     sudo apt-get install software-properties-common
    
  3. Add the kodi ppa

     sudo add-apt-repository ppa:team-xbmc/ppa
     sudo apt-get update
    
  4. For the latest version of Kodi (XBMC)

     sudo apt-get install kodi # for 14.0 and up
    
  5. Otherwise install:

     sudo apt-get install xbmc # for 13.2
    
  6. Lanuch Kodi (XBMC)

Android Install

  1. Find Kodi in the Android Play Store. If you do not have access to the play store download it directly from Kodi.

Access Tuners for Video play

Please note this will not be the normal technique for accessing videos this is just the quick and dirty way to ensure that the tuners are available and the HDHomeRun software is working.

  1. In the main menu for Kodi (XBMC) go to Video> Files > Add Videos...

  2. In the popup window click on Browse.

  3. Click on UPnP Devices

  4. Click on 'HDHomeRun DLNA Tuner 1040FB68'

  5. Click 'OK' to confirm the folder be added.

  6. In Video> Files> HDHomeRun DLNA Tuner 1040FB68> Channels

  7. Pick any channel to test the connection note some channels may just not work because of signal issues in order to ensure the tuner is work test various channels.

MythTV add-on for Kodi (XBMC)

  1. Close Kodi (XBMC)

  2. Install the MythTV addon for Kodi (XBMC). Skip to next step if you are not using Kodi

     sudo apt-get install kodi-pvr-mythtv # For Kodi v 14+
    
  3. If you are still using XBMC (13.2). Otherwise skip

     sudo apt-get install xbmc-pvr-mythtv-cmyth
    
  4. Launch Kodi (XBMC)

  5. Go to System> Settings> Add-ons> Enabled Add-ons> PVR clients> MythTV cmyth PVR Client

  6. In the configuration ensure the database information is correct:

    • dbname - mythtvconverg
    • dbuser - mythtv
    • dbpass - mythtv
  7. The hostname should be localhost and the port should be the default one (6543 which was the default set port in the MythTV setup).

  8. In System> Settings> Live TV> General. Ensure that the option 'Enabled' is set.

  9. Ran into issues with starting LiveTV. Kodi (XBMC) kept saying that the pvr cient 10.0.0.2 or localhost or 10.0.0.8

  • Trying to reboot
  • Ensure all of the pvr stuff is turned up aka disable the livetv setting
    • Disable the mythtv addon

Backend Issue

  1. For some reason the backend doesn't start

  2. Manually start it with:

     sudo mythbackend
    

Trouble Shooting Kodi's (XBMC) MythTV add-on

  1. Initially rebooting did not help but it is still suggested.

  2. Once logged back in execute

     mythtv-setup
    
  3. In the setup in the General menu change the IPv6 address from ::1 to empty (I had to press the right arrow twice to reach it.

  4. Exit the MythTV setup and start the back-end and then start the mythtvdatabasefiller thingy

  5. Ensure MythTV back-end is running by executing

     pgrep mythbackend
    
  6. The previous command should return the pid of the process that was started by calling mythtv-setup

  7. Next configure the MythTV add-on. Change the hostname/ip to 'localhost'

  8. Enable it (ensuring that is has been disabled and then from the disabled options re-enabled).

  9. Enable the live TV setting

  10. Test it to ensure the live TV is actually working.

Testing PVR

  1. Try watching live TV.

  2. Attempt record a TV show. Using the EPG (Episode Program Guide) add a time to record a given TV that is yet to occur.

  3. Watch that recorded show and ensure that is worked.

Adding Fusion (Kodi Plugin)

Adapted from http://www.tvaddons.ag/fusion-installer-kodi/

  1. Go to System > File Manager > Add Source

  2. Create the url as:

     http://fusion.tvaddons.ag
    
  3. Enter a name for it to identify it by

  4. Go back to the man menu and go to System > Settings > Add-ons > Install from zip file > <name you gave to the source in step 3> > start-here

  5. Click on the last 3 options (all zip file). The most important one is addoninstaller.zip hubwizard.zip

  6. Go back to the main menu

  7. Click on Programs

  8. Open Addon installer

  9. Open Program addons

  10. Click on Config Wizard

  11. Click on Install Config Wizard

  12. Go back to the main menu once it finishes installing

  13. Go into Programs (the main menu of programs)

  14. Click on the Config Wizard

  15. Select the device you're installing onto e.g. Linux. Wait for it to complete the installation

Kodi Phone Remote

Kodi Remote Settings

  1. Launch Kodi and go to System> Settings> Services> Webserver

  2. Enable the setting 'Allow Control of Kodi via HTTP'

  3. Set the username and password as desired (they will be used from the next step).

Android Remote

  1. Install the android application (e.g. Kore or Yatse)

  2. Launched the application. (Typically the application will help you through the process of setting up the connection so these guide lines might be outdated)

  3. With Kore you will be guided to create a new connection (ensure you are on the WiFi network (making you on the same LAN as the device)).

  4. If the settings are set up right then Kore should find the device. Click on the device.

  5. A new window will show up requesting the login information (uesrname and password) that you set in the previous section enter it now.

  6. Once entered click on Test on the bottem right.

  7. If you entered the correct login information it will notify you that everythings set up allowing you to click Finish at the bottem right.

  8. You have finished setting up the remote and now can explore and use it as desired. Enjoy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.