Are You There?

So I’ve got a new little guy sitting on top of my monitor.

Presence sensor.

(Click on any image to see a larger version.)

It is an ultrasonic distance sensor that I use as a presence sensor to tell the computer when I’m in front of it or not.

This is connected to a LeoStick to read the distance and notify the computer when the threshold changes from “present” to “away” or back.

LeoStick.

A shell script on my computer listens to the serial port on the LeoStick, so if music is playing when I walk away from my computer, it pauses the music player. When I return, it starts playing again. It will also wake the monitors from power saving mode when I return, too.

It was one of those little annoyances where I would walk three steps away from the desk, stop, then turn around and walk back to press the pause button.

The only issue is when the cat sits on my chair it is just on the distance threshold and you can hear the music chopping on and off from the other room.

I’m also starting to fiddle a bit more with some infrastructure for home automation, so I post presence change events to an MQTT server and a time series database, which will allow me to pull some interesting stats out while I’m at it.

I also stuck a switch on a little bracket under the desk to detect if it is at sitting or standing height, which I also post to MQTT and the database just for the heck of it.

Desk Switch.