• Location Tracking w/ iPhone and Home Assistant

    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 🙂


  • Mentioning here how helpful the native Mac OS app Yate is for cleaning up FLAC tags. The “Mickey Hart” mix versions of Workingman’s were intermingled with the original album release and Yate was the right tool for the job to rename the album to Workingman’s Dead (Mickey Hart Mix). https://2manyrobots.com/yate/


  • Stereo HomePod Pair in Music Assistant

    Took me a little while to get this sorted out so I thought I’d document it here:

    Music Assistant supports grouping speakers so, briefly put what you’re doing here is just creating a group with two HomePods, one playing the left channel, the other the right channel. Key here is configuring the individual HomePods to play left/right and then creating the group.

    Details:

    Under Music Assistant Settings, select the “players” icon (in this screenshot it has the red dot on it)

    Select one of your HomePods and expand the “Audio” settings section. At the bottom you can select the channel:

    Pick either the left or right, depending on your choice/location of the HomePod. Don’t forget to hit “Save” and then repeat this process for the other member of the stereo pair.

    Once you’ve defined your HomePods as left/right, go back to the settings and select “Add Group Player”

    From there it’s just a matter of select “Group Type” of “AirPlay” from the drop down and adding your two HomePods the group and give it a useful name like “Stereo Pair” this seems to be pretty reliably working though sometimes I have to restart the stream once or twice


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`