Six Colors
Six Colors

This Week's Sponsor

Magic Lasso Adblock: YouTube ad blocker for Safari


By Joe Rosensteel

Putting my microclimate in my Menu Bar

Joe's weather hardware
Out with the old, in with the new.

One of the California weather problems that is probably not apparent until one moves to California is that the weather varies wildly in a small region. Microclimates are the name of the game where changes in topology shape the weather. Is it absolutely critical that I know the temperature to the degree? No, but it’s also weird to look at Apple’s Weather app or Carrot Weather, and see a temperature that’s up to 10 degrees off of my outside temperature, and seemingly overestimates the humidity. (Jason Snell gets his specific weather data from his weather station and displays it in his menu bar. As does Dan Moren.)

Previously, I had been getting my weather info from a ThermoPro TP67B that has an outdoor sensor. It’s fine, but it only ever knows what temperature it is right now, and it can only display it on a very ugly, large LCD console that doesn’t fit on my desk. Then I noticed the Eve Weather station was on sale for $60 on Amazon, and that was below my impulse-buy threshold, so… now I have an Eve Weather.

Step One Thing. I decided I would put the weather data up in the menu bar, just like Dan and Jason do it! But I decided to make it hard on myself. I wanted the app I used to be in the Mac App Store—SwiftBar is not—and I wanted something that would just display whatever I sent to it so I could format it how I saw fit without having to write a plugin.

Enter Sindre Sorhus’ One Thing which does, well, one thing: It’ll display any string passed to it. And if there’s one thing I know I can do, it’s pass a string! The instructions are quite easy. You can pass that string via Shortcuts or even the command line.

A piece of cake.

Step cut my weather in two pieces. I really have not gotten along well with Shortcuts, but all the data I would need (coming from HomeKit and Eve Weather) would be handled best in Shortcuts.

Initially, it was a simple matter of using “Get the state of My Home” blocks to individually query the humidity, and the temperature. Then it was a matter of making sure the temperature data was always displayed in Fahrenheit with a “Convert Measurement” block, and a “Round” because 94.46 degrees is not any more or less relevant to me than 94 degrees — this isn’t Celsius.

I also decided to get the UV Index using the weather function in Shortcuts. (While microclimates can cause the temperature to spike, or drop, over short distances the risk of possible skin cancer is pretty uniform across Los Angeles.)

With that done, I formatted the string with the three variables I had, separated by a “/” and displaying their proper units, and used One Thing’s “Set menu bar text to” action to put it into action.

A shortcut!

In the case of UV index, I had wanted to set a color based on the index, but unsurprisingly, the thing that does one thing, does not do that one thing, and not that other thing. C’est la vie. I put a sun emoji just so it wasn’t a naked digit hanging out.

Step Lingon three. I realized I needed something to automate this shortcut. Checking the Mac App Store again, I found a few options for editing launchd plists. I did not want to manually format, and maintain launchd plists because XML is just super weird and I shouldn’t have to do that.

Peter Borg’s Lingon 3 fit the bill. I set it up to run my Shortcut called “Temp?” every 10 minutes. Problem solved. Opening the app shows me exactly where the command is, and I don’t have to remember I did something weird with files somewhere.

Step unFourtunately. Everything was working fine, for several days, and I was not only pleased I was jazzed about it. That’s when the Shortcut started to fail every 10 minutes, and give me a warning dialog that there was a read/write error with the Humidity Sensor.

A shortcut error

This was extremely surprising, as I had done nothing to any of the hardware or the shortcut. There was no additional diagnostic data from Shortcuts. When I opened the Home app on my iPhone I saw the device in the Home app, and could easily see the temperature and humidity. It matched the same data in the Eve app, and the Eve app had no connection issues. My Mac’s home app couldn’t see the weather data, though.

(This is why I wrapped the whole Shortcut in an if/otherwise block so I could just turn it off without having to remove parts of the setup that were working.)

Turns out, after several hours of poking and prodding every piece of electronics I own, that the 4th generation Apple TV in my office, which was the nearest Apple TV to the Eve Weather, had lost its WiFi connection when the Eero updated that morning. The phone was able to see and interact directly with the device over Bluetooth, which is why it produced no errors. This past Sunday everything crapped out again, and I was left wondering why, because that time both Apple TVs were on my Wi-Fi network.

So I did what every normal human being living in the future does: I disconnected my living room Apple TV 4K, and then turned it back on, which seems to have forced the Eve Weather to connect to the office Apple TV instead.

There are no controls to map or specify these connections. There’s also no way to use Thread as an alternative communication path, because the Thread radio in the Eve device, the Eero, Eero beacons, and the living room Apple TV 4K can’t see or work with each other. Neat stuff.

That any one of three devices on my network could restart or drop connection and reshuffle the invisible automation topology of my house is disconcerting, but also something I’m going to have to live with until maybe we get Matter and it’s magical? Maybe? Please?

Micro improvements

Joe's menu bar item

It’s very satisfying to “make” something.

Sure, all I really did was stitch together a bunch of stuff in a pretty inelegant way—and did it in a way that at least two other people wouldn’t bother with. But no one has to know that, other than those two people, and all of you.

All that matters to me is that I can now glance up to my Menu Bar and get an unobtrusive little reminder that the smoldering hillside I’m on is actually five degrees warmer, and slightly drier, than Apple says it is. This makes me feel like I’ve got a really got a handle on things.

[Joe Rosensteel is a VFX artist, writer, and co-host of the Defocused and Unhelpful Suggestions podcasts.]


Search Six Colors