Lazy Part 4

Part 4: Talking to Yahoo! Music Engine

So the remote has been programmed to impersonate a CD player remote, and the computer can detect when it's sending commands. Now I just need to actually do something with the commands.

Good News

When I installed Girder, I found out that it's already got a Yahoo! Music Engine plugin configured. It can handle Play, Pause, Stop, Skip, etc., so my initial goal of skipping Nickelback songs looks to be within easy reach. As a bonus, Girder also has plugins for WinAmp, Windows Media Player, and just about any other software you could be using to control your playlist.

To actually make use of Girder, you will need to visit each event in the included Yahoo! Music Engine GML and make usre it's listening for its events from the remote you just set up. Just visit the event you want to define: and double-click it to set its properties. When you get there, set the Event Device to the remote you just created:

Budget

After my initial investigation, I expected to spend just under $150 and 20 hours to get this done. I spent $143.44, so for once I was under budget. If you already have a universal remote that you like, you really could do this with just the UIRT and Girder ($103.60 with shipping). As far as time, there were two parts of this that went surprisingly smooth: Girder's YME plugin saved me hours of capturing commands, and the IrToWav software made it super easy to program the remote with exactly the right codes for all of my devices. I actually spent only 9 hours on this, and since I already found the parts and vendors, you could get through this exercise in even less time.

Next Steps

At this point, I have achieved my initial goal of being able to control my playlist using the same infrared remote I use for the rest of my stereo equipment. Along the way, some other interesting questions and challenges presented themselves. If I'm feeling particularly ambitious in the future I might plan to pursue one of these:

Changing Stations I might decide after skipping ten tracks in a row that maybe I'm just listening to the wrong station. It would be cool if I could set up a list of favorite channels or playlists and change to them with the remote.

RF Remote Control This setup works great in my living room where I'm already holding an infrared remote control (unless Blake has stolen it). But I have speakers on my back porch too and the IR remote doesn't really cope well with the sliding glass door. I live in Phoenix, so infrared opacity is important, and I'm not willing to change glass. An RF remote would solve this problem and free me from the line-of-sight requirement.

Breakeven Analysis

I know how much time and money I spent on this. I'm willing to ignore the money for now. A vanity website baron such as myself has little time for such material concerns anyway. The real scarce resource is time. I had my faithful assistant clock me while I made round trips to the computer and back to my seat skipping crappy music tracks. 13 seconds per trip, average. Then he clocked me using the remote: 2 seconds. That's a net time savings of 11 seconds per crappy music track.

I don't have data concerning the ratio of music I'll tolerate to music I won't, so we will work from a model. If each song is 3½ minutes long and 3% of them are crappy enough to be skipped, my 11 second advantage breaks down to .001571429 seconds saved per second that I listen to music, or about 5.7 seconds per hour. To look at it another way, I'll be hearing about 17 songs per hour, with a little more than one crappy song every two hours, but the song will only waste 2 seconds of my life, not 13.

If I listen to music for an average 30 minutes a day, it will only take me 191 listening days to break even on my 9 hour investment. I drove the golden spike uniting Yahoo! Music Engine and my remote on March 20, 2006. That means that on September 27, 2006, I will have regained all of the time spent putting this together. This is considerably more favorable than if it had taken 20 hours as I predicted at the beginning. That would have put my breakeven point at May 18, 2007. Still acceptable.

Summary in 10 Words or Less

Not as hard as I expected and totally worth it.

Final Budget: $143.44, 9 hours

Lazy Part 3

Part 3: Talking to the Computer

For my next trick, I'll need an assistant: the USB-UIRT. This is that gadget that's going to receive infrared signals from the remote. I'll also need the Girder software to learn the codes my remote is sending and actually do something with them. For now, I'm just going to be satisfied with proving that my PC is hearing what the remote is saying. Making the software do anything about it is a matter for another day.

I'll only be needing a handful of buttons here. They're all standard play controls and appear on just about any remote.

  • Power (to open or bring focus to the application)
  • Play/Pause
  • Stop
  • Previous Track
  • Next Track
  • Shuffle
  • Repeat

Hardware Installation

Dude. That couldn't have gone much easier. Plug in the UIRT and the Plug and Play dialog finds it. You download the drivers from the USBUIRT site and tell the PnP wizard where to find them. Done.

Software Installation

This was also a cakewalk. Come to think of it, it was much easier than a cakewalk. I've participated in several of those and never walked away with a thing. Here there is no cake, but at least I have something to show for my effort.

Telling Girder About It

Go to File -> Settings, select "Plug-in settings," and check the box next to "USB-UIRT." Restart Girder and you're off & running.

Setting Up Your Remote

Go to Tools -> Add Remote Wizard. Click Next, name the remote, then start programming. It asks you to press any button to make sure it detects a remote at all, then it asks you to press each button that you want to use on the remote. After you finish this, Girder will be able to get signals from your remote.

All of this only took me an hour, and most of that was poking around trying to figure out what else Girder could be used for. I went ahead and picked buttons to use for song rating too. If everything goes smooth, I'll not only be able to skip sucky tracks, but ban them for good measure. Next, I'm going to make Girder listen for the signals from my remote.

Budget update: $143.44, 8 hours.

Lazy Part 2

Part 2: Programming the Remote

I got the remote control in the mail today. It's a beautiful, silver OneForAll 8910.

Just to get things warmed up, I found the code for my TV and entered it. I got that up and running right away. Early win. Nice.

Uncharted Territory

I tried out the IR.exe and Remote Master software. It turns out there's one more handy piece of software, IrToWav. I'll explain that in a minute.

In brief, Remote Master creates the key mapping for the remote (which button should send what signal), IR.exe converts that map to a binary file the remote can understand, and IrToWav generates a .wav file that can load the upgrade to the remote.

How slick is that? The remote has a modem in it for one-way uploads of information. If you call OneForAll technical support, they can have you hold your remote up to the phone and load new devices and protocols. If you use IrToWav, you can do the same thing, but with a custom program you created. You don't even need the JP-1 cable to write to this remote.

There's a great tutorial on all of this on the hifi-remote site, and another good one here. The hifi-remote forums are also a gold mine of great information. If you just take two hours to read the sticky posts in the beginner forums and search for your particular remote, you'll be a beginner no longer.

To control the music player on my PC, I just selected a common universal code for a CD player (for some reason, code 0157 is used for 16 different CD players in my remote's catalog, but not for mine). I figure choosing a common code means there's a low probability that its carrier signal will be out of range for my IR receiver or some other nonsense. I plan to use these play controls to manipulate the Music Engine on my screen. I must say that this step of the process went smoother than I could have imagined. The remote is already controlling my whole home entertainment system (except PC), and I had a super-easy graphical interface to remap all of the buttons.

I didn't need the $14 JP-1 Cable to do this, but since I already ordered it, I'm adding it to the budget. I'll use it later when I'm in a nerdy mood.

Budget update: $39.84, 7 hours

A Different Kind of Lazy

All is not as it should be with the world. When I'm on my sofa listening to Launchcast, I'm subjected to Nickelback songs. That's no way to live, and I'm willing to go to the very gates of hell and back to avoid walking 15 feet to hit the "Skip" button every time it happens.

The problem

Back when you had a TV that looked like this:

if you didn't like what was on, you just had to wait it out or get up. Wiser minds than mine realized early that this situation was untennable.

In June of 1956, the first consumer wireless remote control entered the home. It may be just coincidence that this came two months after As the World Turns was introduced on CBS.

Fastforward 50 years.

Now, an increasing amount of my entertainment content comes from my PC, not an audio component sitting with my television. When I'm listening to Yahoo Music Engine and their Launchcast station tries to pawn some Nickelback off on me, I have to get up and skip the track by hand.

This shall not stand.

My Goal

I'm going to use the same infrared remote control I use for my home entertainment system to interact with the Yahoo Music Engine on my PC. It won't be easy, and the fact is, I'll spend more time putting this system together than I would have spent walking over to the computer to skip Nickelback songs over the next year.

If you don't get why I would do this, stop reading here because it's not going to get any better.

Along the way I'll keep track of how much time and money I'm spending to get this done. At the end, I'll have a parts list and step-by-step plans to make this dream a reality in your own home.

The parts list so far

  • USB-UIRT with shipping, $53.61 from Promixis This is the hardware that is going to receive infrared signals from the remote and set events in motion.
  • Girder 4, $49.99 from Promixis This is the Windows automation software that's going to listen for the remote and take all the right actions. I have never worked with it before, so I don't know what techniques will be available for interacting with the target application. There seems to be some support in there for locating windows by title and such (maybe I can just wire it up to automatically press the "Skip" button if "Nickelback" appears in the title bar), and if mouse spoofing doesn't pan out, YME has a developer API that might be useful. We'll see.
  • One for All URC 8910 Universal Remote Control and 4 AAA batteries, $25.85 from Amazon (optional) This will command my whole array of audio/video equipment, as well as the PC. If you have any universal remote, it will work. I got this one because my old "universal" remote couldn't control my DVD player, but this one's got that sweet JP-1 port so I can program it with custom codes. Now there's no such thing as an infrared device I can't control.
  • JP-1 Cable 13.99 from DIY Gadget (optional) This is used to program the remote control. I could get by without this if I used the built-in (and super cool) modem updater, but... it's a gadget. Besides, if $14 is going to break the bank, maybe you should consider another hobby.
  • IR.exe free download from Hi-Fi Remote (optional) This will be used to write data to the remote over the JP-1 cable. You can skip this if you're not going to be buying the JP-1 cable or getting that picky about your key mapping.
  • Remote Master free download from Hi-Fi Remote (optional) This works in conjunction with IR.exe and provides a graphical interface to remap keys on the remote. Naturally, you can skip this part if you're going to skip the previous two items.
  • IrToWav free download from Hi-Fi Remote (optional) This can program an equipped OneForAll remote (like mine) without the JP-1 cable. I'm still going with the JP-1 cable because I want to be able to read programs from the remote as well as write them.

Cost

I expect to spend a little less than $150 (including shipping). I have spent 5 hours finding options and selecting all of these purchases. I expect I'll spend about 20 hours by the time this is over. I will add items to the total expenses as they arrive.

Budget update: $0.00, 5 hours

A Holiday Message of Meat

orHow the Messenger Bag SavedAndy from the parking nightmare at Whole Foods onChristmasEve

Our holiday tale begins at my house, nestled among the quaint & rustic trailer parks of north Phoenix. A beef tenderloin roast awaits at Whole Foods, a mere 10 miles away. The journey will be perilous, but the reward will be a holiday message of meat, delivered in a genuine Timbuk2 messenger bag.

Continuing a long tradition, I get lost in Paradise Valley. Having lived in the Phoenix area for more than five years now, and bicycled through Paradise Valley more times than I can count, my inability to successfully navigate the area stands as a testament to the warped sense of humor shared by the town planners. Either that or I'm a total dumbass. Either way, I'm not going to let the eccentricities of PV's geography keep my message of meat from reaching the holiday table. Here's a sample of the kind of fun I'm talking about:

I eventually give up on the messy side streets of PV and initiate a Banzai Run. The logic of a Banzai run goes like this: If I keep backtracking on these side streets, I'll eventually dehydrate and starve to death. I'll lose so much weight that even spandex won't cling to my emaciated bones. I'll be remembered only as a starved, naked corpse with a kick-ass messenger bag. My message of meat will go undelivered, and Christmas will forever be remembered as a tragic day in my family. But I'm not going to let that happen to me; oh, no. I'm gonna' point my bike down the busiest road I can find. One that I know doesn't dead end at a golf course or change directions at a community library. I'm going to ride Tatum. The trick will be not getting hit by all those SUVs. So before I turn onto Tatum, I'll take a deep breath and yell "BANZAI!!!!" Then I'll accelerate as close to the speed of the cars as I can (about 29 mph on this day) and at least if they hit me it'll only be with a closing speed of 25 mph or so. Best outcome: I get out of PV alive. Worst outcome: I die, but very quickly instead of withering away at the corner of Mockingbird Lane and Mockingbird Lane. I always use a Banzai Run to get out of PV.

Finally, I meet the meat. I ask the butcher for an ice pack, but they don't have any nifty, self-contained ones; just crushed ice. Not a dry cold pack, but stuff that turns wet at 33°F. The ride home has to be quick.

35 min. and one Banzai Run along Cactus Road later, I arrive home, the meaty cargo safely delivered to its destination. The messenger bag performed admirably, showing a much greater load-bearing capacity in the face of this beefy payload than my shoulders (which are still a touch sore).

The colors of the messenger bag tell the story: Brown for the deep chestnut of a perfectly roasted tenderloin, red for the garnet hue of the zinfandel that complemented its meaty succulence, and black for everything that happened after the fifth bottle of zinfandel (I'm told it was memorable).

What You Missed

What You Missed By Slacking on Sunday

0 miles

Est. Temp: 85° F

05:00: It's still dark. Trucks are parked near Pima & Pinnacle Peak. Sunglasses are tucked in helmet vents (just like they do it in Europe), and the ride is underway. Spirits are high and the feeling of invincibility is palpable.

An easy warm-up gets things started:

6 miles

Est. Temp: 86° F

After a quick 700 foot climb, it's time to get down to some cycling. Having reached the summit after only 6 miles, Jayson and Andy figure the rest is really just academic.

7 miles, 4384 ft.

Est. Temp: 86° F

Andy (maybe a touch drowsy from the early hour and lack of breakfast) hits a bump so hard his water bottle falls out and his GPS shuts down.

20 miles

Est. Temp: 89° F

Jayson says "Let's stop at that gas station, I gotta’ take a leak." Buys more Gatorade, does not take leak. Warm, yellow Gatorade in clear water bottle taunts Jayson's bladder for the next few hours.

29 miles

Est. Temp: 90° F

Realizing neither rider had looked at a map, Andy and Jayson take turns trying to find a better road to ride on than Shea. Estimated distance added: 1 mi.

32 miles

Est. Temp: 90° F

An anonymous woman with a friendly dog named Cody decides she's hot, borrows Jayson's cell phone to call for a ride. Jayson will later comment on the surprising durability of said woman's skin care product(s) and/or secretions when applied to surfaces of phone. Good deed done and cell phone greased, both riders set off in search of Sweetwater, the road Andy knows goes to Cave Creek Road eventually.

35 miles

Est. Temp: 90° F

After reminding Andy that Sweetwater does not cross the 101, Jayson engineers a way back to Sweetwater via Raintree. Estimated distance added: 2 mi.

42 miles

Est. Temp: 91° F

Andy remembers something about having to go around PV Mall, but has not, to date, executed the navigational maneuver successfully. Jayson withholds commentary regarding Andy's navigational skills and general level of preparedness. A couple of backtracking loops see the intrepid explorers through to Sweetwater once again. Estimated distance added: 1 mi.

59 miles

Est. Temp: 94° F

The climb back to the trucks has begun. Andy asks Jayson "Is it hot out here or is it just me?"

62 miles

Est. Temp: 204° F

The climb continues. Andy asks Jayson "Is it cold out here or is it just me," implores hypothalamus to regulate temperature for just a few more miles. Hypothalamus reminds him it wasn't his limbic system's idea to get out of bed at 04:00, and tells him to pack sand.

67 miles

Est. Temp: 95° F

Back at the trucks. After a liter of cold water and a pint of iced coffee, Andy and his hypothalamus are on speaking terms again. Jayson withholds commentary on Andy's tendency to converse with his autonomic nervous system.

Now that you've seen the kind of fun you missed, you'll think twice before skippin' the ol' mornin' ride.