19 November 2009

Luxury!

On Tuesday night,Autostart AS-2775 I finished installing a remote starter on my Cutlass Ciera. The car has power locks and trunk release, so I was looking forward to having the remote entry as much as the remote start.

I bought an Autostart AS-2775 on eBay for $51 (with a free Harbor Freight DMM, which turned out to be fairly nice). As it turns out, most of the remote starter brands are owned by Directed Electronics now, so it probably doesn't matter what brand it is. But it did come with very well-written and thorough installation and user manuals.

Armed with my factory service manual, I started by tracking down all the necessary wires. This wasn't too hard with the factory manual, but it took quite a while to remove all the necessary dash and kick panels, as well as find good locations to tap into each wire. After finding all the locations to tap, I stripped an inch of insulation from each wire, soldered on the appropriate wire from the remote starter harness, and taped it up with Scotch Super 33.

One problem I ran into is that the remote starter had only negative triggers (maximum 500 mA to ground) for unlock, lock, and trunk. My car uses positive triggers for each. So I ended up converting polarity with three relays.

relays

I also installed the included hood pin, which disables the remote starter when the hood is open (to prevent Nancy from sucking me into the serpentine belt with the remote). That turned out to be the only wire that needed to go through the firewall, and I used an existing grommet.

After getting everything properly secured behind the dash, I programmed and tested the remote starter, and put everything back together. It's been working great so far, and I can even start it from across campus. Plus, I get a kick out of the second-lock horn confirmation. Chicks dig it.

Anyway, Josh's hints for a successful remote starter install:
  • Budget two days for installation. You'll probably run into snags.
  • Get a factory service manual for your car. It's invaluable for wiring locations, connector pin-outs, drawings of connector locations, and instructions for taking the dash apart without breaking everything.
  • Print out the full installation manual for the remote starter. The printed installation guide that came with mine was a quick-start guide. I found a PDF of the full manual on the manufacturer's website, and it was very helpful.
  • Check whether you need positive or negative triggers for things like door locks, trunk release, horn, etc. Either buy a remote starter with the correct outputs, or round up some extra relays.
  • Take the time to do it right. Solder connections, use good electrical tape or heat-shrink tubing where possible, zip tie the wiring harness to keep it away from stuff that moves or is sharp. You'll end up making enough other compromises that you won't want to feel lousy about cutting corners elsewhere.
  • Don't do something stupid like bypassing the hood pin. Chances are I'll buy your crappy car some day and lose my fingers in the cooling fan.
  • Vacuum the floor of your car before you start crawling around on it.

Labels: ,

02 September 2009

Rube Goldberg thermostatic fan

This could probably be done more elegantly...

In my crontab:

0 * * * * if [ `wget -q -O - http://www.weather.gov/xml/current_obs/KCMX.xml | xpath "/current_observation/temp_f/text()" 2>/dev/null | xargs printf "%1.0f"` -gt 70 ]; then /usr/local/bin/heyu fon B1; fi
10 * * * * /usr/local/bin/heyu foff B1


Basically, if it's greater than 70° F outside, turn on the X10 circuit for my upstairs fan and run for 10 minutes each hour. I give myself bonus points for including XML (which makes it an Enterprise Solution).

Labels: , ,

22 May 2009

Why Ultra 10s Suck More

Here's a blast from the past: A rant from 2000 on crappy old Sun workstations.

U10 vs PC
Yep, you can tell I've worked on one too many Ultra 10s in the past few years.

Why PCs SuckWhy Ultra 10s Suck More
  • one-piece sheet metal cover that is difficult to work with
  • one-piece sheet metal cover that is difficult to work with and is also installed upside-down
  • IDE
  • IDE with no DMA
  • PCI slots that don't line up
  • PCI slots that don't line up on an upside-down riser, working against gravity
  • unreliable floppy drive
  • unreliable floppy drive with the activity LED covered
  • low-quality cooling fan
  • low-quality cooling fan with proprietary connector that can only be purchased as a part of a larger assembly
  • PC RAM sucks
  • Ultra 10 RAM sucks, but costs more
Lest we look back and remember Sun workstations fondly...

Labels: , ,

03 December 2008

Fun with web forms

I occasionally convert web form methods from POST to GET (the Firefox Web Developer Add-on makes this simple) for purposes of bookmarking the resulting page. Sometimes it turns out to be more entertaining than expected.

While bookmarking a USPS detailed tracking result, looking at the URL made me realize that the bookmark wouldn't actually do anything useful. Nearly all the text on the page was the result of long strings passed as parameters to the CGI script. While this works, it's not exactly the nicest way to do it, and hiding behind the POST method doesn't make it any better. But it does make it entertaining, as you can change the tracking results to your heart's content.

One other notable web form gaffe was one I discovered a few years ago on the State Farm website. I wanted to email my State Farm representative, but didn't have her email address. On a lark, I took a look her "contact me" web form link on the State Farm website, and sure enough, her encoded email address was being passed as a parameter. Then I got curious, and tried passing other addresses to their web form. Sure enough, no input validation was being done, and their web form was effectively an open mail relay. I'm not sure if it's still like this, but it would be a fun hack to whip up a Perl SMTP server to take advantage of their generous relaying service.

So, in that spirit, click to view this weblog post on the USPS tracking results page.

Labels: ,

14 November 2008

Good news

Bad news sells. Newspapers, NPR, TV shows make the outlook seem bleak. Depressing.

Slashdot released an article tagging feature a few months ago, which causes user-generated tags to show up below the article summaries on the main page. The tags typically give you an idea of the sentiment surrounding the article. Some of the tags are positive.

Say you wanted to only focus on good news that comes across Slashdot. You could just browse the tags you consider positive, happy, humorous. Here are some I like: aboutdamntime, abouttime, funny, and especially suddenoutbreakofcommonsense. Also check out the entire list of recent tags.

Enjoy your good news.

Labels:

25 March 2008

Aerial imagery on Linux

Frustrated by low-quality aerial photography on the free web-based mapping services (like Google Maps and TerraServer), I set out to find free sources of the USGS data itself. It comes from a government agency, so it should be simple for us taxpayers to find, right?

After much searching, I found some great resources at Michigan's Center for Geographic Information and the Michigan DNR Aerial Imagery Archive. A relatively complete listing of resources for other states can be found at lgalvin's site.

To use the Michigan CGI data, here's what I did:
  1. Select a county from the County Geographic Extent page.
  2. On the next page, select the aerial imagery you want to use. For Houghton county, I wanted the Digital Orthophoto Quads - 2005 series.
  3. Select and download a quadrangle. These are typically compressed in standard zip format.
  4. Unpack the file using the unzip command (this works even though the files are self-extracting Windows executables).
  5. Download and install FWTools for Linux.
  6. Convert the file to TIFF by running something like:
    gdal_translate LAURIUM_NW.ecw LAURIUM_NW.tiff
For the Michigan DNR data, I did this:
  1. Select the 1998 series data from the Aerial Imagery Archive page.
  2. Select a county of interest, and then a quadrangle.
  3. Click on the map of the quadrangle to download the compressed image file.
  4. Download and unpack MrSID Decode for Linux.
  5. Convert the file to TIFF:
    mrsidgeodecode_linux -i laurium_nw.sid -o laurium_nw.tiff
Either way, you'll now have a high-resolution TIFF that can be used in any number of image manipulation programs. I found the CGI imagery to be the most detailed, and far better than web-based mapping services.

Labels: , ,

01 November 2007

Extracting audio from Flash video

I started watching Cory Doctorow's talk at Google on YouTube tonight. I quickly realized that I'd rather listen to this on my MP3 player, since the video isn't very interesting. Here's how I extracted just the audio from the YouTube video.
  1. Download the Flash video using something like the Firefox plugin UnPlug.
  2. Use ffmpeg to extract the audio:
    ffmpeg -i get_video.flv -vn -acodec copy just_the_audio.mp3
The audio in this Flash video happened to be in MP3 format (I'm guessing most are), which meant that I didn't have to re-encode it to use on my MP3 player. If re-encoding is necessary, I can specify -acodec mp3 or -acodec vorbis, for example.

Labels:

06 October 2007

Home automation progress

Today I got all of the home automation hardware working together. I moved the Soekris single-board computer to the basement, wired up a temporary adapter for the second serial port, and connected a Wi-Fi bridge. Earlier this week I built OWFS for the Soekris, and it works great so far. I can now control my boiler from anywhere, though I have no real control code written yet.

I also added a small beeper to one of the relay outputs, just because I had it lying around, and thought maybe it might be useful to audibly signal different conditions (boiler automatic on/off, boiler manual on/off, etc.).

Since I don't have a land phone line, I've been able to use the phone wiring to connect 1-Wire temperature sensors in telephone jack locations. I'd still like a sensor outside, and one on the second floor (the single second-floor jack I'm using for DSL), but right now I have sensors in the three easiest locations. A simple script shows the current status of my 1-Wire network:

1wire@igor:~$ /opt/igor/bin/montest

Temperature (basement) : 66.88 F
Temperature (garage) : 58.21 F
Temperature (living room): 64.40 F

Relay 1 (boiler): OFF
Relay 2 : OFF
Relay 3 : OFF
Relay 4 (bell) : OFF

1wire@igor:~$

(Yeah, I'm considering calling the project "igor", since it lives in my basement and does what I tell it.)

Labels:

21 September 2007

An interesting failure mode

This morning, I came to work to find an server dying a not-so-slow death. This machine in question serves as a firewall, filtering bridge, name server, and DHCP server for several networks in the Computer and Network System Administration (CNSA) program.

The CNSA program doesn't have any money right now, so they get machines that have been rotated out of normal production use. The ailing server was once a part of an ECE cluster, and is a Pentium 4 in a bargain-bin 1U rack case.

One of the joys of "inexpensive" (okay, cheap) 1U rack cases is inexpensive (cheap), tiny cooling fans. These fans, with blades around one inch in diameter, must spin fast and hard to move enough air to cool the CPU, disks, power supply, and anything else in the case that consumes power. When they fail, they do so catastrophically.

Log reports clued me into the problem: the disks were failing. I went down to the ad-hoc CNSA server room, and was welcomed by a loud buzzing. I first looked at the console—yep, one of the RAID-1 members was dead—and shut down the machine. I pulled it from the rack and powered it back on with the cover removed. It sounded like an old mechanical fire alarm buzzer, and shook like a concrete vibrator.

I found the offending fan, unplugged it (hrmph, there are plenty more in there), and powered it back up with a new disk in place of the failed one. And we all lived happily ever—hang on a second, what's this? The second disk is failing now too?

After a few moments of head-scratching, I formulated a theory. It goes like this: the fan failed in a way that caused vibration with an amplitude great enough to either corrupt file systems (disk heads not tracking properly) or actually crash the disk heads into the platters. Headline: FAN-OF-DEATH KILL DISKS, SERVER, AREA SYSTEM ADMINISTRATOR. Anyway, I think my theory is more likely than two disks failing simultaneously after a year or so of operation.

So, today's lesson is all about unexpected failure modes. And the surprising effect of a catastrophic cooling fan failure. Happy computing!

Labels: ,

18 September 2007

Gaah, finally!

Small victory, yes, but at least it's something.

After defeating a USB hub that doesn't like the DS9490R, poorly-built OWFS RPMs (which won't build as non-root), and the deep mysteries of external power (okay, that was my fault), I now have a 1-Wire network, featuring a somewhat-functional 4-channel relay! Woo!

Whew, had to take a break there. Anyway, this is the first step in many steps to automating my home steam boiler control. The programmable thermostat that came with the house, in addition to not being designed for steam radiant heat (and, thus, a gas-waster), doesn't know my daily-changing schedule. I'm planning to use a 1-Wire network, along with a web user interface, to make my home heating work better this winter.

Labels:

28 July 2007

Web fitness tracking sites hate Magellan

When I started bicycling a week or so ago, I wanted to use a site like MotionBased to track my rides. MotionBased is owned by Garmin, so it's not a surprise that it doesn't handle Magellan's MapSend track format natively. Fine, no problem, I'll convert to GPX first and then upload my track.

MotionBased managed to mangle horribly each track that I uploaded. I verified that the GPX files were correct, but still, hate from MotionBased. Meh.

So, I searched for an alternative site. All of them favor or support only Garmin. Grumpy as I am, I said, "Fine. I'll come up with my own thing." Here's what I'm using to generate the maps on this weblog.

GPS Visualizer is a very powerful site for handling GPS data. I started using the map form to generate PNGs for my posts, and was happy with the result. The problem was remembering the options I used each time.

I rooted through the web form, and came up with a URL that would give me the same results each time.

http://www.gpsvisualizer.com/map?output&format=png&width=400&height=auto&margin=40&units=us&bg_map=demis_usa&bg_opacity=70&connect_segments=1&trk_name=0&trk_colorize=speed&remote_data=http://homemachine.feep.org/~josh/gps/biking/20070728.trk

Since I was using GPSBabel to acquire the track from my GPS device, I thought that it was probably the time to put everything in a script.

I'll spare you the entire script, but the important parts follow.

Acquiring the track, putting it in a web-accessible location so that GPS Visualizer can load it up:

gpsbabel -t -i magellan,baud=19200 -f /dev/ttyUSB0 \
-o mapsend -F ~/public_html/gps/biking/20070728.trk

Generating a PNG map using GPS Visualizer:

wget -q -r -l1 -nd -np -A.png --user-agent="" \
"http://www.gpsvisualizer.com/map?output&format=png&width=400&height=auto&margin=40&units=us&bg_map=demis_usa&bg_opacity=70&connect_segments=1&trk_name=0&trk_colorize=speed&remote_data=http://homemachine.feep.org/~josh/gps/biking/20070827.trk"

I then take the resulting PNG in the current directory and upload it to the web server.

Of course, the script does more things, like date handling and error checking, but the snippets above are the useful parts. And now I can avoid buying a new fitness GPS device. Maybe.

Labels: ,

09 March 2007

Karma and Klein bottles

Yesterday at lunch in the Dow atrium, James, Nancy, and I were talking about Cliff Stoll and Klein bottles (in my opinion, the most interesting single-sided surface available for purchase on the Internet). On my way to the garbage can, I passed the "free books" table, and to my surprise, one of the two books was Intuitive Concepts in Elementary Topology, by by B.H. Arnold. And sure enough, on the back of the book was this picture of...a Klein bottle.

So, by a stroke of fortune, I now own a textbook with a picture of a Klein bottle on the back, and a paragraph or two dedicated to an explanation. Unfortunately, I think I've just burned up all my good karma for a while. So long, lottery.

Labels: