Monday, December 22, 2025

Building A Better Digital Bat Signal - Part 1 - The Plan

The Problem

Some people find it difficult to unplug from their day job while on vacation. Not me. When we travel, I quickly transition from work being a primary focus to a distant memory.

This is usually a good thing, as travel is precious and I want to make the most of it. But this is problematic, because even when I'm away I want to support customers who depend on me.

The compromise that I've had in place for years is to tell my clients that if they find themselves with a critical emergency, drop me an e-mail with URGENT in the subject line. I then keep an eye on my inbox, and jump on these messages as quickly as possible. This lets me leave the rest of the messages in my inbox to pile up.

What's nagged at me, however, is that my system requires me to monitor my email. This is less than ideal for everyone. I'd like to be able to stop checking email altogether, and my customers would benefit from a system that is not susceptible to human error.

Essentially, I've set up a bat signal, now I need to write some code to alert me if it's lit up.

The Fun Solution

My first thought was to build some wearable tech, perhaps a pendant that would serve to announce the presence of an urgent message. The jewelry would be delightfully simple, signaling state by glowing in one of three colors. Green means all is good, yellow means that I've lost connection to the status-checking service and red means that I have an urgent issue.

While primitive, this color based UX would let me fully unplug, yet react quickly if there was a problem.

The tech to build such a device is inexpensive and readily available. What I'm after is little more than a bluetooth compatible micro controller, a grid of LEDs and some odds and ends to tie them together. This can be simplified even further, if I used a platform like the Circuit Playground Bluefruit, which has both Bluetooth and LEDs built in.

Oh my, would this be fun to build. And there are a number of tutorials on adafruit.com that seem like a great place to start. Ones that jumped out at me include: NeoPixel LED Heart Necklace, DotStar Fortune Necklace and the NeoPixel Ring Clock. All of these involve an LED based piece of jewelry powered by a microcontroller.

But alas, there are a number of demerits with a hardware based approach. In my mind's eye, the pendant is compact and smart-looking. Yet, the project will start its life as a series of raw components and a heap of wires. Turning this jumble of components into a compact and comfortable to wear piece of jewelry is non-trivial to say the least.

There's also the question of battery life: how big a battery do I need, and how can I camouflage it and make it comfortable to wear?

If I did manage to produce my magical pendant, would I be happy to have another piece of tech to bring on travel? That's more hardware to keep track of, charge and generally debug. Will it be worth the hassle?

And finally, the software to power the pendant is broken into three stages. First, there's code that runs on a server to determine the status of my inbox. That code will send a message to my phone. Next, my phone will process this message, and forward it to the pendant via Bluetooth. Finally, the pendant's microcontroller will convert the message from the phone into a glowing LED.

A far more practical phone based solution calls for precisely these first two steps. So, the smart play is to build a phone version of my bat-signal detector first, as I'll need to write this code anyway. In the future, I can opt to add hardware to display this status in a novel way.

So yeah, while it's incredibly tempting to take the hardware based approach, the ideal MVP should rely on the hardware I already own and carry everywhere: my phone.

The Tasker Solution

While a custom hardware solution is sexy, an Android Tasker based solution should be easy. My plan is this: on a Linux server, use the Gmail API to determine whether I have an unread message in my inbox with the word URGENT in the subject line. If so, then my inbox status is urgent, otherwise, I'll consider the status as ok.

Next, I'll send this status as a message to my phone using AutoRemote. AutoRemote is an amazing service that delivers messages to any phone from any system with a web request. In the case of a Linux server, this can be accomplished with a curl command.

On my phone, I'll use Tasker to react to the AutoRemote message. Specifically, I'll map the status message into a background image and then call SetWallpaper to make this new image my background.

In short, a customer will email me with an urgent message, and in short order my phone's background will change to something attention grabbing. That means I don't need to check my email, I just need to interact with my phone, which of course, I do throughout the day.

If all goes well, in less time than it would take to figure out what hardware I need to buy to build the wearable, the entire project can be completed.

Let's do it!

No comments:

Post a Comment