Categories
Miscellany

A tale of two web sites

I’m a frequent shopper at my local big-box home improvement warehouse chains.  I’ve got my pick of them, too — at last count there were 3 Lowes and around 8 Home Depots within 30 minutes drive of my house.  Welcome to the Baltimore-Washington corridor.

I’m also a web surfer.  I like to plan projects at home and then look for the stuff I need online before I actually get in the car.  I’m sure there are many more like me.  And for the longest time, neither of these two retailers seemed to “get” this.  Searching for stuff on their web sites was mostly an exercise in futility.  In most cases, the search results I got back were either incomplete or totally unrelated to what I was looking for.

Lowes has made some improvements to their web site in recent years.  Case in point: recently I was looking for some PVC electrical conduit and fittings.  Both Home Depot and Lowes carry a fairly complete line of PVC conduit manufactured by Carlon.  I went to both retailers’ web sites and searched for “carlon.”  Lowes’ site worked great, returning several pages of relevant results.  Home Depot’s site “helpfully” corrected my search term to “gallon,” and returned several pages of shop-vacs and pressure washers.  Guess where I ended up going?

I guess the moral here is that retailers need to start realizing that their web sites are extensions of their store fronts.  Online catalogs should be easy to search and results should reflect what’s actually on the shelves in the stores.  I’m sure that’s much easier said than done, but ultimately, modern consumers are going to be driven to the stores that have the best web sites.

Disclaimer:  I am a Home Depot shareholder.

Categories
Pool Projects

Chlorine Generator Manifold Repair

I’m in the process of installing a salt-water chlorine generator (model DIG-60 from AutoPilot) for my swimming pool.  As part of this, I need to plumb the salt cell in downstream of my filter.  The cell is part of a big inline manifold which includes a 3lb spring check valve.  The valve’s purpose is to limit the water pressure going through the salt cell, theoretically extending the cell’s life.  Anyhow, as I was preparing to install the manifold, I dropped it (don’t ask) and the check valve broke away from one of its adjoining tees:

Broken AutoPilot Manifold
Broken AutoPilot Manifold

What to do here?  The whole manifold is solvent-welded together, and the tees are attached to proprietary unions.  At first glance there appeared to be no way to fix it other than ordering a replacement manifold, at a cost of over $100.  By contrast, a replacement check valve can be had online for $15-20.  So I decided to think outside the box a bit.  The check valve is made by Flo-Control and is commonly sold as an air check valve for spa blowers.  It has a 1½” socket and a 2″ spigot, meaning one can either attach a 1½” pipe “inside” it, or a 2″ pipe “around” it.  AutoPilot ships it with 2″ tees cemented to either side, which attach to the pool’s plumbing.  My pool has 1½” plumbing, so I would ordinarily need a reducer bushing to attach to the tees on the manifold.  When the manifold broke, the 1½” socket end of the valve was left stuck inside the tee.  Eventually, it occurred to me that if I cut the other tee away from the valve, I could flip the tees around and cement a new valve to the intact ends. The other ends, with the remains of the original valve, would then accommodate my 1½” plumbing without the need for reducer bushings.  It seemed like a great plan, so I pulled out my trusty miter saw and cut the intact tee away from the old valve, leaving me with 3 pieces:

AutoPilot Manifold Parts
AutoPilot Manifold Parts

I then went online to look for a replacement valve, and promptly ran into another problem.  It turns out that this particular valve is sold in a bunch of different spring weights:  .75, 5, 10, and 15 pounds, to name a few.  The version that ships with the AutoPilot has a 3lb spring.  And here’s the problem:  I wasn’t able to find the valve with a 3lb spring anywhere.  It’s not even listed on Flo-Control’s web site.  They’re apparently made special-order for AutoPilot.

Makeshift check valve spring removal tools
Makeshift check valve spring removal tools

Undeterred, I wondered if I could remove the spring from the broken valve and reuse it in a new valve. With the help of a couple of makeshift “spring removal” tools I fashioned out of copper wire, I was able to extract the spring. As a proof-of-concept, I then replaced the spring with the help of some needle-nose pliers.  Encouraged, I went ahead and ordered an identical valve with a .75lb spring.  I chose the model with the lightest spring I could find, figuring it’d be the easiest to get out without damaging the valve.  The valve arrived a few days later, and happily, it was identical to the original valve, other than having a different weight spring and not being broken.  The lighter-weight spring easily came out of the new valve, and with a little effort I was able to insert the 3lb spring.  Turns out direction matters when re-inserting the spring:  it initially wouldn’t seat properly, but when I flipped it around it went right in.  With that, I had a working, non-broken 3lb check valve.  I then cemented the two tees onto either end of the valve, completing the repair:

Repaired AutoPilot Manifold
Repaired AutoPilot Manifold

All that’s left to do is plumb it in and make sure it works.  Assuming it does, my little accident (dropping the manifold) cost me a lot less than I had feared.

Categories
Geeky Stuff

Perl rocks

I’m doing a bit of tidying-up of my online music library for consistency..  editing tags, renaming files, that kind of thing.  My library consists mainly of FLAC files ripped from my CD collection.  My music player of choice on my Ubuntu box is Banshee.  Banshee has an “Edit Metadata” feature which looks very handy on the surface, but it appears to have a bug where it doesn’t actually save the metadata edits back to the file.  It does, however, update the metadata in Banshee’s internal database, so in Banshee, it appears that the changes have “taken”, but when I play the music files elsewhere it becomes apparent that the changes haven’t been saved out to the files.  Of course, I didn’t discover this problem until I had made edits to 250 files or so.  Nothing against Banshee here of course..  it’s free and no warranty was ever implied or expected.  But, I did have some files to fix.

Fortunately, as I mentioned earlier, the edits I made were saved in Banshee’s internal SQLite database.  So all I really needed to do was whip something up to compare the database with the actual tags in the files.  First, I dumped Banshee’s SQLite database to a flat file:

sqlite3 banshee.db 'select * from Tracks'

Then I wrote a quick Perl script that extracted the FLAC tags from each of the files in the database dump and compared them to the corresponding fields in the SQLite table:

#!/usr/bin/perl

use URI::Escape;
use Audio::FLAC::Header;

print "Key\tPath\tFLAC tag\tDB tag\n";
while (<>) {
    chop;
    my %dbTags = ();
    my($path);
    ($path, $dbTags{ARTIST}, $dbTags{ALBUM}, $dbTags{TITLE},
     $dbTags{GENRE}, $dbTags{DATE}) =
        (split(/\|/))[1, 3, 5, 9, 10, 11];
    next unless ($path =~ /^file:\/\//);
    next unless ($path =~ /\.flac$/);
    next if ($path =~ /\/untagged\//);

    $path =~ s/^file:\/\///;
    $path = uri_unescape($path);
    if (! -f $path) {
        print STDERR "Can't find $path\n";
        next;
    }

    my $flac = Audio::FLAC::Header->new($path);
    my $tags = $flac->tags();

    # Strip extra date info..
    $tags->{DATE} = substr($tags->{DATE}, 0, 4);

    for (keys %dbTags) {
        if ($tags->{$_} ne $dbTags{$_}) {
            print "$_\t$path\t$tags->{$_}\t$dbTags{$_}\n";
        }
    }
}

exit 0;

This script outputs a tab-separated file that shows all of the discrepancies, suitable for loading into your spreadsheet of choice.  I only had to make a small number of edits, so I made the changes manually with EasyTag.  But if I had wanted to take this farther, I could have had the Audio::FLAC::Header module actually save the corrections to the files.

Yet another reason to love Perl.