samgrover.com

On a scale of 1 to 10, the entropy of my home office and the desk therein hovers between 4 and 8. Currently both are at about 8. Each time I organize, I try to get it below 4 but it never happens.

An App for Mapping My Outdoor Activities With Apple Watch Using GPX Tracks

An App for Mapping My Outdoor Activities With Apple Watch Using GPX Tracks

I use an Apple Watch to track my activities, whether that be workouts or recreational. For outdoor activities, the watch records location data throughout the activity. This is later shown on a map in the Fitness app on the iPhone. While that map is interactive, exporting it only exports a low resolution image, and not the actual route.

A walking track is overlaid on a map.

When I share an activity on a blog post I like to show the map but I don’t like the idea of just sharing an image of the map. I would like to get the actual data out so that it can be overlaid on an interactive map using various mapping tools.

I found an app on the App Store that can export the data, among many other features, but I wasn’t keen on paying a subscription for this one small occasional use case. As an app developer, I know that access to this data is controlled by the Health related privacy settings on the iPhone and is accessible using the HealthKit framework. So I decided make a small app to get this data out while also gaining familiarity with that part of the iOS SDK. A few weeks ago I got started on it. I worked on it in small chunks of time, as I usually do with such side projects. The UI came together pretty quickly as a SwiftUI app. It is nothing special but looks presentable and gets the job done.

Screenshot of an app showing a list of workouts with options to fetch and share the route from some of them.

It took just a little bit longer to get the data out from HealthKit. Converting it to GPX files was straightforward. Once I had created a file I could use the share sheet to get it into other apps or to simply save it. From there it can be imported into tools that put it on a map.

For example, here’s a GPX file of a walk at Mount Tabor Park. It can be utilized to create an embedded map as shown below.

See full screen

Or even into Google Maps. In fact once imported there, you can view the track with elevation by selecting the option for Google Earth and enabling the 3D view. I love this option as it adds another dimension (literally 😂) to the activity.

Screenshot of track on 3D view from Google Earth.

Both these presentation styles are far more interesting to me than just a low resolution image out of the Fitness app.

Grainy black and white image of a view through a window to an arbor in the yard. The window has blurry reflections of a geometric pattern.

Film: Kentmere PAN 400
Camera: Voigtländer Bessa R2a

Adding API Accessible Devices to the Home Climate Monitoring Setup

Adding API Accessible Devices to the Home Climate Monitoring Setup

I was thinking about getting more of those AcuRite sensors for expanding my home climate monitoring when I realized that I already have a couple of devices recording this and other data.

Screenshot showing charts of temperature, humidity, and air quality time series.

These include my Ecobee Thermostat and Remote Sensor and my IQAir AirVisual Pro. Both of these have means of getting the data off of them using an API. This blog post by Den Delimarsky really helped with the IQAir API. Ecobee API was straightforward. And after some coding and testing, I had a couple of scripts running that could pull metrics from them and send them to influxdb. So now I have a few more data points for existing metrics, and have added air quality to it.

In the previous blog post , I wrote:

I’m going to take a break from any further optimizing/tweaking for now.

Well, that didn’t happen! But maybe now 🤔

P.S. The screenshot above illustrates a few other things:

The Unfocused iOS Developer Life

A screenshot of four identical squircle icons containing a geometrical pattern.

#iosdev

PSA: Thirty days left on the DarkSky API. Port your apps, port your scripts!

Home Climate Monitoring

Home Climate Monitoring

Sometime last year my friend Andrew made me aware of the sensors and software he was using to monitor temperature and humidity in his home. I thought that was cool and it introduced me to several hardware and software tools that I had not known about. I wanted to set this up at my home so I filed a project for a later date.

Well, that day arrived a few weeks ago and here’s what it looks like today:

Screenshot showing charts of temperature and humidity time series.

To get started exploring this I purchased an AcuRite bundle of three sensor towers and one display. I set up the towers around my home and put the display in my home office. It was neat to see the display showing the measurements at any given time. Soon I wanted to go to the next level and record and see the data over time.

These sensors broadcast the data over 433 MHz and there are consumer level antennas and software available to read this data. I bought a NooElec bundle which gave me all the hardware I needed to receive this data on my computer. Setting it up was straightforward. I used rtl_433 and was able to start seeing the wireless data immediately in the terminal on my Mac.

The next step was storing all this data. That’s where influxdb came in. And the glue to get it from rtl_433 to influxdb involved MQTT and telegraf.

There was a lot of trial and error but I finally got it all set up and was able to get the data into influxdb. I even made a dashboard in there to visualize it. The options on that dashboard were limited so I got grafana set up and built a dashboard in that which can be seen at the top of this post as seen on my desktop browser. It also looks great on mobile devices.

Except for rtl_433, the rest of the tools all run on docker on my desktop Mac. At some point I may migrate that off to a Raspberry Pi but for now it’s all working and I’m going to take a break from any further optimizing/tweaking for now.

Update (6th March, 2023): Follow up post about expanding on this effort.

I had no idea that that name had such an association and am glad that they are making this change.

What has been dismissed, ignored, or overlooked until the last few years by both Portland Audubon and the larger Audubon community is the fact that John James Audubon enslaved and sold Black people, opposed the abolition of slavery, and dug up and stole the human remains of Native Americans from their graves.

🔗 Portland Audubon Commits to Dropping the Name Audubon - Portland Audubon

Momo (a buff tabby cat) sleeps on a colorful blanket on a greenish blue sofa.

📽️ Over the weekend we saw the 2023 Oscar Animated Shorts at a local theater. That was the first time I had gone to see something like that and it was quite enjoyable. Most of the films are a delight. The theater had cozy seats and serves brunch so that made it a little extra fun.

Screenshot showing the names and images of the short films: An Ostrich Told Me the World Is Fake and I Think I Believe it. Ice Merchants. My Year of Dicks. The Boy, the Mole, the Fox, and the Horse. The Flying Sailor.