Ding dong!

Volume 5, Issue 24; 08 Sep 2021

“There’s Klingons on the starboard bow, starboard bow, starboard bow; There’s Klingons on the starboard bow, starboard bow, Jim!”

A couple of years ago, I wrote about some tinkering I did with home automation. I’m still really pleased with Home Assistant and we’ve started doing some automations in our new house as well.

Here, there was a very practical motivation. There are stairs between the bedroom and the bathroom. I managed to navigate them at night, in the black dark, for the better part of a year, but it wasn’t exactly what you’d call the safe option. Turning on the hall lights and blinding myself just to use the loo didn’t appeal to me either.

What I did was put Hue lights in the fixtures and a motion detector on the wall. Walk into the hallway at night and they come on, but only very faintly and only for five minutes. Neither blinding, nor a risk to life and limb on the dark stairs. (During the day, they come on fully bright and stay on a bit longer.)

Motion detector lights turn out to be really nice. We’ve since added a few more in other places.

This past weekend, I got my most ambitous bit of automation working.

The geometry of this house is a little complicated. We live on the upstairs mostly, but the entry door is downstairs. If there was ever a “wired” doorbell, it’s long since gone. So the only doorbell was one of those little radio ones that rings on a gadget plugged into an electrical outlet.

Perfectly fine if you’re downstairs, which we never are during the day. Kind of ok in the kitchen. But by the time you get down the hall to where our office and study are, it’s faint at best. Turn on some music, as I often do, and you’ll be utterly oblivious to the bell.

Previous attempts to resolve this by adding a second gadget plugged in upstairs were unsuccessful. I don’t know if the signal just didn’t make it through the stone walls, or if maybe it was just a cheap unit.

Rather than fuss with more of those, I wondered, couldn’t this be automated?

I got a Zigbee button and a little USB receiver for it that I plugged into the Home Assistant Raspberry Pi. That lets me run an automation when someone pushes the button.

The automation:

  1. Sends a text message to my phone and another to Bethan’s.
  2. Saves the current state of the Sonos system.
  3. Groups all the speakers in the house and plays a short clip of “Star Trekkin”.
  4. Restores the previous state of the Sonos system.

We got a few deliveries today and each time, I got a text message, the music I was listening to paused, all the speakers played “there’s Klingons on the starboard bow”, and the music went back to playing whilst I dashed down the stairs to the door.

That’s going to amuse me every time for a long time.