A Fully Automated Home Office DND Solution

  • March 7, 2022

It was almost two years ago when I created a custom “Do Not Disturb” button for my home office that allowed me to tell my family that I’m in a meeting and please don’t casually pop in. I wrote a post about it, but the up shot is that I cobbled together some parts I had around, 3D printed a case, and wrote some code that so that the button, connected via USB to my computer, would act as a keyboard and fire a keyboard shortcut. That keyboard shortcut would then trigger a bash script that turned on a red light outside my door.

Whew!

Well…all of that is fully automated now. There is no button. The button is in all of us. We are all the button.

Let’s talk about this new automated system I made this weekend.

The old DND button.

Anyone who’s been reading my recent posts won’t be surprised with the foundational pieces of the new automated solution: Keyboard Maestro and my Stream Deck. My solution was heavily inspired by TJ Luoma’s setup described on GitHub two years ago, and my goals were to build off of his Stream Deck display to give myself the same glanceable info on my next meeting, simplify the setup, and add the hooks to automate turning my DND red light on and off automatically when my meetings start and end.

TJ’s solution is based on iCalBuddy (note), eight KM macros, and two external bash scripts, which he uses to setup his Stream Deck to show a button that always shows when the next meting is and changes color as your next meeting gets closer. My solution does that the same and uses iCalBuddy (TJ’s same iCalBuddy version), but no external scripts, and only two KM macros:

  1. A KM macro that runs every minute and updates a button of your choosing with when the next meeting starts.
  2. The other KM macro just opens Fantastical when you press the same configured button.

(Note: Because I’m sharing this macro logic across two computers with two Stream Decks I also have KM macros that set the button ID and then fire the #1 macro. I’m not including those macros here though as most people do not need that level of abstraction.)

This simplification is important as I have two Macs that I want this solution to be usable and synced between both of them. I also added the logic to integrate with my home automation system (Home Assistant) to turn my red DND light on or off. As a part of that logic, I also added a global variable that says to all KM macros whether or not I’m currently in a meeting and I think that could be really helpful to add to other macros in the future. For example, any automation that makes sounds or pops messages can now know that I’m in a meeting and avoid taking any actions that would disturb the meeting.

I haven’t had this solution in place for long, but I love it. It’s sounds crazy, but yes, even just having to hit a button is something that I would frequently forget and now the DND light turns on immediately when the meeting starts and off at the end.

There are edge cases that I may or may not deal with at some point. For example, automatically turning off the DND light at the end of a scheduled meeting time might prove to be annoying if meetings run over frequently. Another potential issue is that not all “meetings” need the DND light, such as a lunch or doctor’s appointment where I’m not in my office. I could deal with that by ensuring those are on a separate calendar that I don’t track with iCalBuddy, or by adding a flag in the title that my automations can look for and utilize. It may not be worth the trouble though.

The old button is now free to be disassembled for future projects. The DND button is dead. Love live the DND button!

Here is a link to an exported copy of the KM macro that includes all of the button display logic and below is a screenshot of the macro if you wanted to just get a sense of how it works.

Related Posts

Thoughts on Apple Bloggers and Vision Pro Coverage

I posted this on Mastodon, but I figured I would cross-post it here as well. I wonder if we’re headed for a weird place with the #Apple Blogosphere (AKA the Apple Blog Mafia). All of the main players are talking about Vision Pro all the time and saying things like “I lose track of time in here!

Read more

The Simple Pleasures of a Mobile Office Whiteboard

I’ve built a lot of stuff for my home office over the last few years of working from home, but my current favorite is something so simple: A custom rolling whiteboard A couple of weeks ago I gave myself a Saturday challenge to take my existing old whiteboard and build a rolling stand for it only with materials I had in my workshop.

Read more

I Made Myself a JARVIS Over the Weekend

With some spare parts, a USB speakerphone, and my Home Assistant server, I was able to make a competent JARVIS for my home office over the weekend…and the exciting part is that it’s only going to keep getting better! Last year was the “Year of Voice” for Home Assistant, the open source home automation platform, and the team accomplished a ton of work that enables Home Assistant users to make their own voice assistants.

Read more