Two Possibilities

June 24, 2010

iMon LCD and lcdproc

Filed under: MythTV,Projects — Eric Friedrich @ 2:13 pm

My current HTPC case is an Antec Remote Fusion. It has an iMon LCD on the front, being driven by lcdproc. Setting this screen up was one of the easiest parts of my MythTV install. I haven’t done any customization of the information shown- the defaults work great. While media is playing, it displays a progress bar of the viewers position in the file. On a menu screen, the currently selected menu item is shown.

I followed instructions from the codeka forums on how to install lcdproc. I downloaded the current release of LCDProc which was 0.5.3 at the time. The release notes show that support for the iMon LCD has been added. Once the software was installed, I edited the /etc/LCDd.conf file, changing the drivers line to read ‘imonlcd’.

I also updated the Protocol setting based on my current hardware. Running lsusb reported “Bus 003 Device 002: ID 15c2:0038 SoundGraph Inc.” According to the LCDd.conf file, a value of 15c2:0038 needs a Protocol setting of 1

  # Specify which iMon protocol should be used [legal: 0=15c2:ffdc device,
  # 1=15c2:0038 device; default: 0]
  Protocol=1

Then, I verified that the /dev/lcd0 device was present and started LCDd by running ‘sudo /etc/init.d/LCDd start’. Once I was sure everything was running satisfactorily, I setup LCDd to run automatically on each boot by creating a symlink in the correct /etc/rc.d directory.

MythTV was set to use the LCD screen by following the brief instructions on the MythTV wiki.

April 20, 2010

HDHomeRun Setup

Filed under: MythTV — Eric Friedrich @ 2:12 pm

The HDHomeRun is a pretty cool little device with the potential for greatness. Its got 2 Digital Cable/Terrestrial Tuners and a 1 gigabit ethernet jack. It will let you record directly off cable through MythTV and several other programs. Its one shortcoming- no CableCard support. This is the business decision of service providers and not of SiliconDust (makers of the HDHomeRun), so I hold out hope that one day CableCards will work under Linux. Until then, this box is only useful to record OTA and non-scrambled channels. This isn’t really that bad, because much of what I record is broadcast on ABC, NBC, CBS and FOX.

The HDHR also has an IR receiver and can forward IR commands over the network, to save someone from having to purchase a separate IR receiver. Pretty cool feature and could come in handy someday, although I don’t need it right now.

The HDHR setup was pretty straightforward using the provided instructions. The HDHR autoconfigured itself using DHCP and was easily discovered by the HDHomeRun config program. Updating the firmware went flawlessly, as did the inital MythConfig.

eric@shaman:~/hdhomerun/libhdhomerun$ ./hdhomerun_config discover
 hdhomerun device 1019A8F9 found at 192.168.1.149
 eric@shaman:~/hdhomerun/libhdhomerun$ ./hdhomerun_config 1019A8F9 get  /sys/version
 20091024
 eric@shaman:~/hdhomerun/libhdhomerun$ ./hdhomerun_config 1019A8F9  upgrade ~/Desktop/hdhomerun_atsc_firmware_20100213.bin
 uploading firmware...
 upgrading firmware...
 rebooting...
 upgrade complete - now running firmware 20100213

MythTV Config

http://www.mythtv.org/wiki/Silicondust_HDHomeRun

I added the tuner in mythtv-setup and it was autodetected by Myth. The frequency table should be set to cable. Moving on to the next screen, I added a new ClearQAM input source & entered Schedules Direct info.

I then associated the input source to the capture card.  I used the channel scan for 256QAM on all cable frequencies. I had no idea on the conflicting channels, or how to deal with them so I just ignored the conflicted ones. A little extra documentation about the channel scanner would be great in this area. The HDHomeRUn is connected to Comcast cable in the Boston, MA area. If the HDHomeRun was hooked up to a DTV antenna, I would have used the 8VSBmodulation instead. Once done, I “fetched listings from source”.

At this point I could watch video on all the channels, but the channel names were wrong and the guide data wasn’t correct. The easiest solution is to manually fix the channel database using the MythWeb interface. Simply fill in the correct channel #, XMLTV ID, and callsign. The XMLTV ID is available from the SiliconDust webpage as well as the SchedulesDirect Page.

If you’d like to make your life more difficult, keep reading…

(more…)

March 23, 2010

iMon Remote and lirc

Filed under: MythTV — Eric Friedrich @ 11:09 am

A HTPC isn’t much good without a remote control. Nobody wants to have a keyboard and mouse sitting out on their coffee table. I use a Logitech Harmony 720 that I picked up from Costco. It can control my TV, Receiver, DVD Player, Cable Box, and Squeezebox Radio. I’ve previously had the remote working with a Hauppage PVR-250 IR receiver. With the new Antec RemoteFusion case, I now use the included iMon IR receiver (plus Volume Knob!) on the other end of the Harmony remote.

During the Mythbuntu setup I selected iMon Veris. When I first started up Myth, this left me with no respone to IR commands to the Frontend. Doublechecking with irw and irrecord, I saw that neither of these programs were receiving IR codes. I did some research, finding the following sites useful:

I ran the ‘lsusb’ command to determine which version of the iMon LCD I have. (Its the 0038 version).

eric@mythbox:~$ lsusb | grep SoundGraph
Bus 003 Device 002: ID 15c2:0038 SoundGraph Inc. 

I then added the following section to my xorg file (/etc/X11/xorg.conf). It allows my remote input to be recognized as a mouse by the X Windows GUI.

 Section "InputDevice"
     Identifier "Remote"
     Driver "mouse"
     Option "Device" "/dev/lircm"
     Option "Protocol" "IntelliMouse"
     Option "SendCoreEvents"
     Option "Buttons" "5"
     Option "ZAxisMapping" "4 5"
 EndSection

 Section "ServerLayout"
     Identifier "StandardLayout"
     Screen 0 "Default Screen" 0 0
     InputDevice "Remote"
 EndSection

The Working With MythTV blog above recommends checking which driver is associated with the SoundGraph device, because usbhid (the generic keyboard/mouse driver) occasionally takes control of it from lirc.

mount -t usbfs none /proc/bus/usb
cat ./devices
T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  3 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=15c2 ProdID=0038 Rev= 0.01
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=02 Driver=lirc_imon
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=lirc_imon
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms``

The above output shows that the lirc_imon driver is being correctly used. I was running out of ideas and everything looked like it should be working, so I decided to try the IR module with another computer. Not surprisingly, it worked perfectly on the first try. While removing the IR module, I accidentally spilled a bowl full of change directly onto my powered-up and running motherboard. Luckily no nickles, dimes or pennies caused permanent damage. I did pull the power cable out the back of the machine as fast as I possibly could. Maybe throwing money at this problem fixed something ;-)

I’ll be honest, I’m not quite sure what I did, but once I reinstalled the IR module in the Antec case, it worked immediately. I have noticed that the IR field of view is pretty narrow, maybe 60 degrees? Its completely possible that I was outside the IR sensor’s receiving angle when I was having the initial problems.

Now that the the IR device & lirc are running, back to MythTV. The Remote still didn’t work in the frontend, but now irw showed remote names like KEY_DOWN, KEY_UP, etc… This didn’t match “button” and “remote” settings in the mythtv lircrc(~/.myth/lircrc) file. I corrected these (manually) and restarted the frontend.

I can now control MythTV with my Harmony remote. The IR receiving angle is still an issue, sitting on one of the two couches in the living room, maybe 60-70 degrees off the axis of the sensor, leaves the remote useless. I might consider some optical (lens/mirror) means of giving a wider angle to the IR sensor. Otherwise, it works great. I still need to tweak my button mappings a little bit to add support for OSDs and menus, but those are relatively minor tasks.

MythBuntu Digital Audio

Filed under: MythTV — Eric Friedrich @ 10:45 am

This article describes the process for enabling digital audio output from MythTV. It was fairly simple and I didn’t run into any major problems. I had previously constructed an external coaxial SPDIF bracket using instructions from AVS-Forum. Basically, I cut apart a motherboard CD-ROM Audio cable and soldered it to an RCA jack. I was too lazy to mount this on a PCI slot bracket so far, so the RCA cable is just hanging out the back of my case at the moment. Inside the case the re-purposed CDA cable is connected to a motherboard SPDIF header. The other end of the cable runs to a coax digital input of my Denon receiver. Its a bit ghetto, but invisible from the front of the case.

The MythTV wiki contains great instructions on configuring MythTV for digital output.  I created the following /etc/asound.conf file:

pcm.!default {
type plug
slave {
pcm "spdif"
rate 48000
format S16_LE
}
}

Then I unmuted the SPDIF output in alsactl and saved the settings with an ‘alsactl store’. Restarted mythfrontend and everything worked magically.

March 21, 2010

Mythbuntu Install

Filed under: MythTV — Eric Friedrich @ 10:31 pm

I’ve been a periodic user of Linux for the last 10 years and have experimented with most of the distributions out there. At the current moment, Ubuntu is my personal favorite for ease of use and features. The steps I describe here are pretty standard, but I’m documenting them more in case I have to do this again than for any other reason. Consider it my personal cheat sheet.

  1. Download the latest MythBuntu installer from http://www.mythbuntu.org/downloads and burn to a CD. I used BitTorrent.
  2. I went through the Mythbuntu-control-centre settings.
  3. According to the Mythbuntu instructions, I enabled the auto builds off of the US repository and 0.22-fixes branch. I also turned on the testing PPA, we’ll see how it works out. I had to run sudo apt-get update before the apt-get upgrade would work. During the upgrade, I had to answer a few questions about mythweb and remote frontends. I then set the user to auto-login although I wish I could choose which user logs in automatically. I’d rather have it as my unprivileged mythtv user rather than the semi-privileged (via sudo) user account. I turned on all of the proprietary software options available. For the IR receiver selection, I chose the IR Soundgraph iMon Antec Veris option. See my separate upcoming post on how I got that working.
  4. Also in MCC, I chose to enable SSH. Once SSH is turned on, you can complete any of these steps over X-forwarding. SSH to the box with a command like ‘ssh -X <user>@mythtv-host’. If you are on a Linux machine or OS X with X11 installed, a new GUI window will load up when you start a graphical program on the remote host.
  5. For now, I am skipping the Mythtv-setup configuration. At the moment I don’t have any recording devices connected, so Myth is just being used for video playback. In the MythTV Frontend configuration, set the video directory to wherever all your content is stored. For me, this required setting up some samba mounts via the /etc/fstab file. I use user authentication with the username and password stored in an external credentials file. Each /etc/fstab entry looks something like:
    //192.168.10.76/tv /mnt/tv_shows smbfs auto,credentials=/root/.credentials,uid=100,mask=000,user 0 0

    where the file /root/.credentials has permissions 400 and contains both a “username=<username>” and a “password=<password>” line.

At this point, I have a semi-functioning MythTV installation and can watch videos through MythVideo. I still have to

  • Get the remote and LCD screen working (via lirc and LCDproc)
  • Grab all the metadata for the video files (via jamu)
  • Setup HDHomeRun for Live TV Watching & Recording
  • Setup Firewire recording from my Comcast cable box.
  • Configure ALSA to play audio through the digital SPDIF output
  • Setup backup and system maintenance jobs

March 18, 2010

MythTV for the Second Time

Filed under: MythTV — Eric Friedrich @ 2:50 pm

A few years ago I had a sweet little MythTV setup. It worked well enough and I could tolerate all the little quirks that go along with using open source software. I moved into a new apartment a few years ago and started using the Comcast DVR. The MythTV box got relegated to an XBMC media player. All Live TV recordings is now done on the DVR, XBMC is only for playing music and video that we’ve ripped or downloaded.

The Comcast DVR is starting to outlive its usefulness and having to switch back and forth between XBMC and the cable box is confusing. I’ve heard a lot of good things about the advances Myth has made in terms of VDPAU for hardware decoding of video and major improvements to the user interface. This section of the blog will journal my efforts with Myth as a HTPC.

Between some well-timed Newegg sales and hardware I already own, the following is my plan for my home mediaNet. All pre-existing content will be stored on a ReadyNAS NV with 4x500GB RAID-5 drives for a total of 1.2TB of storage. This holds music, movies, and TV shows. Samba is used for all network mounts. The main HTPC will run a combined MythTV frontend/backend system and Squeezebox Server. The specs for this system are:

  • Motherboard: Biostar TF7050-M2 with onboard coaxial SPDIF out, Gigabit Ethernet, and Firewire
  • RAM: 4GB DDR 800
  • Graphics: Zotac 9800GT with 512MB DDR3 memory and 2 DVI ports
  • HD: 300GB Western Digital DMA100 (great candidate for replacement…)
  • Antec Fusion Remote case with 350W PowerSupply, iMon LCD and IR sensor.
  • Some old random CD-ROM drive. Might be nice to have a BluRay in here some day :-)

The Firewire port will be connected to a Motorola DCT6200 cable Set Top Box. A HDHomeRun Dual Tuner will also be used for recording ClearQAM (unencrypted) content. My initial plan is to run Mythbuntu off the 0.22-fixes branch of MythTV, allowing me to pickup the great user interface enhancements and VDPAU support. You may wonder why I chose a video card without HDMI- at the moment my receiver only supports digital audio and has no HDMI Inputs. Further, the NVIDIA 9800GT doesn’t support audio over the HDMI connection in the first place, only the GT220 and newer.

Look for more details coming as I assemble and configure the system. I’d like to compile a site that others can use to help themselves through the trickier parts of Myth config and troubleshooting.

Powered by WordPress