PVR150/Gutsy/Sky NZ MythTV configuration tips and tricks

Here are some other things I’ve learnt you need to do to get MythTV working with a Sky box, Ubuntu Gutsy and a PVR-150:

General

  1. Make a directory called /usr/src/mythtv

EPG setup

  1. Create and run channelsetup.sh to import the channels into the MythTV database

    #!/bin/bash
    wget http://epg.pvr.geek.nz/epg/listings-sky.xml.gz
    gunzip -f listings-sky.xml.gz
    mythfilldatabase --file 1 listings-sky.xml --do-channel-updates
  2. Create a file called getEPG in /usr/local/bin (and chmod +x to make it executable) to get the channel data. Copy the following code into it:

    #!/bin/bash
    cd /usr/src/mythtv
    wget http://epg.pvr.geek.nz/epg/listings-sky.xml.gz /usr/src/mythtv/listings-sky.xml.gz
    gunzip -f /usr/src/mythtv/listings-sky.xml.gz /usr/src/mythtv
    mythfilldatabase --no-delete --file 1 -1 /usr/src/mythtv/listings-sky.xml --update

    If you have webmin installed, set up a cron job to run this script once a week.

IR Blaster

  1. The guide for setting up the PVR-150’s built-in IR blaster working is Mark’s guide from BlushingPenguin. Follow them, and the tip I found for the Gutsy patch, to get it so that your IR blaster is working. Key things to remember:
    • Gutsy comes with it’s own copy of IVTV so you don’t need to download that.
    • Run with the pre-patched version of lirc as Mark directs
    • The firmware goes in /lib/firmware
    • Sky Zenith boxes are code 482 in his master lircd.conf. Specifically, your /etc/lirc/lircd.conf needs to have the following for the blaster to work:

      begin remote
      name blaster
      bits 32
      flags RAW_CODES
      eps 0
      aeps 0
      plead 0
      gap 333333
      repeat_bit 0
      begin raw_codes
      name 0
      2179072000
      name 1
      2179072001
      name 2
      2179072002
      name 3
      2179072003
      name 4
      2179072004
      name 5
      2179072005
      name 6
      2179072006
      name 7
      2179072007
      name 8
      2179072008
      name 9
      2179072009
      name POWER
      2179072010
      name CH_UP
      2179072015
      name CH_DOWN
      2179072016
      name CH_PREVIOUS
      2179072019
      end raw_codes
      end remote
  2. Make sure you have MythWeb installed. Go to the Channel Editor in Mythweb and make sure you have a channel number beside each channel to make them appear in the guide and MythWeb
  3. Add a channel number to the freqid field too – otherwise the IR blaster won’t work
  4. Create the following change-channel-lirc.pl in the /usr/local/bin folder (chmod +x so it can run):

    #!/usr/bin/perl
    # make sure to set this string to
    # the corresponding remote in /etc/lircd.conf
    $remote_name = “blaster”;

    sub change_channel {
    my($channel_digit) = @_;
    system (“irsend SEND_ONCE $remote_name $channel_digit”);
    sleep 1;
    }

    $channel=$ARGV[0];
    sleep 1;
    if (length($channel) > 2) {
    change_channel(substr($channel,0,1));
    change_channel(substr($channel,1,1));
    change_channel(substr($channel,2,1));
    } elsif (length($channel) > 1) {
    change_channel(substr($channel,0,1));
    change_channel(substr($channel,1,1));
    } else {
    change_channel(substr($channel,0,1));
    }

  5. Run mythtv-setup and put change_channel_lirc.pl in the external change channel field on the input card.
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s