• Auto-Mute Audio During MacWhisper Dictation on macOS

    If you use MacWhisper for voice-to-text dictation on your Mac, you’ve probably noticed the problem: when you hold down your dictation key, whatever audio is playing — Navidrome, Apple Music, YouTube, Spotify — bleeds into your microphone and garbles the transcription.

    MacWhisper actually has a built-in “Mute Audio During Dictation” toggle in its settings. Unfortunately, if you’re running your audio through an external DAC or an audio routing app like SoundSourcefrom Rogue Amoeba, it doesn’t work. The standard macOS osascript volume commands return missing value for output volume when the system audio is being handled by an external device or third-party audio router, so the built-in mute has nothing to grab onto.

    Here’s how I solved it using Karabiner-Elements and a pair of Apple Shortcuts.

    What Didn’t Work

    Keyboard Maestro was my first thought, since I already had it installed. But KM can’t trigger on modifier keys alone — Command, Option, Shift, etc. aren’t valid hotkey triggers in KM. And even if they were, MacWhisper intercepts the dictation key at a level below where KM operates, so KM never sees the keypress.

    AppleScript volume commands like set volume output volume 0 and set volume output muted true do nothing when your output device doesn’t support system-level volume control. If you run osascript -e 'get volume settings' and see output volume:missing value, you’re in this boat. Common culprits include USB audio interfaces (like my Audient iD22), HDMI audio output, and apps like SoundSource that take over audio routing.

    What Worked

    The solution has three parts:

    1. Create Two Apple Shortcuts

    Open the Shortcuts app on your Mac and create two shortcuts:

    “Mute Mac Audio” — This shortcut should mute your audio output. The exact action depends on your setup. If you’re using SoundSource, you can use its automation support. If you’re using standard system audio, the “Set Volume” action works. The key is finding whatever method actually silences audio on your particular setup.

    “Unmute Mac Audio” — The reverse. Restore audio to its previous state.

    Test both from the command line first to make sure they actually work:

    bash shortcuts run 'Mute Mac Audio' shortcuts run 'Unmute Mac Audio'

    If these don’t silence and restore your audio, the Karabiner rule won’t help — fix the shortcuts first.

    2. Install Karabiner-Elements

    Download Karabiner-Elements and install it. During setup, macOS will ask you to grant several permissions under System Settings → Privacy & Security, including Input Monitoring and a system extension. Grant them all.

    Critical step that’s easy to miss: Open Karabiner-Elements Settings → Devices, and make sure your keyboard has “Modify events” toggled ON. If this is off, Karabiner will see your keypresses in EventViewer but won’t actually act on any rules. This one had me stuck for a while.

    3. Add the Karabiner Complex Modification

    In Karabiner-Elements Settings, go to Complex Modifications → Add your own rule, and paste this JSON:

    json { "description": "Mute audio while Right Command held (for dictation)", "manipulators": [ { "type": "basic", "from": { "key_code": "right_command", "modifiers": { "optional": ["any"] } }, "to": [ { "shell_command": "shortcuts run 'Mute Mac Audio'" }, { "key_code": "right_command" } ], "to_after_key_up": [ { "shell_command": "shortcuts run 'Unmute Mac Audio'" } ] } ] }

    Save it, and you’re done.

    How It Works

    When you press and hold Right Command (or whatever your dictation key is), Karabiner intercepts it, fires the mute shortcut, and then passes the key through to macOS so MacWhisper’s dictation still activates. When you release the key, Karabiner fires the unmute shortcut and your audio resumes.

    A Couple of Gotchas

    Order matters in the to array. You might think to pass through right_command first and then run the shell command. That’s what I tried initially, and dictation broke — MacWhisper wouldn’t activate. Running the shell command first and the key passthrough second is what made both the muting and the dictation work simultaneously.

    The "modifiers": { "optional": ["any"] } bit is important. Without it, Karabiner may not match the key correctly when it’s a modifier key being used on its own.

    Adapt the key code to your setup. If your dictation key is Right Option, use "right_option". If it’s the Globe/fn key, use "fn". You can check what Karabiner sees by opening the Karabiner-EventViewer app (installed alongside Karabiner-Elements) and pressing your key.

    Preserve your volume level. If your shortcuts just slam volume to zero and back to a fixed level, you’ll lose your previous volume setting. Design your Mute shortcut to save the current volume state and your Unmute shortcut to restore it.

    Tools Used


  • Tahoe, cron job failure & iCloud

    After updating to Tahoe (and this may be just coincidence) all of my cron jobs on my Mac starting erroring out. The only telling error I could find in one of my logs was:

    OSError: [Errno 11] Resource deadlock avoided

    After double checking almost every permission setting I could find, I discovered that my iCloud Drive settings had switched to “Optimize Storage” I don’t recall making this change so perhaps it was part of the OS upgrade process.

    Turning it off in “Settings” seems to have solved all of my cron issues:


  • Location Tracking w/ iPhone and Home Assistant

    [Update, Jan 2026 – this approach was garbage. I installed the iCloud3 add on and have had much better luck. This is a bit more of a challenge to setup but WAY more reliable/flexible than the approach below.]

    I have a few home assistant automations that would really benefit from knowing who is home, who isn’t, etc. My family members never open the HA app on their phones. I mean, why should they? Anyway, the Home Assistant mobile app doesn’t reliably track location when users never open the app. This guide that Claude AI wrote for me optimizes location tracking for phones that remain closed.


    iOS Settings (Configure on Each Phone)

    1. Location Permissions ⭐ CRITICAL

    • Settings → Home Assistant → Location → “Always” (NOT “While Using”)
    • Settings → Home Assistant → “Precise Location” → ON

    2. Background App Refresh

    • Settings → General → Background App Refresh → ON (system-wide)
    • Settings → Home Assistant → Background App Refresh → ON

    3. Notifications (Required for Background Activity)

    • Settings → Home Assistant → Notifications → ALLOW
    • Even if ignored, this keeps the app active in the background

    4. Cellular Data

    • Settings → Home Assistant → Cellular Data → ON
    • Ensures tracking works away from WiFi

    5. Low Power Mode (Known Issue)

    • When enabled, iOS kills background location updates
    • No fix, but be aware this affects tracking

    Home Assistant App Settings (Configure Once)

    Location Tracking

    1. Open HA App → Settings → Companion App → Location Sensors
    2. Enable “Zone Based Tracking” (triggers on zone enter/exit)
    3. Enable “Background Location Updates”
    4. Set Update Interval to default (or customize)

    Recommended Sensors to Enable

    • ✅ Zone Sensors – Essential for home/away detection
    • ✅ Activity Sensor – Detects movement vs stationary
    • ✅ Connection Type – WiFi vs cellular helps determine location
    • ✅ SSID Sensor – Reports WiFi network name

    Home Assistant Automations (Server-Side)

    1. Periodic Location Update Requests

    Sends silent notification every 15 minutes to request location update:

    Sends silent notification every 15 minutes to request location update:
    
    ```yaml
    - id: 'location_update_REPLACE_FAMILY_MEMBER_NAME'
      alias: 'Location: Periodic Update - REPLACE_FAMILY_MEMBER_NAME'
      description: 'Sends periodic location update request'
      trigger:
        - platform: time_pattern
          minutes: '/15'
      conditions: []
      actions:
        - service: notify.mobile_app_REPLACE_FAMILY_MEMBER_NAME_iphone
          data:
            message: "request_location_update"
      mode: single
    
    - id: 'location_update_REPLACE_FAMILY_MEMBER_NAME'
      alias: 'Location: Periodic Update - REPLACE_FAMILY_MEMBER_NAME'
      description: 'Sends periodic location update request'
      trigger:
        - platform: time_pattern
          minutes: '/15'
      conditions: []
      actions:
        - service: notify.mobile_app_REPLACE_FAMILY_MEMBER_NAME
          data:
            message: "request_location_update"
      mode: single
    ```

    2. WiFi-Based Home Detection (Backup Method)

    Reliable backup using home WiFi connection:

    ``yaml
    # Add to template.yaml
    - binary_sensor:
      - name: "NAME Home (WiFi Backup)"
        unique_id: NAME_home_wifi_backup
        state: >
          {{ is_state('sensor.NAME_iphone_connection_type', 'wifi')
             and is_state('sensor.NAME_iphone_ssid', 'YourHomeWiFiName') }}
        device_class: occupancy
        icon: mdi:wifi-check
    
      
    ```
    
    **Note:** Replace `'YourHomeWiFiName'` with your actual WiFi SSID.
    

    Note: Replace 'YourHomeWiFiName' with your actual WiFi SSID.

    3. Combined Presence Detection

    Use both location and WiFi for maximum reliability:

    Use both location and WiFi for maximum reliability:
    
    ```yaml
    - binary_sensor:
      - name: "NAME Home (Combined)"
        unique_id: NAME_home_combined
        state: >
          {{ is_state('person.NAME', 'home')
             or is_state('binary_sensor.NAME_home_wifi_backup', 'on') }}
        device_class: occupancy
    ```

    iOS Shortcuts Automation ⭐ SECRET WEAPON

    Create iOS Shortcuts that automatically update HA when entering/leaving home.

    Setup Instructions:

    Automation 1: When Leaving Home

    1. Open Shortcuts app on iPhone
    2. Tap Automation tab (bottom)
    3. Tap + → Create Personal Automation
    4. Choose Leave → Select Home
    5. Tap Add Action → Search “Home Assistant”
    6. Choose “Update Sensors”
    7. Turn OFF “Ask Before Running” ⭐ CRITICAL
    8. Tap Done

    Automation 2: When Arriving Home

    1. Same as above but choose Arrive at Home
    2. Add “Update Sensors” action
    3. Turn OFF “Ask Before Running”

    Automation 3: Daily Updates (Optional)

    1. Create Personal Automation → Time of Day
    2. Set times: 8:00 AM, 12:00 PM, 6:00 PM, 10:00 PM
    3. Add “Update Sensors” action
    4. Turn OFF “Ask Before Running”

    Home Zone Configuration

    Ensure proper home zone settings:

    1. Settings → Areas, Labels, & Zones → Home
    2. Radius: 100-200 meters
      • Too small = missed triggers when GPS drifts
      • Too large = inaccurate arrival/departure detection
      • 100m is usually ideal for residential areas

    5-Minute Setup Checklist for Family Members

    “Setup Once, Never Open HA App Again”

    • [ ] Settings → Home Assistant → Location → “Always”
    • [ ] Settings → Home Assistant → Precise Location → ON
    • [ ] Settings → Home Assistant → Background App Refresh → ON
    • [ ] Settings → Home Assistant → Notifications → Allow
    • [ ] Settings → Home Assistant → Cellular Data → ON
    • [ ] Open HA App once → Settings → Location Sensors → Enable all
    • [ ] Shortcuts app → Create “Leaving Home” automation (see above)
    • [ ] Shortcuts app → Create “Arriving Home” automation (see above)
    • [ ] Done! Never need to open HA app again

    Troubleshooting

    Location Not Updating

    1. Check Low Power Mode is OFF
    2. Verify “Always” location permission
    3. Check HA app hasn’t been offloaded (Settings → General → iPhone Storage)
    4. Force quit and reopen HA app once
    5. Check automations are running (Settings → Automations)

    WiFi Backup Not Working

    1. Verify SSID sensor is reporting correct WiFi name
    2. Check SSID in template matches exactly (case-sensitive)
    3. Ensure phone is actually connected to WiFi (not cellular)

    iOS Shortcuts Not Running

    1. Open Shortcuts app → Automation tab
    2. Verify automations are enabled (toggle should be blue)
    3. Check “Ask Before Running” is turned OFF
    4. Run automation manually once to test

    Option 3: OwnTracks

    • Self-hosted MQTT-based tracking
    • Complete privacy/control
    • Requires MQTT broker setup
    • Good for privacy-conscious users

    Best Practices

    1. Use Multiple Detection Methods
      • Combine GPS (person entity) + WiFi (backup sensor)
      • More reliable than single source
    2. Set Reasonable Update Intervals
      • Every 15 minutes is good balance
      • Too frequent = battery drain
      • Too infrequent = missed events
    3. Test After Setup
      • Have family member leave/return home
      • Watch HA logs for updates
      • Verify automations trigger correctly
    4. Monitor Battery Impact
      • Check battery usage after 1 week
      • If excessive, reduce update frequency
      • iOS Shortcuts use minimal battery

    Notes

    • This configuration works best when all iOS settings are properly configured
    • iOS Shortcuts automation is the most reliable “set and forget” method
    • WiFi backup is excellent for detecting home presence
    • Periodic update requests keep the app active without user interaction
    • Low Power Mode will always impact background location – this is an iOS limitation

    Last Updated: 2025-12-04


  • Wheelbuilding

    well, not from scratch, but I laced a new rim to my front hub this week with a minimal tool setup using mostly zip ties on my fork for a truing stand and a cheap spoke tension meter though, to be fair, once I got the tension close I relied a lot upon the pitch of the ping when I tapped the spoke, it was a lot like tuning a guitar in 4 dimensions (dish, round, true left/right). I think I’d like to try building a whole wheel from scratch now.


  • Sometimes Readwise resurfaces exactly the right quote from 6 years ago that you need today:
    “Convenience is all destination and no journey. But climbing a mountain is different from taking the tram to the top, even if you end up at the same place.”
    From this 2018 piece by Tim Wu in the nytimes


  • Ride Report 2025-02-08

    A few thoughts on my first multi-surface ride with the Joe Appaloosa.

    View from the Oceanic Bridge towards Red Bank.

    I hate the cold. I hate being cold. I hate going out in the cold. From November until May I am cold. Which is to say that for me to get out for a ride during that period either it’s a warm day or the bike’s ride is soooo nice that I’ll don multiple layers and brave the cold just to experience the joy of being on the Riv. 

    Which is what happened this morning. I layered up with the intent just to ride my bike downtown to enjoy the bike and do something about this cabin fever that’s creeping up on me. But instead of a quick pedal down Broad St, I just kept on pedaling and ended up heading up into the gravel and trails of Huber Woods. 

    A few thoughts:

    • I needed a bandana. Riding in the cold is just crazy snot fest and i was dying to blow my nose and my leather gloves weren’t cutting it.
    • Sometimes a triple chainring crankset is better than a double, but a double crankset is always better than a single. I loved the gearing on the Joe Appaloosa. I’m not sure what all the ratio/inches are or even the size of the chainrings size but it handled one of our areas most challenging gravel climbs with ease. 
    • The stem is too short. The sweep back on these Tosco bars needs a 100/110 i think it’s got a 70 on it now so I as just a smidge more upright than i wanted to be and the grips were just a little too close to my legs. Fortunately I’ve got a nice used Nitto en route from eBay.
    • The ULTRADYNAMICO cava tires are great on asphalt, tolerable on gravel and useless when you veer off the gravel to some single track. Too much pressure.  I missed my low PSI gravel kings and ended up skipping a section of single track bc i had no confidence in the cava tires.
    • The geometry of the bike is just mind blowing. On slight inclines i found myself just engaging my legs in a slightly different way instead of switching gears. The bike just responds to subtle difference in pedaling in a way i can’t explain.

  • HomeAssistant Logs

    Here’s a quick one-liner to tail -f home assistant logs from a docker image. I’m sure there are better ways to do this but I got tired of typing a bunch of commands so finally figured out this one liner to save:

    docker ps -a | grep homeassistant | cut -d ' ' -f1 | xargs docker logs -f

    Assumes your homeassistant docker image is called ‘homeassistant’

    then add this to .bashrc

    alias log_ha='docker ps -a | grep homeas | awk "{print \$1}" | xargs docker logs -f'


  • Update Moode Library w/ cron

    To schedule the moOde library update to happen every night, you can use a cron job with the ‘mpc update’ command. Here’s how to set it up:

    1. Enable and start the cron service on your moOde system:
    sudo systemctl enable cron
    sudo systemctl start cron
    1. Open the crontab file for editing:
    sudo crontab -e
    1. Add the following line to schedule the update every night at midnight:
    0 0 * * * /usr/bin/mpc update

    This cron job will run the ‘mpc update’ command at 00:00 (midnight) every day, which will update the moOde library[2].

    Replace with the directory you want to update[2].

    Remember to save and exit the crontab file after making these changes. The library update will now occur automatically every night at midnight.


  • Open Outlook for iOS to Calendar

    iOS Users: Sharing this iOS shortcut despite its very limited use case. My dog has a longer/better attention span than I do. As a result, whenever I open Outlook on my iPhone to check my calendar, I immediately get distracted by whatever emails are at the top of my inbox and forget that I was actually using the app to check my schedule. 

    There’s no setting in the app to have it open in the Calendar view by default so I wrote a shortcut to solve that. If you add this to your homescreen, it will open your Outlook application to the calendar instead of the inbox. LMK if you have any questions.

    https://www.icloud.com/shortcuts/d091f3aad3104e8bb2b1cf9de211395f


  • Friendly warning for new users of . RTFM. This little gem is buried in the instructions: “Note that the command above will store the linkding SQLite database in the container, which means that deleting the container, for example when upgrading the installation, will also remove the database. For hosting an actual installation you usually want to store the database on the host system, rather than in the container. “
    Meaning, if you just start using it out of the box, you’ll be really disappointed when you upgrade and lose all your data. AMHIK 🙂


Current Spins

Top Albums

Check out my album Set It All Down on your favorite streaming service.


Posts Worth Reading:


Letterboxd


Reading Notes

  • Who profits from our constant state of dissatisfaction? The answer, of course, is painfully obvious. Every industry that sells a solution to a problem you […]
  • the shifts have been in place for awhile. A certain kind of book—say those reviewed in the NYRB—will become like opera, or theater, or ballet, […]
  • • No more struggle: “Whatever arises, train again and again in seeing it for what it is. The innermost essence of mind is without bias. […]
  • The real problem, in my mind, isn’t in the nature of this particular Venture-Capital operation. Because the whole raison-d’etre of Venture Capital is to make […]
  • . The EU invokes a mechanism called the precautionary principle in cases where an innovation, such as GMOs, has not yet been sufficiently researched for […]

Saved Links

RSS Error: A feed could not be found at `https://links.jimwillis.org/feed/atom?`; the status code is `404` and content-type is `text/html; charset=utf-8`