The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Category: Recumbent Bicycling

Cruisin’ the streets

  • Copying Action Camera Video: Now With UUIDs

    Having tired of manually decoding UDEV’s essentially random device names produced for the various USB action cameras and card readers, I put the device UUIDs in /etc/fstab and let the device names fall where they may:

    UUID=B40C6DD40C6D9262	/mnt/video	ntfs	noauto,uid=ed 0 0
    UUID=0FC4-01AB	/mnt/Fly6	vfat	noauto,nodiratime,uid=ed	0	0
    UUID=0000-0001	/mnt/M20	vfat	noauto,nodiratime,uid=ed	0	0
    LABEL=AS30V	/mnt/AS30V	exfat	noauto,nodiratime,uid=ed	0	0
    

    You get those by plugging everything in, running blkid, and sorting out the results.

    The 64 GB MicroSD card from the Sony AS30V camera uses Microsoft’s proprietary exfat file system, which apparently doesn’t associate a UUID/GUID with the entire device, so you must use a partition label. The Official SD Card Formatter doesn’t (let you) set one, so:

    exfatlabel /dev/sdd1 AS30V
    

    It turns out you can include spaces in the partition label, but there’s no way to escape them (that I know of) in /etc/fstab, so being succinct counts for more than being explanatory.

    One could name the partition in the Windows device properties pane, which would make sense if one knew it was necessary while the Token Windows Laptop was booted with the card in place.

    I think this is easier then trying to persuade UDEV to create known device names based on the USB hardware characteristics, because those will depend on which USB card / device / reader I use. I can force the UUIDs to be whatever I want, because they’re just bits in the disk image.

    With all that in place, you plug in All. The. Gadgets. and run the script (as seen below). The general idea is to verify the bulk video drive mounted OK, attempt to mount each memory card and fire off a corresponding rsync copy, wait until they’re all done, tidy the target filenames, then delete all the source files to get ready for the next ride.

    Funneling all three copies to a single USB hard drive probably isn’t the smartest thing, but the overall write ticks along at 18 MB/s, which is Good Enough for my simple needs. If the drive thrashes itself to death, I won’t do it again; I expect it won’t fail until well outside the 1 year limited warranty.

    If any of the rsync copies fail, then nothing gets deleted. I’m a little queasy about automagically deleting files, but it’s really just video with very little value. Should something horrible happen, I’d do the copies by hand, taking great care to not screw up.

    After all, how many pictures like this do we need?

    Ed signalling on Raymond
    Ed signalling on Raymond

    The Bash script as a GitHub Gist:

    UUID=B40C6DD40C6D9262 /mnt/video ntfs noauto,uid=ed 0 0
    UUID=0FC4-01AB /mnt/Fly6 vfat noauto,nodiratime,uid=ed 0 0
    UUID=0000-0001 /mnt/M20 vfat noauto,nodiratime,uid=ed 0 0
    LABEL=AS30V /mnt/AS30V exfat noauto,nodiratime,uid=ed 0 0
    view raw fstab hosted with ❤ by GitHub
    #!/bin/bash
    # This uses too many bashisms for dash
    thisdate=$(date –rfc-3339=date)
    echo Date is $thisdate
    date
    # MicroSD / readers / USB drive defined in fstab
    # … with UUID or PARTID as appropriate
    echo Mounting bulk video drive
    sudo mount /mnt/video
    if [ $? -ne 0 ]; then
    echo '** Cannot mount video storage drive'
    exit
    fi
    # Show starting space available
    df -h /mnt/video
    #– Sony AS30V
    printf "\n— AS30V\n"
    as30v=/mnt/AS30V
    sudo mount $as30v
    if [ $? -eq 0 ]; then
    echo " start AS30V transfer on $as30v"
    mkdir /mnt/video/AS30V/$thisdate
    rsync -ahu –progress –exclude "*THM" $as30v/MP_ROOT/100ANV01/ /mnt/video/AS30V/$thisdate &
    pid1=$!
    echo " PID is $pid1"
    else
    echo " skipping"
    as30v=
    fi
    #– Cycliq Fly6
    printf "\n— Fly6\n"
    fly6=/mnt/Fly6
    sudo mount $fly6
    if [ $? -eq 0 ]; then
    echo " start Fly6 transfer on $fly6"
    rsync -ahu –progress $fly6 /mnt/video &
    pid2=$!
    echo " PID is $pid2"
    else
    echo " skipping"
    fly6=
    fi
    #– SJCAM M20
    printf "\n— M20\n"
    m20=/mnt/M20
    sudo mount $m20
    if [ $? -eq 0 ]; then
    echo " start M20 transfer on $m20"
    mkdir /mnt/video/M20/$thisdate
    # See if any still images exist to avoid error messages
    n=$( ls $m20/DCIM/Photo/* 2> /dev/null | wc -l )
    if [ $n -gt 0 ] ; then
    echo " copy M20 photos first"
    rsync -ahu –progress $m20/DCIM/Photo/ /mnt/video/M20/$thisdate
    fi
    rsync -ahu –progress $m20/DCIM/Movie/ /mnt/video/M20/$thisdate &
    pid3=$!
    echo " PID is $pid3"
    else
    echo " skipping"
    m20=
    fi
    printf "\n—– Waiting for all rsync terminations\n"
    rc=0
    for p in $pid1 $pid2 $pid3 ; do
    wait -n
    rc=$(( rc+$? ))
    echo RC so far: $rc
    done
    date
    if [ $rc -eq 0 ] ; then
    echo '—– Final cleanups'
    echo Fix capitalized extensions
    find /mnt/video -name \*AVI -print0 | xargs -0 rename -v -f 's/AVI/avi/'
    find /mnt/video -name \*MP4 -print0 | xargs -0 rename -v -f 's/MP4/mp4/'
    if [ "$as30v" ]; then
    echo Remove files on $as30v
    rm $as30v/MP_ROOT/100ANV01/*
    sudo umount $as30v
    fi
    if [ "$fly6" ]; then
    echo Remove files on $fly6
    rm -rf $fly6/DCIM/*
    sudo umount $fly6
    fi
    if [ "$m20" ]; then
    echo Remove files on $m20
    rm $m20/DCIM/Movie/* $m20/DCIM/Photo/*
    sudo umount $m20
    fi
    echo '—– Space remaining on video drive'
    df -h /mnt/video
    sudo umount /mnt/video
    echo Done!
    else
    echo Whoopsie! Total RC: $rc
    fi
    view raw savevideo.sh hosted with ❤ by GitHub
  • Rt 376 at Red Oaks Mill: Re-repaving

    For unknown reasons, NYS DOT milled away some of the newly laid asphalt north of Red Oaks Mill:

    Rt 376 Red Oaks Mill - New Pavement Milling
    Rt 376 Red Oaks Mill – New Pavement Milling

    Then laid it down again:

    Rt 376 Red Oaks Mill - New Pavement - 2018-06-14
    Rt 376 Red Oaks Mill – New Pavement – 2018-06-14

    As far as we can tell, there’s absolutely no difference, other than the opportunity for a huge longitudinal crack between the shoulder and the travel lane.

    My guess: the contractor shorted them an inch of asphalt, got caught, and had to do it over again.

    It’s only NYS Bike Route 9, so you can’t expect much in the way of bicycle-friendly design or build quality.

  • Side Mirror Turn Signal

    I hoped this bit of roadside debris would yield a shiny new amber LED and driver:

    Car mirror - shattered housing
    Car mirror – shattered housing

    But, alas, it uses an ordinary WY5W incandescent bulb:

    Car mirror - turn signal
    Car mirror – turn signal

    That whole assembly seems to be the replaceable unit, as the lens is firmly snapped-and-glued to the housing. The white shell used to hold the wires, but those vanished when the collision ripped the mirror off the car.

    After I pried off the shattered lens and extracted the bulb, I found a broken filament.

    Ah, well, now we won’t be riding through plastic shards along the shoulder.

  • Tour Easy Rack: Front Mount Screw

    Long ago, I conjured a front rack mount from an aluminum bar across the seat struts on our Tour Easy recumbents, with a spherical washer soaking up the angular misalignment. The rack on Mary’s bike developed a serious wobble due to a missing screw, which was easy enough to replace:

    Rack mount screw - rear
    Rack mount screw – rear

    From the side:

    Rack mount screw - side
    Rack mount screw – side

    It’s a 2 inch screw sawed down to 1.5 inch, ground to shape, then run through a die to clean up the threads.

    The nylon lock nut over on the left should keep the screw from working its way out of the tapped aluminum bar. On the other paw, a dab of Loctite survived nearly a decade of heavy loads and vibration.

  • Bike Brake Pad Wear

    The rear brake on my bike wasn’t stopping nearly as well as it should, even after cleaning the rim and pads with brake cleaner, so I pulled the shoes and replaced the pads:

    Bike brake pad wear
    Bike brake pad wear

    It’s down a bit beyond the --WEAR--LINE-- indicator, of course.

    New brake shoes on clean rims work exactly like they should!

  • Gamified Cycling

    OK, it’s not as exciting as a Strava KOM:

    Sheriff Speed Meter - 8 mph
    Sheriff Speed Meter – 8 mph

    Apparently folks have been going around the curve in front of the Dutchess County BOCES site at a pretty good clip. I didn’t spot any scars in the grass off the high side, but ya never know.

    We’re at the top of an uphill section and, riding together, we’re not sprinting for town line signs.

  • On Being the Biggest Clown in the Parade

    On the Dutchess Rail Trail, just north of Page Industrial Park:

    Biggest Clown in the Parade - Photo Op - 2018-06-17
    Biggest Clown in the Parade – Photo Op – 2018-06-17

    Ya gotta admire the confidence of anyone manipulating a kilobuck of slippery glass while looking backward over his shoulder. I’ll take a helmet camera any day, if only because it’s really conspicuous.

    He’s leading a group of four riders, all on spendy carbon-fiber bikes:

    Biggest Clown in the Parade - Peloton - 2018-06-17
    Biggest Clown in the Parade – Peloton – 2018-06-17

    Presumably they’re all smiling at the sight of a recumbent towing a trailer of garden tools topped with two bags of just-picked lettuce. I’m definitely the biggest clown in this particular parade!

    I wonder how they would have reacted to a propane tank in the trailer?

    We’re ticking along at 18 mph and, as it turned out, drafting a quintet of upright bikes is surprisingly easy. If I weren’t towing the trailer with Mary just out of sight ahead, I’d have had some fun until they decided they’d had enough.

    It’s good to bring such happiness into the world …