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.

Tag: Improvements

Making the world a better place, one piece at a time

  • Pedal Spindle Wrench Flat Tweakage

    A new-old-stock pair of pedals for Mary’s bike had wrench flats just slightly too narrow for my 15 mm wrench:

    Titanium pedal spindle - as built
    Titanium pedal spindle – as built

    Well, that’s easy to fix:

    Titanium pedal spindle - filed to flats
    Titanium pedal spindle – filed to flats

    For reasons lost in the mists of time, those are titanium spindles. They file just like steel; I’m not fussy.

  • Monthly Science: Weight

    Progress is our most important product:

    Weight Chart 2019-04 - Ed
    Weight Chart 2019-04 – Ed

    Now that we’ve begun bicycling more regularly, Winter Bloat is transmogrifying into thigh muscle.

    The hills around here become noticeably steeper during winter; we attribute the additional elevation to frost heaves …

  • Hiatus

    We’ll be tackling several long-delayed household projects during the next month. As a consequence, I won’t be doing my usual techie tinkering and will post shop notes only occasionally.

    There’s not much to say about scraping, priming, and repainting, other than that it’s an ugly job which must get done!

    Turkey on patio rail
    Turkey on patio rail

    If only we could train the turkeys to scrape the rail …

  • Xiaomi Dafang Hacks: Hostname for OSD and Filename

    The config/hostname.conf file (found under /system/sdcard/when the camera is running) file defines the camera’s name:

    Cam4

    That file overrides the contents of the usual etc/hostname.conf file, somewhat to my surprise, which remains the default Ingenic-uc1_1.

    The bin/hostname utility returns the hostname:

    [root@Cam4 ~]# which hostname
    /bin/hostname
    [root@Cam4 ~]# hostname
    Cam4

    You can automagically get the hostname in the on-screen display by modifying the OSD formatting variable in config/osd.conf:

    OSD="$(/bin/hostname) %Y-%m-%d %H:%M:%S"

    Which works because the main OSD script sources the config file to set the variable:

    Xiaomi Dafang - 15-04-2019_13.26.18
    Xiaomi Dafang – 15-04-2019_13.26.18

    It’s also helpful (at least for my purposes) to add the hostname to the image filenames. A one-line tweak in the scripts/detectionOn.sh script does the trick:

    snapshot_filename=$(/bin/hostname)_$(date "$snapshot_pattern")

    Which produces names along these lines:

    -rwxr-xr-x  1 ed   root 246K Apr 23  2019 Cam4_2019-04-23_17.51.02.jpg*
    

    Having source code makes simple changes like this … simple!

  • Fluorescent Ballast Caps: FAIL

    After converting another fluorescent shoplight into an LED fixture, I tested its capacitors:

    Fluorescent ballast capacitors - one failed
    Fluorescent ballast capacitors – one failed

    The ESR02 reports one as a 4.8 µF capacitor, the other as a “defective part” with a 4 kΩ resistance. Having a cap fail by turning into a resistor is surprising; I’m more surprised it didn’t simply burn up.

    They’re visually indistinguishable, of course.

  • Samsung EVO Pro 32 GB MicroSD Cards

    Installing the Xiaomi Dafang Hacks firmware requires an MicroSD card in each camera and, my previous stock having run low, four more just arrived:

    Samsung EVO Plus - 32 GB MicroSD
    Samsung EVO Plus – 32 GB MicroSD

    Prices have collapsed to the point where known-good (all four passed f3probe testing) cards direct from Samsung (as opposed to Amazon’s “commingled inventory” counterfeit situation) now cost $12-ish each with free shipping.

    After I finish fiddling with the first camera, I’ll copy its card onto these four, unique-ify the IP addresses / hostnames /suchlike, and bring ’em all online.

  • Xiaomi Dafang Hacks: Motion Detection

    Given a camera running Xiaomi Dafang Hacks software, you can set up motion-triggered image capture and save the images either locally or on an FTP server. The latter makes sense, as it automatically plunks the images where they’re more generally available.

    Define the FTP server parameters in config/motion.conf:

    # Configure FTP snapshots and videos
    ftp_snapshot=true
    ftp_video=false
    ftp_video_duration=10
    ftp_host="192.168.1.10"
    ftp_port=21
    ftp_username="ftp-user-id"
    ftp_password="secret-password"
    ftp_stills_dir="Cam4"
    ftp_videos_dir="Cam4"

    The FTP server should have the Cam4 directory in place and shared for read-write access before attempting to plunk files therein. Ahem.

    The camera’s Services menu leads to the motion configuration page:

    Xiaomi Dafang - Motion Settings page
    Xiaomi Dafang – Motion Settings page

    Limiting the detection region to the lower-left corner cuts out all the waving-in-the-breeze foliage in the yard, while covering the driveway. High sensitivity detects squirrel-sized objects in the foreground, although your mileage will certainly differ.

    The camera seems rate-limited at 5 s/image, which may come from FTP transfer overhead; I don’t know if the code includes a built-in delay or if it just works like that. The NAS drive requires upwards of 7 s to spin up if it hasn’t been used for a while, but afterwards the transfers don’t take that long.

    Mounting the NAS drive’s CIFS shared directory from my desktop PC works as before:

    sudo mount -v -o rw,credentials=/root/.nas-id,vers=1.0,uid=ed -t cifs //192.168.1.10/Cam4 /mnt/part

    Then view / edit / delete images as needed:

    Xiaomi Dafang - IR motion capture - 15-04-2019_20.02.06
    Xiaomi Dafang – IR motion capture – 15-04-2019_20.02.06

    The camera has built-in IR LEDs, but they’re nowhere near powerful enough to illuminate the entire yard.

    Motion detection works better in daylight:

    Xiaomi Dafang - Daylight motion capture - 16-04-2019_09.53.51
    Xiaomi Dafang – Daylight motion capture – 16-04-2019_09.53.51

    Unlike the original Wyze firmware, the Xiaomi Dafang Hacks firmware & software keep all the images & metadata within my network and under my control.