This is the blog, but if you want to know more about me and my projects, check out the Projects and About pages.

My Bat Phone Holiday Project

With three kids I don’t need a holiday break project to give me something to do like I used to, but I do still like to find something on my list and give it a time limit so I can use the time to accomplish something fun and improve some non-day job skills.

This year, I decided it was time to make myself a Bat Phone.

The Batphone

As those of you have have been in a Zoom meeting with me know, I have a shelf filled with things as my office backdrop and part of that shelf is dedicated to Batman.

The Shelf

On that shelf I have a rewired Bat Signal, Legos, and prop recreations from the Michael Keaton Batman era, the Christian Bale batman era, and the animated (Kevin Conroy) Batman ear, but the Adam West Batman era was sadly underrepresented. What if I made a replica Bat Phone that actually rang (aka flashed a red light), and when you picked it up Commissioner Gordon talked to you?! Yes x 1000. With that, the “working” Bat Phone became my Holiday Break project for 2021.

A little while ago I had purchased a cheap classic looking red analog phone off Amazon for this project, so I had that already, but with supply chain and shipping issues the rest was going to half to come from what I could find in my workshop. I found a Raspberry Pi for the brains, wire, resistors, a red led, a glowing button that sort of worked for a power button, and I was going to try to use a cheap little momentary switch to handle the receiver being hung up (more on that later). I briefly thought about how I could use the receiver with the phone cord that came with the phone, until I remembered I had a corporate gift from a few years back that was an “old” looking phone that you can plug in to your cellphone…and it just happened to be the perfect shade of red. Huge timesaver.

I grabbed a breadboard and quickly hacked together some sloppy Python to make a proof of concept.

Prototyping

I then took apart the phone, put the guts to the side and removed the dial in the front. To fill the hole where the dial was and where the red flashing light would need to be I had to model and 3D print a custom piece. Here’s an early version:

Printed Insert Test

Once I found a way to get everything mounted inside the phone I painted the insert (now on version #3) to match the phone.

Painting

I put the LED in place, resealed the phone, and thought I was done for a hot second until I realized that I didn’t like how it felt when you hung up the phone. The switch I was using was pushing back too much, which would release the button and the code would read accidental pick ups. What I needed was a switch that wouldn’t push back, but I didn’t have a switch like that. I took the receiver apart and added weight to it, and that helped a little but not enough. How did the analog phone handle that? They use a lever style switch that doesn’t push back at all. Could I find a way to cut that out of the old phone and somehow wire that to the Pi in a way that I could use the same Python libraries to talk to it? After an hour or so the answer was: Yes!

The Switch Switch

After taking the phone back apart and swapping out that switch, the receiver felt perfect and the project was done.

The Bat Phone now sits on the shelf behind me and rings by flashing it’s red light randomly throughout the day. If I catch it and pick it up, Commissioner Gordon talks to me, and…it’s awesome! (If you pick it up when it’s not ringing you get a dial tone, because of course you do and even Gotham City has quiet moments.)

I made a short demo YouTube video (volume up if you want to hear the sound from the phone, it’s pretty quiet) if you like that sort of thing, and if anyone is interested I have the code, STL files, and parts list (though you might not want to use exactly what I found and made work from my shop inventory) all documented in a GitHub repo. If you’re interested, ping me via email or Twitter (@thatmikeflynn) I can share the link.

Ringing On Shelf Whole Shelf

I Fell in Love with the Stream Deck

Image.jpeg

I shift gears a lot throughout the day both at work and at home between various projects as things pop up, and while I miss the days when I could just put headphones on and chip away at a single project all day, it’s just not an option for me in any of my roles (CTO, Dad, etc). Over the holiday break I discovered Stream Deck, which is a piece of hardware from Elgato that is targeted for live streamers, but it’s also for anyone that loves automation and I’m completely obsessed with it.

In 2020, in an effort to solve the “Is Dad on a Zoom call right now?” issue I created a Home Office DND Button with a spare Arduino board, an LED light bulb, a button, and a 3D printed case. I love making things like that about as much as I like automating and customizing my home office, so it was fun and solved a problem in a fun way. Since then I’ve been kicking around the idea of expanding on the idea by making a small panel of buttons that can do other functions such as activate the electronics built in to my office shelf, or run automations on my computer. While looking in to this idea further, I ran across Jason Snell’s “2021 Favorites: Hardware” post on Six Colors and saw his blurb on the Stream Deck.

I was absolutely a Stream Deck skeptic when I first heard about it. I have a keyboard, full of keys and modifiers! Why do I need _more keys_when I already have an impossible number of combinations ready to be assigned to macros, obscure commands, whatever.

But I’ve come around. The Stream Deck is transformative because it’s got a programmable LCD display under its keys, allowing you to program actions and visually represent them with an icon. And if you need more buttons, just add more pages, or set a page full of buttons to appear automatically in particular apps.

I’d heard about the Stream Deck before (it’s essentially a keyboard where each key is a little screen and you can use their software to set each key to do anything you’d like via their software, related software like Keyboard Maestro, or writing code) but until I was thinking about building a version of this while reading Jason’s glowing review, I didn’t put it together.

I bought one later that week and it’s been a game changer.

Here’s a sample of what I’ve configured my Stream Deck to do (so far):

  • My top row is all home automations for my office: turning on lights, activating my shelf, and turning on the DND light.
  • I have a button that toggles my VPN.
  • You can have buttons that trigger multiple functions in sequence, and I use that feature to for a button that powers down my office at the end of the day: turning off all lights, the shelf, and puts my computer to sleep.
  • I have a whole folder of buttons that automatically connect to different computers I have locally or remotely.
  • There is another folder of buttons that open apps, but also include extra functions such as positioning the window right where I want it, adjusting audio settings, etc.
  • I have a whole profile with Zoom settings (mute, toggle video, etc) that turn on automatically when Zoom is in use.
  • I have a sound board that plays sounds that make me laugh like this one.

I also have a long list of ideas I’d like to try and implement and this list doesn’t even include all the automation ideas I have for my work computer:

  • Opening our server status page on my office TV
  • Controlling Zoom
  • Buttons for each of my commonly used scripts.
  • So many more servers that need buttons for quick connections!
  • Setting up buttons to toggle VPNs or SSH tunnels.
  • A button to start my local development environment and open the code editor.
  • So many Slack automations…

Yes, you can do all of this with keyboard shortcuts (that you’d have to remember) or an app that sits on your computer desktop with buttons (that takes screen real estate), but there’s something about the Stream Deck that makes automations easier to remember, trigger, and is fun enough that is sparks new automation ideas in my brain.

If this appeals to you, I highly recommend taking a look at the Stream Deck even if you have no interest in live streaming. I’d also love to hear any great automation ideas you have. Hit me up on Twitter: @thatmikeflynn

Apple's App Store Policy Solution is Staring Them in the Face

Apple App Store Demo

Apple has a problem with their App Store. It’s potentially a big problem if it turns in to an official antitrust case, but at best it’s a problem with developer relations and looking like a bunch of greedy jerks. You may say that Apple has lots of problems, but this is problem I’m referring to: Payments on the App Store and the forced 30% cut of purchases.

There is been an ocean of ink (and podcast chatter) spilled over the last few weeks talking about this problem, but briefly, Apple forces everyone who has an app on the iOS App Store to use the Apple payment system, and part of that system is that Apple takes a 30% cut of your purchase [Note: It’s a bit more complex in that subscriptions can earn a drop in Apple’s cut, but generally, 30% is the requirement]. This isn’t illegal (yet) but developers are starting to get more than a little annoyed about the whole thing.

Apple has dug in on changing the price or bending the rules, so what can they do to fix this? Let’s put a pin in that question, and let me tell you about the latest Apple service that was rolled out and mandated in the App Store: Sign in with Apple

Sign in with Apple is…a way to sign in…with Apple. Meaning you can use your Apple ID to sign in to an app rather than making a new account or using other similar solutions from Facebook, Google, GitHub, etc. Apple has baked privacy forward features in to their login to make it attractive to Apple’s customers, and they required that Apple login be an option on all apps that use other login solutions (Facebook, Google, etc.). While a lot of eye-rolling occurred over yet another Apple mandate, it has been successful. Apple isn’t stopping developers from using the login they want, Apple is offering choice for users, and with their login’s feature set, they can appeal to users on the merits of their solution and get people logging in via Apple. Most importantly? No one is complaining about “Sign in with Apple”.

So just do that with iOS purchases.

If Apple just tweaked the requirement on iOS purchases to match the Apple login things could clear up pretty quickly. What would that look like? Well, the mandate would change to say that if you offer purchases in your app, one of the options must be Apple Pay and the other options are up to the developer. This means that Epic could have their own payment method for Fortnite, but it has to be right along side the Apple option. If users’ use the Apple payment option, and for only the Apple payment option, Apple gets their cut. Yes, some payments would drop off, but my hunch is it wouldn’t drop off much because Apple’s option would be faster, more focused on privacy, and would integrate better in to iOS so it would still be very appealing. Plus, smaller developers don’t have another option and won’t support multiple paths anyway so there would be no change for the vast majority of apps. If Epic can convince it’s users to go through it’s slower payment system and user’s understand the trade-offs then good for them. While Apple won’t be seeing 30% of that, I bet they see far less of the inside of a court room as well.

Yes, there’s a lot of details here. Apple could require that the price difference between the payment options has to be within some range (or non-existent). They might also want to mandate the initial buy screen so that the options are all clear, such as they require with the “Sign in with Apple” mandate. Regardless, this seems like the best way for Apple to trade some revenue for good will and not seem like they are walking back the rules they have been fighting to protect. The announcement on stage at a keynote could not be easier: “Today we are standardizing our iOS requirements in an easy to understand way and to give both developers and users greater flexibility in how they sign in and pay for products within the apps they love.” …swoopy slide action…wait for thunderous applause…then move on to those touch screen iMacs they’ve been working on.

DEFCON 28 Wrap Up

Devil Cold Caller

DEFCON, the world’s largest hacking convention and always one of the highlights of my year, was last weekend and, of course, remote. I missed being in Vegas with tens of thousands of hackers, but there were still some fantastic talks and conversations over Discord.

A quick “Top Five” highlights:

  1. If your password is eight characters or less, you essentially don’t have a password. With a small amount of money and a few hours, eight character passwords can be broken with a fair amount of ease. Your password should be at least 12 characters.

  2. That wifi security camera you bought off Amazon for $40 is completely insecure and shares your video, credentials, and even location, with other cameras unencrypted.

  3. Two-factor authentication is an important security measure for every account you have, but it can be beaten with a good phishing attempt. You can’t sleep on phishing just because of 2FA!

  4. The disinformation campaign to instill doubt in mail-in voting is real and huge. Researchers have seen preparations for “time and place” digital attacks since 2017 that can shut off internet or power to voting locations on election day…but then COVID-19 hit and those kinds of attacks don’t work if everyone voted by mail! Since the pandemic has started various nation states launched campaigns to poison the public’s belief in mail-in voting so they can get people back to the polls on election day and back in the target radius of their attacks.

  5. I passed my FCC radio Technician exam!

A Home Office DND Button

I’m extremely fortunate that I have a true home office at our house. It’s my favorite room in our whole place with an both an internal door and a door to to the back yard, and it affords me plenty of room to store my various projects and geeky collections. Of course, the most important aspect of my home office is that it’s a room where I can get some time work on…well…these days I work on work in there. Not exciting, but it is important.

This has made Pandemic Life pretty easy for me but, and of course I have a but, there is one problem that has come up. When I’m in my office, and the door is shut, it’s really hard to tell if I’m on an important Zoom meeting that shouldn’t be interrupted by a family member creeping in from the door behind me or not.

This is a problem that needed a solution.

A solution far more complicated and awesome than any of the following: knocking, a small white board, a post-it note, or a shared calendar. Those are fine solutions that any sane person would be proud of, but…I mean…honestly…no. No, we won’t be doing any of those.

Here’s what I came up with (click to see a short demo video):

Demo Video

The Problem

The core issue is that I want to be able to remotely trigger some kind of visual indicator that I am busy and can’t be disturbed at the moment. The additional problem is that there is no existing power source in the little area outside of my office door so unless I add a new plug to the wall I can’t hang a Raspberry Pi screen or a tablet to be a little billboard, also that kind of stuff wouldn’t have been as obvious.

The Solution

I replaced the one ceiling light bulb in the landing outside of my office door with an color LED bulb from Amazon. If the color is the standard incandescent yellow then all clear, but if the color is red, please hold. Yes, it makes the back of our house look like a hooker might take up residence there when I’m in a meeting, but it’s a fairly elegant solution that didn’t involve and moderate house surgery.

To control the bulb I have a multi layered solution that involves a complete software solution augmented by some hardware. The software part is really what’s doing all of the actual automation, but the hardware…that little glowing button…is the fun part, and does actually serve one real benefit in that it shows me when DND is on as it’s easy to forget. Also, clicky buttons are awesome.

Let’s start with the software.

The Software

We’re a Google Assistant household as that platform seemed to work the best and better fit how my family and I want to use various “smart home” features. That’s important context, because the automation path I settled on is through Google Assistant. It wasn’t my first or most likely path, but it’s where I ended up after starting with trying to find the API for that random Amazon bulb (Nope!), then looking in to Home Assistant (I already have this running in my home) but found their component for those bulbs has been broken for some time (Strike Two!). Then I realized that my Google Assistant devices could manipulate the bulb just fine. How do you “talk” to Google Assistant over a script? The answer is Assistant Relay. Check out their site for the details, but for my story, I got an Assistant Relay instance running via Docker on my home server, configured it and managed to send text commands to Google Assistant from my computer within 15-30 mins. I then wrote a very simple script that I can put on my primary computer to simplify the command to > dnd.sh on or > dnd.sh off.

Success! …and this could have been enough. Certainly typing the above commands in a terminal window I always have open anyway is trivial…but it’s not as fun as a button! Let’s make a button with some stuff I have lying around my workshop!

The Hardware

Final Button

I had a small Arduino board, the ItsyBitsy, laying around from a previous project so let’s start there. I also had one of these small clicky buttons with an LED in it, so let’s throw that in as well. Wiring the button with the LED was straight forward once the right resistors arrived from Amazon, and I soldered it down to a proto board I also had in my stash.

Button Wiring on Bread Board

I then flashed the board with this code tell tell the computer it is a keyboard and to toggle the LED while executing a set of keyboard commands to start the script.

Yes, I could have designed by own button housing, but that is a skill I haven’t yet mastered and I found this lovely little box design on Thingiverse and after scaling it up a bit, it fit my proto board perfectly. It’s bigger than it needs to be but it’s stable and looks fun on my desk. Once the print was complete, I used a stepper bit (these are great for drilling in to plastic) to create a hole in the lid and in the back for the USB cable to connect to the ItsyBitsy.

The Final Result

This was a fun little project that solved a problem in a way that makes everyone in the house happy. There are still some issues on the hardware side such as it firing a “DND OFF” command when the board first boots, but they are minor enough that I’ve chosen to ignore them for now.

The Parts List

Hardware:

Software:

mikeflynn @ GitHub thatmikeflynn @ Twitter