Two Possibilities

January 26, 2011

Homebrew Temperature Controller

Filed under: Projects,Technology — Eric Friedrich @ 4:19 pm
LED Screen

Finished Product

Several months ago I heard some interviews with expert homebrewers advocating for better control of beer fermentation temperatures. The yeast used to ferment beer (producing alcohol and carbonation from sugars), is most effective in a relatively small temperature range. Above that range you may get off-flavors, while below it the beer may not fully ferment. The temperature in my apartments fluctuates quite widely, especially in the winter. We have a programmable thermostat in the apartment to keep it between 60 and 67 degrees, depending on time of day. Most yeasts prefer the 68-72 degree range, disliking temperatures down at 60 degrees. I needed some type of heater to warm my beer up and keep it at a constant temperature. As an added bonus, this project might be able to do double duty as a temperature controller for a sous vide water bath, but that’s another post. You can see the Temperature Controller in the photo to the right. A display shows current temperature of the sensor and what the set point is. The set point is adjusted with a potentiometer knob on the bottom of the box (not visible because of the lighting, but to the left of where the wires enter on the bottom). The “0″ on the bottom right of the display indicates that the relay is currently switched off. When the temperature drops enough, the relay switches on and the display shows a “1″ in that position. You can find links to the source code, schematic, board layout file, and parts list at the bottom of the post. Since there is no good licensing scheme for open sourcing hardware designs, if you use my board layout please at least give me credit. (more…)

July 24, 2010

Backing Up Purchased Music

Filed under: Technology — Eric Friedrich @ 3:15 pm

This is one post in the continuing saga of my challenges of backing up fairly important personal data. Over the years I’ve accumulated a good collection of music. Much of it comes from ripped CDs that I own and can easily recover if the digital files are lost. The rest of my music is not as easily restored, being purchased from Amazon, iTunes, and eMusic. I already regularly backup important files using an rsync job run out of a daily crontab. I’d like to expand the cronjob to also backup my music as well.

To complicate matters, I don’t want all of my music backed up, just the purchased music. I have been good about using the Comments field in the ID3 tag to record the source of the music, so I wrote a short script (my first attempt at Python) to filter on that. The python script creates a new directory tree of symbolic links which are then followed by the rsync command to backup the full file.

(more…)

July 6, 2010

Are Telephone Numbers Still Useful?

Filed under: Technology — Eric Friedrich @ 8:44 pm

This post was inspired by the Globe and Mail article linked below and a lecture given by one of my computer science professors (David Cheriton) on the theory behind directories and naming.

Telephone numbers have been used since the late 1800s as a way to make connecting phone calls easier for human operators. Eventually, rotary dialing and touch tones grew into the new world of automated call switching. Today, telephone numbers have a variety of purposes. They are used for everything from caller ID to locating the source of emergency 911 calls.

The history of telephone numbers is quite interesting on its own, saying much about the evolution of the telephone in the American household over the past 150 years. Wikipedia has a great history. Telephone numbers are most commonly used as the method for dialing a telephone call, or in abstractly, signaling the destination of your call. Yet, they also have many other uses that don’t immediately come to mind. For landline telephones, the area code and exchange indicate the geographic area of the number’s owner. With the emergence of cellphones this has become somewhat less reliable. New techniques such as aGPS is needed to locate a mobile phone. As mentioned before, determining the exact location of a calling phone, either through caller ID or aGPS, is incredibly important to the success of 911 and emergency responders. Informally, the area code has historically given a clue to the residence of a number. A Seinfeld episode even found Elaine rejected by a potential date for lacking the proper New York City area code. Finally, a phone number number can inform you of any long-distance charges (or 1-900 charges if you are into that type of thing) associated with a call.

(more…)

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

Personal Backup Strategy

Filed under: Technology — Eric Friedrich @ 2:33 pm

Like most, I have an increasingly large footprint of electronic data being stored on my computers. Some of the data is very important (financial records and those Jessica Biel photos), while the rest of it is somewhat less critical. Knowing the risks of only keeping a single copy of things, I’ve been working on a backup solution that is simple, yet also meets all my needs.

Requirements

  1. Dead easy and simple to use. I don’t want to have to think about this every day or fix it constantly when it breaks.
  2. Can encrypt a portion of the data, mostly my old financial records.
  3. Off-site storage is a must. If my apartment is broken into or burns down, I’d like to have something left.
  4. Capacity. This one is a little trickier. I have about 2GB of financial stuff, which is growing pretty slowly. I also have about 10GB of personal files from college and life that I would like to keep around. Then there is my media that I’ve bought (music and videos). Because of the licensing restrictions, I would not be able to download again if lost, so I need to keep my own backups. Finally, there are about 20GB of photographs that I’ve taken. I haven’t quite figured out how to handle these yet.

The Idea

The backup solution I’ve come up with right now is three-fold, but does have a few shortcomings. First, I use a Infrant (now Netgear) ReadyNAS NV w/ 1.2TB of HD space in a RAID5 configuration. This is the primary storage for all my data. The RAID 5 offers some level of redundancy against single disk failure (but not really against anything else). All of the important data mentioned above is copied every night from the ReadyNAS to a USB hard drive sitting next to it. this is my main backup should anything go wrong. Finally is the off-site backup. Using rsync + duplicity, I have setup a cronjob that runs every night and backs up the most important files to a webhost. This way, if anything terrible happens, at least I’ll be able to remind myself how much I paid in taxes last year.

Because of the cost of storage, I would rather not pay for the monthly cost of storing all my photos and music somewhere, but that may change as I compare some of the cloud/backup providers.

Update (7/10/2010): The crontab entry in use is 01 02 * * * /usr/local/bin/dreamhost_backup.sh

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.

Older Posts »

Powered by WordPress