Bob's Notepad

Notes on projects I have done and things I have learned saved for my reference and for the world to share

Thursday, November 19, 2009

PVR-150 IR Blaster on MythBuntu 9.10 with Dish Network

Upgrading to MythBuntu 9.10 from 9.04 was a challenge on some respects but the biggest of the challenges was getting my PVR-150 IR Blaster working.... again. I don't know why Ubuntu loves to break this thing on every upgrade but they do. Thanks to Jimmybondo for the bulk of this work.



  • sudo apt-get install lirc-modules-source
  • cd /usr/src/lirc-0.8.6
  • wget http://www.skynet.ie/~shabba/zilog.diff
  • sudo patch -p0 < ~/Downloads/zilog.diff
  • sudo dpkg-reconfigure lirc-modules-source


Now edit your /etc/init.d/hardware.conf file and replace lirc_pvr150 with lirc_zilog and you should be set.

If you're not upgrading from MythBuntu 9.04 and/or don't have the rest of your configuration files, you can refer to my prior post for what your lircd.conf file needs to look like. You may also need to add the following to hardware.conf:
TRANSMITTER_DEVICE="/dev/lirc0"

Labels: , , , , , ,

Reference Link


Sunday, September 09, 2007

MythArchive on a seperate front end machine

Apparently MythBuntu (and MythTV under Ubuntu) will only support MythArchive if it is on the same machine as the backend. Basically, if you have a backend only machine you are unable to burn your recordings to a DVD from your front end machine. There is currently a bug open (118700) but, sadly, it doesnt seem like anyone has an interest in fixing it soonish. The good news is there is a very easy solution to the problem.

First, mount your recordings directory from your backend server on to your front end machine. This requires installing nfs.

apt-get install nfs-user-server
nano /etc/exports


Add this line: /var/lib/mythtv/recordings 192.168.1.5(ro)
(Make sure you replace the IP address with your front end's IP)

/etc/init.d/nfs-user/server restart

Now you need to mount that on your front end machine.

apt-get install nfs-client
nano /etc/fstab

Add this line: 192.168.1.3:/var/lib/mythtv/recordings /mnt/recordings nfs
(Replace that IP address with your backend's IP; Make sure /mnt/recordings exists)

mount -a

Now you need to add an entry to the mythconverg database. You can do this from either machine.

mysql -h 192.168.1.3 -u mythtv -p mythconverg
(Replace the IP with your database server - usually same as your backend)

Now you need to run this command at the mysql prompt:

insert into settings (value, data, hostname) VALUES ('RecordFilePrefix', '/mnt/recordings', 'myth-frontend');
(You'll need to change myth-frontend to whatever the hostname is of your front end)

That should take care of it
DISCLAIMER: I am not a database guy.... I don't even fully understand what that command does. I am simply taking information from the bug report and putting it in to a step by step list. I can confirm that this worked for me in my situation and it most likely will work for you.

Labels: , ,

Reference Link


Saturday, September 08, 2007

MythMusic with iTunes

Now that I am putting more effort into MythTV being the control of entertainment in my house, I've begun working on the MythMusic application. Currently I use iTunes on my iMac for my music library which syncs with my iPod and scrobbles tracks to Last.fm. The last thing I want is another application that I need to keep synced. Here are things I found to make life a little easier/

Trick #1: Share your iTunes Music folder via NFS

On my Mac I moved my iTunes store folder to /music-lib/ rather than the directory it uses by default. My primary reason for doing this was nothing more than the default folder contains a space in the name and this makes things a little harder for NFS. Once all your MP3 files are there, we need to set up the NFS share.... which really isn't all that hard. I used the following guide to do this:
http://mactechnotes.blogspot.com/2005/09/mac-os-x-as-nfs-server.html

Note: On Windows you could substitute this process to use Samba and adjust accordingly

Now you need to mount that share on all applicable MythTV machines. Currently I use Mythbuntu and I have a primary backend machine and 2 front end only machines. First thing you'll need to do is "apt-get install nfs-client" to allow Mythbuntu to connect to an NFS share. Once that's installed, create an empty directory to mount your music in. I created /mnt/music/ for my systems. Now add the following line into your /etc/fstab file on all of your myth machines:

SERVER:/music-lib /mnt/music nfs
(Substitue SERVER with your iTunes' machines IP address and adjust the share names as needed)

Now what's left is to go into the mythmusic settings and change the recordings directory to /mnt/music.

You're ready to listen to music!

Trick #2: iTunes Playlists

So MythMusic has an extreme lack of intuitive playlist editting.... actually, you can't even call it a playlist editor. I want an easy was to use my iTunes playlists. Two people have done an amazing job at a perl script that takes care of a conversion and imports the iTunes playlists into your mythconverg database.

http://www.mickelson.org/2006/11/07/mythmusic-mac-os-x-and-itunes/
http://simonster.com/mt/archives/000038.html

Grab that perl script and throw it on the machine that serves as your mythtv backend. On mythbuntu you need to install XML:Parser which can be done by "apt-get install libxml-parser-perl". Edit the variables at the top of that script and do a chmod +x on the perl script. If you have multiple machines, you will need to run the script different times with the hostname set as each of the myth machines you want the playlists to be active on.

Before you run that script, you need to make sure the iTunes library XML file is in your music-lib directory. I renamed mine to exclude spaces and then copied it to the music-lib directory on my iMac.

Run the script and you should now have playlists in MythMusic.

Trick #3: Automate Trick #2

I have a lot of smart playlists and I am often creating new playlists and, of course, always adding new music to my library. I don't want to have to do this everytime I make an update so I automated the process. I created a script on my iMac to copy the "real" iTunes XML file into the music-lib directory every hour. OSX has dropped the use of cron and replaced it with launchd. Here is a guide you can use to get this set up:
http://www.macdevcenter.com/pub/a/mac/2005/11/15/terminal5.html?page=3

Once that's set up, you need to set up a crontab on your myth system(s) to run the perl script. If you do this hourly, make sure you set your iTunes computer to copy the file before the crontab runs on your myth machines. For instance, make your itunes machine run on minuet 05 and the myth machines run on 08.

Now you're set.... things should automatically update for you.

Trick #4: Scrobble to your Last.fm account

I use Last.fm an awful lot and if I start using MythMusic over iTunes, I lose that scrobbling. I have not completed this yet (or even really began looking at it) but here is a link where you can get a patch. I need to figure out how to apply this on an active mythbuntu system. I'll report back when/if I come up with something :)

http://yaron.org/mythscrobbler/

Labels: , , , , , ,

Reference Link


Tuesday, September 04, 2007

Mythbuntu: My new favorite MythTV solution

As much as I love KnoppMyth and it's ease of installation I have constantly ended up haunted by the lack of upgradeability. If you even think about using apt-get, the system cries and stops working. It's an amazing distro but if you run into a problem with it not playing nicely with some hardware device you have or you get a cool idea that you want to implement, you're most likely going to render your box useless once you start tinkering.

So I installed Mythbuntu last night and.... WOW. I ran into a hardware incompatibility with the new machine I was building. I have a dual opteron 246 mainboard that I wanted to use as my mythbuntu system but the issue was with compatibility with PCI-X and PVR-150's. I have 2 of the older PVR-150 retail versions (these are the cards that the new knoppmyth and it's ivtv version were having issues with) and a PVR-150 MCE version. I also have a Chaintech 710 sound card (*HIGHLY* recommended by me for anyone who wants 5.1). The mainboard only has 1 32 bit (5v) slot and the sound card runs only at 5v. All of the PVR-150's run at either 3.3v or 5v but there is apparently something in the chipsets of the PVR-150 retail versions that make them inoperable in a PCI-X slot. The MCE version works fine so I had a choice of either my chaintech card or a second tuner because the PVR-150 Retails would work fine in the 32 bit slot but the machine wouldnt boot if they were in a PCI-X slot. I have a Sound Blaster Live card so I figured I'd try it and it worked until I wanted to do the digital 5.1 and then hell broke lose which is the same results in ANY distro including KnoppMyth..... so I opted to make that my server and build a seperate front end machine.
Note: Hauppauge will apparently update your PVR-150 to work with PCI-X but who has time for that? :P See this link.)

I can not tell you how easy the install was. In Mythbuntu you can select advanced configuration and select any configuration you want. You have options of the following:


  • Master backend and Front end
  • Secondary backend and Front end
  • Master backend only
  • Secondary backend only
  • Front end only


In all of these configurations, the plugins are installed and 100% working..... installation of the frontend machine asks you for the address and login information for the primary backend and.... it's running.

One thing even more amazing about Mythbuntu.... since I wasn't going to have any PVR-150's in my front end, the use of my Hauppauge remote control wasn't an option. Years ago I bought a StreamZap USB remote control which I previously tried to use on KnoppMyth and I eventually gave up. I decided I'd fight with it in this scenario and dug it out of the "archives" .... Mythbuntu asked me what remote I had and StreamZap was actually an option. When the system booted the remote worked without a single bit of configuration from me. The only thing that I think I need to do is configure the red button for delete like my Hauppauge remote was.... other than that, it's working great even in the DVD program.

Mythbuntu also puts the display to sleep automagically.... if you're sitting at a menu for a while, the screen will go into sleep mode and as soon as you press a button on the remote it will turn back on. This is a huge advantage for me because there are times I'll fall asleep while watching TV and the fact that my 19" CRT is going to sleep is a great savings in energy costs.

Another thing is the DVD player. I adjusted my general settings to use /dev/adsp for the SPDIF port and I figured I'd have to set up the DVD seperately.... I put a DVD in to see what state it was in and not only did my audio come out of the SPDIF optical port but my receiver went to digital mode..... Mythbuntu handles everything with the DVD player internally so there aren't any options that you need to pass... it's very impressive.

For everyone's reference, here is my configuration

  • Server:
    • Tyan S-2882D Mainboard
    • (Qty: 2) Opteron 246 - 2ghz
    • 4GB DDR333 Crucial (128bit mode)
    • 3ware 7500-8 Raid Controller
    • (Qty: 8) 250GB Western Digital SATA drives (Raid 5)
    • Hauppauge PVR-150 Retail version (26052)
    • Hauppauge PVR-150 MCE

  • Front End:
    • Intel 815 Server Board
    • Pentium 3 @ 1.2ghz
    • 512MB PC133 Ram
    • 40GB IDE Seagate
    • Lite-On DVD Burner
    • Chaintech AV-710 with optical out
    • StreamZap USBIR2 Remote Control


I really like the front end being the configuration it is. I was a bit concerned about the Pentium 3 with only 512MB of RAM (thats all the 815 chipset supports) but it runs incredibly smooth.... the network keeps up, the CPU keeps up.... no slow downs at all. The best part about it is all it has is a VERY low speed fan on the power supply and a cpu cooler.... the box makes almost no noise at all. Right now the server is sitting next to eat but I will be moving that to my crawlspace eventually and it should get really quiet in my living room :)

Here are some URLs for anyone interested in some of the things above:

  • http://techgage.com/article/chaintech_av-710_71_sound_card/ (Chaintech AV-710)

    • I really can not recommend this card highly enough. It worked flawlessly on my KnoppMyth box as well as this Mythbuntu box. The quality is amazing.... and the Envy24 chipset is so much enjoyed by linux distros. If you're just getting into MythTV I would highly recommend not even thinking about touching a Creative Labs sound card (that is, if you want anything more than standard 2 channel). Their chipsets are a 3 ring circus and it's always a nightmare

  • StreamZap USB Remote control
  • Mythbuntu
    • My installation was based on Alpha 4..... so far I have seen no reason why this is still considered Alpha.... I havent run into an issue yet.


Keep in mind I have only been running this set up for 24 hours but I have had a very large queue of recordings and I'd say more than half of that time the system was recording two shows at the same time. I haven't tested all of the plug ins yet (like mythweb, archive, etc) but from navigation it appears they are installed and operating.

Overview

  • Installation is quite easy. KnoppMyth may be a touch easier for someone who hasn't a clue about linux but if you know even a tiny bit of computer hardware and the ideas behind the OS, this is a piece of cake.
  • MythBuntu has a sleep function for the monitor out of the box
  • Mythbuntu has a front end only installation option as well as a front end live CD option
  • Mythbuntu is designed from the ground up to be placed in multiple machine configurations. Having mutliple backends and frontends is a breeze
  • Using 5.1 optical on the Chaintech is as simple as changing your audio device in myth setup to /dev/adsp - and it takes it from there (including DVD player)
  • The base system is 100% Ubuntu and is designed with the Ubuntu repositories in mind. Updating packages appears to be no issue at all.
  • Supports my StreamZap USB remote which I previously had not been able to get to work easily
  • Gives you the option to set up VNC access during the install
  • Allows you to select plugins rather than forcing you to install all of them


There is no doubt that this is now my MythTV distro of choice. MythDora has got some great reviews but I'm not such a fan of RPM based distros so when looking for a KnoppMyth replacement I decided to try Mythbuntu - and I'm glad I did.

Please keep in mind that KnoppMyth is still considered a great distro to me. It works flawlessly in what it does but I just sometimes feel trapped by it. That trapped feeling is a trade off, however, as it is designed with the widest automatic support of hardware and it can generally have you set up and running without many technical questions at all.

As far as I'm concerned, KnoppMyth, Mythdora, and Mythbuntu are all very great options but I think Mythbuntu fits into my scenario (as well as many other's) the best.

Labels: , ,

Reference Link