Automators Podcast, episode 58

I was extremely pleased to be on episode 58 of the Automators podcast on Relay.fm.

This was my first time on Automators, which is a show that I have really enjoyed since it first began.

I’m guessing anyone who has managed to still find and read my site probably knows this already, but I’ve also been on a few episodes of Mac Power Users too:

Links and Show Notes

Here are the show notes for Automators 58:

Using Keyboard Maestro to make the Home.app Less Terrible

The Home.app on Mac is, frankly, not very good.

It was originally released as an example of iOS apps coming to the Mac, and when it first came out, pretty much everyone said “Well, sure, it’s not very good, but it’s better than nothing… and surely Apple will improve on it over time.”

That has not happened (yet?) and the app remains mostly terrible. For example, it is completely missing some HomeKit accessories which appear in the iPhone/iPad.

In our living room we have 9 overhead lights which I grouped together as “one light” in the Home.app on the iPhone… but for some reason they continue to appear as 9 individual lights in the Home.app on the Mac. I grouped them together on the Mac Home.app, and later they appeared un-grouped again. Why? Who’s to say?

Oh, and some of my Home.app scenes just don’t appear on the Mac. Why? Who knows? How do I fit it? Who knows? The only thing I can do is uncheck the box for “Home” in System Preferences under iCloud, wait for the Home.app to empty out, and then check the box again to re-enable it.

Screenshot of System Preferences, iCloud, Home

That did work to get the Home.app to recognize some new accessories, but it did not help the missing “scenes” appear. Which, I guess, is better than nothing.

(You’ll notice that “It’s better than nothing” is effectively the slogan of most of these iOS-apps-on-the-Mac, at least so far.)

Home.app Automation

The Home.app is mostly impervious to attempts to automate it on the Mac. There is absolutely zero AppleScript support, and keyboard shortcuts are limited to switching between the “Home”, “Rooms”, and “Automation” tabs in the main window.

(That “Automation” tab is identical to what you see on iOS, where you can set timers and triggers. That automation is pretty good, but if you want to assign a keyboard shortcut to setting a Home.app scene or even turning an accessory on/off, well, you are out of luck.)

One minimal piece of functionality that the app has is that each of your “rooms” are available under the “View” menu and via an icon on the Home.app toolbar.

Screenshot of Home.app's "View" menu

I have often wished for a way to go to a specific room via a keyboard shortcut, and today I finally made that happen using one of the best apps on macOS: Keyboard Maestro.

It’s a relatively straight-forward macro, but I thought I’d walk through it as an intro to folks who may want to learn more about Keyboard Maestro.

Create a “Macro Group” for the Home.app

Screenshot of Keyboard Maestro - create macro group

Click the + icon in the first column of Keyboard Maestro’s Editor window to create a new “Macro Group” (think of it like a folder). Then, in the third (main) section, set “Available in these applications” to the Home app using the dropdown. This will restrict the macros in that Macro Group to only being active when you are using the Home.app. Note that I called mine “» Home.app” but you could call it anything you want. I use the » prefix before all of my Macro Groups that are specific to an app to help keep them sorted together.

(That process of setting a Macro Group to only work in one app is a handy feature of Keyboard Maestro that you will probably use a lot.)

Create a Macro for each room

Screenshot of Keyboard Maestro - create macro

  1. Click the + icon in the middle column to create a new macro inside the “Home.app” macro group.

  2. The Macro Name (shown here as “Ethan’s Room”) can be anything you want. You could call it “Bedroom 3” or “Purple Monster”. Whatever name you give it will be what is shown in the middle column.

  3. Assign a “hot key” which is Keyboard Maestro’s name for a keyboard shortcut. Notice that I have assigned two hot keys: ⌥E and ⌥S.

    Keyboard Maestro will let you create as many of these as you want (which is especially nice if you don’t always remember what keyboard shortcut you used — if you think it might be one or the other, use both!)

    However, in this case, I am going to assign at least two keyboard shortcuts to each room, and one of them will always be ⌥S (I will explain why in a moment).

  4. Click “New Action” and choose “Select or Show a Menu Item” (not shown in screenshot) to tell Keyboard Maestro that you want it to use that keyboard shortcut to match a menu item. The top level title is “View” (that is what appears in the menu bar) and the menu item is the name of the room. (Note: in this step, you do have to be exact and match precisely what the menu item says, so be careful.

Repeat the previous 4 steps for each room

I’m not going to show them all to you, but here’s the next one for the Front Door.

Screenshot of Keyboard Maestro, Macros, Front Door

Notice that the first “hot key” is unique ⌥F but the second is the repeated ⌥S.

The same is true for Garage, Hallway, Tj’s Room, Living Room, Office, and Tracey’s Room.

In the middle column you can see the hot keys which have been assigned to each macro. If more than one hot key is assigned, only the first will be shown, so make sure that is that unique one.

(Yes, I will explain why I added those bracketed letters to Tj’s Room and Tracey’s room.)

Q: “Why did you assign the same hot key for each room? Obviously that isn’t going to work right… Right?”

Well, it depends what you mean by “work right” I suppose.

Normally, if you had two identical keyboard shortcuts in an app, you would expect that when you use that keyboard shortcut, nothing will happen, except maybe the system beep will go off.

Keyboard Maestro is smarter than that. If you assign the same keyboard shortcut (or “hot key” in Keyboard Maestro parlance) when you press that keyboard shortcut, Keyboard Maestro will show you what is called the “Conflict Palette”.

The “Conflict Palette” is a little pop-up window which will appear and look something like this:

Screenshot of Keyboard Maestro's Conflict Palette

Note that at the top of the window it shows ⌥S so you will know what hot key caused the conflict. Then there is a list of each macro that has that hot key assigned to it.

Also note that the first letter of each macro name is in grey. When the “Conflict Palette” appears, you can press the corresponding letter to choose that macro, so H for “Hallway” for example.

You’ll note that that last two both start with the letter T. If you press the letter T when this “Conflict Palette” appears, it will then show you only those two items:

Screenshot of Keyboard Maestro's Smaller Conflict Palette

Now it shows the first unique letter to each macro: in this case it’s either J or R. So if I wanted to go to Tracey’s Room, I could press ⌥S then press T then press R.

However, if you look at the Keyboard Maestro Editor screenshot above, you can see that I have also assigned ⌥R and ⌥J to those rooms, so I can go to them directly by pressing those respective keys. You will note that I added [J] and [R] to the macro names to help me remember which keyboard shortcut to use to go directly to those rooms.

(It is not shown here, but I also assigned the hot key ⌥T to both of them, so if I press that it will bring up the second “Conflict Palette” showing just those two rooms.)

This intentional use of the “Conflict Palette” can come in very handy when using Keyboard Maestro to create these floating menu items which you can select with your keyboard.

It’s also a way to make the Home.app slightly less terrible.


Short URL for this post https://luo.ma/km-home-app