Category Archives: General

Flora

It’s still impossible for me to wrap my head around, but it’s been six months since we said goodbye to Flora. She was part of our family for 14 years, through some wonderful and some very hard times. Jane and I have never lived together without her, and her absence in our lives is as fresh a wound today as that first night without her.

I’m so grateful that our children were able to know her, even just for the ten weeks she overlapped with our daughter in this world. Her love for and kindness toward them left an indelible mark on me.

Flora took responsibility for tending to all of us from the very beginning. She held on until she knew we were all going to be ok after our daughter’s arrival, and left us on the night of our tenth wedding anniversary - she was taking care of us right up until the end.

I miss you.

iOS Scanner Apps

I just discovered that PDFpen Scan+ was discontinued, and went on a mini quest to find a replacement. I landed on ‎Scanner Pro.

I also considered:

Scanner Pro works with most of the cloud environments, so I have it pointed at a folder in Dropbox that gets slurped into my inbox. A scan can also be initiated from Shortcuts, so I’ve removed the app from my homescreen.

Fantastical Version 3, Watch App Edition

Previously: Fantastical Version 3

I’ve finally had a chance to play a bit more with Fantastical version 3, and I’m really disappointed to learn that the new version of their Apple Watch app is useless without a free Flexibits account.

In version 2, the watch app synced data directly from the iOS app via WatchConnectivity. Version 3 syncs event data from the iPhone up to their servers, then back down to the watch. This was done to allow the watch to sync without a direct connection to the iPhone.

I’d prefer not to expose my event data to their server, even if it is end-to-end encrypted. Event data in my calendars doesn’t change without my direct input (or approval), so there really isn’t any benefit to me from enabling independence of the watchOS app.

While I was looking into their encryption, I found that Flexibit’s new privacy policy is internally inconsistent with regard to the syncing of event data. In the summary (“Give me the short version”), it says:

Account passwords, events, tasks, and contacts are stored only on your device and are not sent to servers.

In the section titled “Where are my events, tasks, and contacts stored?”, this is contradicted:

Event and task data synced to your Apple Watch is stored on Flexibits servers. This data is end-to-end encrypted and we are unable to access it.

The summary claim (that event data is stored only on device) is reiterated in the section titled “When does an app send data to Flexibits?”:

Fantastical for iOS:

  • […]
  • When making changes to your calendar or dismissing alerts. No event data is ever sent to Flexibits, our servers only receive a notification that changes were made on your account. This notification is then relayed to Fantastical on your other devices.

This may seem like nitpicking, but if the only way to use the version 2 functionality within version 3 is by syncing my data to their servers, the least Flexibits can do is provide clear, accurate information in their privacy policy.

For now, I’ve switched back to using the native Calendar watch app. In watchOS 6, it seems to offer everything that the version 2 Fantastical app did (with direct sync!). I’m still using Fantastical on iOS, but I’m going to give the native app another test run in the upcoming weeks.

Fantastical Version 3

I was just checking out the new Fantastical version 3. While I don’t mind a subscription, the massive price increase over version 2 is a deal breaker for me. The only thing the subscription unlocks that I would use are calendar sets on iOS, but that’s not worth $40/yr (to me).

Looking back two and a half years to my last thoughts on this topic, my opinion is still the same. The switch to subscriptions is often coupled with a significant price increase, and that’s the cause of most backlash. The old TextExpander versions are still working just fine for me. I did finally subscribe to Day One Premium earlier this year, though I can’t recall what feature finally tipped the cost/value relationship for me.

Maybe I’ll eventually reconsider with Fantastical 3, but for now, I’ll just continue with the version 2 feature set.

Homebridge SoundTouch Platform

I’ve been testing out the homebridge-soundtouch-platform Homebridge plugin as a replacement for homebridge-soundtouch plugin (see my earlier notes about configuring this plugin). The main advantage I is that it exposes the 6 Soundtouch Presets as switches in HomeKit, whereas the older plugin exposes them as a ‘custom’ HomeKit parameter. The custom parameter is visible in the Home+ app, but not in the native Home app.

It was simple to install on my Raspberry Pi Zero W via the command sudo npm install -g homebridge-soundtouch-platform. Then I just added the following to my config.json in the platforms array to define my two speakers (the speakers have fixed IPs on my network, and I’ve disabled the China-only QPlay service, as well as the AUX inputs):

{
  "platform": "SoundTouchPlatform",
  "name": "SoundTouch",
  "accessories": [
    {
      "name": "Master Bedroom Speaker",
      "room": "Master Bedroom",
      "ip": "10.0.1.210",
      "volume": {
        "mode": "lightbulb",
        "onValue": 35,
        "unmuteValue": 35,
        "maxValue": 100
      },
      "presets": [
        {
          "index": 1,
          "name": "MB1",
          "enabled": true
        },
        {
          "index": 2,
          "name": "MB2",
          "enabled": true
        },
        {
          "index": 3,
          "name": "MB3",
          "enabled": true
        },
        {
          "index": 4,
          "name": "MB4",
          "enabled": true
        },
        {
          "index": 5,
          "name": "MB5",
          "enabled": true
        },
        {
          "index": 6,
          "name": "MB6",
          "enabled": true
        }
      ],
      "sources": [
      ]
    },
    {
      "name": "Living Room Speaker",
      "room": "Living Room",
      "ip": "10.0.1.211",
      "volume": {
        "mode": "lightbulb",
        "onValue": 35,
        "unmuteValue": 35,
        "maxValue": 100
      },
      "presets": [
        {
          "index": 1,
          "name": "LR1",
          "enabled": true
        },
        {
          "index": 2,
          "name": "LR2",
          "enabled": true
        },
        {
          "index": 3,
          "name": "LR3",
          "enabled": true
        },
        {
          "index": 4,
          "name": "LR4",
          "enabled": true
        },
        {
          "index": 5,
          "name": "LR5",
          "enabled": true
        },
        {
          "index": 6,
          "name": "LR6",
          "enabled": true
        }
      ],
      "sources": [
      ]
    }
  ],
  "global": {
    "sources": [
      {
        "source": "QPLAY",
        "enabled": false
      },
      {
        "source": "AUX",
        "enabled": false
      }
    ]
  }
}

Despite explicitly defining the presets for the speakers, on one of the speakers only Preset 4 appears in HomeKit. For this reason, I’m sticking with the older platform for now.

Installing Homebridge and homebridge-camera-rpi on a Raspberry Pi Zero W

I finally started over from scratch with my Raspberry Pi Zero W and Camera Module V2. These are the steps I took to configure it with Homebridge as a Homekit-compatible camera.

Initial Pi Setup

  1. Using balenaEtcher, I installed the September 2019 version of Raspbian Buster Lite (link to latest release) on my SD card.
  2. I enabled ssh access by creating an empty file named ssh at the root of the SD card.
  3. To allow the Pi onto my home network, I created a file named wpa_supplicant.conf at the root of the SD card. The contents should be:

    country=US 
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    network={
        ssid="YOUR_NETWORK_NAME"
        psk="YOUR_PASSWORD"
        key_mgmt=WPA-PSK
    }
    
  4. Then I inserted the SD card in the Pi, booted it up, found it’s IP address on my network (I used LanScan), and connected via ssh pi@<ipaddress>.

  5. It’s important to change the pi account password with the passwd command.
  6. I selected my time zone and set the locale to en_us.UTF-8 via sudo raspi-config.
  7. Finally, I updated the software with:

    sudo apt-get update
    sudo apt-get upgrade
    

Install Homebridge, homebridge-pi, and homebridge-camera-rpi

  1. Homebridge requires an installation of node.js, which, surprisingly, can’t be installed via apt on the Pi Zero. This command will install the most recent LTS version of node.js by running a script from node-pi-zero:

    wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v.lts.sh | bash
    
  2. From Running Homebridge on a Raspberry Pi, Homebridge will require git to be installed:

    sudo apt-get install git
    
  3. Those instructions also indicate that avahi must be installed:

    sudo apt-get install libavahi-compat-libdnssd-dev
    
  4. Finally, we can actually install homebridge:

    sudo npm install -g homebridge
    
  5. As well as homebridge-pi (which will provide thermal measurements from the Pi in Homekit):

    sudo npm install -g homebridge-pi
    
  6. Before installing homebridge-camera-rpi (which will expose the camera to Homekit), we need to:

    • Activate the camera via raspi-config
    • Edit sudo nano /etc/modules and add the line bcm2835-v4l2
    • Reboot
    • Install ffmpeg: sudo apt install ffmpeg
  7. Then, we can install homebridge-camera-rpi:

    sudo npm install -g homebridge-camera-rpi
    
  8. And then setup the configuration file (~/.homebridge/config.json) to contain:

    {
      "bridge": {
        "name": "PiZeroHomebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
      },
    
      "description": "This is an example configuration file",
      "accessories": [
        {
          "accessory": "PiTemperature",
          "name": "Pi Zero Temperature"
        }
      ],
    
      "platforms": [
        {
          "platform": "rpi-camera",
          "cameras": [{"name": "Pi Camera"}]
        }
      ]
    }
    
  9. Finally, I needed to add homebridge to my path via export PATH=/opt/nodejs/bin:$PATH.

  10. Now, you can run homebridge and add the devices to HomeKit configuration.

Configuring Homebridge to run on Bootup

There are great instructions for running Homebridge automatically at Bootup. These are the steps I used to configure it as a system service:

  1. Download these files:

    • homebridge to /etc/default via this command:

      sudo wget -O /etc/default/homebridge https://gist.github.com/johannrichard/0ad0de1feb6adb9eb61a/raw/1cf926e63e553c7cbfacf9970042c5ac876fadfa/homebridge
      
    • homebridge.service to /etc/systemd/system via this command:

      sudo wget -O /etc/systemd/system/homebridge.service https://gist.github.com/johannrichard/0ad0de1feb6adb9eb61a/raw/1cf926e63e553c7cbfacf9970042c5ac876fadfa/homebridge.service
      
  2. Fix path to the homebridge binary in homebridge.service with:

    sudo sed -i 's,/usr/local/bin/homebridge,'"$(which homebridge)"',' /etc/systemd/system/homebridge.service
    
  3. Create a new user:

    useradd --system homebridge
    
  4. Per the camera setup instructions, add the new user to the video group:

    sudo adduser homebridge video
    
  5. For convenience, I added the pi user to the homebridge group as well, so it can edit the configuration files:

    sudo adduser pi homebridge
    
  6. Create a new directory for the configuration files:

    sudo mkdir /var/lib/homebridge
    
  7. Give the new user ownership of the configuration files:

    sudo chown -R homebridge:homebridge /var/lib/homebridge/
    
  8. Give the group write permissions for the configuration files:

    sudo chmod -R 775 /var/lib/homebridge/
    
  9. Log out and log back in (still as pi) to pick up the new permissions.

  10. Duplicate the configuration file in the new folder:

    cp .homebridge/config.json /var/lib/homebridge/config.json
    
  11. Make sure the ownership and permissions for config.json are set:

    • sudo chown homebridge:homebridge /var/lib/homebridge/config.json
    • sudo chmod 664 /var/lib/homebridge/config.json
  12. Have the system read the new configuration:

    sudo systemctl daemon-reload
    
  13. Enable it, start it up, and confirm it’s running:

    sudo systemctl enable homebridge
    sudo systemctl start homebridge
    systemctl status homebridge
    

And with that, you can now just plug in the Raspberry Pi and it will boot and start up homebridge with your new camera! This is the cheapest way I’ve seen to get a HomeKit camera up and running.