LED Notifier

Summary

An LED Notifier controlled via a Raspberry Pi Zero W, tucked away in a 3D printed case.

Purpose

I wanted a visual indicator, outside of my main computer monitor, to let me know when I had a Slack DM, Gmail chat message, or really any other arbitrary notification/event on my computer.


Raspberry Pi Zero W Headless

This project uses a Pi Zero W running in headless mode (i.e. no attached monitor or keyboard), a guide for which can be found here. The Raspberry Pi Imager tool used to install the Lite OS version was very easy to use:

Raspberry Pi Imager

Once SSH & WiFi had been configured, I was able to ping the Pi Zero on my local network:

pinging raspberry pi

I opted to solder on header pins, which makes testing, assembly, and any reuse of the Pi in the future a breeze:

raspberry pi soldered header pins

There is a small script, gpiotest, which can be used to test pin functionality after the soldering has been completed:

gpiotest

Code

Code used for this project can be found at: https://github.com/samiff/misc/tree/main/projects/led-notifier

The general code overview is:

  • The Raspberry Pi runs a Flask web server which serves a small API. systemd is used to automatically start and keep this server process running.
  • The API can dispatch Python code on the Pi to control the pins/LEDs.
  • Anything on my local network can hit the API; so far I’m using userscripts to monitor webpage DOM elements (I use Tampermonkey).
  • A simple web dashboard is exposed for manual controls and viewing event logs.

My goal was to keep things simple and learn some fun things along the way. I can easily modify/extend this setup – and not having to worry about digging into dense third-party APIs (e.g. Slack) is definitely a bonus.

Always test on a breadboard first!
web dashboard
service status

3D Print and Assembly

A straightforward snap-fit case is used to house the Pi Zero W, with screw-nuts slid in from the side for two of the standoff posts. This method should be familiar to anyone who has assembled a Prusa printer before and works really well.

The idea was always to have one LED for work events, and another LED for non-work events. This familiar logo used works perfectly 😉

Diffusing the LED light needed a bit of unexpected hacking (some foil glued to a card back), but a 3d-printed shroud for the clear triangle pieces would be best. The clear triangle pieces are simply glued into place.

A bit of mesh on the back/lid completes the look and provides some venting:

sectional analysis

I’ve had this hanging above my monitor for a few days now courtesy of some velcro stickers and think it turned out well. When not in use, I have a USB on/off toggle switch to cut the power.

Leave a Reply